aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2009-03-30 17:31:46 +0000
committerJoseph Myers <joseph@codesourcery.com>2009-03-30 17:31:46 +0000
commit821a687bb3bfa18eabfc9e717c5c9f480fd9647e (patch)
treea6e57b0336a8e766192d6b7b6f59bd62093e8234
parente0b05a75af586156d675d122abddbe0d527b0c16 (diff)
svn merge -r144476:145289 svn+ssh://gcc.gnu.org/svn/gcc/trunkc-4_5-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/c-4_5-branch@145306 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog49
-rw-r--r--MAINTAINERS11
-rw-r--r--Makefile.def12
-rw-r--r--Makefile.in388
-rw-r--r--boehm-gc/ChangeLog4
-rwxr-xr-xboehm-gc/configure14
-rwxr-xr-xconfigure31
-rw-r--r--configure.ac25
-rw-r--r--contrib/ChangeLog4
-rwxr-xr-xcontrib/check_warning_flags.sh5
-rw-r--r--fixincludes/ChangeLog37
-rw-r--r--fixincludes/fixincl.x185
-rw-r--r--fixincludes/inclhack.def68
-rw-r--r--fixincludes/mkheaders.in7
-rw-r--r--fixincludes/server.c2
-rw-r--r--fixincludes/tests/base/math.h11
-rw-r--r--fixincludes/tests/base/net/if.h14
-rw-r--r--fixincludes/tests/base/pthread.h5
-rw-r--r--fixincludes/tests/base/sys/wait.h8
-rw-r--r--gcc/BASE-VER2
-rw-r--r--gcc/ChangeLog1896
-rw-r--r--gcc/ChangeLog-200814
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in411
-rw-r--r--gcc/ada/ChangeLog41
-rw-r--r--gcc/ada/gcc-interface/Makefile.in2
-rw-r--r--gcc/ada/gcc-interface/decl.c31
-rw-r--r--gcc/ada/gcc-interface/trans.c2
-rw-r--r--gcc/ada/gcc-interface/utils.c2
-rw-r--r--gcc/bb-reorder.c12
-rw-r--r--gcc/bitmap.c53
-rw-r--r--gcc/bitmap.h1
-rw-r--r--gcc/builtins.c135
-rw-r--r--gcc/c-common.c171
-rw-r--r--gcc/c-common.def9
-rw-r--r--gcc/c-common.h31
-rw-r--r--gcc/c-convert.c4
-rw-r--r--gcc/c-decl.c2
-rw-r--r--gcc/c-gimplify.c146
-rw-r--r--gcc/c-objc-common.h4
-rw-r--r--gcc/c-omp.c21
-rw-r--r--gcc/c-opts.c25
-rw-r--r--gcc/c-parser.c18
-rw-r--r--gcc/c-ppoutput.c3
-rw-r--r--gcc/c-semantics.c21
-rw-r--r--gcc/c-tree.h4
-rw-r--r--gcc/c-typeck.c14
-rw-r--r--gcc/c.opt6
-rw-r--r--gcc/cfgexpand.c10
-rw-r--r--gcc/cfglayout.c4
-rw-r--r--gcc/cfgloop.h21
-rw-r--r--gcc/cgraph.c105
-rw-r--r--gcc/cgraph.h35
-rw-r--r--gcc/cgraphbuild.c28
-rw-r--r--gcc/cgraphunit.c24
-rw-r--r--gcc/cif-code.def86
-rw-r--r--gcc/combine.c155
-rw-r--r--gcc/common.opt4
-rw-r--r--gcc/config.gcc96
-rw-r--r--gcc/config.host11
-rw-r--r--gcc/config.in19
-rw-r--r--gcc/config/alpha/alpha.c12
-rw-r--r--gcc/config/alpha/driver-alpha.c100
-rw-r--r--gcc/config/alpha/linux.h16
-rw-r--r--gcc/config/alpha/x-alpha3
-rw-r--r--gcc/config/arm/arm.h2
-rw-r--r--gcc/config/arm/rtems-elf.h1
-rw-r--r--gcc/config/arm/t-arm-coff34
-rw-r--r--gcc/config/avr/avr-protos.h3
-rw-r--r--gcc/config/avr/avr.c62
-rw-r--r--gcc/config/avr/avr.h11
-rw-r--r--gcc/config/avr/t-avr3
-rw-r--r--gcc/config/bfin/bfin.c20
-rw-r--r--gcc/config/cris/cris.h5
-rw-r--r--gcc/config/cris/libgcc.ver7
-rw-r--r--gcc/config/cris/linux.h3
-rw-r--r--gcc/config/cris/t-linux1
-rw-r--r--gcc/config/fr30/fr30.opt5
-rw-r--r--gcc/config/h8300/coff.h51
-rw-r--r--gcc/config/i386/cygming.h4
-rw-r--r--gcc/config/i386/i386-aout.h25
-rw-r--r--gcc/config/i386/i386-coff.h69
-rw-r--r--gcc/config/i386/i386-protos.h6
-rw-r--r--gcc/config/i386/i386.c316
-rw-r--r--gcc/config/i386/i386.h88
-rw-r--r--gcc/config/i386/i386.md126
-rw-r--r--gcc/config/i386/i386.opt4
-rw-r--r--gcc/config/i386/mingw32.h2
-rw-r--r--gcc/config/i386/mmx.md64
-rw-r--r--gcc/config/i386/predicates.md28
-rw-r--r--gcc/config/i386/sse.md32
-rw-r--r--gcc/config/i386/sync.md28
-rw-r--r--gcc/config/i386/x-mingw322
-rw-r--r--gcc/config/ia64/ia64.c2
-rw-r--r--gcc/config/ia64/sync.md12
-rw-r--r--gcc/config/libgloss.h37
-rw-r--r--gcc/config/m32r/t-linux4
-rw-r--r--gcc/config/m68k/coff.h88
-rw-r--r--gcc/config/m68k/m68k-aout.h37
-rw-r--r--gcc/config/m68k/m68k.c25
-rw-r--r--gcc/config/m68k/t-rtems1
-rw-r--r--gcc/config/mcore/mcore.h3
-rw-r--r--gcc/config/mcore/mcore.opt13
-rw-r--r--gcc/config/mips/mips.c2
-rw-r--r--gcc/config/mips/t-iris3
-rw-r--r--gcc/config/pa/t-pa-hpux3
-rw-r--r--gcc/config/pdp11/2bsd.h65
-rw-r--r--gcc/config/pdp11/pdp11.c35
-rw-r--r--gcc/config/picochip/picochip.c28
-rw-r--r--gcc/config/picochip/picochip.h1
-rw-r--r--gcc/config/picochip/picochip.md11
-rw-r--r--gcc/config/rs6000/aix41.h101
-rw-r--r--gcc/config/rs6000/aix41.opt24
-rw-r--r--gcc/config/rs6000/linux64.h2
-rw-r--r--gcc/config/rs6000/rs6000-c.c14
-rw-r--r--gcc/config/rs6000/rs6000.c4
-rw-r--r--gcc/config/rs6000/rs6000.md2
-rw-r--r--gcc/config/rs6000/sysv4.h2
-rw-r--r--gcc/config/rs6000/sysv4.opt3
-rw-r--r--gcc/config/rs6000/t-newas37
-rw-r--r--gcc/config/rs6000/t-rtems2
-rw-r--r--gcc/config/sh/coff.h70
-rw-r--r--gcc/config/sh/sh.c4
-rw-r--r--gcc/config/sparc/sparc.c25
-rw-r--r--gcc/config/sparc/sparc.h4
-rw-r--r--gcc/config/sparc/sparc.md15
-rw-r--r--gcc/config/spu/divv2df3.c198
-rw-r--r--gcc/config/spu/spu.c23
-rw-r--r--gcc/config/spu/t-spu-elf7
-rw-r--r--gcc/config/t-svr43
-rw-r--r--gcc/config/t-vxworks3
-rwxr-xr-xgcc/configure216
-rw-r--r--gcc/configure.ac54
-rw-r--r--gcc/coverage.c2
-rw-r--r--gcc/cp/ChangeLog230
-rw-r--r--gcc/cp/class.c36
-rw-r--r--gcc/cp/cp-gimplify.c5
-rw-r--r--gcc/cp/cp-objcp-common.c23
-rw-r--r--gcc/cp/cp-objcp-common.h10
-rw-r--r--gcc/cp/cp-tree.h40
-rw-r--r--gcc/cp/decl.c100
-rw-r--r--gcc/cp/decl2.c25
-rw-r--r--gcc/cp/error.c38
-rw-r--r--gcc/cp/except.c1
-rw-r--r--gcc/cp/init.c114
-rw-r--r--gcc/cp/lex.c3
-rw-r--r--gcc/cp/mangle.c75
-rw-r--r--gcc/cp/method.c2
-rw-r--r--gcc/cp/name-lookup.c28
-rw-r--r--gcc/cp/operators.def2
-rw-r--r--gcc/cp/parser.c171
-rw-r--r--gcc/cp/pt.c153
-rw-r--r--gcc/cp/semantics.c95
-rw-r--r--gcc/cp/tree.c12
-rw-r--r--gcc/cp/typeck.c2
-rw-r--r--gcc/cp/typeck2.c16
-rw-r--r--gcc/crtstuff.c6
-rw-r--r--gcc/cse.c12
-rw-r--r--gcc/dbgcnt.def1
-rw-r--r--gcc/defaults.h5
-rw-r--r--gcc/df-scan.c6
-rw-r--r--gcc/df.h24
-rw-r--r--gcc/diagnostic.c7
-rw-r--r--gcc/diagnostic.h7
-rw-r--r--gcc/doc/c-tree.texi4
-rw-r--r--gcc/doc/extend.texi39
-rw-r--r--gcc/doc/install.texi34
-rw-r--r--gcc/doc/invoke.texi382
-rw-r--r--gcc/doc/md.texi5
-rw-r--r--gcc/doc/options.texi1
-rw-r--r--gcc/doc/tm.texi22
-rw-r--r--gcc/doc/trouble.texi96
-rw-r--r--gcc/dojump.c6
-rw-r--r--gcc/dse.c18
-rw-r--r--gcc/dwarf2out.c462
-rw-r--r--gcc/emit-rtl.c13
-rw-r--r--gcc/except.c567
-rw-r--r--gcc/except.h12
-rw-r--r--gcc/explow.c2
-rw-r--r--gcc/expr.c41
-rw-r--r--gcc/expr.h5
-rw-r--r--gcc/fix-header.c1314
-rwxr-xr-xgcc/fixproto340
-rw-r--r--gcc/flags.h9
-rw-r--r--gcc/fold-const.c127
-rw-r--r--gcc/fortran/ChangeLog168
-rw-r--r--gcc/fortran/arith.c285
-rw-r--r--gcc/fortran/cpp.c58
-rw-r--r--gcc/fortran/decl.c69
-rw-r--r--gcc/fortran/expr.c25
-rw-r--r--gcc/fortran/gfc-internals.texi5
-rw-r--r--gcc/fortran/gfortran.h24
-rw-r--r--gcc/fortran/invoke.texi62
-rw-r--r--gcc/fortran/lang.opt18
-rw-r--r--gcc/fortran/libgfortran.h11
-rw-r--r--gcc/fortran/module.c12
-rw-r--r--gcc/fortran/options.c54
-rw-r--r--gcc/fortran/parse.c34
-rw-r--r--gcc/fortran/resolve.c205
-rw-r--r--gcc/fortran/simplify.c1
-rw-r--r--gcc/fortran/st.c3
-rw-r--r--gcc/fortran/target-memory.c2
-rw-r--r--gcc/fortran/trans-array.c157
-rw-r--r--gcc/fortran/trans-const.c14
-rw-r--r--gcc/fortran/trans-const.h2
-rw-r--r--gcc/fortran/trans-decl.c23
-rw-r--r--gcc/fortran/trans-expr.c36
-rw-r--r--gcc/fortran/trans-intrinsic.c51
-rw-r--r--gcc/fortran/trans-io.c38
-rw-r--r--gcc/fortran/trans-stmt.c58
-rw-r--r--gcc/fortran/trans.c10
-rw-r--r--gcc/function.c38
-rw-r--r--gcc/function.h23
-rw-r--r--gcc/gcc.c8
-rw-r--r--gcc/gcse.c4
-rw-r--r--gcc/gen-protos.c191
-rw-r--r--gcc/genautomata.c159
-rw-r--r--gcc/genpreds.c6
-rw-r--r--gcc/gimplify.c137
-rw-r--r--gcc/ginclude/stdarg.h2
-rw-r--r--gcc/graphite.c37
-rw-r--r--gcc/ipa-inline.c72
-rw-r--r--gcc/ipa-pure-const.c895
-rw-r--r--gcc/ipa-struct-reorg.c2
-rw-r--r--gcc/ipa-type-escape.c4
-rw-r--r--gcc/ira-conflicts.c32
-rw-r--r--gcc/ira-int.h26
-rw-r--r--gcc/ira.c10
-rw-r--r--gcc/java/ChangeLog11
-rw-r--r--gcc/java/lang.opt4
-rw-r--r--gcc/jump.c45
-rw-r--r--gcc/lambda-code.c3
-rw-r--r--gcc/langhooks-def.h8
-rw-r--r--gcc/langhooks.c19
-rw-r--r--gcc/langhooks.h10
-rw-r--r--gcc/libgcc2.c14
-rw-r--r--gcc/loop-iv.c4
-rw-r--r--gcc/matrix-reorg.c12
-rw-r--r--gcc/objc/ChangeLog10
-rw-r--r--gcc/objc/objc-act.c4
-rw-r--r--gcc/omp-low.c12
-rw-r--r--gcc/optabs.c18
-rw-r--r--gcc/optc-gen.awk17
-rw-r--r--gcc/opts.c53
-rw-r--r--gcc/passes.c37
-rw-r--r--gcc/po/ChangeLog13
-rw-r--r--gcc/po/EXCLUDES5
-rw-r--r--gcc/po/es.po2750
-rw-r--r--gcc/po/gcc.pot9502
-rw-r--r--gcc/protoize.c4535
-rw-r--r--gcc/recog.c10
-rw-r--r--gcc/reginfo.c2
-rw-r--r--gcc/regmove.c163
-rw-r--r--gcc/reload.h26
-rw-r--r--gcc/reload1.c34
-rw-r--r--gcc/rtl.def6
-rw-r--r--gcc/rtl.h18
-rw-r--r--gcc/rtlanal.c26
-rw-r--r--gcc/scan-decls.c250
-rwxr-xr-xgcc/scan-types.sh142
-rw-r--r--gcc/scan.c241
-rw-r--r--gcc/scan.h75
-rwxr-xr-xgcc/sort-protos9
-rw-r--r--gcc/sys-protos.h1353
-rw-r--r--gcc/sys-types.h240
-rw-r--r--gcc/testsuite/ChangeLog753
-rw-r--r--gcc/testsuite/g++.dg/compat/struct-layout-1.exp15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto12.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto6.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist5.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C19
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/imported-decl-1.C17
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/imported-module-2.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/imported-module-3.C17
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/imported-module-4.C21
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/static-local-var-in-ctor.C37
-rw-r--r--gcc/testsuite/g++.dg/dg.exp1
-rw-r--r--gcc/testsuite/g++.dg/ext/unary_trait_incomplete.C76
-rw-r--r--gcc/testsuite/g++.dg/ext/vla6.C18
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr39495-1.C95
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr39495-2.C39
-rw-r--r--gcc/testsuite/g++.dg/graphite/graphite.exp48
-rw-r--r--gcc/testsuite/g++.dg/graphite/pr39447.C34
-rw-r--r--gcc/testsuite/g++.dg/inherit/thunk10.C60
-rw-r--r--gcc/testsuite/g++.dg/init/error2.C15
-rw-r--r--gcc/testsuite/g++.dg/opt/new1.C71
-rw-r--r--gcc/testsuite/g++.dg/opt/nrv15.C97
-rw-r--r--gcc/testsuite/g++.dg/opt/switch2.C2
-rw-r--r--gcc/testsuite/g++.dg/other/error32.C8
-rw-r--r--gcc/testsuite/g++.dg/other/new1.C2
-rw-r--r--gcc/testsuite/g++.dg/other/pr39060.C19
-rw-r--r--gcc/testsuite/g++.dg/other/pr39496.C35
-rw-r--r--gcc/testsuite/g++.dg/other/switch3.C25
-rw-r--r--gcc/testsuite/g++.dg/other/var_copy-1.C14
-rw-r--r--gcc/testsuite/g++.dg/parse/crash40.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/ctor9.C7
-rw-r--r--gcc/testsuite/g++.dg/parse/defarg12.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/defarg14.C6
-rw-r--r--gcc/testsuite/g++.dg/template/dependent-name5.C45
-rw-r--r--gcc/testsuite/g++.dg/template/error15.C2
-rw-r--r--gcc/testsuite/g++.dg/template/koenig7.C11
-rw-r--r--gcc/testsuite/g++.dg/template/pr39425.C18
-rw-r--r--gcc/testsuite/g++.dg/template/spec33.C2
-rw-r--r--gcc/testsuite/g++.dg/template/typename17.C10
-rw-r--r--gcc/testsuite/g++.dg/template/typename18.C14
-rw-r--r--gcc/testsuite/g++.dg/torture/pr39362.C105
-rw-r--r--gcc/testsuite/g++.dg/torture/predcom-1.C29
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/copyprop.C739
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C52
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/fwprop-align.C20
-rw-r--r--gcc/testsuite/g++.dg/warn/Warray-bounds.C24
-rw-r--r--gcc/testsuite/g++.dg/warn/Wdisallowed-functions-1.C7
-rw-r--r--gcc/testsuite/g++.dg/warn/Wdisallowed-functions-2.C12
-rw-r--r--gcc/testsuite/g++.dg/warn/Wshadow-4.C20
-rw-r--r--gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C19
-rw-r--r--gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-3.C35
-rw-r--r--gcc/testsuite/g++.dg/warn/Wswitch-1.C6
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuninitialized-3.C17
-rw-r--r--gcc/testsuite/g++.dg/warn/pr35652.C30
-rw-r--r--gcc/testsuite/g++.dg/warn/switch1.C15
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ext/attrib5.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/thunk2.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/thunk3.C2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20090114-1.c44
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20090303-1.c20
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20090303-2.c20
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20090328-1.c17
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/981006-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr16566-2.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr32139.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr39360.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr39394.c28
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20090113-1.c61
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20090113-2.c160
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20090113-3.c138
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20090207-1.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/inf-2.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/inf-3.c79
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr35456.x3
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr39120.c18
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr39339.c81
-rw-r--r--gcc/testsuite/gcc.dg/Warray-bounds.c24
-rw-r--r--gcc/testsuite/gcc.dg/asm-b.c4
-rw-r--r--gcc/testsuite/gcc.dg/attr-noinline.c20
-rw-r--r--gcc/testsuite/gcc.dg/autopar/pr39500-1.c28
-rw-r--r--gcc/testsuite/gcc.dg/autopar/pr39500-2.c20
-rw-r--r--gcc/testsuite/gcc.dg/builtin-redefine.c6
-rw-r--r--gcc/testsuite/gcc.dg/c90-const-expr-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/c90-const-expr-6.c6
-rw-r--r--gcc/testsuite/gcc.dg/c99-const-expr-6.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-layout-1.exp17
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-layout-1_main.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/Wvariadic-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/cpp/Wvariadic-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/cpp/redef2.c10
-rw-r--r--gcc/testsuite/gcc.dg/cpp/redef3.c6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/redef2.c18
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c18
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c30
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/static1.c8
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr39412.c16
-rw-r--r--gcc/testsuite/gcc.dg/fltconst-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/format/plus-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr39495-1.c95
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr39495-2.c39
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr39335.c20
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr39335_1.c9
-rw-r--r--gcc/testsuite/gcc.dg/inline-33.c21
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-5.c3
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipacost-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/memmove-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/memmove-3.c16
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/920507-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr11492.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr27898.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr33826.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr35652.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr39323-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr39323-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr39323-3.c7
-rw-r--r--gcc/testsuite/gcc.dg/pr39343.c29
-rw-r--r--gcc/testsuite/gcc.dg/pr39443.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr39455.c13
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-explog-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/pta-callused-1.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c19
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-24.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-11.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-21.c26
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-22.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-7.c15
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76c.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr32230.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr39529.c21
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-widen-mult-s16.c10
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-widen-mult-u8.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-35.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-82.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-83.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-complex-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-iv-6.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-multitypes-16.c8
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-multitypes-17.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c11
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c11
-rw-r--r--gcc/testsuite/gcc.dg/wdisallowed-functions-1.c7
-rw-r--r--gcc/testsuite/gcc.dg/wdisallowed-functions-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/winline-10.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39315-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39315-2.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39315-3.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39315-4.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39315-check.c22
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39431.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39445.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39482.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39496.c35
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39545-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39545-2.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/push-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/stackalign/longlong-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/stackalign/longlong-2.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/stackalign/return-4.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/stackalign/return-5.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/stackalign/return-6.c2
-rw-r--r--gcc/testsuite/gcc.target/ia64/20090324-1.c21
-rw-r--r--gcc/testsuite/gcc.target/ia64/sync-1.c23
-rw-r--r--gcc/testsuite/gcc.target/powerpc/altivec-28.c16
-rw-r--r--gcc/testsuite/gcc.target/s390/20090223-1.c60
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c27
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2b.c13
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c17
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2b.c24
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect.c2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c24
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4b.c31
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c17
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5b.c37
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c39
-rw-r--r--gcc/testsuite/gfortran.dg/abstract_type_5.f0345
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_assign_9.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_11.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_18.f902
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_22.f902
-rw-r--r--gcc/testsuite/gfortran.dg/char_result_13.f9049
-rw-r--r--gcc/testsuite/gfortran.dg/do_1.f906
-rw-r--r--gcc/testsuite/gfortran.dg/do_3.F9028
-rw-r--r--gcc/testsuite/gfortran.dg/do_4.f9
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_1.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_2.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_3.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_4.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_5.f9032
-rw-r--r--gcc/testsuite/gfortran.dg/fmt_f0_1.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr39354.f9037
-rw-r--r--gcc/testsuite/gfortran.dg/goto_2.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/goto_4.f905
-rw-r--r--gcc/testsuite/gfortran.dg/goto_5.f9044
-rw-r--r--gcc/testsuite/gfortran.dg/power1.f9058
-rw-r--r--gcc/testsuite/gfortran.dg/pr39516.f20
-rw-r--r--gcc/testsuite/gfortran.dg/read_repeat.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/recursive_check_7.f9040
-rw-r--r--gcc/testsuite/gfortran.dg/trim_1.f9041
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_10.f0343
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_11.f0333
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_4.f034
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_9.f0333
-rw-r--r--gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/vect/pr39318.f9021
-rw-r--r--gcc/testsuite/gnat.dg/pack12.adb31
-rw-r--r--gcc/testsuite/gnat.dg/slice_enum.adb8
-rw-r--r--gcc/testsuite/lib/compat.exp2
-rw-r--r--gcc/testsuite/lib/gcc-defs.exp5
-rw-r--r--gcc/testsuite/lib/target-libpath.exp37
-rw-r--r--gcc/testsuite/lib/target-supports.exp3
-rw-r--r--gcc/testsuite/objc.dg/conditional-1.m45
-rw-r--r--gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp16
-rw-r--r--gcc/testsuite/objc/execute/exceptions/handler-1.m38
-rw-r--r--gcc/testsuite/objc/execute/trivial.m7
-rw-r--r--gcc/tree-cfg.c18
-rw-r--r--gcc/tree-data-ref.c7
-rw-r--r--gcc/tree-data-ref.h24
-rw-r--r--gcc/tree-dfa.c12
-rw-r--r--gcc/tree-eh.c345
-rw-r--r--gcc/tree-flow.h6
-rw-r--r--gcc/tree-inline.c204
-rw-r--r--gcc/tree-nrv.c27
-rw-r--r--gcc/tree-optimize.c23
-rw-r--r--gcc/tree-parloops.c35
-rw-r--r--gcc/tree-pass.h5
-rw-r--r--gcc/tree-predcom.c2
-rw-r--r--gcc/tree-scalar-evolution.c119
-rw-r--r--gcc/tree-scalar-evolution.h2
-rw-r--r--gcc/tree-sra.c16
-rw-r--r--gcc/tree-ssa-ccp.c171
-rw-r--r--gcc/tree-ssa-copy.c5
-rw-r--r--gcc/tree-ssa-forwprop.c64
-rw-r--r--gcc/tree-ssa-ifcombine.c74
-rw-r--r--gcc/tree-ssa-live.c16
-rw-r--r--gcc/tree-ssa-loop-ivopts.c24
-rw-r--r--gcc/tree-ssa-loop-manip.c2
-rw-r--r--gcc/tree-ssa-loop-niter.c40
-rw-r--r--gcc/tree-ssa-loop-prefetch.c3
-rw-r--r--gcc/tree-ssa-pre.c109
-rw-r--r--gcc/tree-ssa-sccvn.c25
-rw-r--r--gcc/tree-ssa-structalias.c224
-rw-r--r--gcc/tree-ssa.c20
-rw-r--r--gcc/tree-vect-analyze.c4711
-rw-r--r--gcc/tree-vect-data-refs.c3355
-rw-r--r--gcc/tree-vect-loop-manip.c2363
-rw-r--r--gcc/tree-vect-loop.c3587
-rw-r--r--gcc/tree-vect-patterns.c4
-rw-r--r--gcc/tree-vect-slp.c1694
-rw-r--r--gcc/tree-vect-stmts.c4928
-rw-r--r--gcc/tree-vect-transform.c8517
-rw-r--r--gcc/tree-vectorizer.c2738
-rw-r--r--gcc/tree-vectorizer.h187
-rw-r--r--gcc/tree-vrp.c8
-rw-r--r--gcc/tree.c50
-rw-r--r--gcc/tree.def12
-rw-r--r--gcc/tree.h25
-rw-r--r--gcc/tsystem.h6
-rw-r--r--gcc/varasm.c2
-rw-r--r--gcc/varpool.c23
-rw-r--r--include/ChangeLog5
-rw-r--r--include/demangle.h6
-rw-r--r--libcpp/ChangeLog38
-rw-r--r--libcpp/Makefile.in19
-rw-r--r--libcpp/directives.c9
-rw-r--r--libcpp/errors.c170
-rw-r--r--libcpp/include/cpplib.h69
-rw-r--r--libcpp/include/line-map.h8
-rw-r--r--libcpp/init.c13
-rw-r--r--libcpp/internal.h7
-rw-r--r--libcpp/line-map.c41
-rw-r--r--libcpp/macro.c12
-rw-r--r--libcpp/makedepend.c206
-rw-r--r--libcpp/po/ChangeLog8
-rw-r--r--libcpp/po/cpplib.pot33
-rw-r--r--libcpp/po/es.po32
-rw-r--r--libdecnumber/ChangeLog9
-rw-r--r--libdecnumber/decBasic.c911
-rw-r--r--libdecnumber/decCommon.c431
-rw-r--r--libdecnumber/decContext.c83
-rw-r--r--libdecnumber/decContext.h82
-rw-r--r--libdecnumber/decDPD.h45
-rw-r--r--libdecnumber/decDouble.c174
-rw-r--r--libdecnumber/decDouble.h25
-rw-r--r--libdecnumber/decNumber.c866
-rw-r--r--libdecnumber/decNumber.h6
-rw-r--r--libdecnumber/decNumberLocal.h241
-rw-r--r--libdecnumber/decPacked.c24
-rw-r--r--libdecnumber/decPacked.h14
-rw-r--r--libdecnumber/decQuad.c170
-rw-r--r--libdecnumber/decQuad.h49
-rw-r--r--libdecnumber/decSingle.c53
-rw-r--r--libdecnumber/decSingle.h20
-rw-r--r--libdecnumber/dpd/decimal128.c119
-rw-r--r--libdecnumber/dpd/decimal128.h16
-rw-r--r--libdecnumber/dpd/decimal32.c83
-rw-r--r--libdecnumber/dpd/decimal32.h14
-rw-r--r--libdecnumber/dpd/decimal64.c133
-rw-r--r--libdecnumber/dpd/decimal64.h14
-rw-r--r--libffi/ChangeLog4
-rwxr-xr-xlibffi/configure8
-rw-r--r--libgcc/ChangeLog7
-rw-r--r--libgcc/config.host22
-rw-r--r--[-rwxr-xr-x]libgcc/config/i386/t-cygming0
-rw-r--r--libgfortran/ChangeLog30
-rwxr-xr-xlibgfortran/configure14
-rw-r--r--libgfortran/intrinsics/c99_functions.c24
-rw-r--r--libgfortran/intrinsics/string_intrinsics.c1
-rw-r--r--libgfortran/intrinsics/string_intrinsics_inc.c60
-rw-r--r--libgfortran/io/list_read.c8
-rw-r--r--libgfortran/io/write_float.def2
-rw-r--r--libgomp/ChangeLog20
-rwxr-xr-xlibgomp/configure14
-rw-r--r--libgomp/testsuite/libgomp.c++/for-8.C291
-rw-r--r--libgomp/testsuite/libgomp.c++/loop-11.C276
-rw-r--r--libgomp/testsuite/libgomp.c++/loop-12.C387
-rw-r--r--libgomp/testsuite/libgomp.c/atomic-5.c11
-rw-r--r--libgomp/testsuite/libgomp.c/atomic-6.c11
-rw-r--r--libgomp/testsuite/libgomp.c/loop-11.c276
-rw-r--r--libgomp/testsuite/libgomp.c/loop-12.c387
-rw-r--r--libiberty/ChangeLog30
-rw-r--r--libiberty/Makefile.in14
-rw-r--r--libiberty/config.in3
-rwxr-xr-xlibiberty/configure4
-rw-r--r--libiberty/configure.ac3
-rw-r--r--libiberty/cp-demangle.c95
-rw-r--r--libiberty/functions.texi13
-rw-r--r--libiberty/memmem.c70
-rw-r--r--libiberty/testsuite/demangle-expected22
-rw-r--r--libjava/ChangeLog30
-rw-r--r--libjava/Makefile.am7
-rw-r--r--libjava/Makefile.in8
-rw-r--r--libjava/classpath/ChangeLog4
-rw-r--r--libjava/classpath/ChangeLog.gcj5
-rwxr-xr-xlibjava/classpath/configure122
-rw-r--r--libjava/classpath/configure.ac5
-rwxr-xr-xlibjava/configure40
-rw-r--r--libjava/configure.ac18
-rw-r--r--libjava/gcj/Makefile.in1
-rw-r--r--libjava/include/Makefile.in1
-rw-r--r--libjava/java/lang/natClassLoader.cc9
-rw-r--r--libjava/link.cc2
-rw-r--r--libjava/testsuite/Makefile.in1
-rw-r--r--libmudflap/ChangeLog4
-rwxr-xr-xlibmudflap/configure8
-rw-r--r--libobjc/ChangeLog15
-rwxr-xr-xlibobjc/configure8
-rw-r--r--libobjc/exception.c11
-rw-r--r--libobjc/libobjc.def3
-rw-r--r--libobjc/objc/objc-api.h12
-rw-r--r--libssp/ChangeLog4
-rwxr-xr-xlibssp/configure8
-rw-r--r--libstdc++-v3/ChangeLog164
-rwxr-xr-xlibstdc++-v3/configure14
-rw-r--r--libstdc++-v3/doc/html/api.html4
-rw-r--r--libstdc++-v3/doc/html/bk02.html2
-rw-r--r--libstdc++-v3/doc/html/bk03.html2
-rw-r--r--libstdc++-v3/doc/html/faq.html9
-rw-r--r--libstdc++-v3/doc/html/manual/abi.html22
-rw-r--r--libstdc++-v3/doc/html/manual/algorithms.html2
-rw-r--r--libstdc++-v3/doc/html/manual/api.html6
-rw-r--r--libstdc++-v3/doc/html/manual/appendix_contributing.html2
-rw-r--r--libstdc++-v3/doc/html/manual/appendix_free.html2
-rw-r--r--libstdc++-v3/doc/html/manual/appendix_porting.html2
-rw-r--r--libstdc++-v3/doc/html/manual/auto_ptr.html2
-rw-r--r--libstdc++-v3/doc/html/manual/backwards.html50
-rw-r--r--libstdc++-v3/doc/html/manual/bitmap_allocator.html4
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apas02.html9
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apas03.html5
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apas04.html118
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apas05.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apd.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apds02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01apds03.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01ape.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch01.html6
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch01s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch01s03.html25
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch02s03.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html14
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch03s03.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch03s04.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch03s05.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt01ch03s06.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02ch04.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02ch05.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02ch06.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02ch06s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt02pr01.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt03ch07.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt03ch07s03.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt03ch08.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt04ch09.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt04ch10.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt04ch11.html22
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt04ch12.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt05ch13.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt06ch14.html16
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt06ch15.html16
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt07ch16.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt07ch16s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt07ch17.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt07ch17s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt07ch18.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt08ch19.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt09ch20.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt09pr02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt10ch21.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt10ch22.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt10ch23.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch24.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch25.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch26.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch27.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch28.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch29.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html6
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html4
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch32.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch33.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch33s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch33s03.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch34.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch35.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch36.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch37.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch38.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch39.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch40s02.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12ch40s03.html2
-rw-r--r--libstdc++-v3/doc/html/manual/bk01pt12pr03.html2
-rw-r--r--libstdc++-v3/doc/html/manual/codecvt.html22
-rw-r--r--libstdc++-v3/doc/html/manual/concurrency.html2
-rw-r--r--libstdc++-v3/doc/html/manual/configure.html24
-rw-r--r--libstdc++-v3/doc/html/manual/containers.html2
-rw-r--r--libstdc++-v3/doc/html/manual/debug.html2
-rw-r--r--libstdc++-v3/doc/html/manual/debug_mode.html2
-rw-r--r--libstdc++-v3/doc/html/manual/diagnostics.html2
-rw-r--r--libstdc++-v3/doc/html/manual/extensions.html2
-rw-r--r--libstdc++-v3/doc/html/manual/internals.html2
-rw-r--r--libstdc++-v3/doc/html/manual/intro.html2
-rw-r--r--libstdc++-v3/doc/html/manual/io.html2
-rw-r--r--libstdc++-v3/doc/html/manual/iterators.html2
-rw-r--r--libstdc++-v3/doc/html/manual/localization.html2
-rw-r--r--libstdc++-v3/doc/html/manual/messages.html20
-rw-r--r--libstdc++-v3/doc/html/manual/numerics.html2
-rw-r--r--libstdc++-v3/doc/html/manual/parallel_mode.html6
-rw-r--r--libstdc++-v3/doc/html/manual/shared_ptr.html24
-rw-r--r--libstdc++-v3/doc/html/manual/spine.html6
-rw-r--r--libstdc++-v3/doc/html/manual/strings.html2
-rw-r--r--libstdc++-v3/doc/html/manual/support.html2
-rw-r--r--libstdc++-v3/doc/html/manual/test.html2
-rw-r--r--libstdc++-v3/doc/html/manual/using.html2
-rw-r--r--libstdc++-v3/doc/html/manual/utilities.html2
-rw-r--r--libstdc++-v3/doc/html/spine.html4
-rw-r--r--libstdc++-v3/doc/xml/faq.xml9
-rw-r--r--libstdc++-v3/doc/xml/manual/appendix_contributing.xml256
-rw-r--r--libstdc++-v3/doc/xml/manual/using.xml331
-rw-r--r--libstdc++-v3/include/backward/hashtable.h14
-rw-r--r--libstdc++-v3/include/bits/basic_string.h4
-rw-r--r--libstdc++-v3/include/bits/forward_list.h89
-rw-r--r--libstdc++-v3/include/bits/forward_list.tcc52
-rw-r--r--libstdc++-v3/include/bits/shared_ptr.h5
-rw-r--r--libstdc++-v3/include/ext/vstring.h4
-rw-r--r--libstdc++-v3/include/std/complex8
-rw-r--r--libstdc++-v3/include/std/fstream221
-rw-r--r--libstdc++-v3/include/std/iostream2
-rw-r--r--libstdc++-v3/include/std/type_traits4
-rw-r--r--libstdc++-v3/include/tr1/shared_ptr.h5
-rw-r--r--libstdc++-v3/testsuite/18_support/pthread_guard.cc (renamed from libstdc++-v3/testsuite/thread/guard.cc)0
-rw-r--r--libstdc++-v3/testsuite/20_util/shared_ptr/cons/39405.cc31
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc10
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc10
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/pthread18185.cc (renamed from libstdc++-v3/testsuite/thread/18185.cc)0
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/pthread4.cc (renamed from libstdc++-v3/testsuite/thread/pthread4.cc)0
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/pthread1.cc (renamed from libstdc++-v3/testsuite/thread/pthread1.cc)0
-rw-r--r--libstdc++-v3/testsuite/23_containers/list/pthread5.cc (renamed from libstdc++-v3/testsuite/thread/pthread5.cc)0
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/pthread6.cc (renamed from libstdc++-v3/testsuite/thread/pthread6.cc)0
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc10
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc8
-rw-r--r--libstdc++-v3/testsuite/26_numerics/complex/dr387_2.cc31
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/5.cc31
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_fstream/cons/1.cc (renamed from libstdc++-v3/testsuite/27_io/basic_fstream/cons/3.cc)0
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_fstream/cons/char/1.cc28
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_fstream/open/char/1.cc32
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/2.cc28
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/2.cc32
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/1.cc51
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc35
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/2.cc32
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ofstream/pthread2.cc (renamed from libstdc++-v3/testsuite/thread/pthread2.cc)0
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc10
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc10
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc8
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc10
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostringstream/pthread3.cc (renamed from libstdc++-v3/testsuite/thread/pthread3.cc)0
-rw-r--r--libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc2
-rw-r--r--libstdc++-v3/testsuite/30_threads/condition_variable_any/native_handle/typesizes.cc2
-rw-r--r--libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc2
-rw-r--r--libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc2
-rw-r--r--libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc2
-rw-r--r--libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc (renamed from libstdc++-v3/testsuite/thread/pthread7-rope.cc)0
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc10
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc10
-rw-r--r--libstdc++-v3/testsuite/libstdc++-dg/conformance.exp6
-rw-r--r--libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/39405.cc30
-rw-r--r--libtool.m412
-rw-r--r--maintainer-scripts/ChangeLog9
-rw-r--r--maintainer-scripts/crontab6
-rw-r--r--zlib/ChangeLog.gcj4
-rwxr-xr-xzlib/configure8
800 files changed, 43517 insertions, 39714 deletions
diff --git a/ChangeLog b/ChangeLog
index 791584605c4..e8fe7ad02e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,52 @@
+2009-03-25 Erven Rohou <erven.rohou@inria.fr>
+
+ * MAINTAINERS: Update my email address.
+
+2009-03-18 Tom Tromey <tromey@redhat.com>
+
+ * configure: Rebuild.
+ * configure.ac (host_libs): Add libiconv.
+ * Makefile.in: Rebuild.
+ * Makefile.def (host_modules): Add libiconv.
+ (configure-gdb, all-gdb): Depend on libiconv.
+
+2009-03-16 Tristan Gingold <gingold@adacore.com>
+
+ * configure.ac: Treat gdb as supported on x86_64-darwin.
+ * configure: Regenerate.
+
+2009-03-16 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.ac (--with-host-libstdcxx): New option.
+ * configure: Regenerate.
+
+2009-03-12 Joern Rennecke <joern.rennecke@arc.com>
+
+ * MAINTAINERS: Move myself into the write after approval list.
+
+2009-03-11 Nicola Pero <nicola.pero@meta-innovation.com>
+
+ * MAINTAINERS: Update e-mail address.
+
+2009-03-11 Dorit Nuzman <dorit@il.ibm.com>
+
+ * MAINTAINERS: Remove myself as auto-vectorizer maintainer.
+
+2009-03-10 Ira Rosen <irar@il.ibm.com>
+
+ * MAINTAINERS: Add myself as auto-vectorizer maintainer.
+
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Backport from git Libtool:
+
+ 2009-01-19 Robert Millan <rmh@aybabtu.com>
+ Support GNU/kOpenSolaris.
+ * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
+ (_LT_CHECK_MAGIC_METHOD, _LT_COMPILER_PIC, _LT_LINKER_SHLIBS)
+ (_LT_LANG_CXX_CONFIG) [kopensolaris*-gnu]: Recognize
+ GNU/kOpenSolaris.
+
2009-02-27 Andreas Schwab <schwab@linux-m68k.org>
* MAINTAINERS: Update e-mail address.
diff --git a/MAINTAINERS b/MAINTAINERS
index 4592f1711f2..85bd8c2eeef 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -151,7 +151,7 @@ libgomp Jakub Jelinek jakub@redhat.com
libiberty DJ Delorie dj@redhat.com
libiberty Ian Lance Taylor ian@airs.com
libffi testsuite Andreas Tobler andreast@gcc.gnu.org
-libobjc Nicola Pero n.pero@mi.flashnet.it
+libobjc Nicola Pero nicola.pero@meta-innovation.com
libobjc Andrew Pinski pinskia@gmail.com
loop discovery Michael Hayes m.hayes@elec.canterbury.ac.nz
soft-fp Joseph Myers jsm@polyomino.org.uk
@@ -221,7 +221,7 @@ dfp.c, related Ben Elliston bje@au.ibm.com
RTL optimizers Eric Botcazou ebotcazou@libertysurf.fr
auto-vectorizer Richard Guenther rguenther@suse.de
auto-vectorizer Zdenek Dvorak ook@ucw.cz
-auto-vectorizer Dorit Nuzman dorit@il.ibm.com
+auto-vectorizer Ira Rosen irar@il.ibm.com
loop infrastructure Zdenek Dvorak ook@ucw.cz
OpenMP Jakub Jelinek jakub@redhat.com
@@ -420,10 +420,11 @@ Dwarakanath Rajagopal dwarak.rajagopal@amd.com
Ramana Radhakrishnan ramana.r@gmail.com
Rolf Rasmussen rolfwr@gcc.gnu.org
Volker Reichelt v.reichelt@netcologne.de
+Joern Rennecke joern.rennecke@arc.com
Bernhard Reutner-Fischer rep.dot.nop@gmail.com
Tom Rix trix@redhat.com
Craig Rodrigues rodrigc@gcc.gnu.org
-Erven Rohou erven.rohou@st.com
+Erven Rohou erven.rohou@inria.fr
Ira Rosen irar@il.ibm.com
Maciej W. Rozycki macro@linux-mips.org
Douglas Rupp rupp@gnat.com
@@ -470,10 +471,6 @@ Jon Ziegler jonz@apple.com
Roman Zippel zippel@linux-m68k.org
Josef Zlomek josef.zlomek@email.cz
-Waiting for paperwork:
-
-Joern Rennecke joern.rennecke@arc.com
-
Bug database only accounts
James Dennett jdennett@acm.org
diff --git a/Makefile.def b/Makefile.def
index fee4dda9cfd..a0a5266d218 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -94,6 +94,14 @@ host_modules= { module= libcpp; bootstrap=true; };
host_modules= { module= libdecnumber; bootstrap=true; };
host_modules= { module= libgui; };
host_modules= { module= libiberty; bootstrap=true; };
+// We abuse missing to avoid installing anything for libiconv.
+host_modules= { module= libiconv;
+ extra_configure_flags='--disable-shared';
+ no_install= true;
+ missing= install-info;
+ missing= install-pdf;
+ missing= install-html;
+ missing= install-info; };
host_modules= { module= libtool; };
host_modules= { module= m4; };
host_modules= { module= make; };
@@ -339,7 +347,11 @@ dependencies = { module=configure-cloog; on=all-ppl; };
dependencies = { module=configure-gdb; on=all-intl; };
dependencies = { module=configure-gdb; on=configure-sim; };
dependencies = { module=configure-gdb; on=all-bfd; };
+// Depend on all-libiconv so that configure checks for iconv
+// functions will work.
+dependencies = { module=configure-gdb; on=all-libiconv; };
dependencies = { module=all-gdb; on=all-libiberty; };
+dependencies = { module=all-gdb; on=all-libiconv; };
dependencies = { module=all-gdb; on=all-opcodes; };
dependencies = { module=all-gdb; on=all-readline; };
dependencies = { module=all-gdb; on=all-build-bison; };
diff --git a/Makefile.in b/Makefile.in
index 3ca3f26d774..26d1d01b584 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -714,6 +714,7 @@ configure-host: \
maybe-configure-libdecnumber \
maybe-configure-libgui \
maybe-configure-libiberty \
+ maybe-configure-libiconv \
maybe-configure-libtool \
maybe-configure-m4 \
maybe-configure-make \
@@ -871,6 +872,7 @@ all-host: maybe-all-libgui
@if libiberty-no-bootstrap
all-host: maybe-all-libiberty
@endif libiberty-no-bootstrap
+all-host: maybe-all-libiconv
all-host: maybe-all-libtool
all-host: maybe-all-m4
all-host: maybe-all-make
@@ -989,6 +991,7 @@ info-host: maybe-info-libcpp
info-host: maybe-info-libdecnumber
info-host: maybe-info-libgui
info-host: maybe-info-libiberty
+info-host: maybe-info-libiconv
info-host: maybe-info-libtool
info-host: maybe-info-m4
info-host: maybe-info-make
@@ -1098,6 +1101,7 @@ dvi-host: maybe-dvi-libcpp
dvi-host: maybe-dvi-libdecnumber
dvi-host: maybe-dvi-libgui
dvi-host: maybe-dvi-libiberty
+dvi-host: maybe-dvi-libiconv
dvi-host: maybe-dvi-libtool
dvi-host: maybe-dvi-m4
dvi-host: maybe-dvi-make
@@ -1207,6 +1211,7 @@ pdf-host: maybe-pdf-libcpp
pdf-host: maybe-pdf-libdecnumber
pdf-host: maybe-pdf-libgui
pdf-host: maybe-pdf-libiberty
+pdf-host: maybe-pdf-libiconv
pdf-host: maybe-pdf-libtool
pdf-host: maybe-pdf-m4
pdf-host: maybe-pdf-make
@@ -1316,6 +1321,7 @@ html-host: maybe-html-libcpp
html-host: maybe-html-libdecnumber
html-host: maybe-html-libgui
html-host: maybe-html-libiberty
+html-host: maybe-html-libiconv
html-host: maybe-html-libtool
html-host: maybe-html-m4
html-host: maybe-html-make
@@ -1425,6 +1431,7 @@ TAGS-host: maybe-TAGS-libcpp
TAGS-host: maybe-TAGS-libdecnumber
TAGS-host: maybe-TAGS-libgui
TAGS-host: maybe-TAGS-libiberty
+TAGS-host: maybe-TAGS-libiconv
TAGS-host: maybe-TAGS-libtool
TAGS-host: maybe-TAGS-m4
TAGS-host: maybe-TAGS-make
@@ -1534,6 +1541,7 @@ install-info-host: maybe-install-info-libcpp
install-info-host: maybe-install-info-libdecnumber
install-info-host: maybe-install-info-libgui
install-info-host: maybe-install-info-libiberty
+install-info-host: maybe-install-info-libiconv
install-info-host: maybe-install-info-libtool
install-info-host: maybe-install-info-m4
install-info-host: maybe-install-info-make
@@ -1643,6 +1651,7 @@ install-pdf-host: maybe-install-pdf-libcpp
install-pdf-host: maybe-install-pdf-libdecnumber
install-pdf-host: maybe-install-pdf-libgui
install-pdf-host: maybe-install-pdf-libiberty
+install-pdf-host: maybe-install-pdf-libiconv
install-pdf-host: maybe-install-pdf-libtool
install-pdf-host: maybe-install-pdf-m4
install-pdf-host: maybe-install-pdf-make
@@ -1752,6 +1761,7 @@ install-html-host: maybe-install-html-libcpp
install-html-host: maybe-install-html-libdecnumber
install-html-host: maybe-install-html-libgui
install-html-host: maybe-install-html-libiberty
+install-html-host: maybe-install-html-libiconv
install-html-host: maybe-install-html-libtool
install-html-host: maybe-install-html-m4
install-html-host: maybe-install-html-make
@@ -1861,6 +1871,7 @@ installcheck-host: maybe-installcheck-libcpp
installcheck-host: maybe-installcheck-libdecnumber
installcheck-host: maybe-installcheck-libgui
installcheck-host: maybe-installcheck-libiberty
+installcheck-host: maybe-installcheck-libiconv
installcheck-host: maybe-installcheck-libtool
installcheck-host: maybe-installcheck-m4
installcheck-host: maybe-installcheck-make
@@ -1970,6 +1981,7 @@ mostlyclean-host: maybe-mostlyclean-libcpp
mostlyclean-host: maybe-mostlyclean-libdecnumber
mostlyclean-host: maybe-mostlyclean-libgui
mostlyclean-host: maybe-mostlyclean-libiberty
+mostlyclean-host: maybe-mostlyclean-libiconv
mostlyclean-host: maybe-mostlyclean-libtool
mostlyclean-host: maybe-mostlyclean-m4
mostlyclean-host: maybe-mostlyclean-make
@@ -2079,6 +2091,7 @@ clean-host: maybe-clean-libcpp
clean-host: maybe-clean-libdecnumber
clean-host: maybe-clean-libgui
clean-host: maybe-clean-libiberty
+clean-host: maybe-clean-libiconv
clean-host: maybe-clean-libtool
clean-host: maybe-clean-m4
clean-host: maybe-clean-make
@@ -2188,6 +2201,7 @@ distclean-host: maybe-distclean-libcpp
distclean-host: maybe-distclean-libdecnumber
distclean-host: maybe-distclean-libgui
distclean-host: maybe-distclean-libiberty
+distclean-host: maybe-distclean-libiconv
distclean-host: maybe-distclean-libtool
distclean-host: maybe-distclean-m4
distclean-host: maybe-distclean-make
@@ -2297,6 +2311,7 @@ maintainer-clean-host: maybe-maintainer-clean-libcpp
maintainer-clean-host: maybe-maintainer-clean-libdecnumber
maintainer-clean-host: maybe-maintainer-clean-libgui
maintainer-clean-host: maybe-maintainer-clean-libiberty
+maintainer-clean-host: maybe-maintainer-clean-libiconv
maintainer-clean-host: maybe-maintainer-clean-libtool
maintainer-clean-host: maybe-maintainer-clean-m4
maintainer-clean-host: maybe-maintainer-clean-make
@@ -2460,6 +2475,7 @@ check-host: \
maybe-check-libdecnumber \
maybe-check-libgui \
maybe-check-libiberty \
+ maybe-check-libiconv \
maybe-check-libtool \
maybe-check-m4 \
maybe-check-make \
@@ -2595,6 +2611,7 @@ install-host-nogcc: \
maybe-install-libdecnumber \
maybe-install-libgui \
maybe-install-libiberty \
+ maybe-install-libiconv \
maybe-install-libtool \
maybe-install-m4 \
maybe-install-make \
@@ -2671,6 +2688,7 @@ install-host: \
maybe-install-libdecnumber \
maybe-install-libgui \
maybe-install-libiberty \
+ maybe-install-libiconv \
maybe-install-libtool \
maybe-install-m4 \
maybe-install-make \
@@ -29059,6 +29077,374 @@ maintainer-clean-libiberty:
+.PHONY: configure-libiconv maybe-configure-libiconv
+maybe-configure-libiconv:
+@if gcc-bootstrap
+configure-libiconv: stage_current
+@endif gcc-bootstrap
+@if libiconv
+maybe-configure-libiconv: configure-libiconv
+configure-libiconv:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/libiconv; \
+ cd "$(HOST_SUBDIR)/libiconv" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libiconv"; \
+ libsrcdir="$$s/libiconv"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} --disable-shared \
+ || exit 1
+@endif libiconv
+
+
+
+
+
+.PHONY: all-libiconv maybe-all-libiconv
+maybe-all-libiconv:
+@if gcc-bootstrap
+all-libiconv: stage_current
+@endif gcc-bootstrap
+@if libiconv
+TARGET-libiconv=all
+maybe-all-libiconv: all-libiconv
+all-libiconv: configure-libiconv
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) \
+ $(TARGET-libiconv))
+@endif libiconv
+
+
+
+
+.PHONY: check-libiconv maybe-check-libiconv
+maybe-check-libiconv:
+@if libiconv
+maybe-check-libiconv: check-libiconv
+
+check-libiconv:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif libiconv
+
+.PHONY: install-libiconv maybe-install-libiconv
+maybe-install-libiconv:
+@if libiconv
+maybe-install-libiconv: install-libiconv
+
+install-libiconv:
+
+@endif libiconv
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-libiconv info-libiconv
+maybe-info-libiconv:
+@if libiconv
+maybe-info-libiconv: info-libiconv
+
+info-libiconv: \
+ configure-libiconv
+ @: $(MAKE); $(unstage)
+ @[ -f ./libiconv/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in libiconv" ; \
+ (cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ info) \
+ || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-dvi-libiconv dvi-libiconv
+maybe-dvi-libiconv:
+@if libiconv
+maybe-dvi-libiconv: dvi-libiconv
+
+dvi-libiconv: \
+ configure-libiconv
+ @: $(MAKE); $(unstage)
+ @[ -f ./libiconv/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in libiconv" ; \
+ (cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ dvi) \
+ || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-pdf-libiconv pdf-libiconv
+maybe-pdf-libiconv:
+@if libiconv
+maybe-pdf-libiconv: pdf-libiconv
+
+pdf-libiconv: \
+ configure-libiconv
+ @: $(MAKE); $(unstage)
+ @[ -f ./libiconv/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in libiconv" ; \
+ (cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ pdf) \
+ || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-html-libiconv html-libiconv
+maybe-html-libiconv:
+@if libiconv
+maybe-html-libiconv: html-libiconv
+
+html-libiconv: \
+ configure-libiconv
+ @: $(MAKE); $(unstage)
+ @[ -f ./libiconv/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing html in libiconv" ; \
+ (cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ html) \
+ || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-TAGS-libiconv TAGS-libiconv
+maybe-TAGS-libiconv:
+@if libiconv
+maybe-TAGS-libiconv: TAGS-libiconv
+
+TAGS-libiconv: \
+ configure-libiconv
+ @: $(MAKE); $(unstage)
+ @[ -f ./libiconv/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in libiconv" ; \
+ (cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ TAGS) \
+ || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-install-info-libiconv install-info-libiconv
+maybe-install-info-libiconv:
+@if libiconv
+maybe-install-info-libiconv: install-info-libiconv
+
+# libiconv doesn't support install-info.
+install-info-libiconv:
+
+@endif libiconv
+
+.PHONY: maybe-install-pdf-libiconv install-pdf-libiconv
+maybe-install-pdf-libiconv:
+@if libiconv
+maybe-install-pdf-libiconv: install-pdf-libiconv
+
+# libiconv doesn't support install-pdf.
+install-pdf-libiconv:
+
+@endif libiconv
+
+.PHONY: maybe-install-html-libiconv install-html-libiconv
+maybe-install-html-libiconv:
+@if libiconv
+maybe-install-html-libiconv: install-html-libiconv
+
+# libiconv doesn't support install-html.
+install-html-libiconv:
+
+@endif libiconv
+
+.PHONY: maybe-installcheck-libiconv installcheck-libiconv
+maybe-installcheck-libiconv:
+@if libiconv
+maybe-installcheck-libiconv: installcheck-libiconv
+
+installcheck-libiconv: \
+ configure-libiconv
+ @: $(MAKE); $(unstage)
+ @[ -f ./libiconv/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in libiconv" ; \
+ (cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ installcheck) \
+ || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-mostlyclean-libiconv mostlyclean-libiconv
+maybe-mostlyclean-libiconv:
+@if libiconv
+maybe-mostlyclean-libiconv: mostlyclean-libiconv
+
+mostlyclean-libiconv:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libiconv/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in libiconv" ; \
+ (cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ mostlyclean) \
+ || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-clean-libiconv clean-libiconv
+maybe-clean-libiconv:
+@if libiconv
+maybe-clean-libiconv: clean-libiconv
+
+clean-libiconv:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libiconv/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in libiconv" ; \
+ (cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ clean) \
+ || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-distclean-libiconv distclean-libiconv
+maybe-distclean-libiconv:
+@if libiconv
+maybe-distclean-libiconv: distclean-libiconv
+
+distclean-libiconv:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libiconv/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in libiconv" ; \
+ (cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ distclean) \
+ || exit 1
+
+@endif libiconv
+
+.PHONY: maybe-maintainer-clean-libiconv maintainer-clean-libiconv
+maybe-maintainer-clean-libiconv:
+@if libiconv
+maybe-maintainer-clean-libiconv: maintainer-clean-libiconv
+
+maintainer-clean-libiconv:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libiconv/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in libiconv" ; \
+ (cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif libiconv
+
+
+
.PHONY: configure-libtool maybe-configure-libtool
maybe-configure-libtool:
@if gcc-bootstrap
@@ -55261,7 +55647,9 @@ configure-stagefeedback-cloog: maybe-all-stagefeedback-ppl
configure-gdb: maybe-all-intl
configure-gdb: maybe-configure-sim
configure-gdb: maybe-all-bfd
+configure-gdb: maybe-all-libiconv
all-gdb: maybe-all-libiberty
+all-gdb: maybe-all-libiconv
all-gdb: maybe-all-opcodes
all-gdb: maybe-all-readline
all-gdb: maybe-all-build-bison
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index 3ce034a0931..ed6ee543650 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
2009-02-09 Mark Mitchell <mark@codesourcery.com>
* Makefile.am (LTLDFLAGS): New variable.
diff --git a/boehm-gc/configure b/boehm-gc/configure
index a7760a93066..6d2cf83e4cf 100755
--- a/boehm-gc/configure
+++ b/boehm-gc/configure
@@ -5079,7 +5079,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -8446,7 +8446,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -9007,7 +9007,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -10571,7 +10571,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -12749,7 +12749,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
inherit_rpath_CXX=yes
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -13577,7 +13577,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
esac
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -14497,7 +14497,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
diff --git a/configure b/configure
index d66bd53db1a..ecbbce689ba 100755
--- a/configure
+++ b/configure
@@ -969,6 +969,8 @@ Optional Packages:
plus --with-gmp-lib=PATH/lib
--with-gmp-include=PATH specify directory for installed GMP include files
--with-gmp-lib=PATH specify directory for the installed GMP library
+ --with-host-libstdcxx=L Use linker arguments L to link with libstdc++
+ when linking with PPL
--with-ppl=PATH Specify prefix directory for the installed PPL package
Equivalent to --with-ppl-include=PATH/include
plus --with-ppl-lib=PATH/lib
@@ -1885,7 +1887,7 @@ build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fix
# these libraries are used by various programs built for the host environment
#
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr ppl cloog"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr ppl cloog libiconv"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -2209,11 +2211,11 @@ case "${target}" in
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
- powerpc-*-darwin* | x86_64-*-darwin[912]*)
+ powerpc-*-darwin*)
noconfigdirs="$noconfigdirs ld gas gdb gprof"
noconfigdirs="$noconfigdirs sim target-rda"
;;
- i[3456789]86-*-darwin*)
+ i[3456789]86-*-darwin* | x86_64-*-darwin9*)
noconfigdirs="$noconfigdirs ld gas gprof"
noconfigdirs="$noconfigdirs sim target-rda"
;;
@@ -4808,11 +4810,26 @@ fi
+# Allow host libstdc++ to be specified for static linking with PPL.
+
+# Check whether --with-host-libstdcxx or --without-host-libstdcxx was given.
+if test "${with_host_libstdcxx+set}" = set; then
+ withval="$with_host_libstdcxx"
+
+fi;
+
+case $with_host_libstdcxx in
+ no|yes)
+ { { echo "$as_me:$LINENO: error: -with-host-libstdcxx needs an argument" >&5
+echo "$as_me: error: -with-host-libstdcxx needs an argument" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
# Check for PPL
ppl_major_version=0
ppl_minor_version=10
-ppllibs=" -lppl_c -lppl -lgmpxx "
+ppllibs=" -lppl_c -lppl -lgmpxx $with_host_libstdcxx "
pplinc=
@@ -4839,7 +4856,7 @@ case $with_ppl in
ppllibs=
;;
*)
- ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx"
+ ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx"
pplinc="-I$with_ppl/include $pplinc"
LIBS="$ppllibs $LIBS"
;;
@@ -4848,11 +4865,11 @@ if test "x$with_ppl_include" != x; then
pplinc="-I$with_ppl_include $pplinc"
fi
if test "x$with_ppl_lib" != x; then
- ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx"
+ ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx"
LIBS="$ppllibs $LIBS"
fi
if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
- ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '
+ ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '"$with_host_libstdcxx "
pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include '
LIBS="$ppllibs $LIBS"
fi
diff --git a/configure.ac b/configure.ac
index 52e535678b2..a34cbe1175b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-# 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
+# 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
#
# This file is free software; you can redistribute it and/or modify it
@@ -158,7 +158,7 @@ build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fix
# these libraries are used by various programs built for the host environment
#
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr ppl cloog"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr ppl cloog libiconv"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -446,11 +446,11 @@ case "${target}" in
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
- powerpc-*-darwin* | x86_64-*-darwin[[912]]*)
+ powerpc-*-darwin*)
noconfigdirs="$noconfigdirs ld gas gdb gprof"
noconfigdirs="$noconfigdirs sim target-rda"
;;
- i[[3456789]]86-*-darwin*)
+ i[[3456789]]86-*-darwin* | x86_64-*-darwin9*)
noconfigdirs="$noconfigdirs ld gas gprof"
noconfigdirs="$noconfigdirs sim target-rda"
;;
@@ -1315,11 +1315,20 @@ fi
AC_SUBST(gmplibs)
AC_SUBST(gmpinc)
+# Allow host libstdc++ to be specified for static linking with PPL.
+AC_ARG_WITH(host-libstdcxx, [ --with-host-libstdcxx=L Use linker arguments L to link with libstdc++
+ when linking with PPL])
+
+case $with_host_libstdcxx in
+ no|yes)
+ AC_MSG_ERROR([-with-host-libstdcxx needs an argument])
+ ;;
+esac
# Check for PPL
ppl_major_version=0
ppl_minor_version=10
-ppllibs=" -lppl_c -lppl -lgmpxx "
+ppllibs=" -lppl_c -lppl -lgmpxx $with_host_libstdcxx "
pplinc=
AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package
@@ -1333,7 +1342,7 @@ case $with_ppl in
ppllibs=
;;
*)
- ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx"
+ ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx"
pplinc="-I$with_ppl/include $pplinc"
LIBS="$ppllibs $LIBS"
;;
@@ -1342,11 +1351,11 @@ if test "x$with_ppl_include" != x; then
pplinc="-I$with_ppl_include $pplinc"
fi
if test "x$with_ppl_lib" != x; then
- ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx"
+ ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx $with_host_libstdcxx"
LIBS="$ppllibs $LIBS"
fi
if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
- ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '
+ ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '"$with_host_libstdcxx "
pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include '
LIBS="$ppllibs $LIBS"
fi
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 4f49364ef3d..4fc801b0ae9 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * check_warning_flags.sh: Update flag exceptions.
+
2008-11-18 Ben Elliston <bje@au.ibm.com>
* dg-cmp-results.sh: Do not print usage if either .sum file cannot
diff --git a/contrib/check_warning_flags.sh b/contrib/check_warning_flags.sh
index fcd0f37e105..eb53832730c 100755
--- a/contrib/check_warning_flags.sh
+++ b/contrib/check_warning_flags.sh
@@ -3,7 +3,7 @@
# Check that the warning flags documented in invoke.texi match up
# with what the compiler accepts.
#
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
# Written by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
#
# This script is Free Software, and it can be copied, distributed and
@@ -39,9 +39,12 @@ stderr=check_warning_flags_stderr$$
remove_problematic_flags='
/-Wlarger-than-/d
+ /-Wframe-larger-than/d
+ /-Wdisallowed-function-list/d
/-W[alp],/d
/-Werror/d
/-Wpadded/d
+ /pedantic-ms-format/d
/=/d'
# Ensure that indexed warnings are accepted.
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index ca308109296..68bb8e818af 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,40 @@
+2009-03-29 Joseph Myers <joseph@codesourcery.com>
+
+ * tests/base/math.h, tests/base/pthread.h, tests/base/sys/wait.h:
+ Update.
+
+2009-03-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/456
+ PR c/5675
+ PR c/19976
+ PR c/29116
+ PR c/31871
+ PR c/35198
+ * inclhack.def (glibc_tgmath): New fix.
+ * fixincl.x: Regenerate.
+ * tests/base/tgmath.h: New.
+
+2009-03-28 Joseph Myers <joseph@codesourcery.com>
+
+ * inclhack.def (aix_syswait, exception_structure,
+ pthread_page_size): Remove.
+ (math_exception): Remove mention of fixproto in comment.
+ * fixincl.x: Regenerate.
+ * mkheaders.in: Do not handle STMP_FIXPROTO.
+
+2009-03-27 Sandra Loosemore <sandra@codesourcery.com>
+
+ * server.c (run_shell): Quote directory name passed to cd.
+
+2009-03-01 Bruce Korb <bkorb@gnu.org>
+ Apply a positively ancient patch:
+
+ 2004-10-15 Giovanni Bajo <giovannibajo@libero.it>
+
+ * inclhack.def (alpha_if_semicolon): new fix from long, long ago
+ * tests/base/net/if.h: Add new test.
+
2009-01-06 Andreas Tobler <a.tobler@schweiz.org>
* tests/base/locale.h: Add new test.
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 5a77bb7cb6a..98aa9d28b3f 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Friday January 16, 2009 at 04:40:32 PM UTC
+ * It has been AutoGen-ed Monday March 30, 2009 at 02:04:53 PM UTC
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Jan 16 16:40:32 UTC 2009
+/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Mar 30 14:04:53 UTC 2009
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
- * This file contains 182 fixup descriptions.
+ * This file contains 180 fixup descriptions.
*
* See README for more information.
*
@@ -557,45 +557,6 @@ static const char* apzAix_SysmachinePatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Aix_Syswait fix
- */
-tSCC zAix_SyswaitName[] =
- "aix_syswait";
-
-/*
- * File name selection pattern
- */
-tSCC zAix_SyswaitList[] =
- "sys/wait.h\0";
-/*
- * Machine/OS name selection pattern
- */
-#define apzAix_SyswaitMachs (const char**)NULL
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zAix_SyswaitSelect0[] =
- "^extern pid_t wait3\\(\\);\n";
-tSCC zAix_SyswaitSelect1[] =
- "bos325,";
-
-#define AIX_SYSWAIT_TEST_CT 2
-static tTestDesc aAix_SyswaitTests[] = {
- { TT_EGREP, zAix_SyswaitSelect0, (regex_t*)NULL },
- { TT_EGREP, zAix_SyswaitSelect1, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Aix_Syswait
- */
-static const char* apzAix_SyswaitPatch[] = {
- "format",
- "struct rusage;\n\
-%0",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
* Description of Aix_Syswait_2 fix
*/
tSCC zAix_Syswait_2Name[] =
@@ -918,6 +879,41 @@ static const char* apzAlpha_GetoptPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Alpha_If_Semicolon fix
+ */
+tSCC zAlpha_If_SemicolonName[] =
+ "alpha_if_semicolon";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAlpha_If_SemicolonList[] =
+ "net/if.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+#define apzAlpha_If_SemicolonMachs (const char**)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAlpha_If_SemicolonSelect0[] =
+ "struct[ \t]+sockaddr[ \t]+vmif_paddr[ \t]+/\\*";
+
+#define ALPHA_IF_SEMICOLON_TEST_CT 1
+static tTestDesc aAlpha_If_SemicolonTests[] = {
+ { TT_EGREP, zAlpha_If_SemicolonSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Alpha_If_Semicolon
+ */
+static const char* apzAlpha_If_SemicolonPatch[] = {
+ "format",
+ "struct sockaddr vmif_paddr;\t/*",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Alpha_Parens fix
*/
tSCC zAlpha_ParensName[] =
@@ -1898,48 +1894,6 @@ static const char* apzEcd_CursorPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Exception_Structure fix
- */
-tSCC zException_StructureName[] =
- "exception_structure";
-
-/*
- * File name selection pattern
- */
-tSCC zException_StructureList[] =
- "math.h\0";
-/*
- * Machine/OS name selection pattern
- */
-#define apzException_StructureMachs (const char**)NULL
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zException_StructureSelect0[] =
- "matherr";
-
-/*
- * content bypass pattern - skip fix if pattern found
- */
-tSCC zException_StructureBypass0[] =
- "matherr.*(struct exception|__MATH_EXCEPTION|[ \\t]*__FP_EXCEPTION[ \\t]*\\*[ \\t]*)";
-
-#define EXCEPTION_STRUCTURE_TEST_CT 2
-static tTestDesc aException_StructureTests[] = {
- { TT_NEGREP, zException_StructureBypass0, (regex_t*)NULL },
- { TT_EGREP, zException_StructureSelect0, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Exception_Structure
- */
-static const char* apzException_StructurePatch[] = {
- "wrap",
- "struct exception;\n",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
* Description of Freebsd_Gcc3_Breakage fix
*/
tSCC zFreebsd_Gcc3_BreakageName[] =
@@ -5057,41 +5011,6 @@ typedef __regmatch_t\tregmatch_t;",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Pthread_Page_Size fix
- */
-tSCC zPthread_Page_SizeName[] =
- "pthread_page_size";
-
-/*
- * File name selection pattern
- */
-tSCC zPthread_Page_SizeList[] =
- "pthread.h\0";
-/*
- * Machine/OS name selection pattern
- */
-#define apzPthread_Page_SizeMachs (const char**)NULL
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zPthread_Page_SizeSelect0[] =
- "^int __page_size";
-
-#define PTHREAD_PAGE_SIZE_TEST_CT 1
-static tTestDesc aPthread_Page_SizeTests[] = {
- { TT_EGREP, zPthread_Page_SizeSelect0, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Pthread_Page_Size
- */
-static const char* apzPthread_Page_SizePatch[] = {
- "format",
- "extern %0",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
* Description of Pthread_Incomplete_Struct_Argument fix
*/
tSCC zPthread_Incomplete_Struct_ArgumentName[] =
@@ -7406,9 +7325,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 229
+#define REGEX_COUNT 225
#define MACH_LIST_SIZE_LIMIT 181
-#define FIX_COUNT 182
+#define FIX_COUNT 180
/*
* Enumerate the fixes
@@ -7424,7 +7343,6 @@ typedef enum {
AAB_SUN_MEMCPY_FIXIDX,
AIX_PTHREAD_FIXIDX,
AIX_SYSMACHINE_FIXIDX,
- AIX_SYSWAIT_FIXIDX,
AIX_SYSWAIT_2_FIXIDX,
AIX_VOLATILE_FIXIDX,
ALPHA___ASSERT_FIXIDX,
@@ -7434,6 +7352,7 @@ typedef enum {
ALPHA_ASSERT_FIXIDX,
ALPHA_BAD_LVAL_FIXIDX,
ALPHA_GETOPT_FIXIDX,
+ ALPHA_IF_SEMICOLON_FIXIDX,
ALPHA_PARENS_FIXIDX,
ALPHA_PTHREAD_FIXIDX,
ALPHA_PTHREAD_GCC_FIXIDX,
@@ -7459,7 +7378,6 @@ typedef enum {
DEC_INTERN_ASM_FIXIDX,
DJGPP_WCHAR_H_FIXIDX,
ECD_CURSOR_FIXIDX,
- EXCEPTION_STRUCTURE_FIXIDX,
FREEBSD_GCC3_BREAKAGE_FIXIDX,
FREEBSD_GCC4_BREAKAGE_FIXIDX,
GLIBC_C99_INLINE_1_FIXIDX,
@@ -7538,7 +7456,6 @@ typedef enum {
OPENBSD_VA_START_FIXIDX,
OSF_NAMESPACE_A_FIXIDX,
OSF_NAMESPACE_C_FIXIDX,
- PTHREAD_PAGE_SIZE_FIXIDX,
PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_FIXIDX,
READ_RET_TYPE_FIXIDX,
RPC_XDR_LVALUE_CAST_A_FIXIDX,
@@ -7649,11 +7566,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
AIX_SYSMACHINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAix_SysmachineTests, apzAix_SysmachinePatch, 0 },
- { zAix_SyswaitName, zAix_SyswaitList,
- apzAix_SyswaitMachs,
- AIX_SYSWAIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aAix_SyswaitTests, apzAix_SyswaitPatch, 0 },
-
{ zAix_Syswait_2Name, zAix_Syswait_2List,
apzAix_Syswait_2Machs,
AIX_SYSWAIT_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@@ -7699,6 +7611,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ALPHA_GETOPT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAlpha_GetoptTests, apzAlpha_GetoptPatch, 0 },
+ { zAlpha_If_SemicolonName, zAlpha_If_SemicolonList,
+ apzAlpha_If_SemicolonMachs,
+ ALPHA_IF_SEMICOLON_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAlpha_If_SemicolonTests, apzAlpha_If_SemicolonPatch, 0 },
+
{ zAlpha_ParensName, zAlpha_ParensList,
apzAlpha_ParensMachs,
ALPHA_PARENS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@@ -7824,11 +7741,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ECD_CURSOR_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aEcd_CursorTests, apzEcd_CursorPatch, 0 },
- { zException_StructureName, zException_StructureList,
- apzException_StructureMachs,
- EXCEPTION_STRUCTURE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aException_StructureTests, apzException_StructurePatch, 0 },
-
{ zFreebsd_Gcc3_BreakageName, zFreebsd_Gcc3_BreakageList,
apzFreebsd_Gcc3_BreakageMachs,
FREEBSD_GCC3_BREAKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@@ -8219,11 +8131,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
OSF_NAMESPACE_C_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aOsf_Namespace_CTests, apzOsf_Namespace_CPatch, 0 },
- { zPthread_Page_SizeName, zPthread_Page_SizeList,
- apzPthread_Page_SizeMachs,
- PTHREAD_PAGE_SIZE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aPthread_Page_SizeTests, apzPthread_Page_SizePatch, 0 },
-
{ zPthread_Incomplete_Struct_ArgumentName, zPthread_Incomplete_Struct_ArgumentList,
apzPthread_Incomplete_Struct_ArgumentMachs,
PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 29a970da5db..e1d413cc8db 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -386,23 +386,6 @@ fix = {
/*
- * sys/wait.h on AIX 3.2.5 puts the declaration of wait3 before the
- * definition of struct rusage, so the prototype added by fixproto fails.
- */
-fix = {
- hackname = aix_syswait;
- files = sys/wait.h;
- select = "^extern pid_t wait3\\(\\);\n";
- select = "bos325,";
- c_fix = format;
- c_fix_arg = "struct rusage;\n%0";
- test_text = "/* bos325, */\n"
- "extern pid_t wait3();\n"
- "\t/* pid_t wait3(int *, int, struct rusage *); */";
-};
-
-
-/*
* sys/wait.h on AIX 5.2 defines macros that have both signed and
* unsigned types in conditional expressions.
*/
@@ -563,6 +546,19 @@ fix = {
/*
+ * Fix missing semicolon on Alpha OSF/4 in <net/if.h>
+ */
+fix = {
+ hackname = alpha_if_semicolon;
+ files = net/if.h;
+ select = "struct[ \t]+sockaddr[ \t]+vmif_paddr[ \t]+/\\*";
+ c_fix = format;
+ c_fix_arg = "struct sockaddr vmif_paddr;\t/*";
+ test_text = ' struct sockaddr vmif_paddr /* protocol address */';
+};
+
+
+/*
* Remove erroneous parentheses in sym.h on Alpha OSF/1.
*/
fix = {
@@ -1076,26 +1072,6 @@ fix = {
/*
- * math.h on SunOS 4 puts the declaration of matherr before the definition
- * of struct exception, so the prototype (added by fixproto) causes havoc.
- * This must appear before the math_exception fix.
- */
-fix = {
- hackname = exception_structure;
- files = math.h;
-
- /* If matherr has a prototype already, the header needs no fix. */
- bypass = 'matherr.*(struct exception|__MATH_EXCEPTION|[ \t]*__FP_EXCEPTION[ \t]*\*[ \t]*)';
- select = matherr;
-
- c_fix = wrap;
- c_fix_arg = "struct exception;\n";
-
- test_text = "extern int matherr();";
-};
-
-
-/*
* Between 8/24/1998 and 2/17/2001, FreeBSD system headers presume
* neither the existence of GCC 3 nor its exact feature set yet break
* (by design?) when __GNUC__ is set beyond 2.
@@ -2306,9 +2282,7 @@ fix = {
* Interface Definition), which conflicts with the class exception defined
* in the C++ file std/stdexcept.h. We redefine it to __math_exception.
* This is not a great fix, but I haven't been able to think of anything
- * better. Note that we have to put the #ifdef/#endif blocks at beginning
- * and end of file, because fixproto runs after us and may insert
- * additional references to struct exception.
+ * better.
*/
fix = {
hackname = math_exception;
@@ -2716,20 +2690,6 @@ fix = {
/*
- * Fix __page_size* declarations in pthread.h AIX 4.1.[34].
- * The original ones fail if uninitialized externs are not common.
- * This is the default for all ANSI standard C++ compilers.
- */
-fix = {
- hackname = pthread_page_size;
- files = pthread.h;
- select = "^int __page_size";
- c_fix = format;
- c_fix_arg = "extern %0";
- test_text = "int __page_size;";
-};
-
-/*
* On broken glibc-2.3.3 systems an array of incomplete structures is
* passed to __sigsetjmp. Fix that to take a pointer instead.
*/
diff --git a/fixincludes/mkheaders.in b/fixincludes/mkheaders.in
index b584b68d6af..6fc0c51a41e 100644
--- a/fixincludes/mkheaders.in
+++ b/fixincludes/mkheaders.in
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2009 Free Software Foundation, Inc.
#This file is part of GCC.
@@ -102,9 +102,4 @@ for ml in `cat ${itoolsdatadir}/fixinc_list`; do
fi
cp ${itoolsdatadir}/include${multi_dir}/limits.h ${subincdir}
-
- if [ x${STMP_FIXPROTO} != x ] ; then
- export FIXPROTO_DEFINES mkinstalldirs
- @SHELL@ fixproto ${subincdir} ${subincdir} ${isysroot}${SYSTEM_HEADER_DIR} || exit 1
- fi
done
diff --git a/fixincludes/server.c b/fixincludes/server.c
index 6db8cf7e101..1e50efc9faa 100644
--- a/fixincludes/server.c
+++ b/fixincludes/server.c
@@ -266,7 +266,7 @@ run_shell (const char* pz_cmd)
/* Make sure the process will pay attention to us, send the
supplied command, and then have it output a special marker that
we can find. */
- fprintf (server_pair.pf_write, "cd %s\n%s\n\necho\necho %s\n",
+ fprintf (server_pair.pf_write, "cd \"%s\"\n%s\n\necho\necho %s\n",
p_cur_dir, pz_cmd, z_done);
fflush (server_pair.pf_write);
diff --git a/fixincludes/tests/base/math.h b/fixincludes/tests/base/math.h
index 389dacf25c7..88b24d33e34 100644
--- a/fixincludes/tests/base/math.h
+++ b/fixincludes/tests/base/math.h
@@ -13,10 +13,6 @@
#ifdef __cplusplus
#define exception __math_exception
#endif
-#ifndef FIXINC_WRAP_MATH_H_EXCEPTION_STRUCTURE
-#define FIXINC_WRAP_MATH_H_EXCEPTION_STRUCTURE 1
-
-struct exception;
#if defined( AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_CHECK )
@@ -38,11 +34,6 @@ struct exception;
#endif /* BROKEN_CABS_CHECK */
-#if defined( EXCEPTION_STRUCTURE_CHECK )
-extern int matherr();
-#endif /* EXCEPTION_STRUCTURE_CHECK */
-
-
#if defined( HPPA_HPUX_FP_MACROS_CHECK )
#endif /* _INCLUDE_HPUX_SOURCE */
@@ -118,8 +109,6 @@ extern int class();
int foo;
#endif
#endif /* STRICT_ANSI_NOT_CTD_CHECK */
-
-#endif /* FIXINC_WRAP_MATH_H_EXCEPTION_STRUCTURE */
#ifdef __cplusplus
#undef exception
#endif
diff --git a/fixincludes/tests/base/net/if.h b/fixincludes/tests/base/net/if.h
new file mode 100644
index 00000000000..4c25423c522
--- /dev/null
+++ b/fixincludes/tests/base/net/if.h
@@ -0,0 +1,14 @@
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/net/if.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+
+
+#if defined( ALPHA_IF_SEMICOLON_CHECK )
+ struct sockaddr vmif_paddr; /* protocol address */
+#endif /* ALPHA_IF_SEMICOLON_CHECK */
diff --git a/fixincludes/tests/base/pthread.h b/fixincludes/tests/base/pthread.h
index 4f18e718057..069a22bb48b 100644
--- a/fixincludes/tests/base/pthread.h
+++ b/fixincludes/tests/base/pthread.h
@@ -96,11 +96,6 @@
#endif /* GLIBC_MUTEX_INIT_CHECK */
-#if defined( PTHREAD_PAGE_SIZE_CHECK )
-extern int __page_size;
-#endif /* PTHREAD_PAGE_SIZE_CHECK */
-
-
#if defined( PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK )
extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask);
#endif /* PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK */
diff --git a/fixincludes/tests/base/sys/wait.h b/fixincludes/tests/base/sys/wait.h
index a0311c65d0f..556277cc467 100644
--- a/fixincludes/tests/base/sys/wait.h
+++ b/fixincludes/tests/base/sys/wait.h
@@ -9,14 +9,6 @@
-#if defined( AIX_SYSWAIT_CHECK )
-/* bos325, */
-struct rusage;
-extern pid_t wait3();
- /* pid_t wait3(int *, int, struct rusage *); */
-#endif /* AIX_SYSWAIT_CHECK */
-
-
#if defined( AIX_SYSWAIT_2_CHECK )
#define WSTOPSIG(__x) (int)(WIFSTOPPED(__x) ? (int)((((unsigned int)__x) >> 8) & 0xff) : -1)
#endif /* AIX_SYSWAIT_2_CHECK */
diff --git a/gcc/BASE-VER b/gcc/BASE-VER
index fdc6698807a..a84947d6ffe 100644
--- a/gcc/BASE-VER
+++ b/gcc/BASE-VER
@@ -1 +1 @@
-4.4.0
+4.5.0
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 330da7c4a37..8f696913e03 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,1871 @@
+2009-03-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * config/sparc/sparc.md (*nand<V64mode>_vis, *nand<V32mode>_vis):
+ Fix typos in names.
+
+2009-03-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * combine.c (simplify_comparison): Use have_insn_for.
+ * dojump.c (do_jump): Likewise.
+
+2009-03-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * config/sparc/sparc.c (sparc_compare_emitted): Remove.
+ (gen_compare_reg, emit_v9_brxx_insn): Handle MODE_CC
+ sparc_compare_op0 like sparc_compare_emitted used to be handled.
+ (sparc_expand_compare_and_swap_12): Set sparc_compare_op0
+ instead of sparc_compare_emitted.
+ * config/sparc/sparc.h (sparc_compare_emitted): Remove.
+ * config/sparc/sparc.md (stack_protect_test): Set sparc_compare_op0
+ instead of sparc_compare_emitted.
+
+2009-03-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * bb-reorder.c (partition_hot_cold_basic_blocks): Do not
+ enter/exit cfglayout mode.
+ (pass_partition_block): Require it.
+ * combine.c (find_single_use, reg_dead_at_p): Use CFG.
+ (combine_instructions): Track basic blocks instead of labels.
+ (update_cfg_for_uncondjump): New.
+ (try_combine): Use it. Update jumps after rescanning.
+ (pass_combine): Require PROP_cfglayout.
+ * passes.c (pass_outof_cfg_layout_mode): Move after regmove.
+
+2009-03-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * cfglayout.c (pass_into_cfg_layout_mode, pass_outof_cfg_layout_mode):
+ Provide/destroy PROP_cfglayout respectively.
+ * gcse.c (pass_jump_bypass, pass_gcse): Require it.
+ * tree-pass.h (PROP_cfglayout): New.
+
+2009-03-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * fold-const.c (const_binop, fold_convert_const_real_from_fixed,
+ fold_convert_const_fixed_from_fixed,
+ fold_convert_const_fixed_from_int,
+ fold_convert_const_fixed_from_real, fold_negate_const): Do not
+ set TREE_CONSTANT_OVERFLOW.
+ * tree.def: Remove mention of TREE_CONSTANT_OVERFLOW.
+ * tree.h (TREE_CONSTANT_OVERFLOW): Delete.
+
+2009-03-30 Ira Rosen <irar@il.ibm.com>
+
+ * tree-vect-loop-manip.c: New file.
+ * tree-vectorizer.c: Update documentation and included files.
+ (vect_loop_location): Make extern.
+ (rename_use_op): Move to tree-vect-loop-manip.c
+ (rename_variables_in_bb, rename_variables_in_loop,
+ slpeel_update_phis_for_duplicate_loop,
+ slpeel_update_phi_nodes_for_guard1,
+ slpeel_update_phi_nodes_for_guard2, slpeel_make_loop_iterate_ntimes,
+ slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_add_loop_guard,
+ slpeel_can_duplicate_loop_p, slpeel_verify_cfg_after_peeling,
+ set_prologue_iterations, slpeel_tree_peel_loop_to_edge,
+ find_loop_location): Likewise.
+ (new_stmt_vec_info): Move to tree-vect-stmts.c.
+ (init_stmt_vec_info_vec, free_stmt_vec_info_vec, free_stmt_vec_info,
+ get_vectype_for_scalar_type, vect_is_simple_use,
+ supportable_widening_operation, supportable_narrowing_operation):
+ Likewise.
+ (bb_in_loop_p): Move to tree-vect-loop.c.
+ (new_loop_vec_info, destroy_loop_vec_info,
+ reduction_code_for_scalar_code, report_vect_op,
+ vect_is_simple_reduction, vect_is_simple_iv_evolution): Likewise.
+ (vect_can_force_dr_alignment_p): Move to tree-vect-data-refs.c.
+ (vect_supportable_dr_alignment): Likewise.
+ * tree-vectorizer.h (tree-data-ref.h): Include.
+ (vect_loop_location): Declare.
+ Reorganize function declarations according to the new file structure.
+ * tree-vect-loop.c: New file.
+ * tree-vect-analyze.c: Remove. Move functions to tree-vect-data-refs.c,
+ tree-vect-stmts.c, tree-vect-slp.c, tree-vect-loop.c.
+ * tree-vect-data-refs.c: New file.
+ * tree-vect-patterns.c (timevar.h): Don't include.
+ * tree-vect-stmts.c: New file.
+ * tree-vect-transform.c: Remove. Move functions to tree-vect-stmts.c,
+ tree-vect-slp.c, tree-vect-loop.c.
+ * Makefile.in (OBJS-common): Remove tree-vect-analyze.o and
+ tree-vect-transform.o. Add tree-vect-data-refs.o, tree-vect-stmts.o,
+ tree-vect-loop.o, tree-vect-loop-manip.o, tree-vect-slp.o.
+ (tree-vect-analyze.o): Remove.
+ (tree-vect-transform.o): Likewise.
+ (tree-vect-data-refs.o): Add rule.
+ (tree-vect-stmts.o, tree-vect-loop.o, tree-vect-loop-manip.o,
+ tree-vect-slp.o): Likewise.
+ (tree-vect-patterns.o): Remove redundant dependencies.
+ (tree-vectorizer.o): Likewise.
+ * tree-vect-slp.c: New file.
+
+2009-03-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * optc-gen.awk: Warn if an option flag has multiple different
+ help strings.
+
+2009-03-30 Sebastian Pop <sebastian.pop@amd.com>
+
+ * doc/invoke.texi (-floop-interchange, -floop-strip-mine,
+ -floop-block): Document dependences on PPL, CLooG and Graphite.
+
+2009-03-30 Joseph Myers <joseph@codesourcery.com>
+
+ PR rtl-optimization/323
+ * c-common.c (c_fully_fold, convert_and_check,
+ c_common_truthvalue_conversion): Handle EXCESS_PRECISION_EXPR.
+ (c_fully_fold_internal): Disallow EXCESS_PRECISION_EXPR.
+ * c-common.def (EXCESS_PRECISION_EXPR): New.
+ * c-cppbuiltin.c (builtin_define_float_constants): Define
+ constants with enough digits for long double.
+ * c-lex.c (interpret_float): Interpret constant with excess
+ precision where appropriate.
+ * c-opts.c (c_common_post_options): Set
+ flag_excess_precision_cmdline. Give an error for
+ -fexcess-precision=standard for C++ for processors where the
+ option is significant.
+ * c-parser.c (c_parser_conditional_expression): Handle excess
+ precision in condition.
+ * c-typeck.c (convert_arguments): Handle arguments with excess
+ precision.
+ (build_unary_op): Move excess precision outside operation.
+ (build_conditional_expr): Likewise.
+ (build_compound_expr): Likewise.
+ (build_c_cast): Do cast on operand of EXCESS_PRECISION_EXPR.
+ (build_modify_expr): Handle excess precision in RHS.
+ (convert_for_assignment): Handle excess precision in converted
+ value.
+ (digest_init, output_init_element, process_init_element): Handle
+ excess precision in initializer.
+ (c_finish_return): Handle excess precision in return value.
+ (build_binary_op): Handle excess precision in operands and add
+ excess precision as needed for operation.
+ * common.opt (-fexcess-precision=): New option.
+ * config/i386/i386.h (X87_ENABLE_ARITH, X87_ENABLE_FLOAT): New.
+ * config/i386/i386.md (float<SSEMODEI24:mode><X87MODEF:mode>2):
+ For standard excess precision, output explicit conversion to and
+ truncation from XFmode.
+ (*float<SSEMODEI24:mode><X87MODEF:mode>2_1,
+ *float<SSEMODEI24:mode><X87MODEF:mode>2_i387_with_temp,
+ *float<SSEMODEI24:mode><X87MODEF:mode>2_i387, two unnamed
+ define_splits, floatdi<X87MODEF:mode>2_i387_with_xmm, two unnamed
+ define_splits, *floatunssi<mode>2_1, two unnamed define_splits,
+ floatunssi<mode>2, add<mode>3, sub<mode>3, mul<mode>3, divdf3,
+ divsf3, *fop_<mode>_comm_i387, *fop_<mode>_1_i387,
+ *fop_<MODEF:mode>_2_i387, *fop_<MODEF:mode>_3_i387,
+ *fop_df_4_i387, *fop_df_5_i387, *fop_df_6_i387, two unnamed
+ define_splits, sqrt<mode>2): Disable where appropriate for
+ standard excess precision.
+ * convert.c (convert_to_real): Do not shorten arithmetic to type
+ for which excess precision would be used.
+ * defaults.h (TARGET_FLT_EVAL_METHOD_NON_DEFAULT): Define.
+ * doc/invoke.texi (-fexcess-precision=): Document option.
+ (-mfpmath=): Correct index entry.
+ * flags.h (enum excess_precision, flag_excess_precision_cmdline,
+ flag_excess_precision): New.
+ * langhooks.c (lhd_post_options): Set
+ flag_excess_precision_cmdline.
+ * opts.c (common_handle_option): Handle -fexcess-precision=.
+ * toplev.c (flag_excess_precision_cmdline, flag_excess_precision,
+ init_excess_precision): New.
+ (lang_dependent_init_target): Call init_excess_precision.
+ * tree.c (excess_precision_type): New.
+ * tree.h (excess_precision_type): Declare.
+
+2009-03-30 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/35235
+ * c-typeck.c (build_component_ref): Do not copy qualifiers from
+ non-lvalue to component.
+
+2009-03-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR preprocessor/34695
+ * Makefile.in (c-opts.o): Depend on c-tree.h.
+ * c-common.c: Move down include of diagnostic.h.
+ (done_lexing, c_cpp_error): New.
+ * c-common.h (done_lexing): Declare.
+ * c-decl.c (c_write_global_declarations): Don't check cpp_errors
+ (parse_in).
+ * c-opts.c: Include c-tree.h.
+ (c_common_init_options): Set preprocessor error callback.
+ (c_common_handle_option): Do not set preprocessor
+ inhibit_warnings, warnings_are_errors, warn_system_headers,
+ pedantic_errors or inhibit_warnings flags.
+ (c_common_post_options): Do not check cpp_errors (parse_in).
+ (c_common_finish): Do not output dependencies if there were
+ errors. Do not check return value of cpp_finish.
+ * c-ppoutput.c (pp_file_change): Set input_location.
+ * c-tree.h (c_cpp_error): Declare.
+ * diagnostic.c (diagnostic_set_info_translated): Also initialize
+ override_column.
+ (diagnostic_build_prefix): Check override_column.
+ * diagnostic.h (diagnostic_info): Add override_column field.
+ (diagnostic_override_column): Define.
+
+2009-03-28 Paolo Bonzini <bonzini@gnu.org>
+
+ * c-common.c (c_expand_expr, c_staticp): Remove.
+ * c-common.def (COMPOUND_LITERAL_EXPR): Delete.
+ * c-common.h (emit_local_var, c_staticp, COMPOUND_LITERAL_EXPR_DECL,
+ COMPOUND_LITERAL_EXPR_DECL_EXPR): Remove.
+ * c-gimplify.c (gimplify_compound_literal_expr,
+ optimize_compound_literals_in_ctor): Remove.
+ (c_gimplify_expr): Remove COMPOUND_LITERAL_EXPR handling.
+ * c-objc-common.h (LANG_HOOKS_STATICP): Remove.
+ * c-semantics.c (emit_local_var): Remove.
+
+ * langhooks-def.h (lhd_expand_expr): Remove.
+ * langhooks.c (lhd_expand_expr): Remove.
+ * langhooks.h (LANG_HOOKS_DEF): Remove LANG_HOOKS_EXPAND_EXPR.
+
+ * expr.c (expand_expr_real_1): Move COMPOUND_LITERAL_EXPR
+ handling from c-semantics.c; don't call into langhook.
+ (expand_expr_addr_expr_1): Check that we don't get non-GENERIC trees.
+ * gimplify.c (gimplify_compound_literal_expr,
+ optimize_compound_literals_in_ctor): Move from c-gimplify.c.
+ (gimplify_init_constructor): Call optimize_compound_literals_in_ctor.
+ (gimplify_modify_expr_rhs, gimplify_expr): Handle COMPOUND_LITERAL_EXPR
+ as was done in c-gimplify.c.
+ * tree.c (staticp): Move COMPOUND_LITERAL_EXPR handling from c_staticp.
+ * tree.h (COMPOUND_LITERAL_EXPR_DECL, COMPOUND_LITERAL_EXPR_DECL_EXPR):
+ Move from c-common.h.
+ * tree.def (COMPOUND_LITERAL_EXPR): Move from c-common.def.
+
+ * tree.c (staticp): Do not call langhook.
+ * langhooks.c (lhd_staticp): Delete.
+ * langhooks-def.h (lhd_staticp): Delete prototype.
+ (LANG_HOOKS_STATICP): Delete.
+ (LANG_HOOKS_INITIALIZER): Delete LANG_HOOKS_STATICP.
+
+ * doc/c-tree.texi (Expression nodes): Refer to DECL_EXPRs
+ instead of DECL_STMTs.
+
+2009-03-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/456
+ PR c/5675
+ PR c/19976
+ PR c/29116
+ PR c/31871
+ PR c/35198
+ * builtins.c (fold_builtin_sincos): Build COMPOUND_EXPR in
+ void_type_node.
+ (fold_call_expr): Return a NOP_EXPR from folding rather than the
+ contained expression.
+ * c-common.c (c_fully_fold, c_fully_fold_internal, c_save_expr): New.
+ (c_common_truthvalue_conversion): Use c_save_expr. Do not fold
+ conditional expressions for C.
+ (decl_constant_value_for_optimization): Move from
+ decl_constant_value_for_broken_optimization in c-typeck.c. Check
+ whether optimizing and that the expression is a VAR_DECL not of
+ array type instead of doing such checks in the caller. Do not
+ check pedantic. Call gcc_unreachable for C++.
+ * c-common.def (C_MAYBE_CONST_EXPR): New.
+ * c-common.h (c_fully_fold, c_save_expr,
+ decl_constant_value_for_optimization): New prototypes.
+ (C_MAYBE_CONST_EXPR_PRE, C_MAYBE_CONST_EXPR_EXPR,
+ C_MAYBE_CONST_EXPR_INT_OPERANDS, C_MAYBE_CONST_EXPR_NON_CONST,
+ EXPR_INT_CONST_OPERANDS): Define.
+ * c-convert.c (convert): Strip nops from expression.
+ * c-decl.c (groktypename): Take extra parameters expr and
+ expr_const_operands. Update call to grokdeclarator.
+ (start_decl): Update call to grokdeclarator. Add statement for
+ expressions used in type of decl.
+ (grokparm): Update call to grokdeclarator.
+ (push_parm_decl): Update call to grokdeclarator.
+ (build_compound_literal): Add parameter non_const and build a
+ C_MAYBE_COSNT_EXPR if applicable.
+ (grokdeclarator): Take extra parameters expr and
+ expr_const_operands. Track expressions used in declaration
+ specifiers and declarators. Fold array sizes and track whether
+ they are constant expressions and whether they are integer
+ constant expressions.
+ (parser_xref_tag): Set expr and expr_const_operands fields in
+ return value.
+ (grokfield): Update call to grokdeclarator.
+ (start_function): Update call to grokdeclarator.
+ (build_null_declspecs): Set expr and expr_const_operands fields in
+ return value.
+ (declspecs_add_type): Handle expressions in typeof specifiers.
+ * c-parser.c (c_parser_declspecs): Set expr and
+ expr_const_operands fields for declaration specifiers.
+ (c_parser_enum_specifier): Likewise.
+ (c_parser_struct_or_union_specifier): Likewise.
+ (c_parser_typeof_specifier): Likewise. Update call to
+ groktypename. Fold expression as needed. Return expressions with
+ type instead of adding statements.
+ (c_parser_attributes): Update calls to c_parser_expr_list.
+ (c_parser_statement_after_labels): Fold expression before passing
+ to objc_build_throw_stmt.
+ (c_parser_condition): Fold expression.
+ (c_parser_asm_operands): Fold expression.
+ (c_parser_conditional_expression): Use c_save_expr. Update call
+ to build_conditional_expr.
+ (c_parser_alignof_expression): Update call to groktypename.
+ (c_parser_postfix_expression): Preserve C_MAYBE_CONST_EXPR as
+ original_code. Fold expression argument of va_arg. Create
+ C_MAYBE_CONST_EXPR to preserve side effects of expressions in type
+ argument to va_arg. Update calls to groktypename. Fold array
+ index for offsetof. Verify that first argument to
+ __builtin_choose_expr has integer type.
+ (c_parser_postfix_expression_after_paren_type): Update calls to
+ groktypename and build_compound_literal. Handle expressions with
+ side effects in type name.
+ (c_parser_postfix_expression_after_primary): Update call to
+ c_parser_expr_list. Set original_code for calls to
+ __builtin_constant_p.
+ (c_parser_expr_list): Take extra parameter fold_p. Fold
+ expressions if requested.
+ (c_parser_objc_type_name): Update call to groktypename.
+ (c_parser_objc_synchronized_statement): Fold expression.
+ (c_parser_objc_receiver): Fold expression.
+ (c_parser_objc_keywordexpr): Update call to c_parser_expr_list.
+ (c_parser_omp_clause_num_threads, c_parser_omp_clause_schedule,
+ c_parser_omp_atomic, c_parser_omp_for_loop): Fold expressions.
+ * c-tree.h (CONSTRUCTOR_NON_CONST): Define.
+ (struct c_typespec): Add elements expr and expr_const_operands.
+ (struct c_declspecs): Add elements expr and expr_const_operands.
+ (groktypename, build_conditional_expr, build_compound_literal):
+ Update prototypes.
+ (in_late_binary_op): Declare.
+ * c-typeck.c (note_integer_operands): New function.
+ (in_late_binary_op): New variable.
+ (decl_constant_value_for_broken_optimization): Move to c-common.c
+ and rename to decl_constant_value_for_optimization.
+ (default_function_array_conversion): Do not strip nops.
+ (default_conversion): Do not call
+ decl_constant_value_for_broken_optimization.
+ (build_array_ref): Do not fold result.
+ (c_expr_sizeof_expr): Fold operand. Use C_MAYBE_CONST_EXPR for
+ result when operand is a VLA.
+ (c_expr_sizeof_type): Update call to groktypename. Handle
+ expressions included in type name. Use C_MAYBE_CONST_EXPR for
+ result when operand names a VLA type.
+ (build_function_call): Update call to build_compound_literal.
+ Only fold result for calls to __builtin_* functions. Strip
+ NOP_EXPR from INTEGER_CST returned from such functions. Fold
+ the function designator.
+ (convert_arguments): Fold arguments. Update call to
+ convert_for_assignment.
+ (build_unary_op): Handle increment and decrement of
+ C_MAYBE_CONST_EXPR. Move lvalue checks for increment and
+ decrement earlier. Fold operand of increment and decrement.
+ Handle address of C_MAYBE_CONST_EXPR. Only fold expression being
+ built for integer operand. Wrap returns that are INTEGER_CSTs
+ without being integer constant expressions or that have integer
+ constant operands without being INTEGER_CSTs.
+ (lvalue_p): Handle C_MAYBE_CONST_EXPR.
+ (build_conditional_expr): Add operand ifexp_bcp. Track whether
+ result is an integer constant expression or can be used in
+ unevaluated parts of one and avoid folding and wrap as
+ appropriate. Fold operands before possibly doing -Wsign-compare
+ warnings.
+ (build_compound_expr): Wrap result for C99 if operands can be used
+ in integer constant expressions.
+ (build_c_cast): Update call to digest_init. Do not ignore
+ overflow from casting floating-point constants to integers. Wrap
+ results that could be confused with integer constant expressions,
+ null pointer constants or floating-point constants.
+ (c_cast_expr): Update call to groktypename. Handle expressions
+ included in type name.
+ (build_modify_expr): Handle modifying a C_MAYBE_CONST_EXPR. Fold
+ lhs inside possible SAVE_EXPR. Fold RHS before assignment.
+ Update calls to convert_for_assignment.
+ (convert_for_assignment): Take new parameter
+ null_pointer_constant. Do not strip nops or call
+ decl_constant_value_for_broken_optimization. Set
+ in_late_binary_op for conversions to boolean.
+ (store_init_value): Update call to digest_init.
+ (digest_init): Take new parameter null_pointer_constant. Do not
+ call decl_constant_value_for_broken_optimization. pedwarn for
+ initializers not constant expressions. Update calls to
+ convert_for_assignment.
+ (constructor_nonconst): New.
+ (struct constructor_stack): Add nonconst element.
+ (really_start_incremental_init, push_init_level, pop_init_level):
+ Handle constructor_nonconst and nonconst element.
+ (set_init_index): Call constant_expression_warning for array
+ designators.
+ (output_init_element): Fold value. Set constructor_nonconst as
+ applicable. pedwarn for initializers not constant expressions.
+ Update call to digest_init. Call constant_expression_warning
+ where constant initializers are required.
+ (process_init_element): Use c_save_expr.
+ (c_finish_goto_ptr): Fold expression.
+ (c_finish_return): Fold return value. Update call to
+ convert_for_assignment.
+ (c_start_case): Fold switch expression.
+ (c_process_expr_stmt): Fold expression.
+ (c_finish_stmt_expr): Create C_MAYBE_CONST_EXPR as needed to
+ ensure statement expression is not evaluated in constant expression.
+ (build_binary_op): Track whether results are integer constant
+ expressions or may occur in such, disable folding and wrap results
+ as applicable. Fold operands for -Wsign-compare warnings unless
+ in_late_binary_op.
+ (c_objc_common_truthvalue_conversion): Handle results folded to
+ integer constants that are not integer constant expressions.
+ * doc/extend.texi: Document when typeof operands are evaluated,
+ that condition of __builtin_choose_expr is an integer constant
+ expression, and more about use of __builtin_constant_p in
+ initializers.
+
+2009-03-29 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Properly
+ propagate addresses of array references.
+
+2009-03-29 Steven Bosscher <steven@gcc.gnu.org>
+
+ * regmove.c (perhaps_ends_bb_p): Remove.
+ (optimize_reg_copy_1): Don't call perhaps_ends_bb_p. Get basic block
+ from INSN and check that the main loop stays within that basic block.
+ (optimize_reg_copy_1, optimize_reg_copy_3, fixup_match_2): Likewise.
+ (regmove_forward_pass): Split out from regmove_optimize. Use
+ FOR_EACH_BB and FOR_BB_INSNS instead of traversing the insns stream.
+ (regmove_backward_pass): Split out from regmove_optimize. Use
+ FOR_EACH_BB_REVERSE and FOR_BB_INSNS_REVERS_SAFE.
+ (regmove_optimize): Simplify.
+
+2009-03-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39545
+ * config/i386/i386.c (classify_argument): Ignore flexible array
+ member in struct and warn ABI change.
+
+2009-03-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386-protos.h (ix86_agi_dependent): New.
+
+ * config/i386/i386.c (ix86_agi_dependent): Rewrite.
+ (ix86_adjust_cost): Updated.
+
+2009-03-29 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/28850
+ * tree-pass.h (pass_cleanup_eh): New function.
+ (remove_unreachable_regions): Break code handling RTL
+ to rtl_remove_unreachable_regions; remove ERT_MUST_NOT_THROW
+ that can not be reached by runtime.
+ (can_be_reached_by_runtime): New function.
+ (label_to_region_map): New function.
+ (num_eh_regions): New function.
+ (rtl_remove_unreachable_regions): New function.
+ (convert_from_eh_region_ranges): Call rtl_remove_unreachable_regions.
+ (remove_eh_region): New function.
+ * except.h: Include sbitmap and vecprim.
+ (remove_eh_region, remove_unreachable_regions, label_to_region_map,
+ num_eh_regions): Declare.
+ * passes.c (init_optimization_passes): Schedule cleanup_eh.
+ * Makefile.in (EXCEPT_H): New; replace all uses of except.h by it.
+ * tree-eh.c (tree_remove_unreachable_handlers): New function.
+ (tree_empty_eh_handler_p): New function.
+ (cleanup_empty_eh): New function.
+ (cleanup_eh): New function.
+ (pass_cleanup_eh): New function.
+
+2009-03-29 Jan Hubicka <jh@suse.cz>
+
+ * except.c (verify_eh_tree): Fix handling of fun!=cfun; be ready
+ for removed regions.
+
+2009-03-29 Jan Hubicka <jh@suse.cz>
+
+ * except.c (dump_eh_tree): Dump all datastructures.
+
+2009-03-29 Jan Hubicka <jh@suse.cz>
+
+ * except.c (duplicate_eh_regions_0): Handle AKA bitmap.
+ (duplicate_eh_regions_1): Likewise.
+ (duplicate_eh_regions): Likewise; cleanup code gorwing the region
+ vector; call EH verification.
+ (foreach_reachable_handler, can_throw_internal_1, can_throw_external_1):
+ Be ready for region being removed.
+
+2009-03-29 Jan Hubicka <jh@suse.cz>
+
+ * bitmap.c (bitmap_last_set_bit): New function.
+ * bitmap.h (bitmap_last_set_bit): Declare.
+
+2009-03-29 David Ayers <ayers@fsfe.org>
+
+ PR objc/27377
+ * c-typeck.c (build_conditional_expr): Emit ObjC warnings
+ by calling objc_compare_types and surpress warnings about
+ incompatible C pointers that are compatible ObjC pointers.
+
+2009-03-29 Adam Nemet <anemet@caviumnetworks.com>
+
+ * cgraphbuild.c (build_cgraph_edges, rebuild_cgraph_edges): Don't
+ call initialize_inline_failed.
+ (initialize_inline_failed): Move it from here ...
+ * cgraph.c (initialize_inline_failed): ... to here.
+ (cgraph_create_edge): Call initialize_inline_failed rather than
+ setting inline_failed directly.
+
+2009-03-29 Ben Elliston <bje@au.ibm.com>
+
+ PR target/32542
+ * sysv4.opt (msdata): Improve comment.
+ * linux64.h (ASM_SPEC32): Do not pass -memb when -msdata is given.
+ * sysv4.h (SVR4_ASM_SPEC): Likewise.
+
+2009-03-29 Ben Elliston <bje@au.ibm.com>
+
+ PR target/30451
+ * config/rs6000/rs6000.md (*movti_ppc64): Correct the order of
+ load and store attributes.
+
+2009-03-29 Ben Elliston <bje@au.ibm.com>
+
+ * config/i386/i386.c (enum ix86_builtins): Add IX86_BUILTIN_HUGE_VALQ.
+ (ix86_init_builtins): Add built-in function __builtin_huge_valq.
+ (ix86_expand_builtin): Handle IX86_BUILTIN_HUGE_VALQ.
+ * doc/extend.texi (X86 Built-in Functions): Add index entries for
+ __builtin_infq and __builtin_huge_valq.
+
+2009-03-28 Anatoly Sokolov <aesok@post.ru>
+
+ * config/avr/avr.c (avr_mcu_t): Add atmega8c1, atmega16c1 and
+ atmega8m1 devices.
+ * config/avr/avr.h (LINK_SPEC, CRT_BINUTILS_SPECS): (Ditto.).
+ * config/avr/t-avr (MULTILIB_MATCHES): (Ditto.)
+
+2009-03-28 Xinliang David Li <davidxl@google.com>
+
+ * tree-ssa-ccp.c (ccp_finalize): Add dbg_count support.
+ (do_dbg_cnt): New function.
+
+2009-03-28 Jan Hubicka <jh@suse.cz>
+
+ Merge from pretty-ipa:
+
+ 2009-03-27 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.c (dump_cgraph_node): Add replace output flag by process.
+ * tree-pass.h (function_called_by_processed_nodes_p): Declare.
+ * passes.c (function_called_by_processed_nodes_p): New.
+ * ipa-pure-const.c (check_call): Fix handling of operands.
+ (analyze_function): Dump debug output for skipped bodies.
+ (local_pure_const): Use function_called_by_processed_nodes_p.
+ * dwarf2out.c (reference_to_unused): Use output.
+ * passes.c (do_per_function_toporder): Likewise.
+
+ 2008-11-12 Jan Hubicka <jh@suse.cz>
+
+ * tree-pass.h (pass_fixup_cfg, pass_local_pure_const): Declare.
+ * ipa-pure-const.c (funct_state_d): Add can throw field; make
+ state_set_in_source enum
+ (check_decl): Ignore memory tags; do not set fake looping flags;
+ dump diagnostics.
+ (check_operand, check_tree, check_rhs_var, check_lhs_var,
+ get_asm_expr_operands, scan_function_op, scan_function_stmt): Remove.
+ (check_call, analyze_function): Rewrite.
+ (check_stmt): New.
+ (add_new_function): Update call of analyze_function.
+ (generate_summary): Add call of analyze_function.
+ (propagate): Propagate can_throw; handle state_set_in_source correctly.
+ (local_pure_const): New function.
+ (pass_local_pure_const): New pass.
+ * ipa-inline.c (inline_transform): Set after_inlining.
+ * tree-eh.c (stmt_can_throw_external): New.
+ * tree-optimize.c (execute_fixup_cfg): Do not set after_inlining;
+ work with aliasing built.
+ * tree-flow.h (stmt_can_throw_external): New.
+ * passes.c (init_optimization_passes): Schedule fixup_cfg pass early;
+ and local pure/const pass in early and late optimization queue.
+
+2009-03-28 Martin Jambor <mjambor@suse.cz>
+
+ * fold-const.c (get_pointer_modulus_and_residue): New parameter
+ allow_func_align.
+ (fold_binary): Allow function decl aligment consideration is the
+ second argument is integer constant one.
+ * tree-ssa-forwprop.c (simplify_bitwise_and): New function.
+ (tree_ssa_forward_propagate_single_use_vars): Handle assing statements
+ with BIT_AND_EXPR on the RHS by calling simplify_bitwise_and.
+
+2009-03-28 Jan Hubicka <jh@suse.cz>
+
+ * dwarf2out.c (dwarf2out_begin_prologue): Use crtl->nothrow
+ * tree-eh.c (stmt_could_throw_p): Remove check for WEAK decls.
+ * function.h (rtl_data): Add nothrow flag.
+ * except.c (set_nothrow_function_flags): Use crtl->nothrow;
+ set DECL_NOTHROW for AVAILABLE functions.
+
+2009-03-28 Jakub Jelinek <jakub@redhat.com>
+
+ * config/rs6000/rs6000-c.c (rs6000_macro_to_expand): If macro
+ following vector keyword has expansion starting with pixel or bool
+ keyword, expand vector to __vector and pixel or bool to __pixel or
+ __bool.
+
+ PR c++/39554
+ * opts.c (warning_disallowed_functions, warn_disallowed_functions,
+ warn_if_disallowed_function_p): Removed.
+ (common_handle_option): Don't handle OPT_Wdisallowed_function_list_.
+ * c-parser.c (c_parser_postfix_expression_after_primary): Don't call
+ warning_if_disallowed_function_p.
+ * flags.h (warn_if_disallowed_function_p,
+ warn_disallowed_functions): Removed.
+ * common.opt (Wdisallowed-function-list=): Removed.
+ * doc/invoke.texi (-Wdisallowed-function-list=): Removed.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38723
+ * tree-ssa-pre.c (compute_avail): Add all default definitions to
+ the entry block.
+
+2009-03-28 Jan Hubicka <jh@suse.cz>
+
+ * tree-ssa-structalias.c (ipa_pta_execute): Fix bogus node->analyzed
+ test introduced by my previous patch.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-copy.c (copy_prop_visit_phi_node): Do not leave
+ the PHIs value undefined.
+
+2009-03-28 Jan Hubicka <jh@suse.cz>
+
+ * tree-pass.h (pass_fixup_cfg): New pass.
+ * ipa-inline.c (inline_transform): Set
+ always_inline_functions_inlined/after_inlining.
+ * tree-optimize.c (execute_fixup_cfg): Do not set them here.
+ (pass_fixup_cfg): New pass.
+ * passes.c (init_optimization_passes): Add fixup_cfg.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38458
+ * tree-ssa-copy.c (copy_prop_visit_phi_node): For the first
+ argument use the arguments copy-of value.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38180
+ * tree-ssa-ccp.c (get_default_value): Simplify.
+ (likely_value): Likewise.
+ (surely_varying_stmt_p): Properly handle VOP case.
+ (ccp_initialize): Likewise.
+ (ccp_fold): Handle propagating through *&.
+ (fold_const_aggregate_ref): Also handle decls.
+
+2009-03-28 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.c (dump_cgraph_node): Add replace output flag by process.
+ * cgraph.h (cgraph_node): Likewise.
+ * cgraphunit.c (cgraph_process_new_functions): Set process flag.
+ (cgraph_reset_node): Use process flag.
+ (cgraph_mark_functions_to_output): Likewise.
+ (cgraph_expand_function): Likewise.
+ (cgraph_expand_all_functions): Likewise.
+ (cgraph_output_in_order): Likewise.
+ * dwarf2out.c (reference_to_unused): Likewise.
+ * passes.c do_per_function_toporder): Likewise.
+
+2009-03-28 Jan Hubicka <jh@suse.cz>
+
+ Bring from lto-branch:
+
+ 2008-09-03 Doug Kwan <dougkwan@google.com>
+
+ * cgraphbuild.c (initialize_inline_failed): Use cgraph_inline_failed_t
+ enums instead of reason strings.
+ * cgraph.c (cgraph_create_edge): Same.
+ (cgraph_inline_failed_string): New function.
+ * cgraph.h (cgraph_inline_failed_t): New enum type.
+ (cgraph_inline_failed_string): New prototype.
+ (struct cgraph_edge): Change type of INLINED_FAILED from constant
+ char pointer to cgraph_inline_failed_t.
+ (cgraph_inline_p): Adjust prototype to use cgraph_inline_failed_t.
+ (cgraph_default_inline_p): Ditto.
+ * gcc/cgraphunit.c (cgraph_inline_p): Change type of parameter REASON
+ to cgraph_inline_failed_t pointer.
+ * cif-code.def: New file.
+ * ipa-inline.c (cgraph_mark_inline_edge): Use an enum instead of a
+ reason string.
+ (cgraph_check_inline_limits): Change type of REASON to pointer to
+ cgraph_inline_failed_t. Replace reason strings with enums.
+ (cgraph_default_inline_p): Ditto.
+ (cgraph_recursive_inlining_p): Ditto.
+ (update_caller_keys): Change type of FAILED_REASON to
+ cgraph_inline_failed_t.
+ (cgraph_set_inline_failed): Change type of REASON to pointer to
+ cgraph_inline_failed_t. Call cgraph_inline_failed_string to
+ convert enums to strings for text output.
+ (cgraph_decide_inlining_of_small_function): Change FAILED_REASON
+ to be of type cgraph_inline_failed_t. Replace reason strings with
+ enums. Call cgraph_inline_failed_string to covert enums
+ to strings for text output.
+ (cgraph_decide_inlining): Replace reason strings with enums.
+ (cgraph_decide_inlining_incrementally): Change type of FAILED_REASON
+ to cgraph_inline_failed_t type. Call cgraph_inline_failed_string
+ for text output.
+ * tree-inline.c (expand_call_inline): Change type of REASON
+ to cgraph_inline_failed_t. Replace reason strings with enums.
+ Call cgraph_inline_failed_string for text output.
+ * Makefile.in (CGRAPH_H): Add cif-code.def to dependencies.
+ (cgraph.o): Ditto.
+
+2009-03-28 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.c (cgraph_node, cgraph_remove_node, dump_cgraph_node,
+ cgraph_clone_node): Remove master clone handling.
+ (cgraph_is_master_clone, cgraph_master_clone): Remove.
+ * cgraph.h (master_clone): Remove.
+ (cgraph_is_master_clone, cgraph_master_clone): Remove.
+ * ipa-type-escape.c (type_escape_execute): Remove use of master clone.
+ (tree-ssa-structalias.c (ipa_pta_execute): Likewise.
+
+2009-03-28 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.c (cgraph_function_body_availability): Functions declared
+ inline are always safe to assume that it is not going to be replaced.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38513
+ * tree-ssa-pre.c (eliminate): Remove redundant stores.
+ * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle
+ EXC_PTR_EXPR and FILTER_EXPR.
+ (get_ref_from_reference_ops): Likewise.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38968
+ * tree-vect-analyze.c (vect_compute_data_ref_alignment):
+ Use FLOOR_MOD_EXPR to compute misalignment.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/37795
+ * tree.h (combine_comparisons): Declare.
+ * fold-const.c (combine_comparisons): Export.
+ * tree-ssa-ifcombine.c (ifcombine_ifandif): Optimize two successive
+ comparisons.
+ (ifcombine_iforif): Use combine_comparisons.
+
+2009-03-28 Jan Hubicka <jh@suse.cz>
+
+ * tree-eh.c (inlinable_call_p): New function.
+ (make_eh_edges): Use it.
+ (verify_eh_edges): Use it.
+ (stmt_can_throw_external, stmt_can_throw_internal): Use it.
+ * except.c (reachable_next_level): Add inlinable_function argument
+ (sjlj_find_directly_reachable_regions): Update.
+ (add_reachable_handler): Do not set saw_any_handlers.
+ (reachable_next_level): Handle MUST_NOT_THROW more curefully.
+ (foreach_reachable_handler, can_throw_internal_1, can_throw_external_1):
+ Add new inlinable call parameter.
+ (can_throw_internal, can_throw_external): Update.
+ * except.h (can_throw_internal_1, can_throw_external_1,
+ foreach_reachable_handler): Update declaration.
+
+2009-03-28 Joseph Myers <joseph@codesourcery.com>
+
+ * config/arm/t-arm-coff, config/h8300/coff.h,
+ config/i386/i386-aout.h, config/i386/i386-coff.h,
+ config/libgloss.h, config/m68k/coff.h, config/m68k/m68k-aout.h,
+ config/pdp11/2bsd.h, config/rs6000/aix41.h,
+ config/rs6000/aix41.opt, config/rs6000/t-newas, config/sh/coff.h,
+ fix-header.c, fixproto, gen-protos.c, protoize.c, scan-decls.c,
+ scan-types.sh, scan.c, scan.h, sort-protos, sys-protos.h,
+ sys-types.h: Remove.
+ * Makefile.in: Remove protoize and fixproto support and references
+ in comments.
+ (SYSCALLS.c.X-warn, TARGET_GETGROUPS_T, STMP_FIXPROTO,
+ PROTOIZE_INSTALL_NAME, UNPROTOIZE_INSTALL_NAME, FIXPROTO_DEFINES):
+ Remove.
+ (ALL_HOST_OBJS): Remove $(PROTO_OBJS).
+ (MOSTLYCLEANFILES): Remove protoize$(exeext) and
+ unprotoize$(exeext).
+ (rest.encap): Don't depend on $(STMP_FIXPROTO)
+ (.PHONY): Don't depend on proto.
+ (libgcc-support): Don't depend on $(STMP_FIXPROTO).
+ (proto, PROTO_OBJS, protoize$(exeext), unprotoize$(exeext),
+ protoize.o, unprotoize.o, SYSCALLS.c.X, test-protoize-simple,
+ deduced.h, GEN_PROTOS_OBJS, build/gen-protos$(build_exeext),
+ build/gen-protos.o, build/scan.o, xsys-protos.h,
+ build/fix-header$(build_exeext), build/fix-header.o,
+ build/scan-decls.o, fixhdr.ready, stmp-fixproto,
+ stmp-install-fixproto): Remove.
+ (mostlyclean): Don't remove xsys-protos.hT, SYSCALLS.c.X,
+ SYSCALLS.c or fixproto files.
+ (install-common): Don't install protoize.
+ (install-headers-tar, install-headers-cpio, install-headers-cp):
+ Don't depend on $(STMP_FIXPROTO).
+ (install-mkheaders): Don't depend on $(STMP_FIXPROTO). Don't
+ install fixproto files or write out fixproto settings.
+ (uninstall): Don't uninstall protoize.
+ * config.gcc (use_fixproto): Remove.
+ (arm-*-coff*, armel-*-coff*, h8300-*-*, i[34567]86-*-aout*,
+ i[34567]86-*-coff*, m68k-*-aout*, m68k-*-coff*, pdp11-*-bsd,
+ rs6000-ibm-aix4.[12]*, powerpc-ibm-aix4.[12]*, sh-*-*): Remove.
+ * config/m32r/t-linux (STMP_FIXPROTO): Remove.
+ * config/m68k/m68k.c: Remove M68K_TARGET_COFF-conditional code.
+ * config/mips/t-iris (FIXPROTO_DEFINES): Remove.
+ * config/pa/t-pa-hpux (FIXPROTO_DEFINES): Remove.
+ * config/pdp11/pdp11.c: Remove TWO_BSD-conditional code.
+ * config/t-svr4 (FIXPROTO_DEFINES): Remove.
+ * config/t-vxworks (STMP_FIXPROTO): Remove.
+ * configure.ac (AC_TYPE_GETGROUPS, TARGET_GETGROUPS_T,
+ STMP_FIXPROTO): Remove.
+ * config.in, configure: Regenerate.
+ * crtstuff.c (gid_t, uid_t): Don't undefine.
+ * doc/install.texi: Change m68k-coff to m68k-elf in example.
+ (arm-*-coff, arm-*-aout: Remove target entries.
+ (*-ibm-aix*): Mention removal of support for AIX 4.2 and older.
+ Remove mention of AIX 4.1.
+ (m68k-*-*): Remove mention of m68k-*-aout and m68k-*-coff*.
+ * doc/invoke.texi (Running Protoize): Remove.
+ * doc/trouble.texi (Actual Bugs): Remove mention of fixproto.
+ (Protoize Caveats): Remove.
+ * tsystem.h: Update comments on headers assumed to exist.
+
+2009-03-27 Vladimir Makarov <vmakarov@redhat.com>
+
+ * genautomata.c: Add a new year to the copyright. Add a new
+ reference.
+ (struct insn_reserv_decl): Add comments for member bypass_list.
+ (find_bypass): Remove.
+ (insert_bypass): New.
+ (process_decls): Use insert_bypass.
+ (output_internal_insn_latency_func): Output all bypasses with the
+ same input insn in one switch case.
+
+ * rtl.def (define_bypass): Describe bypass choice.
+ * doc/md.texi (define_bypass): Ditto.
+
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ * gimplify.c (mark_addressable): Export.
+ * tree-flow.h (mark_addressable): Declare.
+ * tree-ssa-loop-manip.c (create_iv): Mark the base addressable.
+ * tree-ssa.c (verify_phi_args): Verify that address taken
+ variables have TREE_ADDRESSABLE set.
+
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ * fold-const.c (build_fold_addr_expr_with_type_1): Rename back to ...
+ (build_fold_addr_expr_with_type): ... this. Remove in_fold handling.
+ Do not mark decls TREE_ADDRESSABLE.
+ (build_fold_addr_expr): Adjust.
+ (fold_addr_expr): Remove.
+ (fold_unary): Use build_fold_addr_expr.
+ (fold_comparison): Likewise.
+ (split_address_to_core_and_offset): Likewise.
+ * coverage.c (tree_coverage_counter_addr): Mark the array decl
+ TREE_ADDRESSABLE.
+ * gimplify.c (mark_addressable): Do not exclude RESULT_DECLs.
+ (gimplify_modify_expr_to_memcpy): Mark source and destination
+ addressable.
+ * omp-low.c (create_omp_child_function): Mark the object decl
+ TREE_ADDRESSABLE.
+ (lower_rec_input_clauses): Mark the var we take the address of
+ TREE_ADDRESSABLE.
+ (lower_omp_taskreg): Mark the sender decl TREE_ADDRESSABLE.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/39315
+ * cfgexpand.c (expand_one_stack_var_at): Change alignment
+ limit to MAX_SUPPORTED_STACK_ALIGNMENT.
+
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39120
+ * tree-ssa-structalias.c (handle_rhs_call): Fill out return
+ constraints.
+ (handle_lhs_call): Process return constraints. Add escape
+ constraints if necessary.
+ (handle_const_call): Fill out return constraints. Make nested
+ case more precise. Avoid consttmp if possible.
+ (handle_pure_call): Fill out return constraints. Avoid
+ callused if possible.
+ (find_func_aliases): Simplify call handling.
+
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39120
+ * tree-ssa-structalias.c (do_sd_constraint): Do not use CALLUSED
+ as a representative.
+ (solve_graph): Do propagate CALLUSED.
+ (handle_pure_call): Use a scalar constraint from CALLUSED for
+ the return value.
+ (find_what_p_points_to): CALLUSED shall not appear in poins-to
+ solutions.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR c/39323
+ * c-common.c (handle_aligned_attribute): Properly check alignment
+ overflow. Use (1U << i) instead of (1 << i).
+
+ * emit-rtl.c (get_mem_align_offset): Use "unsigned int" for align.
+
+ * expr.h (get_mem_align_offset): Updated.
+
+ * tree.h (tree_decl_common): Change align to "unsigned int" and
+ move it before pointer_alias_set.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR target/38034
+ * config/ia64/sync.md (cmpxchg_rel_<mode>): Replace input
+ gr_register_operand with gr_reg_or_0_operand.
+ (cmpxchg_rel_di): Likewise.
+ (sync_lock_test_and_set<mode>): Likewise.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * jump.c (rtx_renumbered_equal_p): Use subreg_get_info.
+ (true_regnum): Likewise.
+
+ * rtlanal.c (subreg_info): Moved to ...
+ * rtl.h (subreg_info): Here. New.
+ (subreg_get_info): New.
+
+ * rtlanal.c (subreg_get_info): Make it extern.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39472
+ * config/i386/i386.c (ix86_abi): New.
+ (override_options): Handle -mabi=.
+ (ix86_function_arg_regno_p): Replace DEFAULT_ABI with ix86_abi.
+ (ix86_call_abi_override): Likewise.
+ (init_cumulative_args): Likewise.
+ (function_arg_advance): Likewise.
+ (function_arg_64): Likewise.
+ (function_arg): Likewise.
+ (ix86_pass_by_reference): Likewise.
+ (ix86_function_value_regno_p): Likewise.
+ (ix86_build_builtin_va_list_abi): Likewise.
+ (setup_incoming_varargs_64): Likewise.
+ (is_va_list_char_pointer): Likewise.
+ (ix86_init_machine_status): Likewise.
+ (ix86_reg_parm_stack_space): Use enum calling_abi on call_abi.
+ (ix86_function_type_abi): Return enum calling_abi. Rewrite
+ for 64bit. Replace DEFAULT_ABI with ix86_abi.
+ (ix86_function_abi): Make it static and return enum calling_abi.
+ (ix86_cfun_abi): Return enum calling_abi. Replace DEFAULT_ABI
+ with ix86_abi.
+ (ix86_fn_abi_va_list): Updated.
+
+ * config/i386/i386.h (ix86_abi): New.
+ (STACK_BOUNDARY): Replace DEFAULT_ABI with ix86_abi.
+ (CONDITIONAL_REGISTER_USAGE): Likewise.
+ (CUMULATIVE_ARGS): Change call_abi type to enum calling_abi.
+ (machine_function): Likewise.
+
+ * config/i386/i386.md (untyped_call): Replace DEFAULT_ABI
+ with ix86_abi.
+ * config/i386/cygming.h (TARGET_64BIT_MS_ABI): Likewise.
+ (STACK_BOUNDARY): Likewise.
+ * config/i386/mingw32.h (EXTRA_OS_CPP_BUILTINS): Likewise.
+
+ * config/i386/i386.opt (mabi=): New.
+
+ * config/i386/i386-protos.h (ix86_cfun_abi): Changed to
+ return enum calling_abi.
+ (ix86_function_type_abi): Likewise.
+ (ix86_function_abi): Removed.
+
+ * doc/invoke.texi: Document -mabi= option for x86.
+
+2009-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * builtins.c (real_dconstp): Delete.
+ (fold_builtin_logarithm): Remove inaccurate log(e) special case.
+
+2009-03-27 Dodji Seketeli <dodji@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/37959
+ * dwarf2out.c (dwarf_attr_name): Handle DW_AT_explicit attribute.
+ (gen_subprogram_die): When a function is explicit, generate the
+ DW_AT_explicit attribute.
+ * langhooks.h (struct lang_hooks_for_decls): Add
+ function_decl_explicit_p langhook.
+ * langhooks-def.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
+ (LANG_HOOKS_DECLS): Add LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P.
+
+2009-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ * builtins.c (fold_builtin_memory_op): Optimize memmove
+ into memcpy if we can prove source and destination don't overlap.
+
+ * tree-inline.c: Include gt-tree-inline.h.
+ (clone_fn_id_num): New variable.
+ (clone_function_name): New function.
+ (tree_function_versioning): Use it.
+ * Makefile.in (GTFILES): Add tree-inline.c.
+
+2009-03-27 Mark Mitchell <mark@codesourcery.com>
+
+ * BASE-VER: Change to 4.5.0.
+
+2009-03-27 Xinliang David Li <davidxl@google.com>
+
+ PR tree-optimization/39557
+ * tree-ssa.c (warn_uninitialized_vars): free postdom info.
+
+2009-03-27 Xinliang David Li <davidxl@google.com>
+
+ PR tree-optimization/39548
+ * tree-ssa-copy.c (copy_prop_visit_phi_node): Add copy
+ candidate check.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * c-common.c (pointer_int_sum): Use %wd on return from
+ tree_low_cst.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * c-common.c (pointer_int_sum): Use HOST_WIDE_INT_PRINT_DEC
+ on return from tree_low_cst.
+
+2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR c++/36799
+ * ginclude/stdarg.h (va_copy): Define also for
+ __GXX_EXPERIMENTAL_CXX0X__.
+
+2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ PR c++/35652
+ * builtins.h (c_strlen): Do not warn here.
+ * c-typeck.c (build_binary_op): Adjust calls to pointer_int_sum.
+ * c-common.c (pointer_int_sum): Take an explicit location.
+ Warn about offsets out of bounds.
+ * c-common.h (pointer_int_sum): Adjust declaration.
+
+2009-03-26 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * doc/invoke.texi (i386 and x86-64 Windows Options): Fix texinfo
+ markup glitch.
+
+2009-03-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/39554
+ * opts.c (warn_if_disallowed_function_p): Don't assume
+ get_callee_fndecl must return non-NULL.
+
+2009-03-26 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/39522
+ * reload1.c (reload_as_needed): Invalidate reg_last_reload_reg too
+ when reg_reloaded_valid is set.
+
+2009-03-26 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/spu/divv2df3.c: New file.
+ * config/spu/t-spu-elf (LIB2FUNCS_STATIC_EXTRA): Add it.
+ (DPBIT_FUNCS): Filter out _div_df.
+
+2009-03-26 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin/bfin.c (bfin_optimize_loop): If the LSETUP goes before
+ a jump insn, count that jump in the distance to the loop start.
+
+2009-03-25 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR target/39523
+ * config/sh/sh.c (calc_live_regs): Fix condition for global
+ registers except PIC_OFFSET_TABLE_REGNUM.
+
+2009-03-25 Kai Tietz <kai.tietz@onevision.com>
+
+ PR/39518
+ * doc/invoke.texi (-mconsole): New.
+ (-mcygwin): New.
+ (-mno-cygwin): New.
+ (-mdll): New.
+ (-mnop-fun-dllimport): New.
+ (-mthread): New.
+ (-mwin32): New.
+ (-mwindows): New.
+ (sub section "i386 and x86-64 Windows Options"): New.
+
+2009-03-25 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/arm/rtems-elf.h: Remove LINK_GCC_C_SEQUENCE_SPEC.
+ * config/rs6000/t-rtems: Remove MULTILIB_EXTRA_OPTS.
+
+2009-03-25 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/39497
+ * Makefile.in (dfp.o-warn): Use -fno-strict-aliasing instead
+ of -Wno-error.
+
+2009-03-25 Andrey Belevantsev <abel@ispras.ru>
+
+ * config/ia64/ia64.c (ia64_set_sched_flags): Zero spec_info->mask when
+ neither of haifa/selective schedulers are working.
+
+2009-03-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * doc/invoke.texi (Debugging Options): Fix description of
+ -fno-merge-debug-strings.
+
+2009-03-24 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/cris/libgcc.ver: New version-script.
+ * config/cris/t-linux (SHLIB_MAPFILES): Use it.
+
+ * configure.ac <GAS features, nop mnemonic>: Add pattern
+ crisv32-*-* for "nop".
+ <GAS features, Thread-local storage>: Add item for CRIS and CRIS v32.
+ * configure: Regenerate.
+
+2009-03-24 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/39529
+ * tree-vect-transform.c (vect_create_data_ref_ptr): Call
+ mark_sym_for_renaming for the tag copied to the new vector
+ pointer.
+
+2009-03-24 Arthur Loiret <aloiret@debian.org>
+
+ * config.host (alpha*-*-linux*): Use driver-alpha.o and alpha/x-alpha.
+ * config/alpha/linux.h (host_detect_local_cpu): Declare, add to
+ EXTRA_SPEC_FUNCTIONS.
+ (MCPU_MTUNE_NATIVE_SPECS, DRIVER_SELF_SPECS): New macros.
+ * config/alpha/driver-alpha.c, config/alpha/x-alpha: New.
+ * doc/invoke.texi (DEC Alpha Options): Document 'native' value for
+ -march and -mtune options.
+
+2009-03-24 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/m68k/t-rtems: Add m5329 multilib.
+
+2009-03-24 Dodji Seketeli <dodji@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/39524
+ * dwarf2out.c (gen_variable_die): Avoid adding duplicate declaration
+ nodes.
+
+2009-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/39495
+ * c-parser.c (c_parser_omp_for_loop): Call c_parser_binary_expression
+ instead of c_parser_expression_conv, if original_code isn't one of the
+ 4 allowed comparison codes, fail.
+
+2009-03-23 Richard Guenther <rguenther@suse.de>
+
+ * cgraph.h (struct cgraph_node): Reorder fields for 64-bit hosts.
+ * tree.h (struct tree_type): Likewise.
+ * reload.h (struct insn_chain): Likewise.
+ * dwarf2out.c (struct dw_loc_descr_struct): Likewise.
+ * function.h (struct function): Likewise.
+ * tree-ssa-structalias.c (struct equiv_class_label): Likewise.
+
+2009-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/39516
+ * lambda-code.c (perfect_nestify): Fix type of the uboundvar variable.
+
+2009-03-23 Bingfeng Mei <bmei@broadcom.com>
+
+ * config.gcc (need_64bit_hwint): Make clear that need_64bit_hwint
+ should be set true if BITS_PER_WORD of target is bigger than 32
+
+2009-03-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/cris/linux.h (CRIS_LINK_SUBTARGET_SPEC):
+ Translate -B-options to -rpath-link. Correct existing
+ rpath-link and conditionalize on !nostdlib.
+
+2009-03-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * doc/extend.texi (Function Attributes, Variable Attributes):
+ Fix typos.
+ * doc/invoke.texi (Debugging Options, Optimize Options)
+ (i386 and x86-64 Options, MCore Options): Likewise.
+
+2009-03-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/37890
+ * dwarf2out.c (gen_namespace_die): Add context_die argument and use
+ it for block local namespace aliases.
+ (gen_decl_die): Pass context_die to gen_namespace_die.
+
+2009-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/39495
+ * c-omp.c (c_finish_omp_for): Allow NE_EXPR with TREE_TYPE (decl)'s
+ minimum or maximum value.
+
+2009-03-19 Alexandre Oliva <aoliva@redhat.com>
+
+ * reginfo.c (globalize_reg): Recompute derived reg sets.
+
+2009-03-19 Ozkan Sezer <sezeroz@gmail.com>
+
+ PR target/39063
+ * libgcc2.c (mprotect): Do not use signed arguments for
+ VirtualProtect, use DWORD arguments. Also fix the 'may
+ be used uninitialized' warning for the np variable.
+
+2009-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/39496
+ * config/i386/i386.c (ix86_function_regparm): Don't optimize local
+ functions using regparm calling conventions when not optimizing.
+ (ix86_function_sseregparm): Similarly for sseregparm calling
+ conventions.
+
+2009-03-19 Li Feng <nemokingdom@gmail.com>
+
+ PR middle-end/39500
+ * tree-data-ref.c (analyze_subscript_affine_affine): There is no
+ dependence if the first conflict is after niter iterations.
+
+2009-03-19 Hans-Peter Nilsson <hp@axis.com>
+
+ PR middle-end/38609
+ * config/cris/cris.h (FRAME_POINTER_REQUIRED): Force for all
+ functions with dynamic stack-pointer adjustments.
+
+2009-03-19 Ben Elliston <bje@au.ibm.com>
+
+ * doc/invoke.texi (RS/6000 and PowerPC Options): Fix -msdata-data
+ option; change to -msdata=data.
+
+2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * c.opt: Unify help texts for -Wdeprecated, -Wsystem-headers,
+ and -fopenmp.
+
+2009-03-18 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR target/35180
+ * config/sparc/sparc.md (do_builtin_setjmp_setup): Prettify asm output.
+
+2009-03-18 Sandra Loosemore <sandra@codesourcery.com>
+
+ * doc/invoke.texi (Code Gen Options): Expand discussion of
+ -fno-common.
+
+2009-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ * dse.c (struct group_info): Reorder fields for 64-bit hosts.
+ * matrix-reorg.c (struct matrix_info): Likewise.
+ * tree-ssa-loop-ivopts.c (struct ivopts_data): Likewise.
+ * rtl.h (struct mem_attrs): Likewise.
+ * df.h (struct df): Likewise.
+ * tree-data-ref.h (struct data_dependence_relation): Likewise.
+ * ira-int.h (struct ira_allocno): Likewise.
+ * df-scan.c (struct df_collection_rec): Likewise.
+ * ira.c (struct equivalence): Likewise.
+ * function.c (struct temp_slot): Likewise.
+ * cfgloop.h (struct loop): Likewise.
+
+ PR debug/39485
+ * function.c (use_register_for_decl): When not optimizing, disregard
+ register keyword for variables with types containing methods.
+
+2009-03-18 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/39447
+ * graphite.c (exclude_component_ref): Renamed contains_component_ref_p.
+ (is_simple_operand): Call contains_component_ref_p before calling data
+ reference analysis that would fail on COMPONENT_REFs.
+
+ * tree-vrp.c (search_for_addr_array): Fix formatting.
+
+2009-03-18 Richard Guenther <rguenther@suse.de>
+
+ * tree-vect-transform.c (vect_loop_versioning): Fold the
+ generated comparisons.
+ * tree-vectorizer.c (set_prologue_iterations): Likewise.
+ (slpeel_tree_peel_loop_to_edge): Likewise.
+
+2009-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ PR middle-end/37805
+ * opts.c (print_specific_help): In addition to `undocumented',
+ accept `separate' and `joined' flags if passed alone. Describe
+ output by the first matched one of those.
+ (common_handle_option): Skip over empty strings.
+ * gcc.c (display_help): Fix help string for `--help='.
+ * doc/invoke.texi (Option Summary, Overall Options): With
+ `--help=', classes and qualifiers can both be repeated, but
+ only the latter can be negated. One should not pass only
+ negated qualifiers. Fix markup and examples.
+
+ Revert
+ 2008-10-14 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/37805
+ * opts.c (common_handle_option): Don't ICE on -fhelp=joined
+ and -fhelp=separate.
+
+2009-03-17 Jing Yu <jingyu@google.com>
+
+ PR middle-end/39378
+ * function.h (struct rtl_data): Move is_thunk from here...
+ (struct function): ...to here.
+ * cp/method.c (use_thunk): Change is_thunk from crtl to cfun.
+ * varasm.c (assemble_start_function): Change is_thunk from crtl to
+ cfun.
+ * config/alpha/alpha.c (alpha_sa_mask): Change is_thunk from crtl to
+ cfun.
+ (alpha_does_function_need_gp, alpha_start_function): Likewise.
+ (alpha_output_function_end_prologue): Likewise.
+ (alpha_end_function, alpha_output_mi_thunk_osf): Likewise.
+ * config/rs6000/rs6000.c (rs6000_ra_ever_killed): Likewise.
+ (rs6000_output_function_epilogue): Likewise.
+ * config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise.
+
+2009-03-17 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/39482
+ * config/i386/i386.md (*truncdfsf_mixed): Avoid combining registers
+ from different units in a single alternative.
+ (*truncdfsf_i387): Ditto.
+ (*truncxfsf2_mixed): Ditto.
+ (*truncxfdf2_mixed): Ditto.
+
+2009-03-17 Jakub Jelinek <jakub@redhat.com>
+
+ * dwarf2out.c (dwarf2out_imported_module_or_decl_1): Allow
+ non-NAMESPACE_DECL IMPORTED_DECL_ASSOCIATED_DECL.
+
+ PR debug/39474
+ * tree-ssa-live.c (remove_unused_locals): Don't remove local
+ unused non-artificial variables when not optimizing.
+
+ PR debug/39471
+ * dwarf2out.c (dwarf2out_imported_module_or_decl_1): Emit
+ DW_TAG_imported_module even if decl is IMPORTED_DECL with
+ NAMESPACE_DECL in its DECL_INITIAL.
+
+ PR middle-end/39443
+ * optabs.c (set_user_assembler_libfunc): New function.
+ * expr.h (set_user_assembler_libfunc): New prototype.
+ * c-common.c: Include libfuncs.h.
+ (set_builtin_user_assembler_name): Call set_user_assembler_libfunc
+ for memcmp, memset, memcpy, memmove and abort.
+ * Makefile.in (c-common.o): Depend on libfuncs.h.
+
+ PR debug/39412
+ * dwarf2out.c (gen_inlined_enumeration_type_die,
+ gen_inlined_structure_type_die, gen_inlined_union_type_die,
+ gen_tagged_type_instantiation_die): Removed.
+ (gen_decl_die): For TYPE_DECL_IS_STUB with non-NULL decl_origin
+ do nothing.
+
+2009-03-17 Janis Johnson <janis187@us.ibm.com>
+
+ PR testsuite/38526
+ * Makefile.in (site.exp): Rename TEST_GCC_EXEC_PREFIX and comment
+ its use.
+ (check-%): Don't set GCC_EXEC_PREFIX when invoking runtest.
+ (check-parallel-%): Ditto.
+ (check-consistency): Ditto.
+
+2009-03-17 Kai Tietz <kai.tietz@onevision.com>
+
+ * ipa-struct-reorg.c (create_general_new_stmt): Initialize
+ local variable rhs by NULL_TREE.
+
+2009-03-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39477
+ * doc/extend.texi: Correct register behavior for regparm on Intel 386.
+
+2009-03-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39476
+ * config/i386/i386.c (ix86_function_regparm): Rewrite for 64bit.
+
+2009-03-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39473
+ * config/i386/i386.c (ix86_expand_call): Check extra clobbers
+ for ms->sysv ABI calls only in 64bit mode.
+
+ * config/i386/i386.md (untyped_call): Support 32bit.
+
+2009-03-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ * doc/extend.texi: Replace x86_65 with x86_64.
+
+2009-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/39455
+ * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Fix types
+ mismatches for POINTER_TYPE_P (type).
+ (number_of_iterations_le): Likewise.
+
+2009-03-16 Hariharan Sandanagobalane <hariharan@picochip.com>
+
+ * config/picochip/picochip.c: Removed profiling support.
+ * config/picochip/picochip.md: Removed profiling instruction.
+ * config/picochip/picochip.h: Removed profiling builtin.
+
+2009-03-16 Joseph Myers <joseph@codesourcery.com>
+
+ * doc/install.texi (--with-host-libstdcxx): Document.
+
+2009-03-14 Anatoly Sokolov <aesok@post.ru>
+
+ PR target/34299
+ * config/avr/avr.c (avr_handle_fndecl_attribute): Move code for
+ generate a warning if the function name does not begin with
+ "__vector" and the function has either the 'signal' or 'interrupt'
+ attribute, from here to ...
+ (avr_declare_function_name): ...here. New function.
+ * config/avr/avr.h (ASM_DECLARE_FUNCTION_NAME): Redefine.
+ * config/avr/avr-protos.h (avr_declare_function_name): Declare.
+
+2009-03-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/39454
+ * cse.c (fold_rtx): Don't modify original const_arg1 when
+ canonicalizing SHIFT_COUNT_TRUNCATED shift count, do it on a
+ separate variable instead.
+ * rtlanal.c (nonzero_bits1) <case ASHIFTRT>: Don't assume anything
+ from out of range shift counts.
+ (num_sign_bit_copies1) <case ASHIFTRT, case ASHIFT>: Similarly.
+
+2008-03-13 Catherine Moore <clm@codesourcery.com>
+
+ * gcc/config/i386/x-mingw32 (host-mingw32.o): Replace
+ diagnostic.h with $(DIAGNOSTIC_H).
+
+2008-03-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/39431
+ * config/i386/predicates.md (cmpxchg8b_pic_memory_operand): New
+ predicate.
+ * config/i386/sync.md (sync_compare_and_swap<mode>,
+ sync_compare_and_swap_cc<mode>): For DImode with -m32 -fpic check
+ if operands[1] is cmpxchg8b_pic_memory_operand, if not force address
+ into a register.
+ (sync_double_compare_and_swapdi_pic,
+ sync_double_compare_and_swap_ccdi_pic): Require operand 1 to be
+ cmpxchg8b_pic_memory_operand instead of just memory_operand.
+
+2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39445
+ * config/i386/i386.c (ix86_expand_push): Don't set memory alignment.
+
+2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39327
+ * config/i386/sse.md (avx_addsubv8sf3): Correct item bits.
+ (avx_addsubv4df3): Likewise.
+ (*avx_addsubv4sf3): Likewise.
+ (sse3_addsubv4sf3): Likewise.
+
+2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/38824
+ * config/i386/i386.md: Compare REGNO on the new peephole2 patterns.
+
+2009-03-12 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR debug/39432
+ * ira-int.h (struct allocno): Fix comment for calls_crossed_num.
+ * ira-conflicts.c (ira_build_conflicts): Prohibit call used
+ registers for allocnos created from user-defined variables.
+
+2009-03-11 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ PR target/39181
+ * config/spu/spu.c (spu_expand_mov): Handle invalid subregs
+ of non-integer mode as well.
+
+2009-03-11 Adam Nemet <anemet@caviumnetworks.com>
+
+ * gimplify.c (gimplify_call_expr): Don't set CALL_CANNOT_INLINE_P
+ for functions for which the parameter types are unknown.
+
+2009-03-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/39137
+ * cfgexpand.c (get_decl_align_unit): Use LOCAL_DECL_ALIGNMENT macro.
+ * defaults.h (LOCAL_DECL_ALIGNMENT): Define if not yet defined.
+ * config/i386/i386.h (LOCAL_DECL_ALIGNMENT): Define.
+ * config/i386/i386.c (ix86_local_alignment): For
+ -m32 -mpreferred-stack-boundary=2 use 32-bit alignment for
+ long long variables on the stack to avoid dynamic realignment.
+ Allow the first argument to be a decl rather than type.
+ * doc/tm.texi (LOCAL_DECL_ALIGNMENT): Document.
+
+2009-03-11 Nick Clifton <nickc@redhat.com>
+
+ PR target/5362
+ * config/mcore/mcore.opt: Remove deprecated m4align and m8align
+ options.
+ Add description to mno-lsim option.
+ * config/mcore/mcore.h: Remove comment about deprecated m4align
+ option.
+ (TARGET_DEFAULT): Remove deprecated MASK_M8ALIGN.
+ * doc/invoke.texi: Add description of mno-lsim and
+ mstack-increment options.
+
+ * config/fr30/fr30.opt: Document the -mno-lsim option.
+ * doc/invoke.texi: Add descriptions of the FR30's -msmall-model
+ and -mno-lsim options.
+
+2009-03-11 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * fold-const.c (fold_comparison): Only call fold_inf_compare
+ if the mode supports infinities.
+
+2009-03-11 Jason Merrill <jason@redhat.com>
+
+ PR debug/39086
+ * tree-nrv.c (tree_nrv): Don't do this optimization if the front
+ end already did. Notice GIMPLE_CALL modifications of the result.
+ Don't copy debug information from an ignored decl or a decl from
+ another function.
+
+2009-03-10 Richard Guenther <rguenther@suse.de>
+ Nathan Froyd <froydnj@codesourcery.com>
+
+ PR middle-end/37850
+ * libgcc2.c (__mulMODE3): Use explicit assignments to form the result.
+ (__divMODE3): Likewise.
+
+2009-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/39394
+ * gimplify.c (gimplify_type_sizes): Gimplify DECL_SIZE and
+ DECL_SIZE_UNIT of variable length FIELD_DECLs.
+
+2009-03-09 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * recog.c (verfiy_changes): Disallow renaming of hard regs in
+ inline asms for register asm ("") declarations.
+
+2009-03-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * fold-const.c (fold_unary): Fix comment.
+
+2009-03-07 Jan Hubicka <jh@suse.cz>
+
+ PR target/39361
+ * tree-inline.c (setup_one_parameter): Do replacement of const
+ argument by constant in SSA form.
+
+2009-03-07 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ PR middle-end/38028
+ * function.c (assign_parm_setup_stack): Use STACK_SLOT_ALIGNMENT to
+ determine alignment passed to assign_stack_local.
+ (assign_parms_unsplit_complex): Likewise.
+ * except.c (sjlj_build_landing_pads): Likewise.
+
+2009-03-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/39360
+ * tree-flow.h (add_referenced_var): Return bool instead of void.
+ * tree-dfa.c (add_referenced_var): Return result of
+ referenced_var_check_and_insert call.
+ * tree-inline.c (expand_call_inline): Call add_referenced_var instead
+ of referenced_var_check_and_insert.
+
+ PR debug/39372
+ * dwarf2out.c (add_abstract_origin_attribute): Return origin_die.
+ (gen_variable_die): Emit DW_AT_location on abstract static variable's
+ DIE, don't emit it if abstract origin already has it.
+ * tree-cfg.c (remove_useless_stmts_bind): GIMPLE_BINDs with any
+ BLOCK_NONLOCALIZED_VARS in its gimple_bind_block aren't useless.
+
+2009-03-06 Jan-Benedict Glaw <jbglaw@lug-owl.de>
+
+ * genpreds.c (needs_variable): Fix parentheses at variable name
+ detection.
+ (write_tm_constrs_h): Indent generated code.
+
+2009-03-06 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ * doc/extend.texi (Function Attributes): Add documentation
+ for isr attributes.
+
+2009-03-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/39387
+ * dwarf2out.c (dwarf2out_imported_module_or_decl_1): For IMPORTED_DECL
+ take locus from its DECL_SOURCE_LOCATION instead of input_location.
+
+2009-03-05 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin/bfin.c (bfin_discover_loop): When retrying fails, mark
+ the loop as bad.
+
+2009-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/39379
+ * tree-cfg.c (remove_useless_stmts_bind): Don't remove GIMPLE_BINDs
+ with blocks containing IMPORTED_DECLs in BLOCK_VARS.
+
+2009-03-05 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.md (R8_REG, R9_REG): New constants.
+ * config/i386/i386.h (CONDITIONAL_REGISTER_USAGE): Use named
+ constants instead of magic numbers.
+ (HARD_REGNO_CALLER_SAVE_MODE): Ditto.
+ (QI_REG_P): Ditto.
+ * config/i386/i386.c (x86_64_int_parameter_registers): Ditto.
+ (x86_64_ms_abi_int_parameter_registers): Ditto.
+ (x86_64_int_return_registers): Ditto.
+ (ix86_maybe_switch_abi): Ditto.
+ (ix86_expand_call): Ditto for clobbered_registers array.
+ (ix86_hard_regno_mode_ok): Ditto.
+ (x86_extended_QIreg_mentioned_p): Ditto.
+
+2009-03-05 J"orn Rennecke <joern.rennecke@arc.com>
+
+ PR tree-optimization/39349
+ * cse.c (cse_insn): Fix loop to stop at VOIDmode.
+
+ * combine.c (gen_lowpart_for_combine): Use omode when generating
+ clobber.
+
+2009-03-04 J"orn Rennecke <joern.rennecke@arc.com>
+
+ PR rtl-optimization/39235
+ * loop-iv.c (get_simple_loop_desc): Use XCNEW.
+
+2009-03-04 Zdenek Dvorak <ook@ucw.cz>
+
+ * graphite.c (nb_reductions_in_loop): Update simple_iv arguments.
+
+2009-03-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39362
+ * tree-ssa-sccvn.c (visit_use): Stores and copies from SSA_NAMEs
+ that occur in abnormal PHIs should be varying.
+
+2009-03-04 Zdenek Dvorak <ook@ucw.cz>
+
+ * tree-scalar-evolution.c (analyze_scalar_evolution_in_loop):
+ Extend comments.
+ (simple_iv): Take loop as an argument instead of statement.
+ * tree-scalar-evolution.h (simple_iv): Declaration changed.
+ * tree-ssa-loop-niter.c (number_of_iterations_exit): Update calls
+ to simple_iv.
+ * tree-ssa-loop-ivopts.c (determine_biv_step, find_givs_in_stmt_scev):
+ Ditto.
+ * tree-parloops.c (loop_parallel_p, canonicalize_loop_ivs): Ditto.
+ * matrix-reorg.c (analyze_transpose): Ditto.
+ * tree-data-ref.c (dr_analyze_innermost): Ditto.
+ * tree-vect-analyze.c (vect_analyze_data_refs): Ditto.
+ * tree-predcom.c (ref_at_iteration): Ditto.
+ * tree-ssa-loop-prefetch.c (idx_analyze_ref): Ditto.
+
+2009-03-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39358
+ * tree-ssa-structalias.c (do_sd_constraint): Fix check for
+ escaped_id and callused_id.
+ (solve_graph): Likewise.
+
+2009-03-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39339
+ * tree-sra.c (try_instantiate_multiple_fields): Make it
+ no longer ICE on the above.
+
+2009-03-03 Joseph Myers <joseph@codesourcery.com>
+
+ * emit-rtl.c (adjust_address_1): Reduce offset to a signed value
+ that fits within Pmode.
+
+2009-03-03 Steve Ellcey <sje@cup.hp.com>
+
+ PR middle-end/10109
+ * tm.texi (LIBCALL_VALUE): Update description.
+
+2009-03-03 Steve Ellcey <sje@cup.hp.com>
+
+ PR middle-end/34443
+ * doc/extend.texi (section): Update description.
+
+2009-03-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/39345
+ * tree-inline.c (remapped_type): New.
+ (can_be_nonlocal): Call remapped_type instead of remap_type.
+
+2009-03-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/39354
+ * gimplify.c (goa_stabilize_expr): Handle tcc_comparison,
+ TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
+
+2009-03-03 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/39272
+ * tree.c (tree_nonartificial_location): New function.
+ * tree.h (tree_nonartificial_location): Declare.
+ * builtins.c (expand_builtin_memory_chk): Provide location
+ of the call location for artificial function pieces.
+ (maybe_emit_chk_warning): Likewise.
+ (maybe_emit_sprintf_chk_warning): Likewise.
+ (maybe_emit_free_warning): Likewise.
+ * expr.c (expand_expr_real_1): Likewise.
+
+2009-03-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/39343
+ * tree-ssa-ccp.c (maybe_fold_offset_to_address): Don't check if
+ COMPONENT_REF t has ARRAY_TYPE.
+
+2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/39335
+ * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
+ when the type precision of the induction variable should be
+ larger than the type precision of nit.
+ (gen_parallel_loop): Update use of canonicalize_loop_ivs.
+ * graphite.c (graphite_loop_normal_form): Same.
+ * tree-flow.h (canonicalize_loop_ivs): Update declaration.
+
+2009-03-02 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.md (ST?_REG, MM?_REG): New constants.
+ (*call_1_rex64_ms_sysv): Use named constants instead of magic
+ numbers to describe clobbered registers.
+ (*call_value_0_rex64_ms_sysv): Ditto.
+ * config/i386/mmx.md (mmx_emms): Ditto.
+ (mmx_femms): Ditto.
+
+2009-03-02 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * config/mips/mips.c (mips_mdebug_abi_name): Fix the handling
+ of ABI_64.
+
+2009-03-02 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/spu/spu.c (TARGET_SECTION_TYPE_FLAGS): Define.
+ (spu_section_type_flags): New function.
+
+2009-03-02 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.h (CONDITIONAL_REGISTER_USAGE): Do not copy
+ reg_class_contents of FLOAT_REGS into a temporary.
+
+2009-03-02 Richard Guenther <rguenther@suse.de>
+ Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/39318
+ * tree-vect-transform.c (vectorizable_call): Transfer the EH region
+ information to the vectorized statement.
+
+2009-03-01 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.h (CONDITIONAL_REGISTER_USAGE): Do not shadow "i"
+ variable. Use defined names instead of magic constants for REX SSE
+ registers.
+
+2009-03-01 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39331
+ * omp-low.c (lower_send_shared_vars): Do not receive new
+ values for the reference of DECL_BY_REFERENCE parms or results.
+
+2009-03-01 Jan Hubicka <jh@suse.cz>
+
+ PR debug/39267
+ * tree.h (BLOCK_NONLOCALIZED_VARS, BLOCK_NUM_NONLOCALIZED_VARS,
+ BLOCK_NONLOCALIZED_VAR): New macros.
+ (tree_block): Add nonlocalized_vars.
+ * dwarf2out.c (gen_formal_parameter_die, gen_variable_die,
+ gen_decl_die): Add origin argument. Allow generation of die with
+ origin at hand only.
+ (gen_member_die, gen_type_die_with_usage, force_decl_die,
+ declare_in_namespace, gen_namescpace_die, dwarf2out_decl): Update use
+ of gen_*.
+ (gen_block_die): Fix checking for unused blocks.
+ (process_scope_var): Break out from .... ; work with origins only.
+ (decls_for_scope) ... here; process nonlocalized list.
+ (dwarf2out_ignore_block): Look for nonlocalized vars.
+ * tree-ssa-live.c (remove_unused_scope_block_p): Look for nonlocalized
+ vars.
+ (dump_scope_block): Dump them.
+ * tree-inline.c (remap_decls): Handle nonlocalized vars.
+ (remap_block): Likewise.
+ (can_be_nonlocal): New predicate.
+ (copy_bind_expr, copy_gimple_bind): Update use of remap_block.
+
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * optc-gen.awk: No need to duplicate option flags twice.
+ Reuse help texts for duplicate options which do not have any.
+
+ * gcc.c (display_help): Document --version.
+
+ * gcc.c (main): If print_help_list and verbose_flag, ensure
+ driver output comes before subprocess output.
+
+ * optc-gen.awk: Assign all remaining fields to help string,
+ space-separated, for multi-line help in *.opt.
+
+ * doc/invoke.texi (Warning Options): -Wsync-nand is C/C++ only.
+ -Wno-pedantic-ms-format is for MinGW targets only.
+
+ * doc/options.texi (Option file format): Fix bad indentation,
+ restoring dropped sentence.
+
+2009-02-28 Jan Hubicka <jh@suse.cz>
+
+ * tree-inline.c (tree_function_versioning): Output debug info.
+
+2009-02-28 Jan Hubicka <jh@suse.cz>
+
+ PR debug/39267
+ * tree-inline.c (setup_one_parameter): Do not copy propagate
+ arguments when not optimizing.
+
+2009-02-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39327
+ * config/i386/sse.md (avx_addsubv8sf3): Correct item bits.
+ (avx_addsubv4df3): Likewise.
+ (*avx_addsubv4sf3): Likewise.
+ (sse3_addsubv4sf3): Likewise.
+ (*avx_addsubv2df3): Likewise.
+ (sse3_addsubv2df3): Likewise.
+ (avx_unpckhps256): Correct item selectors.
+ (avx_unpcklps256): Likewise.
+ (avx_unpckhpd256): Likewise.
+ (avx_unpcklpd256): Likewise.
+
+2009-02-28 Jan Hubicka <jh@suse.cz>
+
+ * tree-inline.c (expand_call_inline): Avoid duplicate declarations of
+ static vars.
+ (copy_arguments_for_versioning): If var is declared don't declare it.
+ (tree_function_versioning): First setup substitutions and then copy
+ args.
+
+2009-02-27 Jan Hubicka <jh@suse.cz>
+
+ PR debug/39267
+ * cgraph.h (varpool_output_debug_info): Remove.
+ * cgraphunit.c (varpool_output_debug_info): Remove.
+ * dwarf2out.c (deferred_locations_struct): New struct
+ (deferred_locations): New type.
+ (deferred_locations_list): New static var.
+ (deffer_location): New function.
+ (gen_variable_die): Use it.
+ (decls_for_scope): Output info on local static vars.
+ (dwarf2out_finish): Process deferred locations.
+ * varpool.c (varpool_output_debug_info): Remove.
+
2009-02-27 Jan Hubicka <jh@suse.cz>
PR debug/39267
@@ -32,7 +1900,7 @@
2009-02-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
- * gcc/config/s390/s390.c: (s390_swap_cmp): Look for conditional
+ * gcc/config/s390/s390.c (s390_swap_cmp): Look for conditional
jumps if COND is NULL.
(find_cond_jump): New function.
(s390_z10_optimize_cmp): Handling for reg-reg compares added.
@@ -43,6 +1911,20 @@
* config/alpha/alpha.h (alpha_expand_mov): Return false if
force_const_mem returns NULL_RTX.
+2009-02-26 Jan Hubicka <jh@suse.cz>
+
+ PR debug/39267
+ * cgraph.h (varpool_output_debug_info): Remove.
+ * cgraphunit.c (varpool_output_debug_info): Remove.
+ * dwarf2out.c (deferred_locations_struct): New struct
+ (deferred_locations): New type.
+ (deferred_locations_list): New static var.
+ (deffer_location): New function.
+ (gen_variable_die): Use it.
+ (decls_for_scope): Output info on local static vars.
+ (dwarf2out_finish): Process deferred locations.
+ * varpool.c (varpool_output_debug_info): Remove.
+
2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/39241
@@ -62,7 +1944,7 @@
PR tree-optimization/39259
* tree-inline.c (initialize_cfun): Remove asserts for calls_setjmp and
- alls_alloca function flags.
+ calls_alloca function flags.
(copy_bb): Set calls_setjmp and alls_alloca function flags if such
calls are detected.
@@ -455,7 +2337,7 @@
PR target/39149
* config/i386/i386.c (override_options): Correct warning
- messages for -malign-loops, -malign-jumps and -malign-functions.
+ messages for -malign-loops, -malign-jumps and -malign-functions.
2009-02-13 H.J. Lu <hongjiu.lu@intel.com>
@@ -1065,7 +2947,7 @@
* global.c: Remove the file.
- * opts.c: (decode_options): Remove flag_ira.
+ * opts.c (decode_options): Remove flag_ira.
* hard-reg-set.h (losing_caller_save_reg_set): Remove.
@@ -1445,7 +3327,7 @@
2009-01-22 Dodji Seketeli <dodji@redhat.com>
PR c++/38930
- * c-decl.c: (clone_underlying_type): Revert PR c++/26693 changes.
+ * c-decl.c (clone_underlying_type): Revert PR c++/26693 changes.
* c-common.c (set_underlying_type): Likewise.
(is_typedef_decl ): Likewise
* tree.h: Likewise
@@ -1475,7 +3357,7 @@
2009-01-21 Dodji Seketeli <dodji@redhat.com>
PR c++/26693
- * c-decl.c: (clone_underlying_type): Move this ...
+ * c-decl.c (clone_underlying_type): Move this ...
* c-common.c (set_underlying_type): ... here.
Also, make sure the function properly sets TYPE_STUB_DECL() on
the newly created typedef variant type.
@@ -1838,7 +3720,7 @@
* config/avr/t-avr (LIB1ASMFUNCS): Add _tablejump_elpm.
* config/avr/libgcc.S (__do_global_ctors, __do_global_dtors): Add
variant for devices with 3-byte PC.
- (__tablejump_elpm__) : New.
+ (__tablejump_elpm__): New.
2009-01-12 Jakub Jelinek <jakub@redhat.com>
diff --git a/gcc/ChangeLog-2008 b/gcc/ChangeLog-2008
index ec1badf2b44..54e7abd90b1 100644
--- a/gcc/ChangeLog-2008
+++ b/gcc/ChangeLog-2008
@@ -17771,12 +17771,6 @@
* config/i386/i386.c (override_options): Replace TARGET_64BIT_MS_ABI.
(X86_64_VARARGS_SIZE): Replace REGPARM_MAX and SSE_REGPARM_MAX by abi
specific defines.
- (X86_64_REGPARM_MAX): New.
- (X86_64_SSE_REGPARM_MAX): New.
- (X64_REGPARM_MAX): New.
- (X64_SSE_REGPARM_MAX): New.
- (X86_32_REGPARM_MAX): New.
- (X86_32_SSE_REGPARM_MAX): New.
(ix86_handle_cconv_attribute): Replace TARGET_64BIT_MS_ABI.
(ix86_function_regparm): Handle user calling abi.
(ix86_function_arg_regno_p): Replace TARGET_64BIT_MS_ABI
@@ -17816,6 +17810,14 @@
(OUTGOING_REG_PARM_STACK_SPACE): New.
(ix86_reg_parm_stack_space): New prototype.
(CUMULATIVE_ARGS): Add call_abi member.
+ (X86_64_REGPARM_MAX): New.
+ (X86_64_SSE_REGPARM_MAX): New.
+ (X64_REGPARM_MAX): New.
+ (X64_SSE_REGPARM_MAX): New.
+ (X86_32_REGPARM_MAX): New.
+ (X86_32_SSE_REGPARM_MAX): New.
+ (REGPARM_MAX): Updated.
+ (SSE_REGPARM_MAX): Updated.
(machine_function): Add call_abi member.
* config/i386/mingw32.h (EXTRA_OS_CPP_BUILTINS): Replace
TARGET_64BIT_MS_ABI by DEFAULT_ABI compare to MS_ABI.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index ab96d86c2e4..a8baed44b24 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20090227
+20090330
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 81a78ceb5ee..5d0e4a820a5 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -22,7 +22,7 @@
#<http://www.gnu.org/licenses/>.
# The targets for external use include:
-# all, doc, proto, install, install-cross, install-cross-rest,
+# all, doc, install, install-cross, install-cross-rest,
# uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean.
# This is the default target.
@@ -175,10 +175,8 @@ GCC_WARN_CFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn)
# be subject to -Werror:
# flex output may yield harmless "no previous prototype" warnings
build/gengtype-lex.o-warn = -Wno-error
-# SYSCALLS.c misses prototypes
-SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
-# dfp.c contains alias violations
-dfp.o-warn = -Wno-error
+# dfp.c contains many alias violations
+dfp.o-warn = -fno-strict-aliasing
# mips-tfile.c contains -Wcast-qual warnings.
mips-tfile.o-warn = -Wno-error
@@ -297,9 +295,6 @@ DECNUMFMT = $(srcdir)/../libdecnumber/$(enable_decimal_float)
DECNUMINC = -I$(DECNUM) -I$(DECNUMFMT) -I../libdecnumber
LIBDECNUMBER = ../libdecnumber/libdecnumber.a
-# Substitution type for target's getgroups 2nd arg.
-TARGET_GETGROUPS_T = @TARGET_GETGROUPS_T@
-
# Target to use when installing include directory. Either
# install-headers-tar, install-headers-cpio or install-headers-cp.
INSTALL_HEADERS_DIR = @build_install_headers_dir@
@@ -395,8 +390,7 @@ CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
# macro is also used in a double-quoted context.
SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`
-# Control whether to run fixproto and fixincludes.
-STMP_FIXPROTO = @STMP_FIXPROTO@
+# Control whether to run fixincludes.
STMP_FIXINC = @STMP_FIXINC@
# Test to see whether <limits.h> exists in the system header files.
@@ -704,8 +698,6 @@ BUILD_CPPFLAGS=$(ALL_CPPFLAGS)
GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
GCC_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcc|sed '$(program_transform_name)')
CPP_INSTALL_NAME := $(shell echo cpp|sed '$(program_transform_name)')
-PROTOIZE_INSTALL_NAME := $(shell echo protoize|sed '$(program_transform_name)')
-UNPROTOIZE_INSTALL_NAME := $(shell echo unprotoize|sed '$(program_transform_name)')
GCOV_INSTALL_NAME := $(shell echo gcov|sed '$(program_transform_name)')
GCCBUG_INSTALL_NAME := $(shell echo gccbug|sed '$(program_transform_name)')
@@ -719,9 +711,6 @@ RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
else echo runtest; fi`
RUNTESTFLAGS =
-# Extra symbols for fixproto to define when parsing headers.
-FIXPROTO_DEFINES =
-
# Extra flags to use when compiling crt{begin,end}.o.
CRTSTUFF_T_CFLAGS =
@@ -794,6 +783,7 @@ REVISION_s :=
endif
# Shorthand variables for dependency lists.
+EXCEPT_H = except.h sbitmap.h vecprim.h
TOPLEV_H = toplev.h input.h
TARGET_H = $(TM_H) target.h insn-modes.h
MACHMODE_H = machmode.h mode-classes.def insn-modes.h
@@ -1272,10 +1262,13 @@ OBJS-common = \
tree-ssanames.o \
tree-stdarg.o \
tree-tailcall.o \
- tree-vect-analyze.o \
tree-vect-generic.o \
tree-vect-patterns.o \
- tree-vect-transform.o \
+ tree-vect-data-refs.o \
+ tree-vect-stmts.o \
+ tree-vect-loop.o \
+ tree-vect-loop-manip.o \
+ tree-vect-slp.o \
tree-vectorizer.o \
tree-vrp.o \
tree.o \
@@ -1327,7 +1320,7 @@ ALL_HOST_OBJS = $(GCC_OBJS) $(C_OBJS) $(OBJS) libbackend.o \
$(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS)) \
$(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) \
mips-tfile.o mips-tdump.o \
- $(PROTO_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS)
+ $(GCOV_OBJS) $(GCOV_DUMP_OBJS)
BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB) $(LIBDECNUMBER)
@@ -1339,7 +1332,6 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list \
xgcc$(exeext) cpp$(exeext) cc1$(exeext) cc1*-dummy$(exeext) $(EXTRA_PASSES) \
$(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
- protoize$(exeext) unprotoize$(exeext) \
$(SPECS) collect2$(exeext) \
gcov-iov$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
*.[0-9][0-9].* *.[si] *-checksum.c libbackend.a libgcc.mk
@@ -1589,7 +1581,7 @@ all.cross: native gcc-cross$(exeext) cpp$(exeext) specs \
start.encap: native xgcc$(exeext) cpp$(exeext) specs \
libgcc-support lang.start.encap @GENINSRC@ srcextra
# These can't be made until after GCC can run.
-rest.encap: $(STMP_FIXPROTO) lang.rest.encap
+rest.encap: lang.rest.encap
# This is what is made with the host's compiler
# whether making a cross compiler or not.
native: config.status auto-host.h build-@POSUB@ $(LANGUAGES) \
@@ -1599,7 +1591,7 @@ native: config.status auto-host.h build-@POSUB@ $(LANGUAGES) \
c: cc1$(exeext)
# Tell GNU make these are phony targets.
-.PHONY: c proto
+.PHONY: c
# On the target machine, finish building a cross compiler.
# This does the things that can't be done on the host machine.
@@ -1673,7 +1665,7 @@ srcdirify = $(patsubst $(srcdir)%,$$(gcc_srcdir)%,$(filter $(srcdir)%,$(1))) \
# so we combine them. Sort removes duplicates.
GCC_EXTRA_PARTS := $(sort $(EXTRA_MULTILIB_PARTS) $(EXTRA_PARTS))
-libgcc-support: libgcc.mvars stmp-int-hdrs $(STMP_FIXPROTO) $(TCONFIG_H) \
+libgcc-support: libgcc.mvars stmp-int-hdrs $(TCONFIG_H) \
$(MACHMODE_H) $(FPBIT) $(DPBIT) $(TPBIT) $(LIB2ADD) \
$(LIB2ADD_ST) $(LIB2ADDEH) $(srcdir)/emutls.c gcov-iov.h $(SFP_MACHINE)
@@ -1825,7 +1817,7 @@ c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) output.h \
$(EXPR_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) $(TREE_DUMP_H) $(C_COMMON_H) $(CPPLIB_H) \
+ $(EXCEPT_H) $(LANGHOOKS_DEF_H) $(TREE_DUMP_H) $(C_COMMON_H) $(CPPLIB_H) \
$(DIAGNOSTIC_H) $(INPUT_H) langhooks.h $(GIMPLE_H) tree-mudflap.h \
pointer-set.h $(BASIC_BLOCK_H) $(GIMPLE_H) tree-iterator.h
c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
@@ -1893,7 +1885,7 @@ c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(TARGET_H) $(C_TREE_H) tree-iterator.h langhooks.h tree-mudflap.h \
intl.h opts.h $(REAL_H) $(CPPLIB_H) $(TREE_INLINE_H) $(HASHTAB_H) \
$(BUILTINS_DEF) $(CGRAPH_H) $(BASIC_BLOCK_H) $(TARGET_DEF_H) \
- $(GIMPLE_H)
+ $(GIMPLE_H) libfuncs.h
c-pretty-print.o : c-pretty-print.c $(C_PRETTY_PRINT_H) \
$(C_TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(REAL_H) \
@@ -1903,13 +1895,13 @@ c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(C_PRAGMA_H) $(FLAGS_H) $(TOPLEV_H) langhooks.h \
$(TREE_INLINE_H) $(DIAGNOSTIC_H) intl.h debug.h $(C_COMMON_H) \
opts.h options.h $(MKDEPS_H) incpath.h cppdefault.h $(TARGET_H) \
- $(TM_P_H) $(VARRAY_H)
+ $(TM_P_H) $(VARRAY_H) $(C_TREE_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
$< $(OUTPUT_OPTION) @TARGET_SYSTEM_ROOT_DEFINE@
c-cppbuiltin.o : c-cppbuiltin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) version.h $(C_COMMON_H) $(C_PRAGMA_H) $(FLAGS_H) \
- $(TOPLEV_H) output.h except.h $(REAL_H) $(TARGET_H) $(TM_P_H) \
+ $(TOPLEV_H) output.h $(EXCEPT_H) $(REAL_H) $(TARGET_H) $(TM_P_H) \
$(BASEVER) debug.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) -DBASEVER=$(BASEVER_s) \
$< $(OUTPUT_OPTION)
@@ -1926,7 +1918,7 @@ c-format.o : c-format.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) la
c-semantics.o : c-semantics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(FLAGS_H) $(TOPLEV_H) output.h $(RTL_H) $(GGC_H) \
- $(PREDICT_H) $(TREE_INLINE_H) $(C_COMMON_H) except.h $(FUNCTION_H) \
+ $(PREDICT_H) $(TREE_INLINE_H) $(C_COMMON_H) $(EXCEPT_H) $(FUNCTION_H) \
langhooks.h $(SPLAY_TREE_H) $(TIMEVAR_H) $(GIMPLE_H) \
$(VARRAY_H) tree-iterator.h
@@ -2023,7 +2015,7 @@ gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
input.h $(TREE_H) $(RTL_H) $(FUNCTION_H) insn-config.h $(EXPR_H) \
hard-reg-set.h $(BASIC_BLOCK_H) cselib.h $(INSN_ADDR_H) $(OPTABS_H) \
libfuncs.h debug.h $(GGC_H) $(CGRAPH_H) $(TREE_FLOW_H) reload.h \
- $(CPP_ID_DATA_H) tree-chrec.h $(CFGLAYOUT_H) except.h output.h \
+ $(CPP_ID_DATA_H) tree-chrec.h $(CFGLAYOUT_H) $(EXCEPT_H) output.h \
$(CFGLOOP_H)
ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(GGC_H) \
@@ -2069,7 +2061,7 @@ tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(RTL_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) $(INPUT_H) insn-config.h \
$(VARRAY_H) $(HASHTAB_H) $(TOPLEV_H) langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \
intl.h $(FUNCTION_H) $(GGC_H) $(GIMPLE_H) \
- debug.h $(DIAGNOSTIC_H) except.h $(TREE_FLOW_H) tree-iterator.h tree-mudflap.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)
print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(GGC_H) langhooks.h $(REAL_H) tree-iterator.h fixed-value.h \
@@ -2192,13 +2184,13 @@ tree-vrp.o : tree-vrp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
tree-cfg.o : tree-cfg.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_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 \
+ $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(CFGLOOP_H) tree-pass.h \
$(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h $(TOPLEV_H) \
value-prof.h tree-ssa-propagate.h $(TREE_INLINE_H)
tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \
$(DIAGNOSTIC_H) $(TOPLEV_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) except.h langhooks.h $(CFGLOOP_H) tree-pass.h \
+ $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(CFGLOOP_H) tree-pass.h \
$(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h $(HASHTAB_H) $(TOPLEV_H) \
tree-ssa-propagate.h tree-scalar-evolution.h
rtl-factoring.o : rtl-factoring.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
@@ -2207,7 +2199,7 @@ rtl-factoring.o : rtl-factoring.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
$(TIMEVAR_H) output.h $(DF_H)
tree-tailcall.o : tree-tailcall.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_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 \
+ $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(EXCEPT_H) tree-pass.h $(FLAGS_H) langhooks.h \
$(BASIC_BLOCK_H) hard-reg-set.h $(DBGCNT_H)
tree-ssa-sink.o : tree-ssa-sink.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
@@ -2236,7 +2228,7 @@ tree-ssa-operands.o : tree-ssa-operands.c $(TREE_FLOW_H) $(CONFIG_H) \
$(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) tree-pass.h $(TOPLEV_H) \
coretypes.h langhooks.h $(IPA_REFERENCE_H)
tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
- $(RTL_H) $(TREE_H) $(TM_H) $(FLAGS_H) $(FUNCTION_H) except.h langhooks.h \
+ $(RTL_H) $(TREE_H) $(TM_H) $(FLAGS_H) $(FUNCTION_H) $(EXCEPT_H) langhooks.h \
$(GGC_H) tree-pass.h coretypes.h $(TIMEVAR_H) $(TM_P_H) pointer-set.h \
$(TREE_DUMP_H) $(TREE_INLINE_H) tree-iterator.h $(TOPLEV_H)
tree-ssa-loop.o : tree-ssa-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
@@ -2316,7 +2308,7 @@ tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(DIAGNOSTIC_H) $(BASIC_BLOCK_H) $(FLAGS_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(TOPLEV_H) $(FUNCTION_H) langhooks.h $(FLAGS_H) $(CGRAPH_H) \
$(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) tree-pass.h \
- $(CFGLOOP_H) except.h
+ $(CFGLOOP_H) $(EXCEPT_H)
c-gimplify.o : c-gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(C_TREE_H) $(C_COMMON_H) $(DIAGNOSTIC_H) $(GIMPLE_H) $(VARRAY_H) \
@@ -2326,7 +2318,7 @@ c-gimplify.o : c-gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
gimplify.o : gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \
$(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_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 \
+ coretypes.h $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) output.h \
$(GGC_H) gt-gimplify.h $(HASHTAB_H) $(TARGET_H) $(TOPLEV_H) $(OPTABS_H) \
$(REAL_H) $(SPLAY_TREE_H) vec.h tree-iterator.h
gimple-iterator.o : gimple-iterator.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
@@ -2334,12 +2326,12 @@ gimple-iterator.o : gimple-iterator.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
gimple-low.o : gimple-low.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) langhooks.h \
$(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- except.h $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) tree-pass.h \
+ $(EXCEPT_H) $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) tree-pass.h \
$(HASHTAB_H) $(TOPLEV.H) tree-iterator.h
omp-low.o : omp-low.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h $(DIAGNOSTIC_H) \
$(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) $(TOPLEV_H) tree-pass.h \
- $(GGC_H) except.h $(SPLAY_TREE_H) $(OPTABS_H) $(CFGLOOP_H) \
+ $(GGC_H) $(EXCEPT_H) $(SPLAY_TREE_H) $(OPTABS_H) $(CFGLOOP_H) \
tree-iterator.h
tree-browser.o : tree-browser.c tree-browser.def $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) \
@@ -2363,26 +2355,33 @@ graphite.o: graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(GIMPLE_H) domwalk.h \
$(TREE_DATA_REF_H) $(SCEV_H) tree-pass.h tree-chrec.h graphite.h pointer-set.h \
value-prof.h
-tree-vect-analyze.o: tree-vect-analyze.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RECOG_H) $(BASIC_BLOCK_H) \
- $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
- tree-vectorizer.h $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) tree-chrec.h \
- $(TOPLEV_H) $(RECOG_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) $(EXPR_H) $(RECOG_H) $(OPTABS_H) $(TOPLEV_H) \
+ tree-chrec.h $(SCEV_H) tree-vectorizer.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) $(EXPR_H) $(TOPLEV_H) $(SCEV_H) \
+ tree-vectorizer.h langhooks.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) $(TIMEVAR_H) $(CFGLOOP_H) $(EXPR_H) \
- $(OPTABS_H) $(PARAMS_H) $(TREE_DATA_REF_H) tree-vectorizer.h $(RECOG_H) $(TOPLEV_H)
-tree-vect-transform.o: tree-vect-transform.c $(CONFIG_H) $(SYSTEM_H) \
- coretypes.h $(TM_H) $(GGC_H) $(OPTABS_H) $(RECOG_H) $(TREE_H) $(RTL_H) \
- $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \
- $(TIMEVAR_H) $(CFGLOOP_H) $(TARGET_H) tree-pass.h $(EXPR_H) \
- tree-vectorizer.h $(TREE_DATA_REF_H) $(SCEV_H) langhooks.h $(TOPLEV_H) \
- tree-chrec.h
+ $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(EXPR_H) $(OPTABS_H) $(PARAMS_H) \
+ $(TREE_DATA_REF_H) tree-vectorizer.h $(RECOG_H) $(TOPLEV_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) \
+ $(EXPR_H) $(RECOG_H) $(OPTABS_H) tree-vectorizer.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) \
+ $(EXPR_H) $(RECOG_H) $(OPTABS_H) tree-vectorizer.h langhooks.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) tree-chrec.h $(SCEV_H) tree-vectorizer.h $(TOPLEV_H)
tree-vectorizer.o: tree-vectorizer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \
- $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
- tree-pass.h $(EXPR_H) $(RECOG_H) tree-vectorizer.h $(TREE_DATA_REF_H) $(SCEV_H) \
- $(INPUT_H) $(TARGET_H) $(CFGLAYOUT_H) $(TOPLEV_H) tree-chrec.h langhooks.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-loop-linear.o: tree-loop-linear.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
@@ -2444,7 +2443,7 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
version.h $(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h $(INPUT_H) \
$(INSN_ATTR_H) output.h $(DIAGNOSTIC_H) debug.h insn-config.h intl.h \
$(RECOG_H) Makefile $(TOPLEV_H) dwarf2out.h sdbout.h dbxout.h $(EXPR_H) \
- hard-reg-set.h $(BASIC_BLOCK_H) graph.h except.h $(REGS_H) $(TIMEVAR_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) \
@@ -2457,7 +2456,7 @@ passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h $(INPUT_H) $(INSN_ATTR_H) output.h \
$(DIAGNOSTIC_H) debug.h insn-config.h intl.h $(RECOG_H) $(TOPLEV_H) \
dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \
- graph.h except.h $(REGS_H) $(TIMEVAR_H) value-prof.h \
+ graph.h $(EXCEPT_H) $(REGS_H) $(TIMEVAR_H) value-prof.h \
$(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \
langhooks.h insn-flags.h $(CFGLAYOUT_H) $(REAL_H) $(CFGLOOP_H) \
hosthooks.h $(CGRAPH_H) $(COVERAGE_H) tree-pass.h $(TREE_DUMP_H) \
@@ -2492,26 +2491,26 @@ varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(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 $(TOPLEV_H) except.h $(HASHTAB_H) $(GGC_H) $(TM_P_H) langhooks.h \
+ output.h $(TOPLEV_H) $(EXCEPT_H) $(HASHTAB_H) $(GGC_H) $(TM_P_H) langhooks.h \
gt-function.h $(TARGET_H) $(BASIC_BLOCK_H) $(INTEGRATE_H) $(PREDICT_H) \
tree-pass.h $(DF_H) $(TIMEVAR_H) vecprim.h
statistics.o : statistics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
tree-pass.h $(TREE_DUMP_H) $(HASHTAB_H) statistics.h $(TM_H) $(FUNCTION_H)
stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(FUNCTION_H) insn-config.h hard-reg-set.h $(EXPR_H) \
- libfuncs.h except.h $(RECOG_H) $(TOPLEV_H) output.h $(GGC_H) $(TM_P_H) \
+ libfuncs.h $(EXCEPT_H) $(RECOG_H) $(TOPLEV_H) output.h $(GGC_H) $(TM_P_H) \
langhooks.h $(PREDICT_H) $(OPTABS_H) $(TARGET_H) $(MACHMODE_H) \
$(REGS_H) alloc-pool.h
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 \
+ $(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) $(HASHTAB_H) intl.h $(GGC_H) \
- gt-except.h $(CGRAPH_H) $(INTEGRATE_H) $(DIAGNOSTIC_H) dwarf2.h \
+ gt-$(EXCEPT_H) $(CGRAPH_H) $(INTEGRATE_H) $(DIAGNOSTIC_H) dwarf2.h \
$(TARGET_H) $(TM_P_H) tree-pass.h $(TIMEVAR_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 \
- typeclass.h hard-reg-set.h $(TOPLEV_H) hard-reg-set.h except.h reload.h \
+ typeclass.h hard-reg-set.h $(TOPLEV_H) hard-reg-set.h $(EXCEPT_H) reload.h \
$(GGC_H) langhooks.h intl.h $(TM_P_H) $(REAL_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
@@ -2521,23 +2520,23 @@ dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_
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) \
$(EXPR_H) $(OPTABS_H) insn-config.h $(RECOG_H) output.h typeclass.h \
- hard-reg-set.h $(TOPLEV_H) hard-reg-set.h except.h $(TM_P_H) $(PREDICT_H) \
+ hard-reg-set.h $(TOPLEV_H) hard-reg-set.h $(EXCEPT_H) $(TM_P_H) $(PREDICT_H) \
libfuncs.h $(REAL_H) langhooks.h $(BASIC_BLOCK_H) tree-mudflap.h \
$(BUILTINS_DEF) $(MACHMODE_H) $(DIAGNOSTIC_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) output.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_P_H) \
- $(CGRAPH_H) except.h sbitmap.h $(DBGCNT_H) $(TREE_FLOW_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) \
$(FLAGS_H) insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) $(REAL_H) \
$(TOPLEV_H) $(TM_P_H) langhooks.h $(DF_H) $(TARGET_H)
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) \
- $(TOPLEV_H) except.h $(FUNCTION_H) $(GGC_H) $(TM_P_H) langhooks.h gt-explow.h \
+ $(TOPLEV_H) $(EXCEPT_H) $(FUNCTION_H) $(GGC_H) $(TM_P_H) langhooks.h gt-explow.h \
$(TARGET_H) output.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 $(TOPLEV_H) $(GGC_H) $(REAL_H) $(TM_P_H) except.h \
+ $(RECOG_H) reload.h $(TOPLEV_H) $(GGC_H) $(REAL_H) $(TM_P_H) $(EXCEPT_H) \
gt-optabs.h $(BASIC_BLOCK_H) $(TARGET_H) $(FUNCTION_H)
dbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(FLAGS_H) $(REGS_H) debug.h $(TM_P_H) $(TARGET_H) $(FUNCTION_H) \
@@ -2551,7 +2550,7 @@ sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) debug.h \
dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) version.h $(RTL_H) dwarf2.h debug.h $(FLAGS_H) insn-config.h \
output.h $(DIAGNOSTIC_H) $(REAL_H) hard-reg-set.h $(REGS_H) $(EXPR_H) \
- libfuncs.h $(TOPLEV_H) dwarf2out.h reload.h $(GGC_H) except.h dwarf2asm.h \
+ libfuncs.h $(TOPLEV_H) dwarf2out.h reload.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) $(VARRAY_H)
dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
@@ -2576,11 +2575,11 @@ fixed-value.o: fixed-value.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_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) $(REAL_H) $(REGS_H) intl.h $(FUNCTION_H) output.h $(RECOG_H) \
- except.h $(TOPLEV_H) $(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h \
+ $(EXCEPT_H) $(TOPLEV_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) \
- $(REAL_H) except.h $(FUNCTION_H) tree-pass.h $(DIAGNOSTIC_H) \
+ $(REAL_H) $(EXCEPT_H) $(FUNCTION_H) tree-pass.h $(DIAGNOSTIC_H) \
$(TOPLEV_H) $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H) \
$(TIMEVAR_H) $(TARGET_H)
simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
@@ -2663,7 +2662,7 @@ cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
hard-reg-set.h $(FLAGS_H) insn-config.h $(RECOG_H) $(EXPR_H) $(TOPLEV_H) \
output.h $(FUNCTION_H) $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H) \
- except.h $(TARGET_H) $(PARAMS_H) rtlhooks-def.h tree-pass.h $(REAL_H) \
+ $(EXCEPT_H) $(TARGET_H) $(PARAMS_H) rtlhooks-def.h tree-pass.h $(REAL_H) \
$(DF_H) $(DBGCNT_H)
dce.o : dce.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) $(DF_H) cselib.h \
@@ -2686,11 +2685,11 @@ see.o : see.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(REGS_H) hard-reg-set.h $(FLAGS_H) $(REAL_H) insn-config.h $(GGC_H) \
$(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
- $(TM_P_H) $(PARAMS_H) except.h gt-gcse.h $(TREE_H) cselib.h $(TIMEVAR_H) \
+ $(TM_P_H) $(PARAMS_H) $(EXCEPT_H) gt-gcse.h $(TREE_H) cselib.h $(TIMEVAR_H) \
intl.h $(OBSTACK_H) tree-pass.h $(DF_H) $(DBGCNT_H)
resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \
coretypes.h $(TM_H) $(REGS_H) $(FLAGS_H) output.h $(RESOURCE_H) $(DF_H) \
- $(FUNCTION_H) $(TOPLEV_H) $(INSN_ATTR_H) except.h $(PARAMS_H) $(TM_P_H)
+ $(FUNCTION_H) $(TOPLEV_H) $(INSN_ATTR_H) $(EXCEPT_H) $(PARAMS_H) $(TM_P_H)
lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
hard-reg-set.h $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(RECOG_H) \
$(BASIC_BLOCK_H) $(TM_P_H) $(FUNCTION_H) output.h $(REAL_H)
@@ -2737,7 +2736,7 @@ df-core.o : df-core.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
df-problems.o : df-problems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
- $(TM_P_H) $(FLAGS_H) output.h except.h dce.h vecprim.h
+ $(TM_P_H) $(FLAGS_H) output.h $(EXCEPT_H) dce.h vecprim.h
df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
@@ -2746,7 +2745,7 @@ df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
df-byte-scan.o : df-byte-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
tm_p.h $(DF_H) output.h $(DBGCNT_H)
regstat.o : regstat.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(TM_P_H) $(FLAGS_H) $(REGS_H) output.h except.h hard-reg-set.h \
+ $(TM_P_H) $(FLAGS_H) $(REGS_H) output.h $(EXCEPT_H) hard-reg-set.h \
$(BASIC_BLOCK_H) $(TIMEVAR_H) $(DF_H)
var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) hard-reg-set.h insn-config.h reload.h $(FLAGS_H) \
@@ -2773,22 +2772,22 @@ loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
alloc-pool.o : alloc-pool.c $(CONFIG_H) $(SYSTEM_H) alloc-pool.h $(HASHTAB_H)
auto-inc-dec.o : auto-inc-dec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) insn-config.h \
- $(REGS_H) $(FLAGS_H) output.h $(FUNCTION_H) except.h $(TOPLEV_H) $(RECOG_H) \
+ $(REGS_H) $(FLAGS_H) output.h $(FUNCTION_H) $(EXCEPT_H) $(TOPLEV_H) $(RECOG_H) \
$(EXPR_H) $(TIMEVAR_H) tree-pass.h $(DF_H) $(DBGCNT_H)
cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(FLAGS_H) \
- $(REGS_H) hard-reg-set.h output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(GGC_H) \
+ $(REGS_H) hard-reg-set.h output.h $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) $(GGC_H) \
$(TM_P_H) $(TIMEVAR_H) $(OBSTACK_H) $(TREE_H) alloc-pool.h \
$(HASHTAB_H) $(DF_H) $(CFGLOOP_H) $(TREE_FLOW_H) tree-pass.h
cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TOPLEV_H) $(CFGLOOP_H)
cfgexpand.o : cfgexpand.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) \
- coretypes.h $(TREE_DUMP_H) except.h langhooks.h tree-pass.h $(RTL_H) \
+ coretypes.h $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h tree-pass.h $(RTL_H) \
$(DIAGNOSTIC_H) $(TOPLEV_H) $(BASIC_BLOCK_H) $(FLAGS_H) debug.h $(PARAMS_H) \
value-prof.h $(TREE_INLINE_H) $(TARGET_H)
cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
- output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) insn-config.h $(EXPR_H) \
+ output.h $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) $(TM_P_H) insn-config.h $(EXPR_H) \
$(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \
tree-pass.h $(DF_H) $(GGC_H)
cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
@@ -2796,7 +2795,7 @@ cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TIMEVAR_H) $(OBSTACK_H) $(TOPLEV_H) vecprim.h
cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h $(TOPLEV_H) \
- $(FUNCTION_H) except.h $(TIMEVAR_H) $(TREE_H)
+ $(FUNCTION_H) $(EXCEPT_H) $(TIMEVAR_H) $(TREE_H)
cfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TIMEVAR_H) hard-reg-set.h output.h $(FLAGS_H) $(RECOG_H) \
$(TOPLEV_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H) $(PARAMS_H) \
@@ -2817,7 +2816,7 @@ loop-iv.o : loop-iv.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \
loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) coretypes.h \
$(TM_H) $(TM_P_H) $(FUNCTION_H) $(FLAGS_H) $(DF_H) $(OBSTACK_H) output.h \
- $(HASHTAB_H) except.h $(PARAMS_H)
+ $(HASHTAB_H) $(EXCEPT_H) $(PARAMS_H)
cfgloopmanip.o : cfgloopmanip.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) output.h \
coretypes.h $(TM_H) cfghooks.h $(OBSTACK_H) $(TREE_FLOW_H)
@@ -2859,31 +2858,31 @@ reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \
$(BASIC_BLOCK_H) $(RECOG_H) output.h $(FUNCTION_H) $(TOPLEV_H) $(TM_P_H) \
- addresses.h except.h $(TREE_H) $(REAL_H) $(FLAGS_H) $(MACHMODE_H) \
+ addresses.h $(EXCEPT_H) $(TREE_H) $(REAL_H) $(FLAGS_H) $(MACHMODE_H) \
$(OBSTACK_H) $(DF_H) $(TARGET_H) $(EMIT_RTL_H) ira.h
rtlhooks.o : rtlhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
rtlhooks-def.h $(EXPR_H) $(RECOG_H)
postreload.o : postreload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(REAL_H) $(FLAGS_H) $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) \
hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) output.h \
- $(FUNCTION_H) $(TOPLEV_H) cselib.h $(TM_P_H) except.h $(TREE_H) $(MACHMODE_H) \
+ $(FUNCTION_H) $(TOPLEV_H) cselib.h $(TM_P_H) $(EXCEPT_H) $(TREE_H) $(MACHMODE_H) \
$(OBSTACK_H) $(TIMEVAR_H) tree-pass.h $(DF_H) $(DBGCNT_H)
postreload-gcse.o : postreload-gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_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) \
- $(TM_P_H) except.h $(TREE_H) $(TARGET_H) $(HASHTAB_H) intl.h $(OBSTACK_H) \
+ $(TM_P_H) $(EXCEPT_H) $(TREE_H) $(TARGET_H) $(HASHTAB_H) intl.h $(OBSTACK_H) \
$(PARAMS_H) $(TIMEVAR_H) tree-pass.h $(REAL_H) $(DBGCNT_H)
caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) $(FUNCTION_H) \
addresses.h $(RECOG_H) reload.h $(EXPR_H) $(TOPLEV_H) $(TM_P_H) $(DF_H) \
output.h ira.h gt-caller-save.h $(GGC_H)
-bt-load.o : bt-load.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) except.h \
+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) \
$(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 \
+ $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) $(FUNCTION_H) $(FLAGS_H) output.h \
$(EXPR_H) $(TOPLEV_H) $(PARAMS_H) $(TM_P_H) $(OBSTACK_H) $(RESOURCE_H) \
$(TIMEVAR_H) $(TARGET_H) tree-pass.h
alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
@@ -2919,7 +2918,7 @@ ira-emit.o: ira-emit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(PARAMS_H) \
$(IRA_INT_H)
ira-lives.o: ira-lives.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(TARGET_H) $(RTL_H) $(REGS_H) except.h hard-reg-set.h $(FLAGS_H) \
+ $(TARGET_H) $(RTL_H) $(REGS_H) $(EXCEPT_H) hard-reg-set.h $(FLAGS_H) \
insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(PARAMS_H) \
$(DF_H) sparseset.h $(IRA_INT_H)
ira.o: ira.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
@@ -2931,62 +2930,62 @@ ira.o: ira.c $(CONFIG_H) $(SYSTEM_H) coretypes.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) \
- $(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) except.h reload.h
+ $(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(EXCEPT_H) reload.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) $(TOPLEV_H) $(TM_P_H) $(DF_H) except.h reload.h
+ $(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(DF_H) $(EXCEPT_H) reload.h
ddg.o : ddg.c $(DDG_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TARGET_H) \
$(TOPLEV_H) $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) \
- $(FLAGS_H) insn-config.h $(INSN_ATTR_H) except.h $(RECOG_H) \
+ $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) \
$(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(BITMAP_H) \
hard-reg-set.h sbitmap.h $(TM_H)
modulo-sched.o : modulo-sched.c $(DDG_H) $(CONFIG_H) $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TARGET_H) $(TOPLEV_H) $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) \
- $(FLAGS_H) insn-config.h $(INSN_ATTR_H) except.h $(RECOG_H) \
+ $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) \
$(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(PARAMS_H) \
cfghooks.h $(GCOV_IO_H) hard-reg-set.h $(TM_H) $(TIMEVAR_H) tree-pass.h \
$(DF_H) $(DBGCNT_H)
haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(FUNCTION_H) \
- $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) except.h $(TM_P_H) $(TARGET_H) output.h \
+ $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(TM_P_H) $(TARGET_H) output.h \
$(PARAMS_H) $(DBGCNT_H)
sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
- $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) except.h cselib.h \
+ $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) cselib.h \
$(PARAMS_H) $(TM_P_H)
sched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
- $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) except.h $(PARAMS_H) \
+ $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
$(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \
$(DBGCNT_H)
sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
- $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) except.h $(TM_P_H) \
+ $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(TM_P_H) \
$(PARAMS_H) $(CFGLAYOUT_H) $(TARGET_H) output.h
sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(SCHED_INT_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H) \
$(REAL_H) tree-pass.h $(INSN_ATTR_H)
sel-sched.o : sel-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
- $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(PARAMS_H) \
+ $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
$(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \
$(SCHED_INT_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) \
$(SEL_SCHED_IR_H) $(SEL_SCHED_DUMP_H) sel-sched.h
sel-sched-dump.o : sel-sched-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
- $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(PARAMS_H) \
+ $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
$(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \
$(SEL_SCHED_DUMP_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) $(SEL_SCHED_IR_H)
sel-sched-ir.o : sel-sched-ir.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
- $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(PARAMS_H) \
+ $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
$(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \
$(SCHED_INT_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) $(SEL_SCHED_IR_H)
final.o : final.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) intl.h $(REGS_H) $(RECOG_H) conditions.h \
insn-config.h $(INSN_ATTR_H) $(FUNCTION_H) output.h hard-reg-set.h \
- except.h debug.h xcoffout.h $(TOPLEV_H) reload.h dwarf2out.h tree-pass.h \
+ $(EXCEPT_H) debug.h xcoffout.h $(TOPLEV_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) $(REAL_H) $(DF_H) vecprim.h $(GGC_H) \
$(CFGLOOP_H) $(PARAMS_H)
@@ -3003,7 +3002,7 @@ reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
sreal.o: sreal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) sreal.h
predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) \
- hard-reg-set.h output.h $(TOPLEV_H) $(RECOG_H) $(FUNCTION_H) except.h \
+ hard-reg-set.h output.h $(TOPLEV_H) $(RECOG_H) $(FUNCTION_H) $(EXCEPT_H) \
$(TM_P_H) $(PREDICT_H) sreal.h $(PARAMS_H) $(TARGET_H) $(CFGLOOP_H) \
$(COVERAGE_H) $(SCEV_H) $(GGC_H) predict.def $(TIMEVAR_H) $(TREE_DUMP_H) \
$(TREE_FLOW_H) tree-pass.h $(EXPR_H) pointer-set.h
@@ -3030,7 +3029,7 @@ regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
addresses.h reload.h $(TOPLEV_H) $(TIMEVAR_H) tree-pass.h $(DF_H)
ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(REGS_H) $(TOPLEV_H) $(FLAGS_H) insn-config.h $(FUNCTION_H) $(RECOG_H) \
- $(TARGET_H) $(BASIC_BLOCK_H) $(EXPR_H) output.h except.h $(TM_P_H) \
+ $(TARGET_H) $(BASIC_BLOCK_H) $(EXPR_H) output.h $(EXCEPT_H) $(TM_P_H) \
$(REAL_H) $(OPTABS_H) $(CFGLOOP_H) hard-reg-set.h $(TIMEVAR_H) tree-pass.h \
$(DF_H) $(DBGCNT_H)
lambda-mat.o : lambda-mat.c $(LAMBDA_H) $(GGC_H) $(SYSTEM_H) $(CONFIG_H) \
@@ -3053,7 +3052,7 @@ dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h errors.h $(DBGCNT_H) \
lower-subreg.o : lower-subreg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(MACHMODE_H) $(TM_H) $(RTL_H) $(TM_P_H) $(TIMEVAR_H) $(FLAGS_H) \
insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) $(OBSTACK_H) $(BITMAP_H) \
- $(EXPR_H) except.h $(REGS_H) tree-pass.h $(DF_H)
+ $(EXPR_H) $(EXCEPT_H) $(REGS_H) tree-pass.h $(DF_H)
$(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h insn-config.h conditions.h \
@@ -3136,7 +3135,7 @@ insn-output.o : insn-output.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TARGET_H) tm-constrs.h
insn-peep.o : insn-peep.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
insn-config.h $(RTL_H) $(TM_P_H) $(REGS_H) output.h $(REAL_H) \
- $(RECOG_H) except.h $(FUNCTION_H) $(TOPLEV_H) $(FLAGS_H) tm-constrs.h
+ $(RECOG_H) $(EXCEPT_H) $(FUNCTION_H) $(TOPLEV_H) $(FLAGS_H) tm-constrs.h
insn-preds.o : insn-preds.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TREE_H) insn-config.h $(RECOG_H) output.h \
$(FLAGS_H) $(FUNCTION_H) hard-reg-set.h $(RESOURCE_H) $(TM_P_H) \
@@ -3311,7 +3310,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/tree-ssa-propagate.c \
$(srcdir)/tree-phinodes.c \
$(srcdir)/ipa-reference.c $(srcdir)/tree-ssa-structalias.h \
- $(srcdir)/tree-ssa-structalias.c \
+ $(srcdir)/tree-ssa-structalias.c $(srcdir)/tree-inline.c \
@all_gtfiles@
# Compute the list of GT header files from the corresponding C sources,
@@ -3373,7 +3372,7 @@ build/vec.o : vec.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h vec.h \
build/gencondmd.o : build/gencondmd.c $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) insn-constants.h $(RTL_H) $(TM_P_H) \
$(FUNCTION_H) $(REGS_H) $(RECOG_H) $(REAL_H) output.h $(FLAGS_H) \
- $(RESOURCE_H) $(TOPLEV_H) reload.h except.h tm-constrs.h
+ $(RESOURCE_H) $(TOPLEV_H) reload.h $(EXCEPT_H) tm-constrs.h
# This pulls in tm-pred.h which contains inline functions wrapping up
# predicates from the back-end so those functions must be discarded.
# No big deal since gencondmd.c is a dummy file for non-GCC compilers.
@@ -3463,7 +3462,7 @@ intl.o: intl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h Makefile
-c $(srcdir)/intl.c $(OUTPUT_OPTION)
#
-# Remake cpp and protoize.
+# Remake cpp.
PREPROCESSOR_DEFINES = \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
@@ -3487,72 +3486,6 @@ cppdefault.o: cppdefault.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
# Note for the stamp targets, we run the program `true' instead of
# having an empty command (nothing following the semicolon).
-proto: config.status protoize$(exeext) unprotoize$(exeext) SYSCALLS.c.X
-
-PROTO_OBJS = intl.o version.o cppdefault.o errors.o
-
-protoize$(exeext): protoize.o $(PROTO_OBJS) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ protoize.o $(PROTO_OBJS) $(LIBS)
-
-unprotoize$(exeext): unprotoize.o $(PROTO_OBJS) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ unprotoize.o $(PROTO_OBJS) $(LIBS)
-
-protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) $(SYSTEM_H) \
- coretypes.h $(TM_H) Makefile version.h cppdefault.h intl.h
- (SHLIB_LINK='$(SHLIB_LINK)'; \
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
- $(DRIVER_DEFINES) \
- $(srcdir)/protoize.c $(OUTPUT_OPTION))
-
-unprotoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) \
- $(SYSTEM_H) coretypes.h $(TM_H) Makefile version.h cppdefault.h intl.h
- (SHLIB_LINK='$(SHLIB_LINK)'; \
- $(CC) -c -DUNPROTOIZE $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
- $(DRIVER_DEFINES) \
- $(srcdir)/protoize.c $(OUTPUT_OPTION))
-
-# This info describes the target machine, so compile with GCC just built.
-SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
- stmp-int-hdrs
- -rm -f SYSCALLS.c tmp-SYSCALLS.s
- sed -e s/TARGET_GETGROUPS_T/$(TARGET_GETGROUPS_T)/ \
- $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
- $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) \
- -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
- -rm -f SYSCALLS.c tmp-SYSCALLS.s
-
-
-test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
- -rm -f tmp-proto.[cso]
- cp $(srcdir)/protoize.c tmp-proto.c
- chmod u+w tmp-proto.c
- ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
- $(GCC_CFLAGS) $(INCLUDES) \
- -DGCC_INCLUDE_DIR=0 \
- -DFIXED_INCLUDE_DIR=0 \
- -DGPLUSPLUS_INCLUDE_DIR=0 \
- -DCROSS_INCLUDE_DIR=0 \
- -DTOOL_INCLUDE_DIR=0 \
- -DSTANDARD_EXEC_PREFIX=0 \
- -DDEFAULT_TARGET_MACHINE=0 \
- -DDEFAULT_TARGET_VERSION=0" tmp-proto.c
- @echo '**********' Expect 400 lines of differences.
- -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
- -wc -l tmp-proto.diff
- ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
- $(GCC_CFLAGS) $(INCLUDES) \
- -DGCC_INCLUDE_DIR=0 \
- -DFIXED_INCLUDE_DIR=0 \
- -DGPLUSPLUS_INCLUDE_DIR=0 \
- -DCROSS_INCLUDE_DIR=0 \
- -DTOOL_INCLUDE_DIR=0 \
- -DSTANDARD_EXEC_PREFIX=0 \
- -DDEFAULT_TARGET_MACHINE=0 \
- -DDEFAULT_TARGET_VERSION=0" tmp-proto.c
- @echo Expect zero differences.
- diff $(srcdir)/protoize.c tmp-proto.c | cat
- -rm -f tmp-proto.[cs] tmp-proto$(objext)
-
# gcov-iov.c is run on the build machine to generate gcov-iov.h from version.c
build/gcov-iov.o: gcov-iov.c $(BCONFIG_H) coretypes.h $(GTM_H) \
$(SYSTEM_H) coretypes.h $(TM_H)
@@ -3723,98 +3656,6 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \
done; \
fi
$(STAMP) stmp-fixinc
-
-# Files related to the fixproto script.
-# gen-protos and fix-header are compiled with CC_FOR_BUILD, but they are only
-# used in native and host-x-target builds, so it's safe to link them with
-# libiberty.a.
-
-deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
- if [ -d "$(SYSTEM_HEADER_DIR)" ]; \
- then \
- CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -isystem include -isystem ${SYSTEM_HEADER_DIR}"; \
- export CC; \
- $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h; \
- mv tmp-deduced.h deduced.h; \
- else \
- $(STAMP) deduced.h; \
- fi
-
-GEN_PROTOS_OBJS = build/gen-protos.o build/scan.o $(BUILD_ERRORS)
-build/gen-protos$(build_exeext): $(GEN_PROTOS_OBJS)
- ${CC_FOR_BUILD} $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ \
- $(GEN_PROTOS_OBJS) $(BUILD_LIBS)
-
-build/gen-protos.o: gen-protos.c scan.h $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
- $(GTM_H) errors.h
-
-build/scan.o: scan.c scan.h $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H)
-
-xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h \
- build/gen-protos$(build_exeext) Makefile
- sed -e s/TARGET_GETGROUPS_T/$(TARGET_GETGROUPS_T)/ \
- deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c
- mv tmp-fixtmp.c fixtmp.c
- $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
- | sed -e 's/ / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
- | $(RUN_GEN) build/gen-protos >xsys-protos.hT
- mv xsys-protos.hT xsys-protos.h
- rm -rf fixtmp.c
-
-# This is nominally a 'build' program, but it's run only when host==build,
-# so we can (indeed, must) use $(LIBDEPS) and $(LIBS).
-build/fix-header$(build_exeext): build/fix-header.o build/scan-decls.o \
- build/scan.o xsys-protos.h \
- $(BUILD_ERRORS) $(LIBDEPS)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ \
- build/fix-header.o incpath.o cppdefault.o build/scan-decls.o prefix.o \
- build/scan.o $(BUILD_ERRORS) $(LIBS)
-
-build/fix-header.o: fix-header.c $(OBSTACK_H) scan.h errors.h \
- xsys-protos.h $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) $(CPPLIB_H)
-
-build/scan-decls.o: scan-decls.c scan.h $(CPPLIB_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H)
-
-# stmp-fixproto depends on this, not on fix-header directly.
-# The idea is to make sure fix-header gets built,
-# but not rerun fixproto after each stage
-# just because fix-header's mtime has changed.
-fixhdr.ready: build/fix-header$(build_exeext)
- -if [ -f fixhdr.ready ] ; then \
- true; \
- else \
- $(STAMP) fixhdr.ready; \
- fi
-
-# stmp-int-hdrs is to make sure fixincludes has already finished.
-# The if statement is so that we don't run fixproto a second time
-# if it has already been run on the files in `include-fixed'.
-stmp-fixproto: fixhdr.ready fixproto fixinc_list stmp-int-hdrs
- set -e; for ml in `cat fixinc_list`; do \
- sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \
- multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
- fix_dir=include-fixed$${multi_dir}; \
- if [ -f $${fix_dir}/fixed ] ; then true; \
- else \
- : This line works around a 'make' bug in BSDI 1.1.; \
- FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
- FIX_HEADER="build/fix-header$(build_exeext)"; export FIX_HEADER; \
- mkinstalldirs="$(mkinstalldirs)"; \
- export mkinstalldirs; \
- if [ -d "$(SYSTEM_HEADER_DIR)" ]; then \
- $(SHELL) ${srcdir}/fixproto $${fix_dir} $${fix_dir} $(SYSTEM_HEADER_DIR); \
- if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \
- else true; fi; \
- $(STAMP) $${fix_dir}/fixed; \
- fi; \
- done
- $(STAMP) stmp-fixproto
-
-# We can't run fixproto (it's being built for a different host), but we still
-# need to install it so that the user can run it when the compiler is
-# installed.
-stmp-install-fixproto: fixproto
- $(STAMP) $@
#
# Remake the info files.
@@ -4020,7 +3861,6 @@ mostlyclean: lang.mostlyclean
-rm -f build/*
-rm -f mddeps.mk
# Delete other built files.
- -rm -f xsys-protos.hT
-rm -f specs.h options.c options.h
# Delete the stamp and temporary files.
-rm -f s-* tmp-* stamp-* stmp-*
@@ -4028,11 +3868,8 @@ mostlyclean: lang.mostlyclean
# Delete debugging dump files.
-rm -f *.[0-9][0-9].* */*.[0-9][0-9].*
# Delete some files made during installation.
- -rm -f specs $(SPECS) SYSCALLS.c.X SYSCALLS.c
+ -rm -f specs $(SPECS)
-rm -f collect collect2 mips-tfile mips-tdump
-# Delete files generated for fixproto
- -rm -rf $(build_exeext) xsys-protos.h deduced.h tmp-deduced.h \
- gen-protos$(build_exeext) fixproto.list fixtmp.* fixhdr.ready
# Delete unwanted output files from TeX.
-rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
-rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
@@ -4153,16 +3990,6 @@ install-common: native lang.install-common installdirs
# using -dumpspecs. We remove any old version because it would
# otherwise override the specs built into the driver.
rm -f $(DESTDIR)$(libsubdir)/specs
-# Install protoize if it was compiled.
- -if [ -f protoize$(exeext) ]; then \
- rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
- $(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \
- rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
- $(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \
- rm -f $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
- $(INSTALL_DATA) SYSCALLS.c.X $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
- chmod a-x $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \
- fi
# Install gcov if it was compiled.
-if [ -f gcov$(exeext) ]; \
then \
@@ -4310,7 +4137,7 @@ install-itoolsdirs: installdirs
$(mkinstalldirs) $(DESTDIR)$(itoolsdir)
# Install the include directory using tar.
-install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
+install-headers-tar: stmp-int-hdrs install-include-dir
# We use `pwd`/include instead of just include to problems with CDPATH
# Unless a full pathname is provided, some shells would print the new CWD,
# found in CDPATH, corrupting the output. We could just redirect the
@@ -4324,7 +4151,7 @@ install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
# So use `exit 0' to ignore its exit status.
# Install the include directory using cpio.
-install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
+install-headers-cpio: stmp-int-hdrs install-include-dir
# See discussion about the use of `pwd` above
cd `${PWD_COMMAND}`/include ; \
find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include
@@ -4332,7 +4159,7 @@ install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include-fixed
# Install the include directory using cp.
-install-headers-cp: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
+install-headers-cp: stmp-int-hdrs install-include-dir
cp -p -r include $(DESTDIR)$(libsubdir)
cp -p -r include-fixed $(DESTDIR)$(libsubdir)
@@ -4349,7 +4176,7 @@ real-install-headers-cp:
cp -p -r include-fixed $(DESTDIR)$(libsubdir)
# Install supporting files for fixincludes to be run later.
-install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-itoolsdirs \
+install-mkheaders: stmp-int-hdrs install-itoolsdirs \
macro_list fixinc_list
$(INSTALL_DATA) $(srcdir)/gsyslimits.h \
$(DESTDIR)$(itoolsdatadir)/gsyslimits.h
@@ -4362,20 +4189,11 @@ install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-itoolsdirs \
done
$(INSTALL_SCRIPT) $(srcdir)/../mkinstalldirs \
$(DESTDIR)$(itoolsdir)/mkinstalldirs ; \
- if [ x$(STMP_FIXPROTO) != x ] ; then \
- $(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \
- $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \
- $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \
- else :; fi
sysroot_headers_suffix='$${sysroot_headers_suffix}'; \
echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \
> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
echo 'OTHER_FIXINCLUDES_DIRS="$(OTHER_FIXINCLUDES_DIRS)"' \
>> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
- echo 'FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"' \
- >> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
- echo 'STMP_FIXPROTO="$(STMP_FIXPROTO)"' \
- >> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
echo 'STMP_FIXINC="$(STMP_FIXINC)"' \
>> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
@@ -4394,13 +4212,9 @@ uninstall: lang.uninstall
-if [ x$(cpp_install_dir) != x ]; then \
rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
else true; fi
- -rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext)
- -rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext)
-rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
-rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext)
- -rm -rf $(DESTDIR)$(man1dir)/protoize$(man1ext)
- -rm -rf $(DESTDIR)$(man1dir)/unprotoize$(man1ext)
-rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
-rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info*
#
@@ -4429,9 +4243,13 @@ site.exp: ./config.status Makefile
@echo "set CXXFLAGS \"\"" >> ./tmp0
@echo "set HOSTCC \"$(CC)\"" >> ./tmp0
@echo "set HOSTCFLAGS \"$(CFLAGS)\"" >> ./tmp0
+# When running the tests we set GCC_EXEC_PREFIX to the install tree so that
+# files that have already been installed there will be found. The -B option
+# overrides it, so use of GCC_EXEC_PREFIX will not result in using GCC files
+# from the install tree.
+ @echo "set TEST_GCC_EXEC_PREFIX \"$(libdir)/gcc/\"" >> ./tmp0
@echo "set TESTING_IN_BUILD_TREE 1" >> ./tmp0
@echo "set HAVE_LIBSTDCXX_V3 1" >> ./tmp0
- @echo "set GCC_EXEC_PREFIX \"$(libdir)/gcc/\"" >> ./tmp0
# If newlib has been configured, we need to pass -B to gcc so it can find
# newlib's crt0.o if it exists. This will cause a "path prefix not used"
# message if it doesn't, but the testsuite is supposed to ignore the message -
@@ -4516,7 +4334,6 @@ $(filter-out $(lang_checks_parallelized),$(lang_checks)): check-% : site.exp
if [ -f $${rootme}/../expect/expect ] ; then \
TCL_LIBRARY=`cd .. ; cd $${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
export TCL_LIBRARY ; fi ; \
- GCC_EXEC_PREFIX="$(libdir)/gcc/" ; export GCC_EXEC_PREFIX ; \
$(RUNTEST) --tool $* $(RUNTESTFLAGS))
$(patsubst %,%-subtargets,$(filter-out $(lang_checks_parallelized),$(lang_checks))): check-%-subtargets:
@@ -4604,7 +4421,6 @@ check-parallel-% : site.exp
if [ -f $${rootme}/../expect/expect ] ; then \
TCL_LIBRARY=`cd .. ; cd $${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
export TCL_LIBRARY ; fi ; \
- GCC_EXEC_PREFIX="$(libdir)/gcc/" ; export GCC_EXEC_PREFIX ; \
runtestflags= ; \
if [ -n "$(check_p_subno)" ] ; then \
runtestflags="$(check_p_subwork)"; \
@@ -4629,7 +4445,6 @@ check-consistency: testsuite/site.exp
if [ -f $${rootme}/../expect/expect ] ; then \
TCL_LIBRARY=`cd .. ; cd $${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
export TCL_LIBRARY ; fi ; \
- GCC_EXEC_PREFIX="$(libdir)/gcc/" ; export GCC_EXEC_PREFIX ; \
$(RUNTEST) --tool consistency $(RUNTESTFLAGS)
# QMTest targets
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 799cf6e56ea..cd9527ce6d8 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,43 @@
+2009-03-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * gcc-interface/decl.c (maybe_pad_type): Use TREE_OVERFLOW instead
+ of TREE_CONSTANT_OVERFLOW.
+
+2009-03-30 Joseph Myers <joseph@codesourcery.com>
+
+ PR rtl-optimization/323
+ * gcc-interface/misc.c (gnat_post_options): Set
+ flag_excess_precision_cmdline. Give an error for
+ -fexcess-precision=standard for processors where the option is
+ significant.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR c/39323
+ * gcc-interface/utils.c (create_field_decl): Use "unsigned int"
+ on bit_align.
+
+2009-03-11 Olivier Hainque <hainque@adacore.com>
+
+ * gcc-interface/trans.c (gnat_to_gnu) <case N_Slice>: In range
+ checks processing, remove unintended TREE_TYPE walk on index type.
+
+2009-03-01 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/39264
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do no
+ call make_packable_type on fat pointer types.
+ <E_Array_Subtype>: Likewise.
+ <E_Record_Subtype>: Call make_packable_type on all record types
+ except for fat pointer types.
+ (make_packable_type): Likewise.
+ (gnat_to_gnu_field): Likewise.
+
+2009-02-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/Makefile.in (cygwin/mingw): Revert accidental
+ EH_MECHANISM change made on 2007-12-06.
+
2009-02-26 Andreas Schwab <schwab@suse.de>
PR ada/39172
@@ -9,6 +49,7 @@
2009-02-25 Laurent GUERBY <laurent@guerby.net>
+ PR ada/39221
* a-teioed.adb (Expand): Fix Result overflow.
2009-02-25 Laurent GUERBY <laurent@guerby.net>
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index cec096e77e3..c431118608e 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -1403,8 +1403,6 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
# ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
# auto-import support for array/record will be done.
GNATLIB_SHARED = gnatlib-shared-win32
-
- EH_MECHANISM=-gcc
endif
TOOLS_TARGET_PAIRS= \
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 34d8b379831..5e44c3cef2c 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -1958,6 +1958,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
&& !Has_Aliased_Components (gnat_entity)
&& !Strict_Alignment (Component_Type (gnat_entity))
&& TREE_CODE (tem) == RECORD_TYPE
+ && !TYPE_IS_FAT_POINTER_P (tem)
&& host_integerp (TYPE_SIZE (tem), 1))
tem = make_packable_type (tem, false);
@@ -2326,6 +2327,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
&& !Has_Aliased_Components (gnat_entity)
&& !Strict_Alignment (Component_Type (gnat_entity))
&& TREE_CODE (gnu_type) == RECORD_TYPE
+ && !TYPE_IS_FAT_POINTER_P (gnu_type)
&& host_integerp (TYPE_SIZE (gnu_type), 1))
gnu_type = make_packable_type (gnu_type, false);
@@ -3082,8 +3084,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
== INTEGER_CST)
{
gnu_size = DECL_SIZE (gnu_old_field);
- if (TYPE_MODE (gnu_field_type) == BLKmode
- && TREE_CODE (gnu_field_type) == RECORD_TYPE
+ if (TREE_CODE (gnu_field_type) == RECORD_TYPE
+ && !TYPE_IS_FAT_POINTER_P (gnu_field_type)
&& host_integerp (TYPE_SIZE (gnu_field_type), 1))
gnu_field_type
= make_packable_type (gnu_field_type, true);
@@ -5697,8 +5699,8 @@ round_up_to_align (unsigned HOST_WIDE_INT t, unsigned int align)
as the field type of a packed record if IN_RECORD is true, or as the
component type of a packed array if IN_RECORD is false. See if we can
rewrite it either as a type that has a non-BLKmode, which we can pack
- tighter in the packed record case, or as a smaller type with BLKmode.
- If so, return the new type. If not, return the original type. */
+ tighter in the packed record case, or as a smaller type. If so, return
+ the new type. If not, return the original type. */
static tree
make_packable_type (tree type, bool in_record)
@@ -5760,10 +5762,10 @@ make_packable_type (tree type, bool in_record)
tree new_field_type = TREE_TYPE (old_field);
tree new_field, new_size;
- if (TYPE_MODE (new_field_type) == BLKmode
- && (TREE_CODE (new_field_type) == RECORD_TYPE
- || TREE_CODE (new_field_type) == UNION_TYPE
- || TREE_CODE (new_field_type) == QUAL_UNION_TYPE)
+ if ((TREE_CODE (new_field_type) == RECORD_TYPE
+ || TREE_CODE (new_field_type) == UNION_TYPE
+ || TREE_CODE (new_field_type) == QUAL_UNION_TYPE)
+ && !TYPE_IS_FAT_POINTER_P (new_field_type)
&& host_integerp (TYPE_SIZE (new_field_type), 1))
new_field_type = make_packable_type (new_field_type, true);
@@ -5947,7 +5949,7 @@ maybe_pad_type (tree type, tree size, unsigned int align,
&& TREE_CODE (type) == RECORD_TYPE
&& TYPE_MODE (type) == BLKmode
&& TREE_CODE (orig_size) == INTEGER_CST
- && !TREE_CONSTANT_OVERFLOW (orig_size)
+ && !TREE_OVERFLOW (orig_size)
&& compare_tree_int (orig_size, MAX_FIXED_MODE_SIZE) <= 0
&& (!size
|| (TREE_CODE (size) == INTEGER_CST
@@ -6207,11 +6209,10 @@ gnat_to_gnu_field (Entity_Id gnat_field, tree gnu_record_type, int packed,
gnu_size = NULL_TREE;
/* If we have a specified size that's smaller than that of the field type,
- or a position is specified, and the field type is also a record that's
- BLKmode, see if we can get either an integral mode form of the type or
- a smaller BLKmode form. If we can, show a size was specified for the
- field if there wasn't one already, so we know to make this a bitfield
- and avoid making things wider.
+ or a position is specified, and the field type is a record, see if we can
+ get either an integral mode form of the type or a smaller form. If we
+ can, show a size was specified for the field if there wasn't one already,
+ so we know to make this a bitfield and avoid making things wider.
Doing this is first useful if the record is packed because we may then
place the field at a non-byte-aligned position and so achieve tighter
@@ -6231,7 +6232,7 @@ gnat_to_gnu_field (Entity_Id gnat_field, tree gnu_record_type, int packed,
from a component clause. */
if (TREE_CODE (gnu_field_type) == RECORD_TYPE
- && TYPE_MODE (gnu_field_type) == BLKmode
+ && !TYPE_IS_FAT_POINTER_P (gnu_field_type)
&& host_integerp (TYPE_SIZE (gnu_field_type), 1)
&& (packed == 1
|| (gnu_size
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 4f4f8a1a154..0384d370da2 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -3594,7 +3594,7 @@ gnat_to_gnu (Node_Id gnat_node)
gnu_max_expr = protect_multiple_eval (gnu_max_expr);
/* Derive a good type to convert everything to. */
- gnu_expr_type = get_base_type (TREE_TYPE (gnu_index_type));
+ gnu_expr_type = get_base_type (gnu_index_type);
/* Test whether the minimum slice value is too small. */
gnu_expr_l = build_binary_op (LT_EXPR, integer_type_node,
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 7b52d902241..8c5dc583625 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -1707,7 +1707,7 @@ create_field_decl (tree field_name, tree field_type, tree record_type,
we get the alignment from the type, indicate if this is from an explicit
user request, which prevents stor-layout from lowering it later on. */
{
- int bit_align
+ unsigned int bit_align
= (DECL_BIT_FIELD (field_decl) ? 1
: packed && TYPE_MODE (field_type) != BLKmode ? BITS_PER_UNIT : 0);
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index b636c1e3a1d..d1a36c13346 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -2177,7 +2177,6 @@ struct rtl_opt_pass pass_duplicate_computed_gotos =
static void
partition_hot_cold_basic_blocks (void)
{
- basic_block cur_bb;
edge *crossing_edges;
int n_crossing_edges;
int max_edges = 2 * last_basic_block;
@@ -2187,13 +2186,6 @@ partition_hot_cold_basic_blocks (void)
crossing_edges = XCNEWVEC (edge, max_edges);
- cfg_layout_initialize (0);
-
- FOR_EACH_BB (cur_bb)
- if (cur_bb->index >= NUM_FIXED_BLOCKS
- && cur_bb->next_bb->index >= NUM_FIXED_BLOCKS)
- cur_bb->aux = cur_bb->next_bb;
-
find_rarely_executed_basic_blocks_and_crossing_edges (&crossing_edges,
&n_crossing_edges,
&max_edges);
@@ -2202,8 +2194,6 @@ partition_hot_cold_basic_blocks (void)
fix_edges_for_rarely_executed_code (crossing_edges, n_crossing_edges);
free (crossing_edges);
-
- cfg_layout_finalize ();
}
static bool
@@ -2300,7 +2290,7 @@ struct rtl_opt_pass pass_partition_blocks =
NULL, /* next */
0, /* static_pass_number */
TV_REORDER_BLOCKS, /* tv_id */
- 0, /* properties_required */
+ PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index d2c2e05aae0..6230adbc029 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -806,6 +806,59 @@ bitmap_first_set_bit (const_bitmap a)
#endif
return bit_no;
}
+
+/* Return the bit number of the first set bit in the bitmap. The
+ bitmap must be non-empty. */
+
+unsigned
+bitmap_last_set_bit (const_bitmap a)
+{
+ const bitmap_element *elt = a->current ? a->current : a->first;
+ unsigned bit_no;
+ BITMAP_WORD word;
+ int ix;
+
+ gcc_assert (elt);
+ while (elt->next)
+ elt = elt->next;
+ bit_no = elt->indx * BITMAP_ELEMENT_ALL_BITS;
+ for (ix = BITMAP_ELEMENT_WORDS - 1; ix >= 0; ix--)
+ {
+ word = elt->bits[ix];
+ if (word)
+ goto found_bit;
+ }
+ gcc_unreachable ();
+ found_bit:
+ bit_no += ix * BITMAP_WORD_BITS;
+
+ /* Binary search for the last set bit. */
+#if GCC_VERSION >= 3004
+ gcc_assert (sizeof(long) == sizeof (word));
+ bit_no += sizeof (long) * 8 - __builtin_ctzl (word);
+#else
+#if BITMAP_WORD_BITS > 64
+#error "Fill out the table."
+#endif
+#if BITMAP_WORD_BITS > 32
+ if ((word & 0xffffffff00000000))
+ word >>= 32, bit_no += 32;
+#endif
+ if (word & 0xffff0000)
+ word >>= 16, bit_no += 16;
+ if (!(word & 0xff00))
+ word >>= 8, bit_no += 8;
+ if (!(word & 0xf0))
+ word >>= 4, bit_no += 4;
+ if (!(word & 12))
+ word >>= 2, bit_no += 2;
+ if (!(word & 2))
+ word >>= 1, bit_no += 1;
+#endif
+
+ gcc_assert (word & 1);
+ return bit_no;
+}
/* DST = A & B. */
diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index a5b0528c3b6..99cf752f686 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -183,6 +183,7 @@ extern void bitmap_obstack_free (bitmap);
#define dump_bitmap(file, bitmap) bitmap_print (file, bitmap, "", "\n")
#define bitmap_zero(a) bitmap_clear (a)
extern unsigned bitmap_first_set_bit (const_bitmap);
+extern unsigned bitmap_last_set_bit (const_bitmap);
/* Compute bitmap hash (for purposes of hashing etc.) */
extern hashval_t bitmap_hash(const_bitmap);
diff --git a/gcc/builtins.c b/gcc/builtins.c
index f8401dc4184..e22c5f58964 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -469,16 +469,13 @@ c_strlen (tree src, int only_value)
else
offset = tree_low_cst (offset_node, 0);
- /* If the offset is known to be out of bounds, warn, and call strlen at
- runtime. */
+ /* If the offset is known to be out of bounds, the front-end should
+ have warned already. We call strlen at runtime.
+
+ ??? Perhaps we should turn this into an assert and force
+ front-ends to define offsets whtin boundaries. */
if (offset < 0 || offset > max)
{
- /* Suppress multiple warnings for propagated constant strings. */
- if (! TREE_NO_WARNING (src))
- {
- warning (0, "offset outside bounds of constant string");
- TREE_NO_WARNING (src) = 1;
- }
return NULL_TREE;
}
@@ -8334,21 +8331,6 @@ fold_builtin_bswap (tree fndecl, tree arg)
return NULL_TREE;
}
-/* Return true if EXPR is the real constant contained in VALUE. */
-
-static bool
-real_dconstp (tree expr, const REAL_VALUE_TYPE *value)
-{
- STRIP_NOPS (expr);
-
- return ((TREE_CODE (expr) == REAL_CST
- && !TREE_OVERFLOW (expr)
- && REAL_VALUES_EQUAL (TREE_REAL_CST (expr), *value))
- || (TREE_CODE (expr) == COMPLEX_CST
- && real_dconstp (TREE_REALPART (expr), value)
- && real_zerop (TREE_IMAGPART (expr))));
-}
-
/* A subroutine of fold_builtin to fold the various logarithmic
functions. Return NULL_TREE if no simplification can me made.
FUNC is the corresponding MPFR logarithm function. */
@@ -8363,17 +8345,6 @@ fold_builtin_logarithm (tree fndecl, tree arg,
tree res;
const enum built_in_function fcode = builtin_mathfn_code (arg);
- /* Optimize log(e) = 1.0. We're never passed an exact 'e',
- instead we'll look for 'e' truncated to MODE. So only do
- this if flag_unsafe_math_optimizations is set. */
- if (flag_unsafe_math_optimizations && func == mpfr_log)
- {
- const REAL_VALUE_TYPE e_truncated =
- real_value_truncate (TYPE_MODE (type), dconst_e ());
- if (real_dconstp (arg, &e_truncated))
- return build_real (type, dconst1);
- }
-
/* Calculate the result when the argument is a constant. */
if ((res = do_mpfr_arg1 (arg, type, func, &dconst0, NULL, false)))
return res;
@@ -8882,17 +8853,76 @@ fold_builtin_memory_op (tree dest, tree src, tree len, tree type, bool ignore, i
really mandatory?
If either SRC is readonly or length is 1, we can use memcpy. */
- if (dest_align && src_align
- && (readonly_data_expr (src)
- || (host_integerp (len, 1)
- && (MIN (src_align, dest_align) / BITS_PER_UNIT >=
- tree_low_cst (len, 1)))))
+ if (!dest_align || !src_align)
+ return NULL_TREE;
+ if (readonly_data_expr (src)
+ || (host_integerp (len, 1)
+ && (MIN (src_align, dest_align) / BITS_PER_UNIT
+ >= tree_low_cst (len, 1))))
{
tree fn = implicit_built_in_decls[BUILT_IN_MEMCPY];
if (!fn)
return NULL_TREE;
return build_call_expr (fn, 3, dest, src, len);
}
+
+ /* If *src and *dest can't overlap, optimize into memcpy as well. */
+ srcvar = build_fold_indirect_ref (src);
+ destvar = build_fold_indirect_ref (dest);
+ if (srcvar
+ && !TREE_THIS_VOLATILE (srcvar)
+ && destvar
+ && !TREE_THIS_VOLATILE (destvar))
+ {
+ tree src_base, dest_base, fn;
+ HOST_WIDE_INT src_offset = 0, dest_offset = 0;
+ HOST_WIDE_INT size = -1;
+ HOST_WIDE_INT maxsize = -1;
+
+ src_base = srcvar;
+ if (handled_component_p (src_base))
+ src_base = get_ref_base_and_extent (src_base, &src_offset,
+ &size, &maxsize);
+ dest_base = destvar;
+ if (handled_component_p (dest_base))
+ dest_base = get_ref_base_and_extent (dest_base, &dest_offset,
+ &size, &maxsize);
+ if (host_integerp (len, 1))
+ {
+ maxsize = tree_low_cst (len, 1);
+ if (maxsize
+ > INTTYPE_MAXIMUM (HOST_WIDE_INT) / BITS_PER_UNIT)
+ maxsize = -1;
+ else
+ maxsize *= BITS_PER_UNIT;
+ }
+ else
+ maxsize = -1;
+ if (SSA_VAR_P (src_base)
+ && SSA_VAR_P (dest_base))
+ {
+ if (operand_equal_p (src_base, dest_base, 0)
+ && ranges_overlap_p (src_offset, maxsize,
+ dest_offset, maxsize))
+ return NULL_TREE;
+ }
+ else if (TREE_CODE (src_base) == INDIRECT_REF
+ && TREE_CODE (dest_base) == INDIRECT_REF)
+ {
+ if (! operand_equal_p (TREE_OPERAND (src_base, 0),
+ TREE_OPERAND (dest_base, 0), 0)
+ || ranges_overlap_p (src_offset, maxsize,
+ dest_offset, maxsize))
+ return NULL_TREE;
+ }
+ else
+ return NULL_TREE;
+
+ fn = implicit_built_in_decls[BUILT_IN_MEMCPY];
+ if (!fn)
+ return NULL_TREE;
+ return build_call_expr (fn, 3, dest, src, len);
+ }
return NULL_TREE;
}
@@ -11964,8 +11994,9 @@ expand_builtin_memory_chk (tree exp, rtx target, enum machine_mode mode,
if (! integer_all_onesp (size) && tree_int_cst_lt (size, len))
{
- warning (0, "%Kcall to %D will always overflow destination buffer",
- exp, get_callee_fndecl (exp));
+ warning_at (tree_nonartificial_location (exp),
+ 0, "%Kcall to %D will always overflow destination buffer",
+ exp, get_callee_fndecl (exp));
return NULL_RTX;
}
@@ -12072,6 +12103,7 @@ maybe_emit_chk_warning (tree exp, enum built_in_function fcode)
{
int is_strlen = 0;
tree len, size;
+ location_t loc = tree_nonartificial_location (exp);
switch (fcode)
{
@@ -12118,8 +12150,8 @@ maybe_emit_chk_warning (tree exp, enum built_in_function fcode)
src = c_strlen (src, 1);
if (! src || ! host_integerp (src, 1))
{
- warning (0, "%Kcall to %D might overflow destination buffer",
- exp, get_callee_fndecl (exp));
+ warning_at (loc, 0, "%Kcall to %D might overflow destination buffer",
+ exp, get_callee_fndecl (exp));
return;
}
else if (tree_int_cst_lt (src, size))
@@ -12128,8 +12160,8 @@ maybe_emit_chk_warning (tree exp, enum built_in_function fcode)
else if (! host_integerp (len, 1) || ! tree_int_cst_lt (size, len))
return;
- warning (0, "%Kcall to %D will always overflow destination buffer",
- exp, get_callee_fndecl (exp));
+ warning_at (loc, 0, "%Kcall to %D will always overflow destination buffer",
+ exp, get_callee_fndecl (exp));
}
/* Emit warning if a buffer overflow is detected at compile time
@@ -12186,10 +12218,9 @@ maybe_emit_sprintf_chk_warning (tree exp, enum built_in_function fcode)
return;
if (! tree_int_cst_lt (len, size))
- {
- warning (0, "%Kcall to %D will always overflow destination buffer",
- exp, get_callee_fndecl (exp));
- }
+ warning_at (tree_nonartificial_location (exp),
+ 0, "%Kcall to %D will always overflow destination buffer",
+ exp, get_callee_fndecl (exp));
}
/* Emit warning if a free is called with address of a variable. */
@@ -12208,9 +12239,11 @@ maybe_emit_free_warning (tree exp)
return;
if (SSA_VAR_P (arg))
- warning (0, "%Kattempt to free a non-heap object %qD", exp, arg);
+ warning_at (tree_nonartificial_location (exp),
+ 0, "%Kattempt to free a non-heap object %qD", exp, arg);
else
- warning (0, "%Kattempt to free a non-heap object", exp);
+ warning_at (tree_nonartificial_location (exp),
+ 0, "%Kattempt to free a non-heap object", exp);
}
/* Fold a call to __builtin_object_size with arguments PTR and OST,
diff --git a/gcc/c-common.c b/gcc/c-common.c
index e4a87020366..efe2feebeb5 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -33,7 +33,6 @@ along with GCC; see the file COPYING3. If not see
#include "varray.h"
#include "expr.h"
#include "c-common.h"
-#include "diagnostic.h"
#include "tm_p.h"
#include "obstack.h"
#include "cpplib.h"
@@ -42,6 +41,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-inline.h"
#include "c-tree.h"
#include "toplev.h"
+#include "diagnostic.h"
#include "tree-iterator.h"
#include "hashtab.h"
#include "tree-mudflap.h"
@@ -51,6 +51,7 @@ along with GCC; see the file COPYING3. If not see
#include "target-def.h"
#include "gimple.h"
#include "fixed-value.h"
+#include "libfuncs.h"
cpp_reader *parse_in; /* Declared in c-pragma.h. */
@@ -614,6 +615,10 @@ tree (*make_fname_decl) (tree, int);
This is a count, since unevaluated expressions can nest. */
int skip_evaluation;
+/* Whether lexing has been completed, so subsequent preprocessor
+ errors should use the compiler's input_location. */
+bool done_lexing = false;
+
/* Information about how a function name is generated. */
struct fname_var_t
{
@@ -3745,7 +3750,8 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr,
of pointer PTROP and integer INTOP. */
tree
-pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop)
+pointer_int_sum (location_t location, enum tree_code resultcode,
+ tree ptrop, tree intop)
{
tree size_exp, ret;
@@ -3754,19 +3760,19 @@ pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop)
if (TREE_CODE (TREE_TYPE (result_type)) == VOID_TYPE)
{
- pedwarn (input_location, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
+ pedwarn (location, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
"pointer of type %<void *%> used in arithmetic");
size_exp = integer_one_node;
}
else if (TREE_CODE (TREE_TYPE (result_type)) == FUNCTION_TYPE)
{
- pedwarn (input_location, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
+ pedwarn (location, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
"pointer to a function used in arithmetic");
size_exp = integer_one_node;
}
else if (TREE_CODE (TREE_TYPE (result_type)) == METHOD_TYPE)
{
- pedwarn (input_location, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
+ pedwarn (location, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
"pointer to member function used in arithmetic");
size_exp = integer_one_node;
}
@@ -3829,6 +3835,31 @@ pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop)
if (resultcode == MINUS_EXPR)
intop = fold_build1 (NEGATE_EXPR, sizetype, intop);
+ if (TREE_CODE (intop) == INTEGER_CST)
+ {
+ tree offset_node;
+ tree string_cst = string_constant (ptrop, &offset_node);
+
+ if (string_cst != 0
+ && !(offset_node && TREE_CODE (offset_node) != INTEGER_CST))
+ {
+ HOST_WIDE_INT max = TREE_STRING_LENGTH (string_cst);
+ HOST_WIDE_INT offset;
+ if (offset_node == 0)
+ offset = 0;
+ else if (! host_integerp (offset_node, 0))
+ offset = -1;
+ else
+ offset = tree_low_cst (offset_node, 0);
+
+ offset = offset + tree_low_cst (intop, 0);
+ if (offset < 0 || offset > max)
+ warning_at (location, 0,
+ "offset %<%wd%> outside bounds of constant string",
+ tree_low_cst (intop, 0));
+ }
+ }
+
ret = fold_build2 (POINTER_PLUS_EXPR, result_type, ptrop, intop);
fold_undefer_and_ignore_overflow_warnings ();
@@ -5047,10 +5078,28 @@ set_builtin_user_assembler_name (tree decl, const char *asmspec)
builtin = built_in_decls [DECL_FUNCTION_CODE (decl)];
set_user_assembler_name (builtin, asmspec);
- if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMCPY)
- init_block_move_fn (asmspec);
- else if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMSET)
- init_block_clear_fn (asmspec);
+ switch (DECL_FUNCTION_CODE (decl))
+ {
+ case BUILT_IN_MEMCPY:
+ init_block_move_fn (asmspec);
+ memcpy_libfunc = set_user_assembler_libfunc ("memcpy", asmspec);
+ break;
+ case BUILT_IN_MEMSET:
+ init_block_clear_fn (asmspec);
+ memset_libfunc = set_user_assembler_libfunc ("memset", asmspec);
+ break;
+ case BUILT_IN_MEMMOVE:
+ memmove_libfunc = set_user_assembler_libfunc ("memmove", asmspec);
+ break;
+ case BUILT_IN_MEMCMP:
+ memcmp_libfunc = set_user_assembler_libfunc ("memcmp", asmspec);
+ break;
+ case BUILT_IN_ABORT:
+ abort_libfunc = set_user_assembler_libfunc ("abort", asmspec);
+ break;
+ default:
+ break;
+ }
}
/* The number of named compound-literals generated thus far. */
@@ -5628,43 +5677,6 @@ finish_label_address_expr (tree label, location_t loc)
return result;
}
-
-/* Hook used by expand_expr to expand language-specific tree codes. */
-/* The only things that should go here are bits needed to expand
- constant initializers. Everything else should be handled by the
- gimplification routines. */
-
-rtx
-c_expand_expr (tree exp, rtx target, enum machine_mode tmode,
- int modifiera /* Actually enum expand_modifier. */,
- rtx *alt_rtl)
-{
- enum expand_modifier modifier = (enum expand_modifier) modifiera;
- switch (TREE_CODE (exp))
- {
- case COMPOUND_LITERAL_EXPR:
- {
- /* Initialize the anonymous variable declared in the compound
- literal, then return the variable. */
- tree decl = COMPOUND_LITERAL_EXPR_DECL (exp);
- emit_local_var (decl);
- return expand_expr_real (decl, target, tmode, modifier, alt_rtl);
- }
-
- default:
- gcc_unreachable ();
- }
-}
-
-/* Hook used by staticp to handle language-specific tree codes. */
-
-tree
-c_staticp (tree exp)
-{
- return (TREE_CODE (exp) == COMPOUND_LITERAL_EXPR
- && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp))
- ? exp : NULL);
-}
/* Given a boolean expression ARG, return a tree representing an increment
@@ -6631,7 +6643,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
error ("requested alignment is not a power of 2");
*no_add_attrs = true;
}
- else if (i > HOST_BITS_PER_INT - 2)
+ else if (i >= HOST_BITS_PER_INT - BITS_PER_UNIT_LOG)
{
error ("requested alignment is too large");
*no_add_attrs = true;
@@ -6653,7 +6665,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
else if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE))
*type = build_variant_type_copy (*type);
- TYPE_ALIGN (*type) = (1 << i) * BITS_PER_UNIT;
+ TYPE_ALIGN (*type) = (1U << i) * BITS_PER_UNIT;
TYPE_USER_ALIGN (*type) = 1;
}
else if (! VAR_OR_FUNCTION_DECL_P (decl)
@@ -6663,7 +6675,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
*no_add_attrs = true;
}
else if (TREE_CODE (decl) == FUNCTION_DECL
- && DECL_ALIGN (decl) > (1 << i) * BITS_PER_UNIT)
+ && DECL_ALIGN (decl) > (1U << i) * BITS_PER_UNIT)
{
if (DECL_USER_ALIGN (decl))
error ("alignment for %q+D was previously specified as %d "
@@ -6676,7 +6688,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
}
else
{
- DECL_ALIGN (decl) = (1 << i) * BITS_PER_UNIT;
+ DECL_ALIGN (decl) = (1U << i) * BITS_PER_UNIT;
DECL_USER_ALIGN (decl) = 1;
}
@@ -8203,6 +8215,65 @@ c_parse_error (const char *gmsgid, enum cpp_ttype token, tree value)
#undef catenate_messages
}
+/* Callback from cpp_error for PFILE to print diagnostics from the
+ preprocessor. The diagnostic is of type LEVEL, at location
+ LOCATION unless this is after lexing and the compiler's location
+ should be used instead, with column number possibly overridden by
+ COLUMN_OVERRIDE if not zero; MSG is the translated message and AP
+ the arguments. Returns true if a diagnostic was emitted, false
+ otherwise. */
+
+bool
+c_cpp_error (cpp_reader *pfile ATTRIBUTE_UNUSED, int level,
+ location_t location, unsigned int column_override,
+ const char *msg, va_list *ap)
+{
+ diagnostic_info diagnostic;
+ diagnostic_t dlevel;
+ int save_warn_system_headers = warn_system_headers;
+ bool ret;
+
+ switch (level)
+ {
+ case CPP_DL_WARNING_SYSHDR:
+ if (flag_no_output)
+ return false;
+ warn_system_headers = 1;
+ /* Fall through. */
+ case CPP_DL_WARNING:
+ if (flag_no_output)
+ return false;
+ dlevel = DK_WARNING;
+ break;
+ case CPP_DL_PEDWARN:
+ if (flag_no_output && !flag_pedantic_errors)
+ return false;
+ dlevel = DK_PEDWARN;
+ break;
+ case CPP_DL_ERROR:
+ dlevel = DK_ERROR;
+ break;
+ case CPP_DL_ICE:
+ dlevel = DK_ICE;
+ break;
+ case CPP_DL_NOTE:
+ dlevel = DK_NOTE;
+ break;
+ default:
+ gcc_unreachable ();
+ }
+ if (done_lexing)
+ location = input_location;
+ diagnostic_set_info_translated (&diagnostic, msg, ap,
+ location, dlevel);
+ if (column_override)
+ diagnostic_override_column (&diagnostic, column_override);
+ ret = report_diagnostic (&diagnostic);
+ if (level == CPP_DL_WARNING_SYSHDR)
+ warn_system_headers = save_warn_system_headers;
+ return ret;
+}
+
/* Walk a gimplified function and warn for functions whose return value is
ignored and attribute((warn_unused_result)) is set. This is done before
inlining, so we don't have to worry about that. */
diff --git a/gcc/c-common.def b/gcc/c-common.def
index 642f299d129..1c593633e12 100644
--- a/gcc/c-common.def
+++ b/gcc/c-common.def
@@ -2,7 +2,7 @@
additional tree codes used in the GNU C compiler (see tree.def
for the standard codes).
Copyright (C) 1987, 1988, 1990, 1993, 1997, 1998,
- 1999, 2000, 2001, 2004, 2005, 2007 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
Written by Benjamin Chelf <chelf@codesourcery.com>
This file is part of GCC.
@@ -24,13 +24,6 @@ along with GCC; see the file COPYING3. If not see
/* Tree nodes used in the C frontend. These are also shared with the
C++ and Objective C frontends. */
-/* A COMPOUND_LITERAL_EXPR represents a C99 compound literal. The
- COMPOUND_LITERAL_EXPR_DECL_STMT is the a DECL_STMT containing the decl
- for the anonymous object represented by the COMPOUND_LITERAL;
- the DECL_INITIAL of that decl is the CONSTRUCTOR that initializes
- the compound literal. */
-DEFTREECODE (COMPOUND_LITERAL_EXPR, "compound_literal_expr", tcc_expression, 1)
-
/* A C_MAYBE_CONST_EXPR, currently only used for C and Objective C,
tracks information about constancy of an expression and VLA type
sizes or VM expressions from typeof that need to be evaluated
diff --git a/gcc/c-common.h b/gcc/c-common.h
index 1892dda1095..26423a8cc9e 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -1,6 +1,6 @@
/* Definitions for c-common.c.
Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -716,6 +716,11 @@ extern int max_tinst_depth;
extern int skip_evaluation;
+/* Whether lexing has been completed, so subsequent preprocessor
+ errors should use the compiler's input_location. */
+
+extern bool done_lexing;
+
/* C types are partitioned into three subsets: object, function, and
incomplete types. */
#define C_TYPE_OBJECT_P(type) \
@@ -807,7 +812,7 @@ extern tree shorten_binary_op (tree result_type, tree op0, tree op1, bool bitwis
and, if so, perhaps change them both back to their original type. */
extern tree shorten_compare (tree *, tree *, tree *, enum tree_code *);
-extern tree pointer_int_sum (enum tree_code, tree, tree);
+extern tree pointer_int_sum (location_t, enum tree_code, tree, tree);
/* Add qualifiers to a type, in the fashion for C. */
extern tree c_build_qualified_type (tree, int);
@@ -854,11 +859,20 @@ extern void finish_file (void);
#define STATEMENT_LIST_HAS_LABEL(NODE) \
TREE_LANG_FLAG_3 (STATEMENT_LIST_CHECK (NODE))
-/* COMPOUND_LITERAL_EXPR accessors. */
-#define COMPOUND_LITERAL_EXPR_DECL_STMT(NODE) \
- TREE_OPERAND (COMPOUND_LITERAL_EXPR_CHECK (NODE), 0)
-#define COMPOUND_LITERAL_EXPR_DECL(NODE) \
- DECL_EXPR_DECL (COMPOUND_LITERAL_EXPR_DECL_STMT (NODE))
+/* C_MAYBE_CONST_EXPR accessors. */
+#define C_MAYBE_CONST_EXPR_PRE(NODE) \
+ TREE_OPERAND (C_MAYBE_CONST_EXPR_CHECK (NODE), 0)
+#define C_MAYBE_CONST_EXPR_EXPR(NODE) \
+ TREE_OPERAND (C_MAYBE_CONST_EXPR_CHECK (NODE), 1)
+#define C_MAYBE_CONST_EXPR_INT_OPERANDS(NODE) \
+ TREE_LANG_FLAG_0 (C_MAYBE_CONST_EXPR_CHECK (NODE))
+#define C_MAYBE_CONST_EXPR_NON_CONST(NODE) \
+ TREE_LANG_FLAG_1 (C_MAYBE_CONST_EXPR_CHECK (NODE))
+#define EXPR_INT_CONST_OPERANDS(EXPR) \
+ (INTEGRAL_TYPE_P (TREE_TYPE (EXPR)) \
+ && (TREE_CODE (EXPR) == INTEGER_CST \
+ || (TREE_CODE (EXPR) == C_MAYBE_CONST_EXPR \
+ && C_MAYBE_CONST_EXPR_INT_OPERANDS (EXPR))))
/* C_MAYBE_CONST_EXPR accessors. */
#define C_MAYBE_CONST_EXPR_PRE(NODE) \
@@ -883,7 +897,6 @@ extern void finish_file (void);
#define CLEAR_DECL_C_BIT_FIELD(NODE) \
(DECL_LANG_FLAG_4 (FIELD_DECL_CHECK (NODE)) = 0)
-extern void emit_local_var (tree);
extern tree do_case (tree, tree);
extern tree build_stmt (enum tree_code, ...);
extern tree build_case_label (tree, tree, tree);
@@ -932,8 +945,6 @@ extern bool vector_types_convertible_p (const_tree t1, const_tree t2, bool emit_
extern rtx c_expand_expr (tree, rtx, enum machine_mode, int, rtx *);
-extern tree c_staticp (tree);
-
extern void init_c_lex (void);
extern void c_cpp_builtins (cpp_reader *);
diff --git a/gcc/c-convert.c b/gcc/c-convert.c
index 779a22f5f58..f6bf5deb893 100644
--- a/gcc/c-convert.c
+++ b/gcc/c-convert.c
@@ -1,6 +1,6 @@
/* Language-level data type conversion for GNU C.
- Copyright (C) 1987, 1988, 1991, 1998, 2002, 2003, 2004, 2005, 2007, 2008
- Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1991, 1998, 2002, 2003, 2004, 2005, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
This file is part of GCC.
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 588b75c5527..97d95b858d1 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -8148,7 +8148,7 @@ c_write_global_declarations (void)
/* Don't waste time on further processing if -fsyntax-only or we've
encountered errors. */
- if (flag_syntax_only || errorcount || sorrycount || cpp_errors (parse_in))
+ if (flag_syntax_only || errorcount || sorrycount)
return;
/* Close the external scope. */
diff --git a/gcc/c-gimplify.c b/gcc/c-gimplify.c
index 5b309343361..9cb4a0b2d17 100644
--- a/gcc/c-gimplify.c
+++ b/gcc/c-gimplify.c
@@ -176,145 +176,25 @@ c_build_bind_expr (tree block, tree body)
/* Gimplification of expression trees. */
-/* Gimplify a C99 compound literal expression. This just means adding
- the DECL_EXPR before the current statement and using its anonymous
- decl instead. */
-
-static enum gimplify_status
-gimplify_compound_literal_expr (tree *expr_p, gimple_seq *pre_p)
-{
- tree decl_s = COMPOUND_LITERAL_EXPR_DECL_STMT (*expr_p);
- tree decl = DECL_EXPR_DECL (decl_s);
- /* Mark the decl as addressable if the compound literal
- expression is addressable now, otherwise it is marked too late
- after we gimplify the initialization expression. */
- if (TREE_ADDRESSABLE (*expr_p))
- TREE_ADDRESSABLE (decl) = 1;
-
- /* Preliminarily mark non-addressed complex variables as eligible
- for promotion to gimple registers. We'll transform their uses
- as we find them. */
- if ((TREE_CODE (TREE_TYPE (decl)) == COMPLEX_TYPE
- || TREE_CODE (TREE_TYPE (decl)) == VECTOR_TYPE)
- && !TREE_THIS_VOLATILE (decl)
- && !needs_to_live_in_memory (decl))
- DECL_GIMPLE_REG_P (decl) = 1;
-
- /* This decl isn't mentioned in the enclosing block, so add it to the
- list of temps. FIXME it seems a bit of a kludge to say that
- anonymous artificial vars aren't pushed, but everything else is. */
- if (DECL_NAME (decl) == NULL_TREE && !DECL_SEEN_IN_BIND_EXPR_P (decl))
- gimple_add_tmp_var (decl);
-
- gimplify_and_add (decl_s, pre_p);
- *expr_p = decl;
- return GS_OK;
-}
-
-/* Optimize embedded COMPOUND_LITERAL_EXPRs within a CONSTRUCTOR,
- return a new CONSTRUCTOR if something changed. */
-
-static tree
-optimize_compound_literals_in_ctor (tree orig_ctor)
-{
- tree ctor = orig_ctor;
- VEC(constructor_elt,gc) *elts = CONSTRUCTOR_ELTS (ctor);
- unsigned int idx, num = VEC_length (constructor_elt, elts);
-
- for (idx = 0; idx < num; idx++)
- {
- tree value = VEC_index (constructor_elt, elts, idx)->value;
- tree newval = value;
- if (TREE_CODE (value) == CONSTRUCTOR)
- newval = optimize_compound_literals_in_ctor (value);
- else if (TREE_CODE (value) == COMPOUND_LITERAL_EXPR)
- {
- tree decl_s = COMPOUND_LITERAL_EXPR_DECL_STMT (value);
- tree decl = DECL_EXPR_DECL (decl_s);
- tree init = DECL_INITIAL (decl);
-
- if (!TREE_ADDRESSABLE (value)
- && !TREE_ADDRESSABLE (decl)
- && init)
- newval = init;
- }
- if (newval == value)
- continue;
-
- if (ctor == orig_ctor)
- {
- ctor = copy_node (orig_ctor);
- CONSTRUCTOR_ELTS (ctor) = VEC_copy (constructor_elt, gc, elts);
- elts = CONSTRUCTOR_ELTS (ctor);
- }
- VEC_index (constructor_elt, elts, idx)->value = newval;
- }
- return ctor;
-}
-
/* Do C-specific gimplification on *EXPR_P. PRE_P and POST_P are as in
gimplify_expr. */
int
-c_gimplify_expr (tree *expr_p, gimple_seq *pre_p,
+c_gimplify_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED,
gimple_seq *post_p ATTRIBUTE_UNUSED)
{
enum tree_code code = TREE_CODE (*expr_p);
- switch (code)
- {
- case DECL_EXPR:
- /* This is handled mostly by gimplify.c, but we have to deal with
- not warning about int x = x; as it is a GCC extension to turn off
- this warning but only if warn_init_self is zero. */
- if (TREE_CODE (DECL_EXPR_DECL (*expr_p)) == VAR_DECL
- && !DECL_EXTERNAL (DECL_EXPR_DECL (*expr_p))
- && !TREE_STATIC (DECL_EXPR_DECL (*expr_p))
- && (DECL_INITIAL (DECL_EXPR_DECL (*expr_p))
- == DECL_EXPR_DECL (*expr_p))
- && !warn_init_self)
- TREE_NO_WARNING (DECL_EXPR_DECL (*expr_p)) = 1;
- return GS_UNHANDLED;
-
- case COMPOUND_LITERAL_EXPR:
- return gimplify_compound_literal_expr (expr_p, pre_p);
-
- case INIT_EXPR:
- case MODIFY_EXPR:
- if (TREE_CODE (TREE_OPERAND (*expr_p, 1)) == COMPOUND_LITERAL_EXPR)
- {
- tree complit = TREE_OPERAND (*expr_p, 1);
- tree decl_s = COMPOUND_LITERAL_EXPR_DECL_STMT (complit);
- tree decl = DECL_EXPR_DECL (decl_s);
- tree init = DECL_INITIAL (decl);
-
- /* struct T x = (struct T) { 0, 1, 2 } can be optimized
- into struct T x = { 0, 1, 2 } if the address of the
- compound literal has never been taken. */
- if (!TREE_ADDRESSABLE (complit)
- && !TREE_ADDRESSABLE (decl)
- && init)
- {
- *expr_p = copy_node (*expr_p);
- TREE_OPERAND (*expr_p, 1) = init;
- return GS_OK;
- }
- }
- else if (TREE_CODE (TREE_OPERAND (*expr_p, 1)) == CONSTRUCTOR)
- {
- tree ctor
- = optimize_compound_literals_in_ctor (TREE_OPERAND (*expr_p, 1));
-
- if (ctor != TREE_OPERAND (*expr_p, 1))
- {
- *expr_p = copy_node (*expr_p);
- TREE_OPERAND (*expr_p, 1) = ctor;
- return GS_OK;
- }
- }
- return GS_UNHANDLED;
-
- default:
- return GS_UNHANDLED;
- }
+ /* This is handled mostly by gimplify.c, but we have to deal with
+ not warning about int x = x; as it is a GCC extension to turn off
+ this warning but only if warn_init_self is zero. */
+ if (code == DECL_EXPR
+ && TREE_CODE (DECL_EXPR_DECL (*expr_p)) == VAR_DECL
+ && !DECL_EXTERNAL (DECL_EXPR_DECL (*expr_p))
+ && !TREE_STATIC (DECL_EXPR_DECL (*expr_p))
+ && (DECL_INITIAL (DECL_EXPR_DECL (*expr_p)) == DECL_EXPR_DECL (*expr_p))
+ && !warn_init_self)
+ TREE_NO_WARNING (DECL_EXPR_DECL (*expr_p)) = 1;
+
+ return GS_UNHANDLED;
}
diff --git a/gcc/c-objc-common.h b/gcc/c-objc-common.h
index 2a981502b84..6ef98febfb5 100644
--- a/gcc/c-objc-common.h
+++ b/gcc/c-objc-common.h
@@ -43,16 +43,12 @@ extern void c_initialize_diagnostics (diagnostic_context *);
#define LANG_HOOKS_POST_OPTIONS c_common_post_options
#undef LANG_HOOKS_GET_ALIAS_SET
#define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set
-#undef LANG_HOOKS_EXPAND_EXPR
-#define LANG_HOOKS_EXPAND_EXPR c_expand_expr
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE c_common_parse_file
#undef LANG_HOOKS_FINISH_INCOMPLETE_DECL
#define LANG_HOOKS_FINISH_INCOMPLETE_DECL c_finish_incomplete_decl
-#undef LANG_HOOKS_STATICP
-#define LANG_HOOKS_STATICP c_staticp
#undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
#define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL c_warn_unused_global_decl
#undef LANG_HOOKS_PRINT_IDENTIFIER
diff --git a/gcc/c-omp.c b/gcc/c-omp.c
index 3be3729a32c..33f0a83e1a8 100644
--- a/gcc/c-omp.c
+++ b/gcc/c-omp.c
@@ -1,7 +1,7 @@
/* This file contains routines to construct GNU OpenMP constructs,
called from parsing in the C and C++ front ends.
- Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>,
Diego Novillo <dnovillo@redhat.com>.
@@ -280,7 +280,8 @@ c_finish_omp_for (location_t locus, tree declv, tree initv, tree condv,
if (TREE_CODE (cond) == LT_EXPR
|| TREE_CODE (cond) == LE_EXPR
|| TREE_CODE (cond) == GT_EXPR
- || TREE_CODE (cond) == GE_EXPR)
+ || TREE_CODE (cond) == GE_EXPR
+ || TREE_CODE (cond) == NE_EXPR)
{
tree op0 = TREE_OPERAND (cond, 0);
tree op1 = TREE_OPERAND (cond, 1);
@@ -324,6 +325,22 @@ c_finish_omp_for (location_t locus, tree declv, tree initv, tree condv,
TREE_OPERAND (cond, 0) = decl;
cond_ok = true;
}
+
+ if (TREE_CODE (cond) == NE_EXPR)
+ {
+ if (!INTEGRAL_TYPE_P (TREE_TYPE (decl)))
+ cond_ok = false;
+ else if (operand_equal_p (TREE_OPERAND (cond, 1),
+ TYPE_MIN_VALUE (TREE_TYPE (decl)),
+ 0))
+ TREE_SET_CODE (cond, GT_EXPR);
+ else if (operand_equal_p (TREE_OPERAND (cond, 1),
+ TYPE_MAX_VALUE (TREE_TYPE (decl)),
+ 0))
+ TREE_SET_CODE (cond, LT_EXPR);
+ else
+ cond_ok = false;
+ }
}
if (!cond_ok)
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index b2a1c03e257..39539919470 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see
#include "mkdeps.h"
#include "target.h"
#include "tm_p.h"
+#include "c-tree.h" /* For c_cpp_error. */
#ifndef DOLLARS_IN_IDENTIFIERS
# define DOLLARS_IN_IDENTIFIERS true
@@ -201,6 +202,7 @@ c_common_init_options (unsigned int argc, const char **argv)
{
static const unsigned int lang_flags[] = {CL_C, CL_ObjC, CL_CXX, CL_ObjCXX};
unsigned int i, result;
+ struct cpp_callbacks *cb;
/* This is conditionalized only because that is the way the front
ends used to do it. Maybe this should be unconditional? */
@@ -216,6 +218,8 @@ c_common_init_options (unsigned int argc, const char **argv)
parse_in = cpp_create_reader (c_dialect_cxx () ? CLK_GNUCXX: CLK_GNUC89,
ident_hash, line_table);
+ cb = cpp_get_callbacks (parse_in);
+ cb->error = c_cpp_error;
cpp_opts = cpp_get_options (parse_in);
cpp_opts->dollars_in_ident = DOLLARS_IN_IDENTIFIERS;
@@ -333,7 +337,6 @@ c_common_handle_option (size_t scode, const char *arg, int value)
or environment var dependency generation is used. */
cpp_opts->deps.style = (code == OPT_M ? DEPS_SYSTEM: DEPS_USER);
flag_no_output = 1;
- cpp_opts->inhibit_warnings = 1;
break;
case OPT_MD:
@@ -444,7 +447,6 @@ c_common_handle_option (size_t scode, const char *arg, int value)
break;
case OPT_Werror:
- cpp_opts->warnings_are_errors = value;
global_dc->warning_as_error_requested = value;
break;
@@ -503,10 +505,6 @@ c_common_handle_option (size_t scode, const char *arg, int value)
warn_strict_null_sentinel = value;
break;
- case OPT_Wsystem_headers:
- cpp_opts->warn_system_headers = value;
- break;
-
case OPT_Wtraditional:
cpp_opts->warn_traditional = value;
break;
@@ -895,8 +893,6 @@ c_common_handle_option (size_t scode, const char *arg, int value)
c_common_post_options, so that a subsequent -Wno-endif-labels
is not overridden. */
case OPT_pedantic_errors:
- cpp_opts->pedantic_errors = 1;
- /* Fall through. */
case OPT_pedantic:
cpp_opts->pedantic = 1;
cpp_opts->warn_endif_labels = 1;
@@ -971,10 +967,6 @@ c_common_handle_option (size_t scode, const char *arg, int value)
flag_undef = 1;
break;
- case OPT_w:
- cpp_opts->inhibit_warnings = 1;
- break;
-
case OPT_v:
verbose = true;
break;
@@ -1173,10 +1165,6 @@ c_common_post_options (const char **pfilename)
input_location = UNKNOWN_LOCATION;
- /* If an error has occurred in cpplib, note it so we fail
- immediately. */
- errorcount += cpp_errors (parse_in);
-
*pfilename = this_input_filename
= cpp_read_main_file (parse_in, in_fnames[0]);
/* Don't do any compilation or preprocessing if there is no input file. */
@@ -1288,7 +1276,8 @@ c_common_finish (void)
{
FILE *deps_stream = NULL;
- if (cpp_opts->deps.style != DEPS_NONE)
+ /* Don't write the deps file if there are errors. */
+ if (cpp_opts->deps.style != DEPS_NONE && errorcount == 0)
{
/* If -M or -MM was seen without -MF, default output to the
output stream. */
@@ -1304,7 +1293,7 @@ c_common_finish (void)
/* For performance, avoid tearing down cpplib's internal structures
with cpp_destroy (). */
- errorcount += cpp_finish (parse_in, deps_stream);
+ cpp_finish (parse_in, deps_stream);
if (deps_stream && deps_stream != out_stream
&& (ferror (deps_stream) || fclose (deps_stream)))
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index f9f1f3cb780..03a7194a864 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -5647,8 +5647,6 @@ c_parser_postfix_expression_after_primary (c_parser *parser,
&& DECL_BUILT_IN_CLASS (orig_expr.value) == BUILT_IN_NORMAL
&& DECL_FUNCTION_CODE (orig_expr.value) == BUILT_IN_CONSTANT_P)
expr.original_code = C_MAYBE_CONST_EXPR;
- if (warn_disallowed_functions)
- warn_if_disallowed_function_p (expr.value);
break;
case CPP_DOT:
/* Structure element reference. */
@@ -7724,10 +7722,24 @@ c_parser_omp_for_loop (c_parser *parser, tree clauses, tree *par_clauses)
if (c_parser_next_token_is_not (parser, CPP_SEMICOLON))
{
location_t cond_loc = c_parser_peek_token (parser)->location;
+ struct c_expr cond_expr = c_parser_binary_expression (parser, NULL);
- cond = c_parser_expression_conv (parser).value;
+ cond = cond_expr.value;
cond = c_objc_common_truthvalue_conversion (cond_loc, cond);
cond = c_fully_fold (cond, false, NULL);
+ switch (cond_expr.original_code)
+ {
+ case GT_EXPR:
+ case GE_EXPR:
+ case LT_EXPR:
+ case LE_EXPR:
+ break;
+ default:
+ /* Can't be cond = error_mark_node, because we want to preserve
+ the location until c_finish_omp_for. */
+ cond = build1 (NOP_EXPR, boolean_type_node, error_mark_node);
+ break;
+ }
protected_set_expr_location (cond, cond_loc);
}
c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>");
diff --git a/gcc/c-ppoutput.c b/gcc/c-ppoutput.c
index f5a3a788256..ff3e6b6c843 100644
--- a/gcc/c-ppoutput.c
+++ b/gcc/c-ppoutput.c
@@ -1,6 +1,6 @@
/* Preprocess only, using cpplib.
Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
- 2008 Free Software Foundation, Inc.
+ 2008, 2009 Free Software Foundation, Inc.
Written by Per Bothner, 1994-95.
This program is free software; you can redistribute it and/or modify it
@@ -521,6 +521,7 @@ pp_file_change (const struct line_map *map)
if (map != NULL)
{
+ input_location = map->start_location;
if (print.first_time)
{
/* Avoid printing foo.i when the main file is foo.c. */
diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c
index 7731ac9351f..3c7b241b999 100644
--- a/gcc/c-semantics.c
+++ b/gcc/c-semantics.c
@@ -1,6 +1,4 @@
-/* This file contains the definitions and documentation for the common
- tree codes used in the GNU C and C++ compilers (see c-common.def
- for the standard codes).
+/* This file contains subroutine used by the C front-end to construct GENERIC.
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
Free Software Foundation, Inc.
Written by Benjamin Chelf (chelf@codesourcery.com).
@@ -145,23 +143,6 @@ build_stmt (enum tree_code code, ...)
return ret;
}
-/* Let the back-end know about DECL. */
-
-void
-emit_local_var (tree decl)
-{
- /* 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);
- }
-}
-
/* Create a CASE_LABEL_EXPR tree node and return it. */
tree
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index f9e4b3e5d9d..ac9586b8243 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -672,4 +672,8 @@ extern void c_write_global_declarations (void);
extern void pedwarn_c90 (location_t, int opt, const char *, ...) ATTRIBUTE_GCC_CDIAG(3,4);
extern void pedwarn_c99 (location_t, int opt, const char *, ...) ATTRIBUTE_GCC_CDIAG(3,4);
+extern bool c_cpp_error (cpp_reader *, int, location_t, unsigned int,
+ const char *, va_list *)
+ ATTRIBUTE_GCC_CDIAG(5,0);
+
#endif /* ! GCC_C_TREE_H */
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index d1b51e71b5a..8702373eac1 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -3577,6 +3577,7 @@ build_conditional_expr (tree ifexp, bool ifexp_bcp, tree op1, tree op2)
tree orig_op1 = op1, orig_op2 = op2;
bool int_const, op1_int_operands, op2_int_operands, int_operands;
tree ret;
+ bool objc_ok;
/* Promote both alternatives. */
@@ -3603,6 +3604,8 @@ build_conditional_expr (tree ifexp, bool ifexp_bcp, tree op1, tree op2)
return error_mark_node;
}
+ objc_ok = objc_compare_types (type1, type2, -3, NULL_TREE);
+
if ((TREE_CODE (op1) == EXCESS_PRECISION_EXPR
|| TREE_CODE (op2) == EXCESS_PRECISION_EXPR)
&& (code1 == INTEGER_TYPE || code1 == REAL_TYPE
@@ -3739,8 +3742,9 @@ build_conditional_expr (tree ifexp, bool ifexp_bcp, tree op1, tree op2)
}
else
{
- pedwarn (input_location, 0,
- "pointer type mismatch in conditional expression");
+ if (!objc_ok)
+ pedwarn (input_location, 0,
+ "pointer type mismatch in conditional expression");
result_type = build_pointer_type (void_type_node);
}
}
@@ -8590,12 +8594,12 @@ build_binary_op (location_t location, enum tree_code code,
/* Handle the pointer + int case. */
if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
{
- ret = pointer_int_sum (PLUS_EXPR, op0, op1);
+ ret = pointer_int_sum (location, PLUS_EXPR, op0, op1);
goto return_build_binary_op;
}
else if (code1 == POINTER_TYPE && code0 == INTEGER_TYPE)
{
- ret = pointer_int_sum (PLUS_EXPR, op1, op0);
+ ret = pointer_int_sum (location, PLUS_EXPR, op1, op0);
goto return_build_binary_op;
}
else
@@ -8614,7 +8618,7 @@ build_binary_op (location_t location, enum tree_code code,
/* Handle pointer minus int. Just like pointer plus int. */
else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
{
- ret = pointer_int_sum (MINUS_EXPR, op0, op1);
+ ret = pointer_int_sum (location, MINUS_EXPR, op0, op1);
goto return_build_binary_op;
}
else
diff --git a/gcc/c.opt b/gcc/c.opt
index 5f07aead908..40681bdc377 100644
--- a/gcc/c.opt
+++ b/gcc/c.opt
@@ -185,7 +185,7 @@ Warn when a declaration is found after a statement
Wdeprecated
C C++ ObjC ObjC++ Var(warn_deprecated) Init(1) Warning
-Warn about deprecated compiler features
+Warn if a deprecated compiler feature, class, method, or field is used
Wdiv-by-zero
C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1) Warning
@@ -446,7 +446,7 @@ Deprecated. This switch has no effect
Wsystem-headers
C ObjC C++ ObjC++ Warning
-Do not suppress warnings from system headers
+; Documented in common.opt
Wtraditional
C ObjC Var(warn_traditional) Warning
@@ -691,7 +691,7 @@ Enable Objective-C setjmp exception handling runtime
fopenmp
C ObjC C++ ObjC++ Var(flag_openmp)
-Enable OpenMP
+Enable OpenMP (implies -frecursive in Fortran)
foperator-names
C++ ObjC++
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index c73bba7d9a9..695e4ef0ef9 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -488,8 +488,7 @@ get_decl_align_unit (tree decl)
{
unsigned int align;
- align = DECL_ALIGN (decl);
- align = LOCAL_ALIGNMENT (TREE_TYPE (decl), align);
+ align = LOCAL_DECL_ALIGNMENT (decl);
if (align > MAX_SUPPORTED_STACK_ALIGNMENT)
align = MAX_SUPPORTED_STACK_ALIGNMENT;
@@ -867,7 +866,8 @@ dump_stack_var_partition (void)
static void
expand_one_stack_var_at (tree decl, HOST_WIDE_INT offset)
{
- HOST_WIDE_INT align;
+ /* Alignment is unsigned. */
+ unsigned HOST_WIDE_INT align;
rtx x;
/* If this fails, we've overflowed the stack frame. Error nicely? */
@@ -880,8 +880,10 @@ expand_one_stack_var_at (tree decl, HOST_WIDE_INT offset)
offset -= frame_phase;
align = offset & -offset;
align *= BITS_PER_UNIT;
- if (align > STACK_BOUNDARY || align == 0)
+ if (align == 0)
align = STACK_BOUNDARY;
+ else if (align > MAX_SUPPORTED_STACK_ALIGNMENT)
+ align = MAX_SUPPORTED_STACK_ALIGNMENT;
DECL_ALIGN (decl) = align;
DECL_USER_ALIGN (decl) = 0;
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index 27eb029d076..3af15ec5601 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -365,7 +365,7 @@ struct rtl_opt_pass pass_into_cfg_layout_mode =
0, /* static_pass_number */
0, /* tv_id */
0, /* properties_required */
- 0, /* properties_provided */
+ PROP_cfglayout, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_func, /* todo_flags_finish */
@@ -385,7 +385,7 @@ struct rtl_opt_pass pass_outof_cfg_layout_mode =
0, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
- 0, /* properties_destroyed */
+ PROP_cfglayout, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_func, /* todo_flags_finish */
}
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 8f5ba8dce49..0af5be02d76 100644
--- a/gcc/cfgloop.h
+++ b/gcc/cfgloop.h
@@ -1,6 +1,6 @@
/* Natural loop functions
Copyright (C) 1987, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -105,6 +105,9 @@ struct loop GTY ((chain_next ("%h.next")))
/* Index into loops array. */
int num;
+ /* Number of loop insns. */
+ unsigned ninsns;
+
/* Basic block of loop header. */
struct basic_block_def *header;
@@ -114,9 +117,6 @@ struct loop GTY ((chain_next ("%h.next")))
/* For loop unrolling/peeling decision. */
struct lpt_decision lpt_decision;
- /* Number of loop insns. */
- unsigned ninsns;
-
/* Average number of executed insns per iteration. */
unsigned av_ninsns;
@@ -142,19 +142,20 @@ struct loop GTY ((chain_next ("%h.next")))
information in this field. */
tree nb_iterations;
- /* An integer estimation of the number of iterations. Estimate_state
- describes what is the state of the estimation. */
- enum loop_estimation estimate_state;
-
/* An integer guaranteed to bound the number of iterations of the loop
from above. */
- bool any_upper_bound;
double_int nb_iterations_upper_bound;
/* An integer giving the expected number of iterations of the loop. */
- bool any_estimate;
double_int nb_iterations_estimate;
+ bool any_upper_bound;
+ bool any_estimate;
+
+ /* An integer estimation of the number of iterations. Estimate_state
+ describes what is the state of the estimation. */
+ enum loop_estimation estimate_state;
+
/* Upper bound on number of iterations of a loop. */
struct nb_iter_bound *bounds;
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index b1eea0b080f..d5dba426b1a 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -464,8 +464,6 @@ cgraph_node (tree decl)
if (*slot)
{
node = *slot;
- if (!node->master_clone)
- node->master_clone = node;
return node;
}
@@ -477,7 +475,6 @@ cgraph_node (tree decl)
node->origin = cgraph_node (DECL_CONTEXT (decl));
node->next_nested = node->origin->nested;
node->origin->nested = node;
- node->master_clone = node;
}
if (assembler_name_hash)
{
@@ -655,6 +652,26 @@ cgraph_set_call_stmt (struct cgraph_edge *e, gimple new_stmt)
}
}
+/* Give initial reasons why inlining would fail on EDGE. This gets either
+ nullified or usually overwritten by more precise reasons later. */
+
+static void
+initialize_inline_failed (struct cgraph_edge *e)
+{
+ struct cgraph_node *callee = e->callee;
+
+ if (!callee->analyzed)
+ e->inline_failed = CIF_BODY_NOT_AVAILABLE;
+ else if (callee->local.redefined_extern_inline)
+ e->inline_failed = CIF_REDEFINED_EXTERN_INLINE;
+ else if (!callee->local.inlinable)
+ e->inline_failed = CIF_FUNCTION_NOT_INLINABLE;
+ else if (gimple_call_cannot_inline_p (e->call_stmt))
+ e->inline_failed = CIF_MISMATCHED_ARGUMENTS;
+ else
+ e->inline_failed = CIF_FUNCTION_NOT_CONSIDERED;
+}
+
/* Create edge from CALLER to CALLEE in the cgraph. */
struct cgraph_edge *
@@ -682,16 +699,6 @@ cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee,
edge->uid = cgraph_edge_max_uid++;
}
- if (!callee->analyzed)
- edge->inline_failed = N_("function body not available");
- else if (callee->local.redefined_extern_inline)
- edge->inline_failed = N_("redefined extern inline functions are not "
- "considered for inlining");
- else if (callee->local.inlinable)
- edge->inline_failed = N_("function not considered for inlining");
- else
- edge->inline_failed = N_("function not inlinable");
-
edge->aux = NULL;
edge->caller = caller;
@@ -725,6 +732,9 @@ cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee,
gcc_assert (!*slot);
*slot = edge;
}
+
+ initialize_inline_failed (edge);
+
return edge;
}
@@ -985,11 +995,6 @@ cgraph_remove_node (struct cgraph_node *node)
if (node->next_clone)
{
struct cgraph_node *new_node = node->next_clone;
- struct cgraph_node *n;
-
- /* Make the next clone be the master clone */
- for (n = new_node; n; n = n->next_clone)
- n->master_clone = new_node;
*slot = new_node;
node->next_clone->prev_clone = NULL;
@@ -1113,6 +1118,24 @@ cgraph_rtl_info (tree decl)
return &node->rtl;
}
+/* Return a string describing the failure REASON. */
+
+const char*
+cgraph_inline_failed_string (cgraph_inline_failed_t reason)
+{
+#undef DEFCIFCODE
+#define DEFCIFCODE(code, string) string,
+
+ static const char *cif_string_table[CIF_N_REASONS] = {
+#include "cif-code.def"
+ };
+
+ /* Signedness of an enum type is implementation defined, so cast it
+ to unsigned before testing. */
+ gcc_assert ((unsigned) reason < CIF_N_REASONS);
+ return cif_string_table[reason];
+}
+
/* Return name of the node used in debug output. */
const char *
cgraph_node_name (struct cgraph_node *node)
@@ -1139,8 +1162,6 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
if (cgraph_function_flags_ready)
fprintf (f, " availability:%s",
cgraph_availability_names [cgraph_function_body_availability (node)]);
- if (node->master_clone && node->master_clone->uid != node->uid)
- fprintf (f, "(%i)", node->master_clone->uid);
if (node->count)
fprintf (f, " executed "HOST_WIDEST_INT_PRINT_DEC"x",
(HOST_WIDEST_INT)node->count);
@@ -1161,8 +1182,8 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
fprintf (f, " reachable");
if (gimple_has_body_p (node->decl))
fprintf (f, " body");
- if (node->output)
- fprintf (f, " output");
+ if (node->process)
+ fprintf (f, " process");
if (node->local.local)
fprintf (f, " local");
if (node->local.externally_visible)
@@ -1349,7 +1370,6 @@ cgraph_clone_node (struct cgraph_node *n, gcov_type count, int freq,
new_node->local = n->local;
new_node->global = n->global;
new_node->rtl = n->rtl;
- new_node->master_clone = n->master_clone;
new_node->count = count;
if (n->count)
{
@@ -1381,28 +1401,6 @@ cgraph_clone_node (struct cgraph_node *n, gcov_type count, int freq,
return new_node;
}
-/* Return true if N is an master_clone, (see cgraph_master_clone). */
-
-bool
-cgraph_is_master_clone (struct cgraph_node *n)
-{
- return (n == cgraph_master_clone (n));
-}
-
-struct cgraph_node *
-cgraph_master_clone (struct cgraph_node *n)
-{
- enum availability avail = cgraph_function_body_availability (n);
-
- if (avail == AVAIL_NOT_AVAILABLE || avail == AVAIL_OVERWRITABLE)
- return NULL;
-
- if (!n->master_clone)
- n->master_clone = cgraph_node (n->decl);
-
- return n->master_clone;
-}
-
/* NODE is no longer nested function; update cgraph accordingly. */
void
cgraph_unnest_node (struct cgraph_node *node)
@@ -1429,6 +1427,11 @@ cgraph_function_body_availability (struct cgraph_node *node)
avail = AVAIL_LOCAL;
else if (!node->local.externally_visible)
avail = AVAIL_AVAILABLE;
+ /* Inline functions are safe to be analyzed even if their sybol can
+ be overwritten at runtime. It is not meaningful to enfore any sane
+ behaviour on replacing inline function by different body. */
+ else if (DECL_DECLARED_INLINE_P (node->decl))
+ avail = AVAIL_AVAILABLE;
/* If the function can be overwritten, return OVERWRITABLE. Take
care at least of two notable extensions - the COMDAT functions
@@ -1438,15 +1441,9 @@ cgraph_function_body_availability (struct cgraph_node *node)
??? Does the C++ one definition rule allow us to always return
AVAIL_AVAILABLE here? That would be good reason to preserve this
- hook Similarly deal with extern inline functions - this is again
- necessary to get C++ shared functions having keyed templates
- right and in the C extension documentation we probably should
- document the requirement of both versions of function (extern
- inline and offline) having same side effect characteristics as
- good optimization is what this optimization is about. */
-
- else if (!(*targetm.binds_local_p) (node->decl)
- && !DECL_COMDAT (node->decl) && !DECL_EXTERNAL (node->decl))
+ bit. */
+
+ else if (DECL_REPLACEABLE_P (node->decl) && !DECL_EXTERNAL (node->decl))
avail = AVAIL_OVERWRITABLE;
else avail = AVAIL_AVAILABLE;
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 782580466dd..0e01a659419 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -143,9 +143,6 @@ struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous")))
/* Pointer to the next clone. */
struct cgraph_node *next_clone;
struct cgraph_node *prev_clone;
- /* Pointer to a single unique cgraph node for this function. If the
- function is to be output, this is the copy that will survive. */
- struct cgraph_node *master_clone;
/* For functions with many calls sites it holds map from call expression
to the edge to speed up cgraph_edge function. */
htab_t GTY((param_is (struct cgraph_edge))) call_site_hash;
@@ -163,6 +160,10 @@ struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous")))
/* Ordering of all cgraph nodes. */
int order;
+ /* unique id for profiling. pid is not suitable because of different
+ number of cfg nodes with -fprofile-generate and -fprofile-use */
+ int pid;
+
/* Set when function must be output - it is externally visible
or its address is taken. */
unsigned needed : 1;
@@ -177,8 +178,8 @@ struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous")))
/* Set once the function has been instantiated and its callee
lists created. */
unsigned analyzed : 1;
- /* Set when function is scheduled to be assembled. */
- unsigned output : 1;
+ /* Set when function is scheduled to be processed by local passes. */
+ unsigned process : 1;
/* Set for aliases once they got through assemble_alias. */
unsigned alias : 1;
@@ -186,12 +187,15 @@ struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous")))
into clone before compiling so the function in original form can be
inlined later. This pointer points to the clone. */
tree inline_decl;
-
- /* unique id for profiling. pid is not suitable because of different
- number of cfg nodes with -fprofile-generate and -fprofile-use */
- int pid;
};
+#define DEFCIFCODE(code, string) CIF_ ## code,
+/* Reasons for inlining failures. */
+typedef enum {
+#include "cif-code.def"
+ CIF_N_REASONS
+} cgraph_inline_failed_t;
+
struct cgraph_edge GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller")))
{
struct cgraph_node *caller;
@@ -202,9 +206,9 @@ struct cgraph_edge GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_call
struct cgraph_edge *next_callee;
gimple call_stmt;
PTR GTY ((skip (""))) aux;
- /* When NULL, inline this call. When non-NULL, points to the explanation
- why function was not inlined. */
- const char *inline_failed;
+ /* When equal to CIF_OK, inline this call. Otherwise, points to the
+ explanation why function was not inlined. */
+ cgraph_inline_failed_t inline_failed;
/* Expected number of executions: calculated in profile.c. */
gcov_type count;
/* Expected frequency of executions within the function.
@@ -334,9 +338,8 @@ bool cgraph_function_possibly_inlined_p (tree);
void cgraph_unnest_node (struct cgraph_node *);
enum availability cgraph_function_body_availability (struct cgraph_node *);
-bool cgraph_is_master_clone (struct cgraph_node *);
-struct cgraph_node *cgraph_master_clone (struct cgraph_node *);
void cgraph_add_new_function (tree, bool);
+const char* cgraph_inline_failed_string (cgraph_inline_failed_t);
/* In cgraphunit.c */
void cgraph_finalize_function (tree, bool);
@@ -345,7 +348,7 @@ void cgraph_finalize_compilation_unit (void);
void cgraph_optimize (void);
void cgraph_mark_needed_node (struct cgraph_node *);
void cgraph_mark_reachable_node (struct cgraph_node *);
-bool cgraph_inline_p (struct cgraph_edge *, const char **reason);
+bool cgraph_inline_p (struct cgraph_edge *, cgraph_inline_failed_t *reason);
bool cgraph_preserve_function_body_p (tree);
void verify_cgraph (void);
void verify_cgraph_node (struct cgraph_node *);
@@ -413,7 +416,6 @@ enum availability cgraph_variable_initializer_availability (struct varpool_node
bool varpool_assemble_pending_decls (void);
bool varpool_assemble_decl (struct varpool_node *node);
bool varpool_analyze_pending_decls (void);
-void varpool_output_debug_info (void);
void varpool_remove_unreferenced_decls (void);
void varpool_empty_needed_queue (void);
@@ -455,7 +457,6 @@ varpool_next_static_initializer (struct varpool_node *node)
/* In ipa-inline.c */
void cgraph_clone_inlined_nodes (struct cgraph_edge *, bool, bool);
-bool cgraph_default_inline_p (struct cgraph_node *, const char **);
unsigned int compute_inline_parameters (struct cgraph_node *);
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index 75db87544ce..3868712b3f7 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -78,31 +78,6 @@ record_reference (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
return NULL_TREE;
}
-/* Give initial reasons why inlining would fail on all calls from
- NODE. Those get either nullified or usually overwritten by more precise
- reason later. */
-
-static void
-initialize_inline_failed (struct cgraph_node *node)
-{
- struct cgraph_edge *e;
-
- for (e = node->callers; e; e = e->next_caller)
- {
- gcc_assert (!e->callee->global.inlined_to);
- gcc_assert (e->inline_failed);
- if (node->local.redefined_extern_inline)
- e->inline_failed = N_("redefined extern inline functions are not "
- "considered for inlining");
- else if (!node->local.inlinable)
- e->inline_failed = N_("function not inlinable");
- else if (gimple_call_cannot_inline_p (e->call_stmt))
- e->inline_failed = N_("mismatched arguments");
- else
- e->inline_failed = N_("function not considered for inlining");
- }
-}
-
/* Computes the frequency of the call statement so that it can be stored in
cgraph_edge. BB is the basic block of the call statement. */
int
@@ -194,7 +169,6 @@ build_cgraph_edges (void)
}
pointer_set_destroy (visited_nodes);
- initialize_inline_failed (node);
return 0;
}
@@ -254,8 +228,8 @@ rebuild_cgraph_edges (void)
bb->loop_depth);
}
- initialize_inline_failed (node);
gcc_assert (!node->global.inlined_to);
+
return 0;
}
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 00a1bc26f1a..9f6a50ddcbe 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -426,7 +426,7 @@ cgraph_process_new_functions (void)
case CGRAPH_STATE_EXPANSION:
/* Functions created during expansion shall be compiled
directly. */
- node->output = 0;
+ node->process = 0;
cgraph_expand_function (node);
break;
@@ -452,12 +452,12 @@ cgraph_process_new_functions (void)
static void
cgraph_reset_node (struct cgraph_node *node)
{
- /* If node->output is set, then we have already begun whole-unit analysis.
+ /* If node->process is set, then we have already begun whole-unit analysis.
This is *not* testing for whether we've already emitted the function.
That case can be sort-of legitimately seen with real function redefinition
errors. I would argue that the front end should never present us with
such a case, but don't enforce that for now. */
- gcc_assert (!node->output);
+ gcc_assert (!node->process);
/* Reset our data structures so we can analyze the function again. */
memset (&node->local, 0, sizeof (node->local));
@@ -990,7 +990,7 @@ cgraph_mark_functions_to_output (void)
tree decl = node->decl;
struct cgraph_edge *e;
- gcc_assert (!node->output);
+ gcc_assert (!node->process);
for (e = node->callers; e; e = e->next_caller)
if (e->inline_failed)
@@ -1005,7 +1005,7 @@ cgraph_mark_functions_to_output (void)
|| (e && node->reachable))
&& !TREE_ASM_WRITTEN (decl)
&& !DECL_EXTERNAL (decl))
- node->output = 1;
+ node->process = 1;
else
{
/* We should've reclaimed all functions that are not needed. */
@@ -1038,6 +1038,7 @@ cgraph_expand_function (struct cgraph_node *node)
gcc_assert (!node->global.inlined_to);
announce_function (decl);
+ node->process = 0;
gcc_assert (node->lowered);
@@ -1061,7 +1062,7 @@ cgraph_expand_function (struct cgraph_node *node)
/* Return true when CALLER_DECL should be inlined into CALLEE_DECL. */
bool
-cgraph_inline_p (struct cgraph_edge *e, const char **reason)
+cgraph_inline_p (struct cgraph_edge *e, cgraph_inline_failed_t *reason)
{
*reason = e->inline_failed;
return !e->inline_failed;
@@ -1093,16 +1094,16 @@ cgraph_expand_all_functions (void)
/* Garbage collector may remove inline clones we eliminate during
optimization. So we must be sure to not reference them. */
for (i = 0; i < order_pos; i++)
- if (order[i]->output)
+ if (order[i]->process)
order[new_order_pos++] = order[i];
for (i = new_order_pos - 1; i >= 0; i--)
{
node = order[i];
- if (node->output)
+ if (node->process)
{
gcc_assert (node->reachable);
- node->output = 0;
+ node->process = 0;
cgraph_expand_function (node);
}
}
@@ -1151,7 +1152,7 @@ cgraph_output_in_order (void)
for (pf = cgraph_nodes; pf; pf = pf->next)
{
- if (pf->output)
+ if (pf->process)
{
i = pf->order;
gcc_assert (nodes[i].kind == ORDER_UNDEFINED);
@@ -1191,7 +1192,7 @@ cgraph_output_in_order (void)
switch (nodes[i].kind)
{
case ORDER_FUNCTION:
- nodes[i].u.f->output = 0;
+ nodes[i].u.f->process = 0;
cgraph_expand_function (nodes[i].u.f);
break;
@@ -1313,7 +1314,6 @@ cgraph_optimize (void)
varpool_assemble_pending_decls ();
}
- varpool_output_debug_info ();
cgraph_process_new_functions ();
cgraph_state = CGRAPH_STATE_FINISHED;
diff --git a/gcc/cif-code.def b/gcc/cif-code.def
new file mode 100644
index 00000000000..48dbabffbed
--- /dev/null
+++ b/gcc/cif-code.def
@@ -0,0 +1,86 @@
+/* This file contains the definitions of the cgraph_inline_failed_t
+ enums used in GCC.
+
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ Contributed by Doug Kwan <dougkwan@google.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/>. */
+
+/* The format of this file is
+ DEFCIFCODE(code, string).
+
+ Where symbol is the enumeration name without the ``''.
+ The argument STRING is a explain the failure. Except for OK,
+ which is a NULL pointer. */
+
+/* Inlining successful. This must be the first code. */
+DEFCIFCODE(OK , NULL)
+
+/* Inlining failed for an unspecified reason. */
+DEFCIFCODE(UNSPECIFIED , "")
+
+/* Function has not be considered for inlining. This is the code for
+ functions that have not been rejected for inlining yet. */
+DEFCIFCODE(FUNCTION_NOT_CONSIDERED,
+ N_("function not considered for inlining"))
+
+/* Inlining failed owing to unavailable function body. */
+DEFCIFCODE(BODY_NOT_AVAILABLE, N_("function body not available"))
+
+DEFCIFCODE(REDEFINED_EXTERN_INLINE,
+ N_("redefined extern inline functions are not considered for "
+ "inlining"))
+
+/* Function is not inlinable. */
+DEFCIFCODE(FUNCTION_NOT_INLINABLE, N_("function not inlinable"))
+
+/* Function is not an inlining candidate. */
+DEFCIFCODE(FUNCTION_NOT_INLINE_CANDIDATE, N_("function not inline candidate"))
+
+/* Inlining failed because of various limit parameters. */
+DEFCIFCODE(LARGE_FUNCTION_GROWTH_LIMIT,
+ N_("--param large-function-growth limit reached"))
+DEFCIFCODE(LARGE_STACK_FRAME_GROWTH_LIMIT,
+ N_("--param large-stack-frame-growth limit reached"))
+DEFCIFCODE(MAX_INLINE_INSNS_SINGLE_LIMIT,
+ N_("--param max-inline-insns-single limit reached"))
+DEFCIFCODE(MAX_INLINE_INSNS_AUTO_LIMIT,
+ N_("--param max-inline-insns-auto limit reached"))
+DEFCIFCODE(INLINE_UNIT_GROWTH_LIMIT,
+ N_("--param inline-unit-growth limit reached"))
+
+/* Recursive inlining. */
+DEFCIFCODE(RECURSIVE_INLINING, N_("recursive inlining"))
+
+/* Call is unlikely. */
+DEFCIFCODE(UNLIKELY_CALL, N_("call is unlikely and code size would grow"))
+
+/* Function is not declared as an inline. */
+DEFCIFCODE(NOT_DECLARED_INLINED,
+ N_("function not declared inline and code size would grow"))
+
+/* Inlining suppressed due to size optimization. */
+DEFCIFCODE(OPTIMIZING_FOR_SIZE,
+ N_("optimizing for size and code size would grow"))
+
+/* Inlining failed because of mismatched options or arguments. */
+DEFCIFCODE(TARGET_OPTION_MISMATCH, N_("target specific option mismatch"))
+DEFCIFCODE(MISMATCHED_ARGUMENTS, N_("mismatched arguments"))
+
+/* Call was originally indirect. */
+DEFCIFCODE(ORIGINALLY_INDIRECT_CALL,
+ N_("originally indirect function call not considered for inlining"))
diff --git a/gcc/combine.c b/gcc/combine.c
index 3aca075aae1..3ce8a75ca2f 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -605,6 +605,7 @@ find_single_use_1 (rtx dest, rtx *loc)
static rtx *
find_single_use (rtx dest, rtx insn, rtx *ploc)
{
+ basic_block bb;
rtx next;
rtx *result;
rtx link;
@@ -627,9 +628,10 @@ find_single_use (rtx dest, rtx insn, rtx *ploc)
if (!REG_P (dest))
return 0;
- for (next = next_nonnote_insn (insn);
- next != 0 && !LABEL_P (next);
- next = next_nonnote_insn (next))
+ bb = BLOCK_FOR_INSN (insn);
+ for (next = NEXT_INSN (insn);
+ next && BLOCK_FOR_INSN (next) == bb;
+ next = NEXT_INSN (next))
if (INSN_P (next) && dead_or_set_p (next, dest))
{
for (link = LOG_LINKS (next); link; link = XEXP (link, 1))
@@ -1062,17 +1064,19 @@ combine_instructions (rtx f, unsigned int nregs)
Also set any known values so that we can use it while searching
for what bits are known to be set. */
- label_tick = label_tick_ebb_start = 1;
-
setup_incoming_promotions (first);
create_log_links ();
+ label_tick_ebb_start = ENTRY_BLOCK_PTR->index;
FOR_EACH_BB (this_basic_block)
{
optimize_this_for_speed_p = optimize_bb_for_speed_p (this_basic_block);
last_call_luid = 0;
mem_last_set = -1;
- label_tick++;
+ label_tick = this_basic_block->index;
+ if (!single_pred_p (this_basic_block)
+ || single_pred (this_basic_block)->index != label_tick - 1)
+ label_tick_ebb_start = label_tick;
FOR_BB_INSNS (this_basic_block, insn)
if (INSN_P (insn) && BLOCK_FOR_INSN (insn))
{
@@ -1098,15 +1102,13 @@ combine_instructions (rtx f, unsigned int nregs)
fprintf(dump_file, "insn_cost %d: %d\n",
INSN_UID (insn), INSN_COST (insn));
}
- else if (LABEL_P (insn))
- label_tick_ebb_start = label_tick;
}
nonzero_sign_valid = 1;
/* Now scan all the insns in forward order. */
- label_tick = label_tick_ebb_start = 1;
+ label_tick_ebb_start = ENTRY_BLOCK_PTR->index;
init_reg_last ();
setup_incoming_promotions (first);
@@ -1115,7 +1117,10 @@ combine_instructions (rtx f, unsigned int nregs)
optimize_this_for_speed_p = optimize_bb_for_speed_p (this_basic_block);
last_call_luid = 0;
mem_last_set = -1;
- label_tick++;
+ label_tick = this_basic_block->index;
+ if (!single_pred_p (this_basic_block)
+ || single_pred (this_basic_block)->index != label_tick - 1)
+ label_tick_ebb_start = label_tick;
rtl_profile_for_bb (this_basic_block);
for (insn = BB_HEAD (this_basic_block);
insn != NEXT_INSN (BB_END (this_basic_block));
@@ -1268,8 +1273,6 @@ combine_instructions (rtx f, unsigned int nregs)
retry:
;
}
- else if (LABEL_P (insn))
- label_tick_ebb_start = label_tick;
}
}
@@ -2159,6 +2162,25 @@ reg_subword_p (rtx x, rtx reg)
}
+/* Delete the conditional jump INSN and adjust the CFG correspondingly.
+ Note that the INSN should be deleted *after* removing dead edges, so
+ that the kept edge is the fallthrough edge for a (set (pc) (pc))
+ but not for a (set (pc) (label_ref FOO)). */
+
+static void
+update_cfg_for_uncondjump (rtx insn)
+{
+ basic_block bb = BLOCK_FOR_INSN (insn);
+
+ if (BB_END (bb) == insn)
+ purge_dead_edges (bb);
+
+ delete_insn (insn);
+ if (EDGE_COUNT (bb->succs) == 1)
+ single_succ_edge (bb)->flags |= EDGE_FALLTHRU;
+}
+
+
/* Try to combine the insns I1 and I2 into I3.
Here I1 and I2 appear earlier than I3.
I1 can be zero; then we combine just I2 into I3.
@@ -3712,43 +3734,8 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
if (newi2pat)
note_stores (newi2pat, set_nonzero_bits_and_sign_copies, NULL);
note_stores (newpat, set_nonzero_bits_and_sign_copies, NULL);
-
- /* Set new_direct_jump_p if a new return or simple jump instruction
- has been created.
-
- If I3 is now an unconditional jump, ensure that it has a
- BARRIER following it since it may have initially been a
- conditional jump. It may also be the last nonnote insn. */
-
- if (returnjump_p (i3) || any_uncondjump_p (i3))
- {
- *new_direct_jump_p = 1;
- mark_jump_label (PATTERN (i3), i3, 0);
-
- if ((temp = next_nonnote_insn (i3)) == NULL_RTX
- || !BARRIER_P (temp))
- emit_barrier_after (i3);
- }
-
- if (undobuf.other_insn != NULL_RTX
- && (returnjump_p (undobuf.other_insn)
- || any_uncondjump_p (undobuf.other_insn)))
- {
- *new_direct_jump_p = 1;
-
- if ((temp = next_nonnote_insn (undobuf.other_insn)) == NULL_RTX
- || !BARRIER_P (temp))
- emit_barrier_after (undobuf.other_insn);
- }
-
- /* An NOOP jump does not need barrier, but it does need cleaning up
- of CFG. */
- if (GET_CODE (newpat) == SET
- && SET_SRC (newpat) == pc_rtx
- && SET_DEST (newpat) == pc_rtx)
- *new_direct_jump_p = 1;
}
-
+
if (undobuf.other_insn != NULL_RTX)
{
if (dump_file)
@@ -3789,6 +3776,34 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
df_insn_rescan (i3);
}
+ /* Set new_direct_jump_p if a new return or simple jump instruction
+ has been created. Adjust the CFG accordingly. */
+
+ if (returnjump_p (i3) || any_uncondjump_p (i3))
+ {
+ *new_direct_jump_p = 1;
+ mark_jump_label (PATTERN (i3), i3, 0);
+ update_cfg_for_uncondjump (i3);
+ }
+
+ if (undobuf.other_insn != NULL_RTX
+ && (returnjump_p (undobuf.other_insn)
+ || any_uncondjump_p (undobuf.other_insn)))
+ {
+ *new_direct_jump_p = 1;
+ update_cfg_for_uncondjump (undobuf.other_insn);
+ }
+
+ /* A noop might also need cleaning up of CFG, if it comes from the
+ simplification of a jump. */
+ if (GET_CODE (newpat) == SET
+ && SET_SRC (newpat) == pc_rtx
+ && SET_DEST (newpat) == pc_rtx)
+ {
+ *new_direct_jump_p = 1;
+ update_cfg_for_uncondjump (i3);
+ }
+
combine_successes++;
undo_commit ();
@@ -9973,7 +9988,7 @@ gen_lowpart_for_combine (enum machine_mode omode, rtx x)
}
fail:
- return gen_rtx_CLOBBER (imode, const0_rtx);
+ return gen_rtx_CLOBBER (omode, const0_rtx);
}
/* Simplify a comparison between *POP0 and *POP1 where CODE is the
@@ -10519,7 +10534,7 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
&& ((unsigned HOST_WIDE_INT) const_op
< (((unsigned HOST_WIDE_INT) 1
<< (GET_MODE_BITSIZE (mode) - 1))))
- && optab_handler (cmp_optab, mode)->insn_code != CODE_FOR_nothing)
+ && have_insn_for (COMPARE, mode))
{
op0 = XEXP (op0, 0);
continue;
@@ -10600,7 +10615,7 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
&& (unsigned_comparison_p || equality_comparison_p)
&& (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT)
&& ((unsigned HOST_WIDE_INT) const_op < GET_MODE_MASK (mode))
- && optab_handler (cmp_optab, mode)->insn_code != CODE_FOR_nothing)
+ && have_insn_for (COMPARE, mode))
{
op0 = XEXP (op0, 0);
continue;
@@ -11984,32 +11999,28 @@ reg_dead_at_p (rtx reg, rtx insn)
return 0;
}
- /* Scan backwards until we find a REG_DEAD note, SET, CLOBBER, label, or
- beginning of function. */
- for (; insn && !LABEL_P (insn) && !BARRIER_P (insn);
- insn = prev_nonnote_insn (insn))
+ /* Scan backwards until we find a REG_DEAD note, SET, CLOBBER, or
+ beginning of basic block. */
+ block = BLOCK_FOR_INSN (insn);
+ for (;;)
{
- note_stores (PATTERN (insn), reg_dead_at_p_1, NULL);
- if (reg_dead_flag)
- return reg_dead_flag == 1 ? 1 : 0;
+ if (INSN_P (insn))
+ {
+ note_stores (PATTERN (insn), reg_dead_at_p_1, NULL);
+ if (reg_dead_flag)
+ return reg_dead_flag == 1 ? 1 : 0;
- if (find_regno_note (insn, REG_DEAD, reg_dead_regno))
- return 1;
- }
+ if (find_regno_note (insn, REG_DEAD, reg_dead_regno))
+ return 1;
+ }
- /* Get the basic block that we were in. */
- if (insn == 0)
- block = ENTRY_BLOCK_PTR->next_bb;
- else
- {
- FOR_EACH_BB (block)
- if (insn == BB_HEAD (block))
- break;
+ if (insn == BB_HEAD (block))
+ break;
- if (block == EXIT_BLOCK_PTR)
- return 0;
+ insn = PREV_INSN (insn);
}
+ /* Look at live-in sets for the basic block that we were in. */
for (i = reg_dead_regno; i < reg_dead_endregno; i++)
if (REGNO_REG_SET_P (df_get_live_in (block), i))
return 0;
@@ -13025,7 +13036,7 @@ struct rtl_opt_pass pass_combine =
NULL, /* next */
0, /* static_pass_number */
TV_COMBINE, /* tv_id */
- 0, /* properties_required */
+ PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
diff --git a/gcc/common.opt b/gcc/common.opt
index 0f230a88e04..3626c9ed486 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -94,10 +94,6 @@ Wdisabled-optimization
Common Var(warn_disabled_optimization) Warning
Warn when an optimization pass is disabled
-Wdisallowed-function-list=
-Common RejectNegative Joined Warning
-Warn on calls to these functions
-
Werror
Common Var(warnings_are_errors)
Treat all warnings as errors
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 4104b883148..5617065fe2a 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -152,17 +152,15 @@
# system normally uses GNU as.
#
# need_64bit_hwint Set to yes if HOST_WIDE_INT must be 64 bits wide
-# for this target. This is true iff this target
-# supports "long" or "wchar_t" wider than 32 bits.
+# for this target. This is true if this target
+# supports "long" or "wchar_t" wider than 32 bits,
+# or BITS_PER_WORD is wider than 32 bits.
# The setting made here must match the one made in
# other locations such as libcpp/configure.ac
#
# configure_default_options
# Set to an initializer for configure_default_options
# in configargs.h, based on --with-cpu et cetera.
-#
-# use_fixproto Set to "yes" if fixproto should be run normally,
-# "no" if fixproto should never be run.
# The following variables are used in each case-construct to build up the
# outgoing variables:
@@ -202,40 +200,21 @@ default_use_cxa_atexit=no
target_gtfiles=
need_64bit_hwint=
-# Default to not using fixproto. Targets which need fixproto should
-# specifically set this to 'yes'.
-use_fixproto=no
-
# Don't carry these over build->host->target. Please.
xm_file=
md_file=
# Obsolete configurations.
-case ${target} in
-# Avoid generic cases below matching.
- h8300-*-rtems* | h8300-*-elf* \
- | sh-*-elf* | sh-*-symbianelf* | sh-*-linux* | sh-*-netbsdelf* \
- | sh-*-rtems* | sh-wrs-vxworks) ;;
- arm-*-coff* \
- | armel-*-coff* \
- | h8300-*-* \
- | i[34567]86-*-aout* \
- | i[34567]86-*-coff* \
- | m68k-*-aout* \
- | m68k-*-coff* \
- | sh-*-* \
- | pdp11-*-bsd \
- | rs6000-ibm-aix4.[12]* \
- | powerpc-ibm-aix4.[12]* \
- )
- if test "x$enable_obsolete" != xyes; then
- echo "*** Configuration ${target} is obsolete." >&2
- echo "*** Specify --enable-obsolete to build it anyway." >&2
- echo "*** Support will be REMOVED in the next major release of GCC," >&2
- echo "*** unless a maintainer comes forward." >&2
- exit 1
- fi;;
-esac
+#case ${target} in
+# )
+# if test "x$enable_obsolete" != xyes; then
+# echo "*** Configuration ${target} is obsolete." >&2
+# echo "*** Specify --enable-obsolete to build it anyway." >&2
+# echo "*** Support will be REMOVED in the next major release of GCC," >&2
+# echo "*** unless a maintainer comes forward." >&2
+# exit 1
+# fi;;
+#esac
# Unsupported targets list. Do not put an entry in this list unless
# it would otherwise be caught by a more permissive pattern. The list
@@ -244,6 +223,7 @@ case ${target} in
i[34567]86-go32-* \
| i[34567]86-*-go32* \
| mips64orion*-*-rtems* \
+ | pdp11-*-bsd \
| sparc-hal-solaris2* \
| thumb-*-* \
| *-*-linux*aout* \
@@ -693,11 +673,6 @@ arc-*-elf*)
tm_file="dbxelf.h elfos.h svr4.h newlib-stdint.h ${tm_file}"
extra_parts="crtinit.o crtfini.o"
;;
-arm-*-coff* | armel-*-coff*)
- tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h newlib-stdint.h"
- tmake_file="arm/t-arm arm/t-arm-coff"
- use_gcc_stdint=wrap
- ;;
arm-wrs-vxworks)
tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
@@ -904,10 +879,6 @@ h8300-*-elf*)
tmake_file="h8300/t-h8300 h8300/t-elf"
tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
;;
-h8300-*-*)
- tm_file="h8300/h8300.h dbxcoff.h newlib-stdint.h h8300/coff.h"
- use_gcc_stdint=wrap
- ;;
hppa*64*-*-linux*)
target_cpu_default="MASK_PA_11|MASK_PA_20"
tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h svr4.h linux.h \
@@ -1058,10 +1029,6 @@ x86_64-*-elf*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
tmake_file="${tmake_file} i386/t-i386elf t-svr4"
;;
-i[34567]86-*-aout*)
- tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/i386-aout.h newlib-stdint.h"
- use_gcc_stdint=wrap
- ;;
i[34567]86-*-freebsd*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
;;
@@ -1095,10 +1062,6 @@ i[34567]86-*-openbsd*)
gas=yes
gnu_ld=yes
;;
-i[34567]86-*-coff*)
- tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h newlib-stdint.h i386/i386-coff.h"
- use_gcc_stdint=wrap
- ;;
i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
# Intel 80386's running GNU/*
# with ELF format using glibc 2
@@ -1433,21 +1396,6 @@ m68hc12-*-*|m6812-*-*)
extra_options="${extra_options} m68hc11/m68hc11.opt"
use_gcc_stdint=wrap
;;
-m68k-*-aout*)
- default_m68k_cpu=68020
- default_cf_cpu=5206
- tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-mlibs"
- tm_file="${tm_file} m68k/m68k-none.h m68k/m68kemb.h m68k/m68k-aout.h libgloss.h newlib-stdint.h"
- use_gcc_stdint=wrap
- ;;
-m68k-*-coff*)
- default_m68k_cpu=68020
- default_cf_cpu=5206
- tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-mlibs"
- tm_defines="${tm_defines} MOTOROLA=1"
- tm_file="${tm_file} m68k/m68k-none.h m68k/m68kemb.h dbxcoff.h m68k/coff.h dbx.h newlib-stdint.h"
- use_gcc_stdint=wrap
- ;;
m68k-*-elf* | fido-*-elf*)
case ${target} in
fido-*-elf*)
@@ -1750,10 +1698,6 @@ mn10300-*-*)
use_collect2=no
use_gcc_stdint=wrap
;;
-pdp11-*-bsd)
- tm_file="${tm_file} pdp11/2bsd.h"
- use_fixproto=yes
- ;;
pdp11-*-*)
tm_file="${tm_file} newlib-stdint.h"
use_gcc_stdint=wrap
@@ -1962,14 +1906,6 @@ powerpc-xilinx-eabi*)
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
use_gcc_stdint=wrap
;;
-rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
- tm_file="${tm_file} rs6000/aix.h rs6000/aix41.h rs6000/xcoff.h"
- tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-newas"
- extra_options="${extra_options} rs6000/aix41.opt"
- use_collect2=yes
- extra_headers=
- use_fixproto=yes
- ;;
rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h"
tmake_file=rs6000/t-aix43
@@ -2214,10 +2150,6 @@ sh-wrs-vxworks)
tmake_file="$tmake_file sh/t-sh sh/t-elf sh/t-vxworks"
tm_file="${tm_file} elfos.h svr4.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
;;
-sh-*-*)
- tm_file="${tm_file} dbxcoff.h sh/coff.h"
- use_gcc_stdint=wrap
- ;;
sparc-*-netbsdelf*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
extra_options="${extra_options} sparc/long-double-switch.opt"
diff --git a/gcc/config.host b/gcc/config.host
index 0cd57ed87f9..b06d1648c73 100644
--- a/gcc/config.host
+++ b/gcc/config.host
@@ -94,6 +94,14 @@ case ${host} in
esac
case ${host} in
+ alpha*-*-linux*)
+ case ${target} in
+ alpha*-*-linux*)
+ host_extra_gcc_objs="driver-alpha.o"
+ host_xmake_file="${host_xmake_file} alpha/x-alpha"
+ ;;
+ esac
+ ;;
i[34567]86-*-* \
| x86_64-*-* )
case ${target} in
@@ -112,9 +120,6 @@ case ${host} in
;;
esac
;;
-esac
-
-case ${host} in
rs6000-*-* \
| powerpc*-*-* )
case ${target} in
diff --git a/gcc/config.in b/gcc/config.in
index cb4d82bc5fc..7c34eed3282 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -169,13 +169,6 @@
#endif
-/* Define to the type of elements in the array set by `getgroups'. Usually
- this is either `int' or `gid_t'. */
-#ifndef USED_FOR_TARGET
-#undef GETGROUPS_T
-#endif
-
-
/* Define if the zone collector is in use */
#ifndef USED_FOR_TARGET
#undef GGC_ZONE
@@ -1553,12 +1546,6 @@
#endif
-/* Define to `int' if <sys/types.h> doesn't define. */
-#ifndef USED_FOR_TARGET
-#undef gid_t
-#endif
-
-
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
@@ -1583,12 +1570,6 @@
#endif
-/* Define to `int' if <sys/types.h> doesn't define. */
-#ifndef USED_FOR_TARGET
-#undef uid_t
-#endif
-
-
/* Define as `fork' if `vfork' does not work. */
#ifndef USED_FOR_TARGET
#undef vfork
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 0675916a230..5ffb8f967ff 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -7135,7 +7135,7 @@ alpha_sa_mask (unsigned long *imaskP, unsigned long *fmaskP)
/* When outputting a thunk, we don't have valid register life info,
but assemble_start_function wants to output .frame and .mask
directives. */
- if (crtl->is_thunk)
+ if (cfun->is_thunk)
{
*imaskP = 0;
*fmaskP = 0;
@@ -7365,7 +7365,7 @@ alpha_does_function_need_gp (void)
return 1;
/* The code emitted by alpha_output_mi_thunk_osf uses the gp. */
- if (crtl->is_thunk)
+ if (cfun->is_thunk)
return 1;
/* The nonlocal receiver pattern assumes that the gp is valid for
@@ -7888,7 +7888,7 @@ alpha_start_function (FILE *file, const char *fnname,
Otherwise, do it here. */
if (TARGET_ABI_OSF
&& ! alpha_function_needs_gp
- && ! crtl->is_thunk)
+ && ! cfun->is_thunk)
{
putc ('$', file);
assemble_name (file, fnname);
@@ -7999,7 +7999,7 @@ alpha_output_function_end_prologue (FILE *file)
fputs ("\t.prologue 0\n", file);
else if (!flag_inhibit_size_directive)
fprintf (file, "\t.prologue %d\n",
- alpha_function_needs_gp || crtl->is_thunk);
+ alpha_function_needs_gp || cfun->is_thunk);
}
/* Write function epilogue. */
@@ -8283,7 +8283,7 @@ alpha_end_function (FILE *file, const char *fnname, tree decl ATTRIBUTE_UNUSED)
output_asm_insn (get_insn_template (CODE_FOR_nop, NULL), NULL);
#if TARGET_ABI_OSF
- if (crtl->is_thunk)
+ if (cfun->is_thunk)
free_after_compilation (cfun);
#endif
@@ -8326,7 +8326,7 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
HOST_WIDE_INT hi, lo;
rtx this_rtx, insn, funexp;
- gcc_assert (crtl->is_thunk);
+ gcc_assert (cfun->is_thunk);
/* We always require a valid GP. */
emit_insn (gen_prologue_ldgp ());
diff --git a/gcc/config/alpha/driver-alpha.c b/gcc/config/alpha/driver-alpha.c
new file mode 100644
index 00000000000..d787886d172
--- /dev/null
+++ b/gcc/config/alpha/driver-alpha.c
@@ -0,0 +1,100 @@
+/* Subroutines for the gcc driver.
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ Contributed by Arthur Loiret <aloiret@debian.org>
+
+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"
+
+/* This will be called by the spec parser in gcc.c when it sees
+ a %:local_cpu_detect(args) construct. Currently it will be called
+ with either "cpu" or "tune" as argument depending on if -mcpu=native
+ or -mtune=native is to be substituted.
+
+ It returns a string containing new command line parameters to be
+ put at the place of the above two options, depending on what CPU
+ this is executed. E.g. "-mcpu=ev6" on an Alpha 21264 for
+ -mcpu=native. If the routine can't detect a known processor,
+ the -mcpu or -mtune option is discarded.
+
+ ARGC and ARGV are set depending on the actual arguments given
+ in the spec. */
+const char *
+host_detect_local_cpu (int argc, const char **argv)
+{
+ const char *cpu = NULL;
+ char buf[128];
+ FILE *f;
+
+ static const struct cpu_names {
+ const char *const name;
+ const char *const cpu;
+ } cpu_names[] = {
+ { "EV79", "ev67" },
+ { "EV7", "ev67" },
+ { "EV69", "ev67" },
+ { "EV68CX", "ev67" },
+ { "EV68CB", "ev67" },
+ { "EV68AL", "ev67" },
+ { "EV67", "ev67" },
+ { "EV6", "ev6" },
+ { "PCA57", "pca56" },
+ { "PCA56", "pca56" },
+ { "EV56", "ev56" },
+ { "EV5", "ev5" },
+ { "LCA45", "ev45" },
+ { "EV45", "ev45" },
+ { "LCA4", "ev4" },
+ { "EV4", "ev4" },
+/* { "EV3", "ev3" }, */
+ { 0, 0 }
+ };
+
+ int i;
+
+ if (argc < 1)
+ return NULL;
+
+ if (strcmp (argv[0], "cpu") && strcmp (argv[0], "tune"))
+ return NULL;
+
+ f = fopen ("/proc/cpuinfo", "r");
+ if (f == NULL)
+ return NULL;
+
+ while (fgets (buf, sizeof (buf), f) != NULL)
+ if (strncmp (buf, "cpu model", sizeof ("cpu model") - 1) == 0)
+ {
+ for (i = 0; cpu_names [i].name; i++)
+ if (strstr (buf, cpu_names [i].name) != NULL)
+ {
+ cpu = cpu_names [i].cpu;
+ break;
+ }
+ break;
+ }
+
+ fclose (f);
+
+ if (cpu == NULL)
+ return NULL;
+
+ return concat ("-m", argv[0], "=", cpu, NULL);
+}
diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h
index 94876f646de..0a32479d5d7 100644
--- a/gcc/config/alpha/linux.h
+++ b/gcc/config/alpha/linux.h
@@ -85,3 +85,19 @@ along with GCC; see the file COPYING3. If not see
/* Define if long doubles should be mangled as 'g'. */
#define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
+
+/* -mcpu=native handling only makes sense with compiler running on
+ an Alpha chip. */
+#if defined(__alpha__) || defined(__alpha)
+extern const char *host_detect_local_cpu (int argc, const char **argv);
+# define EXTRA_SPEC_FUNCTIONS \
+ { "local_cpu_detect", host_detect_local_cpu },
+
+# define MCPU_MTUNE_NATIVE_SPECS \
+ " %{mcpu=native:%<mcpu=native %:local_cpu_detect(cpu)}" \
+ " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
+#else
+# define MCPU_MTUNE_NATIVE_SPECS ""
+#endif
+
+#define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS
diff --git a/gcc/config/alpha/x-alpha b/gcc/config/alpha/x-alpha
new file mode 100644
index 00000000000..27b5f466903
--- /dev/null
+++ b/gcc/config/alpha/x-alpha
@@ -0,0 +1,3 @@
+driver-alpha.o: $(srcdir)/config/alpha/driver-alpha.c \
+ $(CONFIG_H) $(SYSTEM_H)
+ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 7788793b300..f5ec9e7166e 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -2448,7 +2448,7 @@ extern int making_const_table;
{ \
if (is_called_in_ARM_mode (DECL) \
|| (TARGET_THUMB1 && !TARGET_THUMB1_ONLY \
- && crtl->is_thunk)) \
+ && cfun->is_thunk)) \
fprintf (STREAM, "\t.code 32\n") ; \
else if (TARGET_THUMB1) \
fprintf (STREAM, "\t.code\t16\n\t.thumb_func\n") ; \
diff --git a/gcc/config/arm/rtems-elf.h b/gcc/config/arm/rtems-elf.h
index ee8c118112a..dade74b1555 100644
--- a/gcc/config/arm/rtems-elf.h
+++ b/gcc/config/arm/rtems-elf.h
@@ -43,4 +43,3 @@
* with how this used to be defined.
*/
#undef LINK_GCC_C_SEQUENCE_SPEC
-#define LINK_GCC_C_SEQUENCE_SPEC "%G %L"
diff --git a/gcc/config/arm/t-arm-coff b/gcc/config/arm/t-arm-coff
deleted file mode 100644
index 04880833e85..00000000000
--- a/gcc/config/arm/t-arm-coff
+++ /dev/null
@@ -1,34 +0,0 @@
-LIB1ASMSRC = arm/lib1funcs.asm
-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func _call_via_rX _interwork_call_via_rX _clzsi2 _clzdi2
-
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#define FLOAT' > fp-bit.c
- echo '#ifndef __ARMEB__' >> fp-bit.c
- echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
- echo '#endif' >> fp-bit.c
- cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#ifndef __ARMEB__' > dp-bit.c
- echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
- echo '#define FLOAT_WORD_ORDER_MISMATCH' >> dp-bit.c
- echo '#endif' >> dp-bit.c
- cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
-MULTILIB_OPTIONS = mlittle-endian/mbig-endian mhard-float/msoft-float marm/mthumb mno-thumb-interwork/mthumb-interwork
-MULTILIB_DIRNAMES = le be fpu soft arm thumb normal interwork
-MULTILIB_MATCHES =
-EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
-
-LIBGCC = stmp-multilib
-INSTALL_LIBGCC = install-multilib
-
-# Currently there is a bug somewhere in GCC's alias analysis
-# or scheduling code that is breaking _fpmul_parts in fp-bit.c.
-# Disabling function inlining is a workaround for this problem.
-TARGET_LIBGCC2_CFLAGS = -fno-inline
diff --git a/gcc/config/avr/avr-protos.h b/gcc/config/avr/avr-protos.h
index bcf81d9afc5..2df4a16d1cf 100644
--- a/gcc/config/avr/avr-protos.h
+++ b/gcc/config/avr/avr-protos.h
@@ -1,6 +1,6 @@
/* Prototypes for exported functions defined in avr.c
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Denis Chertykov (denisc@overta.ru)
@@ -32,6 +32,7 @@ extern enum reg_class avr_regno_reg_class (int r);
extern enum reg_class avr_reg_class_from_letter (int c);
extern int frame_pointer_required_p (void);
extern void asm_globalize_label (FILE *file, const char *name);
+extern void avr_asm_declare_function_name (FILE *, const char *, tree);
extern void order_regs_for_local_alloc (void);
extern int initial_elimination_offset (int from, int to);
extern int avr_simple_epilogue (void);
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index f8ef6d58fa2..82a9742392c 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -219,6 +219,8 @@ static const struct mcu_type_s avr_mcu_types[] = {
{ "atmega8hva", ARCH_AVR4, "__AVR_ATmega8HVA__" },
{ "atmega4hvd", ARCH_AVR4, "__AVR_ATmega4HVD__" },
{ "atmega8hvd", ARCH_AVR4, "__AVR_ATmega8HVD__" },
+ { "atmega8c1", ARCH_AVR4, "__AVR_ATmega8C1__" },
+ { "atmega8m1", ARCH_AVR4, "__AVR_ATmega8M1__" },
{ "at90pwm1", ARCH_AVR4, "__AVR_AT90PWM1__" },
{ "at90pwm2", ARCH_AVR4, "__AVR_AT90PWM2__" },
{ "at90pwm2b", ARCH_AVR4, "__AVR_AT90PWM2B__" },
@@ -266,6 +268,7 @@ static const struct mcu_type_s avr_mcu_types[] = {
{ "at90can64", ARCH_AVR5, "__AVR_AT90CAN64__" },
{ "at90pwm216", ARCH_AVR5, "__AVR_AT90PWM216__" },
{ "at90pwm316", ARCH_AVR5, "__AVR_AT90PWM316__" },
+ { "atmega16c1", ARCH_AVR5, "__AVR_ATmega16C1__" },
{ "atmega32c1", ARCH_AVR5, "__AVR_ATmega32C1__" },
{ "atmega64c1", ARCH_AVR5, "__AVR_ATmega64C1__" },
{ "atmega16m1", ARCH_AVR5, "__AVR_ATmega16M1__" },
@@ -4595,6 +4598,39 @@ avr_assemble_integer (rtx x, unsigned int size, int aligned_p)
return default_assemble_integer (x, size, aligned_p);
}
+/* Worker function for ASM_DECLARE_FUNCTION_NAME. */
+
+void
+avr_asm_declare_function_name (FILE *file, const char *name, tree decl)
+{
+
+ /* If the function has the 'signal' or 'interrupt' attribute, test to
+ make sure that the name of the function is "__vector_NN" so as to
+ catch when the user misspells the interrupt vector name. */
+
+ if (cfun->machine->is_interrupt)
+ {
+ if (strncmp (name, "__vector", strlen ("__vector")) != 0)
+ {
+ warning_at (DECL_SOURCE_LOCATION (decl), 0,
+ "%qs appears to be a misspelled interrupt handler",
+ name);
+ }
+ }
+ else if (cfun->machine->is_signal)
+ {
+ if (strncmp (name, "__vector", strlen ("__vector")) != 0)
+ {
+ warning_at (DECL_SOURCE_LOCATION (decl), 0,
+ "%qs appears to be a misspelled signal handler",
+ name);
+ }
+ }
+
+ ASM_OUTPUT_TYPE_DIRECTIVE (file, name, "function");
+ ASM_OUTPUT_LABEL (file, name);
+}
+
/* The routine used to output NUL terminated strings. We use a special
version of this for most svr4 targets because doing so makes the
generated assembly code more compact (and thus faster to assemble)
@@ -4779,32 +4815,6 @@ avr_handle_fndecl_attribute (tree *node, tree name,
IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}
- else
- {
- const char *func_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (*node));
- const char *attr = IDENTIFIER_POINTER (name);
-
- /* If the function has the 'signal' or 'interrupt' attribute, test to
- make sure that the name of the function is "__vector_NN" so as to
- catch when the user misspells the interrupt vector name. */
-
- if (strncmp (attr, "interrupt", strlen ("interrupt")) == 0)
- {
- if (strncmp (func_name, "__vector", strlen ("__vector")) != 0)
- {
- warning (0, "%qs appears to be a misspelled interrupt handler",
- func_name);
- }
- }
- else if (strncmp (attr, "signal", strlen ("signal")) == 0)
- {
- if (strncmp (func_name, "__vector", strlen ("__vector")) != 0)
- {
- warning (0, "%qs appears to be a misspelled signal handler",
- func_name);
- }
- }
- }
return NULL_TREE;
}
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 8a4d98ab365..54c607a0e04 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -590,10 +590,7 @@ do { \
specific tm.h file (depending upon the particulars of your assembler). */
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
-do { \
- ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
- ASM_OUTPUT_LABEL (FILE, NAME); \
-} while (0)
+avr_asm_declare_function_name ((FILE), (NAME), (DECL))
#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
do { \
@@ -893,8 +890,11 @@ mmcu=*:-mmcu=%*}"
mmcu=attiny327|\
mmcu=at90can*|\
mmcu=at90pwm*|\
+ mmcu=atmega8c1|\
+ mmcu=atmega16c1|\
mmcu=atmega32c1|\
mmcu=atmega64c1|\
+ mmcu=atmega8m1|\
mmcu=atmega16m1|\
mmcu=atmega32m1|\
mmcu=atmega64m1|\
@@ -975,6 +975,8 @@ mmcu=*:-mmcu=%*}"
%{mmcu=atmega88p:crtm88p.o%s} \
%{mmcu=atmega8515:crtm8515.o%s} \
%{mmcu=atmega8535:crtm8535.o%s} \
+%{mmcu=atmega8c1:crtm8c1.o%s} \
+%{mmcu=atmega8m1:crtm8m1.o%s} \
%{mmcu=at90pwm1:crt90pwm1.o%s} \
%{mmcu=at90pwm2:crt90pwm2.o%s} \
%{mmcu=at90pwm2b:crt90pwm2b.o%s} \
@@ -1023,6 +1025,7 @@ mmcu=*:-mmcu=%*}"
%{mmcu=at90can64:crtcan64.o%s} \
%{mmcu=at90pwm216:crt90pwm216.o%s} \
%{mmcu=at90pwm316:crt90pwm316.o%s} \
+%{mmcu=atmega16c1:crtm16c1.o%s} \
%{mmcu=atmega32c1:crtm32c1.o%s} \
%{mmcu=atmega64c1:crtm64c1.o%s} \
%{mmcu=atmega16m1:crtm16m1.o%s} \
diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr
index 9d8d386c787..7513b3d4afb 100644
--- a/gcc/config/avr/t-avr
+++ b/gcc/config/avr/t-avr
@@ -79,6 +79,8 @@ MULTILIB_MATCHES = \
mmcu?avr4=mmcu?atmega8hva \
mmcu?avr4=mmcu?atmega4hvd \
mmcu?avr4=mmcu?atmega8hvd \
+ mmcu?avr4=mmcu?atmega8c1 \
+ mmcu?avr4=mmcu?atmega8m1 \
mmcu?avr4=mmcu?at90pwm1 \
mmcu?avr4=mmcu?at90pwm2 \
mmcu?avr4=mmcu?at90pwm2b \
@@ -124,6 +126,7 @@ MULTILIB_MATCHES = \
mmcu?avr5=mmcu?at90can64 \
mmcu?avr5=mmcu?at90pwm216 \
mmcu?avr5=mmcu?at90pwm316 \
+ mmcu?avr5=mmcu?atmega16c1 \
mmcu?avr5=mmcu?atmega32c1 \
mmcu?avr5=mmcu?atmega64c1 \
mmcu?avr5=mmcu?atmega16m1 \
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index ec5dd57dde7..d1c964d02ea 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -3854,9 +3854,17 @@ bfin_optimize_loop (loop_info loop)
/* Make sure the predecessor is before the loop start label, as required by
the LSETUP instruction. */
length = 0;
- for (insn = BB_END (loop->incoming_src);
- insn && insn != loop->start_label;
- insn = NEXT_INSN (insn))
+ insn = BB_END (loop->incoming_src);
+ /* If we have to insert the LSETUP before a jump, count that jump in the
+ length. */
+ if (VEC_length (edge, loop->incoming) > 1
+ || !(VEC_last (edge, loop->incoming)->flags & EDGE_FALLTHRU))
+ {
+ gcc_assert (JUMP_P (insn));
+ insn = PREV_INSN (insn);
+ }
+
+ for (; insn && insn != loop->start_label; insn = NEXT_INSN (insn))
length += length_for_loop (insn);
if (!insn)
@@ -4362,6 +4370,12 @@ bfin_discover_loop (loop_info loop, basic_block tail_bb, rtx tail_insn)
break;
}
}
+ if (!retry)
+ {
+ if (dump_file)
+ fprintf (dump_file, ";; No forwarder blocks found\n");
+ loop->bad = 1;
+ }
}
}
}
diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h
index eae8b484904..49822598f45 100644
--- a/gcc/config/cris/cris.h
+++ b/gcc/config/cris/cris.h
@@ -851,8 +851,9 @@ enum reg_class
/* Node: Elimination */
/* Really only needed if the stack frame has variable length (alloca
- or variable sized local arguments (GNU C extension). */
-#define FRAME_POINTER_REQUIRED 0
+ or variable sized local arguments (GNU C extension). See PR39499 and
+ PR38609 for the reason this isn't just 0. */
+#define FRAME_POINTER_REQUIRED (!current_function_sp_is_unchanging)
#define ELIMINABLE_REGS \
{{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
diff --git a/gcc/config/cris/libgcc.ver b/gcc/config/cris/libgcc.ver
new file mode 100644
index 00000000000..e35de83100f
--- /dev/null
+++ b/gcc/config/cris/libgcc.ver
@@ -0,0 +1,7 @@
+GCC_4.3 {
+ __Mul
+ __Div
+ __Udiv
+ __Mod
+ __Umod
+}
diff --git a/gcc/config/cris/linux.h b/gcc/config/cris/linux.h
index 247e827d677..38f0a7ef8c9 100644
--- a/gcc/config/cris/linux.h
+++ b/gcc/config/cris/linux.h
@@ -110,7 +110,8 @@ along with GCC; see the file COPYING3. If not see
#undef CRIS_LINK_SUBTARGET_SPEC
#define CRIS_LINK_SUBTARGET_SPEC \
"-mcrislinux\
- -rpath-link include/asm/../..%s\
+ %{B*:-rpath-link %*}\
+ %{!nostdlib:-rpath-link ../sys-include/asm/../../lib%s}\
%{shared} %{static}\
%{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
%{!shared:%{!static:\
diff --git a/gcc/config/cris/t-linux b/gcc/config/cris/t-linux
index e10d083f565..96e861a4283 100644
--- a/gcc/config/cris/t-linux
+++ b/gcc/config/cris/t-linux
@@ -1,5 +1,6 @@
TARGET_LIBGCC2_CFLAGS += -fPIC
CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
+SHLIB_MAPFILES += $(srcdir)/config/cris/libgcc.ver
# We *know* we have a limits.h in the glibc library, with extra
# definitions needed for e.g. libgfortran.
diff --git a/gcc/config/fr30/fr30.opt b/gcc/config/fr30/fr30.opt
index ac8567da1f3..da6148a6d2b 100644
--- a/gcc/config/fr30/fr30.opt
+++ b/gcc/config/fr30/fr30.opt
@@ -1,6 +1,6 @@
; Options for the FR30 port of the compiler.
-; Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+; Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
@@ -23,4 +23,5 @@ Target Report Mask(SMALL_MODEL)
Assume small address space
mno-lsim
-Target RejectNegative Undocumented
+Target RejectNegative
+Assume that run-time support has been provided, so omit -lsim from the linker command line
diff --git a/gcc/config/h8300/coff.h b/gcc/config/h8300/coff.h
deleted file mode 100644
index d4b6c9b7da9..00000000000
--- a/gcc/config/h8300/coff.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Definitions of target machine for GNU compiler.
- Renesas H8/300 version generating coff
- Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
- Contributed by Steve Chamberlain (sac@cygnus.com),
- Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@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/>. */
-
-#ifndef GCC_H8300_COFF_H
-#define GCC_H8300_COFF_H
-
-#define SDB_DEBUGGING_INFO 1
-#define SDB_DELIM "\n"
-
-/* Generate a blank trailing N_SO to mark the end of the .o file, since
- we can't depend upon the linker to mark .o file boundaries with
- embedded stabs. */
-
-#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
-
-/* This is how to output an assembler line
- that says to advance the location counter by SIZE bytes. */
-
-#define ASM_OUTPUT_IDENT(FILE, NAME) \
- fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME)
-
-#define IDENT_ASM_OP "\t.ident\t"
-#define INIT_SECTION_ASM_OP "\t.section .init"
-#define READONLY_DATA_SECTION_ASM_OP "\t.section .rodata"
-
-/* Switch into a generic section. */
-#define TARGET_ASM_NAMED_SECTION h8300_asm_named_section
-
-/* A bit-field declared as `int' forces `int' alignment for the struct. */
-#define PCC_BITFIELD_TYPE_MATTERS 0
-
-#endif /* h8300/coff.h */
diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h
index db43ffda08b..431e926818a 100644
--- a/gcc/config/i386/cygming.h
+++ b/gcc/config/i386/cygming.h
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see
#endif
#undef TARGET_64BIT_MS_ABI
-#define TARGET_64BIT_MS_ABI (!cfun ? DEFAULT_ABI == MS_ABI : TARGET_64BIT && cfun->machine->call_abi == MS_ABI)
+#define TARGET_64BIT_MS_ABI (!cfun ? ix86_abi == MS_ABI : TARGET_64BIT && cfun->machine->call_abi == MS_ABI)
#undef DEFAULT_ABI
#define DEFAULT_ABI (TARGET_64BIT ? MS_ABI : SYSV_ABI)
@@ -202,7 +202,7 @@ do { \
#define CHECK_STACK_LIMIT 4000
#undef STACK_BOUNDARY
-#define STACK_BOUNDARY (DEFAULT_ABI == MS_ABI ? 128 : BITS_PER_WORD)
+#define STACK_BOUNDARY (ix86_abi == MS_ABI ? 128 : BITS_PER_WORD)
/* By default, target has a 80387, uses IEEE compatible arithmetic,
returns float values in the 387 and needs stack probes.
diff --git a/gcc/config/i386/i386-aout.h b/gcc/config/i386/i386-aout.h
deleted file mode 100644
index e28f28c0280..00000000000
--- a/gcc/config/i386/i386-aout.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Definitions for "naked" Intel 386 using a.out (or coff encap'd
- a.out) object format and stabs debugging info.
-
- Copyright (C) 1994, 2002, 2007 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/>. */
-
-
-#define TARGET_VERSION fprintf (stderr, " (80386, BSD a.out syntax)");
-
-/* end of i386-aout.h */
diff --git a/gcc/config/i386/i386-coff.h b/gcc/config/i386/i386-coff.h
deleted file mode 100644
index af0204bb59e..00000000000
--- a/gcc/config/i386/i386-coff.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Definitions for "naked" Intel 386 using coff object format files
- and coff debugging info.
-
- Copyright (C) 1994, 2000, 2002, 2004, 2007 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/>. */
-
-
-#define TARGET_VERSION fprintf (stderr, " (80386, COFF BSD syntax)");
-
-#define TARGET_OS_CPP_BUILTINS() /* Sweet FA. */
-
-/* We want to be able to get DBX debugging information via -gstabs. */
-
-#define DBX_DEBUGGING_INFO 1
-
-#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
-
-/* Switch into a generic section. */
-#define TARGET_ASM_NAMED_SECTION default_coff_asm_named_section
-
-/* Prefix for internally generated assembler labels. If we aren't using
- underscores, we are using prefix `.'s to identify labels that should
- be ignored, as in `i386/gas.h' --karl@cs.umb.edu */
-
-#undef LPREFIX
-#define LPREFIX ".L"
-
-/* The prefix to add to user-visible assembler symbols. */
-
-#undef USER_LABEL_PREFIX
-#define USER_LABEL_PREFIX ""
-
-/* If user-symbols don't have underscores,
- then it must take more than `L' to identify
- a label that should be ignored. */
-
-/* This is how to store into the string BUF
- the symbol_ref name of an internal numbered label where
- PREFIX is the class of label and NUM is the number within the class.
- This is suitable for output with `assemble_name'. */
-
-#undef ASM_GENERATE_INTERNAL_LABEL
-#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
- sprintf ((BUF), ".%s%ld", (PREFIX), (long)(NUMBER))
-
-/* GNU as expects alignment to be the number of bytes instead of the log for
- COFF targets. */
-
-#undef ASM_OUTPUT_ALIGN
-#define ASM_OUTPUT_ALIGN(FILE,LOG) \
- if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
-
-/* end of i386-coff.h */
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index 23936a8d1e1..d6b30781692 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -85,6 +85,7 @@ extern void ix86_fixup_binary_operands_no_copy (enum rtx_code,
extern void ix86_expand_binary_operator (enum rtx_code,
enum machine_mode, rtx[]);
extern int ix86_binary_operator_ok (enum rtx_code, enum machine_mode, rtx[]);
+extern bool ix86_agi_dependent (rtx set_insn, rtx use_insn);
extern void ix86_expand_unary_operator (enum rtx_code, enum machine_mode,
rtx[]);
extern rtx ix86_build_const_vector (enum machine_mode, bool, rtx);
@@ -139,9 +140,8 @@ extern int ix86_function_arg_boundary (enum machine_mode, tree);
extern bool ix86_sol10_return_in_memory (const_tree,const_tree);
extern rtx ix86_force_to_memory (enum machine_mode, rtx);
extern void ix86_free_from_memory (enum machine_mode);
-extern int ix86_cfun_abi (void);
-extern int ix86_function_abi (const_tree);
-extern int ix86_function_type_abi (const_tree);
+extern enum calling_abi ix86_cfun_abi (void);
+extern enum calling_abi ix86_function_type_abi (const_tree);
extern void ix86_call_abi_override (const_tree);
extern tree ix86_fn_abi_va_list (tree);
extern tree ix86_canonical_va_list_type (tree);
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 120ab156fb1..3dec02f3acd 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -1533,24 +1533,8 @@ int const dbx_register_map[FIRST_PSEUDO_REGISTER] =
-1, -1, -1, -1, -1, -1, -1, -1, /* extended SSE registers */
};
-static int const x86_64_int_parameter_registers[6] =
-{
- 5 /*RDI*/, 4 /*RSI*/, 1 /*RDX*/, 2 /*RCX*/,
- FIRST_REX_INT_REG /*R8 */, FIRST_REX_INT_REG + 1 /*R9 */
-};
-
-static int const x86_64_ms_abi_int_parameter_registers[4] =
-{
- 2 /*RCX*/, 1 /*RDX*/,
- FIRST_REX_INT_REG /*R8 */, FIRST_REX_INT_REG + 1 /*R9 */
-};
-
-static int const x86_64_int_return_registers[4] =
-{
- 0 /*RAX*/, 1 /*RDX*/, 5 /*RDI*/, 4 /*RSI*/
-};
-
/* The "default" register map used in 64bit mode. */
+
int const dbx64_register_map[FIRST_PSEUDO_REGISTER] =
{
0, 1, 2, 3, 4, 5, 6, 7, /* general regs */
@@ -1634,6 +1618,23 @@ rtx ix86_compare_op0 = NULL_RTX;
rtx ix86_compare_op1 = NULL_RTX;
rtx ix86_compare_emitted = NULL_RTX;
+/* Define parameter passing and return registers. */
+
+static int const x86_64_int_parameter_registers[6] =
+{
+ DI_REG, SI_REG, DX_REG, CX_REG, R8_REG, R9_REG
+};
+
+static int const x86_64_ms_abi_int_parameter_registers[4] =
+{
+ CX_REG, DX_REG, R8_REG, R9_REG
+};
+
+static int const x86_64_int_return_registers[4] =
+{
+ AX_REG, DX_REG, DI_REG, SI_REG
+};
+
/* Define the structure for the machine field in struct function. */
struct stack_local_entry GTY(())
@@ -1742,6 +1743,9 @@ static unsigned int ix86_default_incoming_stack_boundary;
/* Alignment for incoming stack boundary in bits. */
unsigned int ix86_incoming_stack_boundary;
+/* The abi used by target. */
+enum calling_abi ix86_abi = DEFAULT_ABI;
+
/* Values 1-5: see jump.c */
int ix86_branch_cost;
@@ -1818,6 +1822,8 @@ static bool ix86_valid_target_attribute_inner_p (tree, char *[]);
static bool ix86_can_inline_p (tree, tree);
static void ix86_set_current_function (tree);
+static enum calling_abi ix86_function_abi (const_tree);
+
/* The svr4 ABI for the i386 says that records and unions are returned
in memory. */
@@ -2715,6 +2721,18 @@ override_options (bool main_args_p)
error ("bad value (%s) for %sarch=%s %s",
ix86_arch_string, prefix, suffix, sw);
+ /* Validate -mabi= value. */
+ if (ix86_abi_string)
+ {
+ if (strcmp (ix86_abi_string, "sysv") == 0)
+ ix86_abi = SYSV_ABI;
+ else if (strcmp (ix86_abi_string, "ms") == 0)
+ ix86_abi = MS_ABI;
+ else
+ error ("unknown ABI (%s) for %sabi=%s %s",
+ ix86_abi_string, prefix, suffix, sw);
+ }
+
if (ix86_cmodel_string != 0)
{
if (!strcmp (ix86_cmodel_string, "small"))
@@ -4272,17 +4290,15 @@ static int
ix86_function_regparm (const_tree type, const_tree decl)
{
tree attr;
- int regparm = ix86_regparm;
+ int regparm;
static bool error_issued;
if (TARGET_64BIT)
- {
- if (ix86_function_type_abi (type) == DEFAULT_ABI)
- return regparm;
- return DEFAULT_ABI != SYSV_ABI ? X86_64_REGPARM_MAX : X64_REGPARM_MAX;
- }
+ return (ix86_function_type_abi (type) == SYSV_ABI
+ ? X86_64_REGPARM_MAX : X64_REGPARM_MAX);
+ regparm = ix86_regparm;
attr = lookup_attribute ("regparm", TYPE_ATTRIBUTES (type));
if (attr)
{
@@ -4310,7 +4326,9 @@ ix86_function_regparm (const_tree type, const_tree decl)
return 2;
/* Use register calling convention for local functions when possible. */
- if (decl && TREE_CODE (decl) == FUNCTION_DECL
+ if (decl
+ && TREE_CODE (decl) == FUNCTION_DECL
+ && optimize
&& !profile_flag)
{
/* FIXME: remove this CONST_CAST when cgraph.[ch] is constified. */
@@ -4395,7 +4413,7 @@ ix86_function_sseregparm (const_tree type, const_tree decl, bool warn)
/* For local functions, pass up to SSE_REGPARM_MAX SFmode
(and DFmode for SSE2) arguments in SSE registers. */
- if (decl && TARGET_SSE_MATH && !profile_flag)
+ if (decl && TARGET_SSE_MATH && optimize && !profile_flag)
{
/* FIXME: remove this CONST_CAST when cgraph.[ch] is constified. */
struct cgraph_local_info *i = cgraph_local_info (CONST_CAST_TREE(decl));
@@ -4514,14 +4532,14 @@ ix86_function_arg_regno_p (int regno)
default ABI. */
/* RAX is used as hidden argument to va_arg functions. */
- if (DEFAULT_ABI == SYSV_ABI && regno == AX_REG)
+ if (ix86_abi == SYSV_ABI && regno == AX_REG)
return true;
- if (DEFAULT_ABI == MS_ABI)
+ if (ix86_abi == MS_ABI)
parm_regs = x86_64_ms_abi_int_parameter_registers;
else
parm_regs = x86_64_int_parameter_registers;
- for (i = 0; i < (DEFAULT_ABI == MS_ABI ? X64_REGPARM_MAX
+ for (i = 0; i < (ix86_abi == MS_ABI ? X64_REGPARM_MAX
: X86_64_REGPARM_MAX); i++)
if (regno == parm_regs[i])
return true;
@@ -4549,7 +4567,7 @@ ix86_must_pass_in_stack (enum machine_mode mode, const_tree type)
int
ix86_reg_parm_stack_space (const_tree fndecl)
{
- int call_abi = SYSV_ABI;
+ enum calling_abi call_abi = SYSV_ABI;
if (fndecl != NULL_TREE && TREE_CODE (fndecl) == FUNCTION_DECL)
call_abi = ix86_function_abi (fndecl);
else
@@ -4561,37 +4579,39 @@ ix86_reg_parm_stack_space (const_tree fndecl)
/* Returns value SYSV_ABI, MS_ABI dependent on fntype, specifying the
call abi used. */
-int
+enum calling_abi
ix86_function_type_abi (const_tree fntype)
{
if (TARGET_64BIT && fntype != NULL)
{
- int abi;
- if (DEFAULT_ABI == SYSV_ABI)
- abi = lookup_attribute ("ms_abi", TYPE_ATTRIBUTES (fntype)) ? MS_ABI : SYSV_ABI;
- else
- abi = lookup_attribute ("sysv_abi", TYPE_ATTRIBUTES (fntype)) ? SYSV_ABI : MS_ABI;
-
+ enum calling_abi abi = ix86_abi;
+ if (abi == SYSV_ABI)
+ {
+ if (lookup_attribute ("ms_abi", TYPE_ATTRIBUTES (fntype)))
+ abi = MS_ABI;
+ }
+ else if (lookup_attribute ("sysv_abi", TYPE_ATTRIBUTES (fntype)))
+ abi = SYSV_ABI;
return abi;
}
- return DEFAULT_ABI;
+ return ix86_abi;
}
-int
+static enum calling_abi
ix86_function_abi (const_tree fndecl)
{
if (! fndecl)
- return DEFAULT_ABI;
+ return ix86_abi;
return ix86_function_type_abi (TREE_TYPE (fndecl));
}
/* Returns value SYSV_ABI, MS_ABI dependent on cfun, specifying the
call abi used. */
-int
+enum calling_abi
ix86_cfun_abi (void)
{
if (! cfun || ! TARGET_64BIT)
- return DEFAULT_ABI;
+ return ix86_abi;
return cfun->machine->call_abi;
}
@@ -4605,7 +4625,7 @@ void
ix86_call_abi_override (const_tree fndecl)
{
if (fndecl == NULL_TREE)
- cfun->machine->call_abi = DEFAULT_ABI;
+ cfun->machine->call_abi = ix86_abi;
else
cfun->machine->call_abi = ix86_function_type_abi (TREE_TYPE (fndecl));
}
@@ -4617,7 +4637,7 @@ static void
ix86_maybe_switch_abi (void)
{
if (TARGET_64BIT &&
- call_used_regs[4 /*RSI*/] == (cfun->machine->call_abi == MS_ABI))
+ call_used_regs[SI_REG] == (cfun->machine->call_abi == MS_ABI))
reinit_regs ();
}
@@ -4645,8 +4665,8 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */
cum->nregs = ix86_regparm;
if (TARGET_64BIT)
{
- if (cum->call_abi != DEFAULT_ABI)
- cum->nregs = DEFAULT_ABI != SYSV_ABI ? X86_64_REGPARM_MAX
+ if (cum->call_abi != ix86_abi)
+ cum->nregs = ix86_abi != SYSV_ABI ? X86_64_REGPARM_MAX
: X64_REGPARM_MAX;
}
if (TARGET_SSE)
@@ -4654,8 +4674,8 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */
cum->sse_nregs = SSE_REGPARM_MAX;
if (TARGET_64BIT)
{
- if (cum->call_abi != DEFAULT_ABI)
- cum->sse_nregs = DEFAULT_ABI != SYSV_ABI ? X86_64_SSE_REGPARM_MAX
+ if (cum->call_abi != ix86_abi)
+ cum->sse_nregs = ix86_abi != SYSV_ABI ? X86_64_SSE_REGPARM_MAX
: X64_SSE_REGPARM_MAX;
}
}
@@ -4922,8 +4942,30 @@ classify_argument (enum machine_mode mode, const_tree type,
}
else
{
- num = classify_argument (TYPE_MODE (TREE_TYPE (field)),
- TREE_TYPE (field), subclasses,
+ type = TREE_TYPE (field);
+
+ /* Flexible array member is ignored. */
+ if (TYPE_MODE (type) == BLKmode
+ && TREE_CODE (type) == ARRAY_TYPE
+ && TYPE_SIZE (type) == NULL_TREE
+ && TYPE_DOMAIN (type) != NULL_TREE
+ && (TYPE_MAX_VALUE (TYPE_DOMAIN (type))
+ == NULL_TREE))
+ {
+ static bool warned;
+
+ if (!warned && warn_psabi)
+ {
+ warned = true;
+ inform (input_location,
+ "The ABI of passing struct with"
+ " a flexible array member has"
+ " changed in GCC 4.4");
+ }
+ continue;
+ }
+ num = classify_argument (TYPE_MODE (type), type,
+ subclasses,
(int_bit_position (field)
+ bit_offset) % 256);
if (!num)
@@ -5581,7 +5623,7 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
if (type)
mode = type_natural_mode (type, NULL);
- if (TARGET_64BIT && (cum ? cum->call_abi : DEFAULT_ABI) == MS_ABI)
+ if (TARGET_64BIT && (cum ? cum->call_abi : ix86_abi) == MS_ABI)
function_arg_advance_ms_64 (cum, bytes, words);
else if (TARGET_64BIT)
function_arg_advance_64 (cum, mode, type, words, named);
@@ -5727,9 +5769,9 @@ function_arg_64 (CUMULATIVE_ARGS *cum, enum machine_mode mode,
if (mode == VOIDmode)
return GEN_INT (cum->maybe_vaarg
? (cum->sse_nregs < 0
- ? (cum->call_abi == DEFAULT_ABI
+ ? (cum->call_abi == ix86_abi
? SSE_REGPARM_MAX
- : (DEFAULT_ABI != SYSV_ABI ? X86_64_SSE_REGPARM_MAX
+ : (ix86_abi != SYSV_ABI ? X86_64_SSE_REGPARM_MAX
: X64_SSE_REGPARM_MAX))
: cum->sse_regno)
: -1);
@@ -5823,7 +5865,7 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode omode,
if (type && TREE_CODE (type) == VECTOR_TYPE)
mode = type_natural_mode (type, cum);
- if (TARGET_64BIT && (cum ? cum->call_abi : DEFAULT_ABI) == MS_ABI)
+ if (TARGET_64BIT && (cum ? cum->call_abi : ix86_abi) == MS_ABI)
return function_arg_ms_64 (cum, mode, omode, named, bytes);
else if (TARGET_64BIT)
return function_arg_64 (cum, mode, omode, type, named);
@@ -5843,7 +5885,7 @@ ix86_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
/* See Windows x64 Software Convention. */
- if (TARGET_64BIT && (cum ? cum->call_abi : DEFAULT_ABI) == MS_ABI)
+ if (TARGET_64BIT && (cum ? cum->call_abi : ix86_abi) == MS_ABI)
{
int msize = (int) GET_MODE_SIZE (mode);
if (type)
@@ -5983,7 +6025,7 @@ ix86_function_value_regno_p (int regno)
/* TODO: The function should depend on current function ABI but
builtins.c would need updating then. Therefore we use the
default ABI. */
- if (TARGET_64BIT && DEFAULT_ABI == MS_ABI)
+ if (TARGET_64BIT && ix86_abi == MS_ABI)
return false;
return TARGET_FLOAT_RETURNS_IN_80387;
@@ -6379,13 +6421,13 @@ ix86_build_builtin_va_list_abi (enum calling_abi abi)
static tree
ix86_build_builtin_va_list (void)
{
- tree ret = ix86_build_builtin_va_list_abi (DEFAULT_ABI);
+ tree ret = ix86_build_builtin_va_list_abi (ix86_abi);
/* Initialize abi specific va_list builtin types. */
if (TARGET_64BIT)
{
tree t;
- if (DEFAULT_ABI == MS_ABI)
+ if (ix86_abi == MS_ABI)
{
t = ix86_build_builtin_va_list_abi (SYSV_ABI);
if (TREE_CODE (t) != RECORD_TYPE)
@@ -6399,7 +6441,7 @@ ix86_build_builtin_va_list (void)
t = build_variant_type_copy (t);
sysv_va_list_type_node = t;
}
- if (DEFAULT_ABI != MS_ABI)
+ if (ix86_abi != MS_ABI)
{
t = ix86_build_builtin_va_list_abi (MS_ABI);
if (TREE_CODE (t) != RECORD_TYPE)
@@ -6432,8 +6474,8 @@ setup_incoming_varargs_64 (CUMULATIVE_ARGS *cum)
int i;
int regparm = ix86_regparm;
- if (cum->call_abi != DEFAULT_ABI)
- regparm = DEFAULT_ABI != SYSV_ABI ? X86_64_REGPARM_MAX : X64_REGPARM_MAX;
+ if (cum->call_abi != ix86_abi)
+ regparm = ix86_abi != SYSV_ABI ? X86_64_REGPARM_MAX : X64_REGPARM_MAX;
/* GPR size of varargs save area. */
if (cfun->va_list_gpr_size)
@@ -6586,7 +6628,7 @@ is_va_list_char_pointer (tree type)
return true;
canonic = ix86_canonical_va_list_type (type);
return (canonic == ms_va_list_type_node
- || (DEFAULT_ABI == MS_ABI && canonic == va_list_type_node));
+ || (ix86_abi == MS_ABI && canonic == va_list_type_node));
}
/* Implement va_start. */
@@ -12632,10 +12674,9 @@ ix86_expand_push (enum machine_mode mode, rtx x)
tmp = gen_rtx_MEM (mode, stack_pointer_rtx);
/* When we push an operand onto stack, it has to be aligned at least
- at the function argument boundary. */
- set_mem_align (tmp,
- ix86_function_arg_boundary (mode, NULL_TREE));
-
+ at the function argument boundary. However since we don't have
+ the argument type, we can't determine the actual argument
+ boundary. */
emit_move_insn (tmp, x);
}
@@ -18617,12 +18658,7 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
rtx pop, int sibcall)
{
rtx use = NULL, call;
- enum calling_abi function_call_abi;
- if (callarg2 && INTVAL (callarg2) == -2)
- function_call_abi = MS_ABI;
- else
- function_call_abi = SYSV_ABI;
if (pop == const0_rtx)
pop = NULL;
gcc_assert (!TARGET_64BIT || !pop);
@@ -18678,14 +18714,19 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
pop = gen_rtx_PLUS (Pmode, stack_pointer_rtx, pop);
pop = gen_rtx_SET (VOIDmode, stack_pointer_rtx, pop);
call = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, call, pop));
- gcc_assert (ix86_cfun_abi () != MS_ABI || function_call_abi != SYSV_ABI);
}
- /* We need to represent that SI and DI registers are clobbered
- by SYSV calls. */
- if (ix86_cfun_abi () == MS_ABI && function_call_abi == SYSV_ABI)
- {
- static int clobbered_registers[] = {27, 28, 45, 46, 47, 48, 49, 50, 51,
- 52, SI_REG, DI_REG};
+ if (TARGET_64BIT
+ && ix86_cfun_abi () == MS_ABI
+ && (!callarg2 || INTVAL (callarg2) != -2))
+ {
+ /* We need to represent that SI and DI registers are clobbered
+ by SYSV calls. */
+ static int clobbered_registers[] = {
+ XMM6_REG, XMM7_REG, XMM8_REG,
+ XMM9_REG, XMM10_REG, XMM11_REG,
+ XMM12_REG, XMM13_REG, XMM14_REG,
+ XMM15_REG, SI_REG, DI_REG
+ };
unsigned int i;
rtx vec[ARRAY_SIZE (clobbered_registers) + 2];
rtx unspec = gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, const0_rtx),
@@ -18724,7 +18765,7 @@ ix86_init_machine_status (void)
f = GGC_CNEW (struct machine_function);
f->use_fast_prologue_epilogue_nregs = -1;
f->tls_descriptor_call_expanded_p = 0;
- f->call_abi = DEFAULT_ABI;
+ f->call_abi = ix86_abi;
return f;
}
@@ -19051,41 +19092,21 @@ ix86_flags_dependent (rtx insn, rtx dep_insn, enum attr_type insn_type)
return 1;
}
-/* A subroutine of ix86_adjust_cost -- return true iff INSN has a memory
- address with operands set by DEP_INSN. */
+/* Return true iff USE_INSN has a memory address with operands set by
+ SET_INSN. */
-static int
-ix86_agi_dependent (rtx insn, rtx dep_insn, enum attr_type insn_type)
+bool
+ix86_agi_dependent (rtx set_insn, rtx use_insn)
{
- rtx addr;
-
- if (insn_type == TYPE_LEA
- && TARGET_PENTIUM)
- {
- addr = PATTERN (insn);
-
- if (GET_CODE (addr) == PARALLEL)
- addr = XVECEXP (addr, 0, 0);
-
- gcc_assert (GET_CODE (addr) == SET);
-
- addr = SET_SRC (addr);
- }
- else
- {
- int i;
- extract_insn_cached (insn);
- for (i = recog_data.n_operands - 1; i >= 0; --i)
- if (MEM_P (recog_data.operand[i]))
- {
- addr = XEXP (recog_data.operand[i], 0);
- goto found;
- }
- return 0;
- found:;
- }
-
- return modified_in_p (addr, dep_insn);
+ int i;
+ extract_insn_cached (use_insn);
+ for (i = recog_data.n_operands - 1; i >= 0; --i)
+ if (MEM_P (recog_data.operand[i]))
+ {
+ rtx addr = XEXP (recog_data.operand[i], 0);
+ return modified_in_p (addr, set_insn) != 0;
+ }
+ return false;
}
static int
@@ -19113,7 +19134,20 @@ ix86_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
{
case PROCESSOR_PENTIUM:
/* Address Generation Interlock adds a cycle of latency. */
- if (ix86_agi_dependent (insn, dep_insn, insn_type))
+ if (insn_type == TYPE_LEA)
+ {
+ rtx addr = PATTERN (insn);
+
+ if (GET_CODE (addr) == PARALLEL)
+ addr = XVECEXP (addr, 0, 0);
+
+ gcc_assert (GET_CODE (addr) == SET);
+
+ addr = SET_SRC (addr);
+ if (modified_in_p (addr, dep_insn))
+ cost += 1;
+ }
+ else if (ix86_agi_dependent (dep_insn, insn))
cost += 1;
/* ??? Compares pair with jump/setcc. */
@@ -19123,7 +19157,7 @@ ix86_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
/* Floating point stores require value to be ready one cycle earlier. */
if (insn_type == TYPE_FMOV
&& get_attr_memory (insn) == MEMORY_STORE
- && !ix86_agi_dependent (insn, dep_insn, insn_type))
+ && !ix86_agi_dependent (dep_insn, insn))
cost += 1;
break;
@@ -19146,7 +19180,7 @@ ix86_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
in parallel with previous instruction in case
previous instruction is not needed to compute the address. */
if ((memory == MEMORY_LOAD || memory == MEMORY_BOTH)
- && !ix86_agi_dependent (insn, dep_insn, insn_type))
+ && !ix86_agi_dependent (dep_insn, insn))
{
/* Claim moves to take one cycle, as core can issue one load
at time and the next load can start cycle later. */
@@ -19175,7 +19209,7 @@ ix86_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
in parallel with previous instruction in case
previous instruction is not needed to compute the address. */
if ((memory == MEMORY_LOAD || memory == MEMORY_BOTH)
- && !ix86_agi_dependent (insn, dep_insn, insn_type))
+ && !ix86_agi_dependent (dep_insn, insn))
{
/* Claim moves to take one cycle, as core can issue one load
at time and the next load can start cycle later. */
@@ -19200,7 +19234,7 @@ ix86_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
in parallel with previous instruction in case
previous instruction is not needed to compute the address. */
if ((memory == MEMORY_LOAD || memory == MEMORY_BOTH)
- && !ix86_agi_dependent (insn, dep_insn, insn_type))
+ && !ix86_agi_dependent (dep_insn, insn))
{
enum attr_unit unit = get_attr_unit (insn);
int loadcost = 3;
@@ -19342,15 +19376,39 @@ ix86_data_alignment (tree type, int align)
return align;
}
-/* Compute the alignment for a local variable or a stack slot. TYPE is
- the data type, MODE is the widest mode available and ALIGN is the
- alignment that the object would ordinarily have. The value of this
- macro is used instead of that alignment to align the object. */
+/* Compute the alignment for a local variable or a stack slot. EXP is
+ the data type or decl itself, MODE is the widest mode available and
+ ALIGN is the alignment that the object would ordinarily have. The
+ value of this macro is used instead of that alignment to align the
+ object. */
unsigned int
-ix86_local_alignment (tree type, enum machine_mode mode,
+ix86_local_alignment (tree exp, enum machine_mode mode,
unsigned int align)
{
+ tree type, decl;
+
+ if (exp && DECL_P (exp))
+ {
+ type = TREE_TYPE (exp);
+ decl = exp;
+ }
+ else
+ {
+ type = exp;
+ decl = NULL;
+ }
+
+ /* Don't do dynamic stack realignment for long long objects with
+ -mpreferred-stack-boundary=2. */
+ if (!TARGET_64BIT
+ && align == 64
+ && ix86_preferred_stack_boundary < 64
+ && (mode == DImode || (type && TYPE_MODE (type) == DImode))
+ && (!type || !TYPE_USER_ALIGN (type))
+ && (!decl || !DECL_USER_ALIGN (decl)))
+ align = 32;
+
/* If TYPE is NULL, we are allocating a stack slot for caller-save
register in MODE. We will return the largest alignment of XF
and DF. */
@@ -20182,6 +20240,7 @@ enum ix86_builtins
/* TFmode support builtins. */
IX86_BUILTIN_INFQ,
+ IX86_BUILTIN_HUGE_VALQ,
IX86_BUILTIN_FABSQ,
IX86_BUILTIN_COPYSIGNQ,
@@ -23350,6 +23409,11 @@ ix86_init_builtins (void)
NULL, NULL_TREE);
ix86_builtins[(int) IX86_BUILTIN_INFQ] = decl;
+ decl = add_builtin_function ("__builtin_huge_valq", ftype,
+ IX86_BUILTIN_HUGE_VALQ, BUILT_IN_MD,
+ NULL, NULL_TREE);
+ ix86_builtins[(int) IX86_BUILTIN_HUGE_VALQ] = decl;
+
/* We will expand them to normal call if SSE2 isn't available since
they are used by libgcc. */
ftype = build_function_type_list (float128_type_node,
@@ -24805,6 +24869,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
return ix86_expand_vec_set_builtin (exp);
case IX86_BUILTIN_INFQ:
+ case IX86_BUILTIN_HUGE_VALQ:
{
REAL_VALUE_TYPE inf;
rtx tmp;
@@ -25757,7 +25822,7 @@ ix86_hard_regno_mode_ok (int regno, enum machine_mode mode)
{
/* Take care for QImode values - they can be in non-QI regs,
but then they do cause partial register stalls. */
- if (regno < 4 || TARGET_64BIT)
+ if (regno <= BX_REG || TARGET_64BIT)
return 1;
if (!TARGET_PARTIAL_REG_STALL)
return 1;
@@ -26869,7 +26934,7 @@ x86_extended_QIreg_mentioned_p (rtx insn)
extract_insn_cached (insn);
for (i = 0; i < recog_data.n_operands; i++)
if (REG_P (recog_data.operand[i])
- && REGNO (recog_data.operand[i]) >= 4)
+ && REGNO (recog_data.operand[i]) > BX_REG)
return true;
return false;
}
@@ -29419,14 +29484,11 @@ x86_builtin_vectorization_cost (bool runtime_test)
tree
ix86_fn_abi_va_list (tree fndecl)
{
- int abi;
-
if (!TARGET_64BIT)
return va_list_type_node;
gcc_assert (fndecl != NULL_TREE);
- abi = ix86_function_abi ((const_tree) fndecl);
- if (abi == MS_ABI)
+ if (ix86_function_abi ((const_tree) fndecl) == MS_ABI)
return ms_va_list_type_node;
else
return sysv_va_list_type_node;
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 48ee1ff8569..89e26f63dde 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -465,7 +465,10 @@ enum calling_abi
MS_ABI = 1
};
-/* The default abi form used by target. */
+/* The abi used by target. */
+extern enum calling_abi ix86_abi;
+
+/* The default abi used by target. */
#define DEFAULT_ABI SYSV_ABI
/* Subtargets may reset this to 1 in order to enable 96-bit long double
@@ -667,7 +670,7 @@ enum target_cpu_default
/* Boundary (in *bits*) on which stack pointer should be aligned. */
#define STACK_BOUNDARY \
- (TARGET_64BIT && DEFAULT_ABI == MS_ABI ? 128 : BITS_PER_WORD)
+ (TARGET_64BIT && ix86_abi == MS_ABI ? 128 : BITS_PER_WORD)
/* Stack boundary of the main function guaranteed by OS. */
#define MAIN_STACK_BOUNDARY (TARGET_64BIT ? 128 : 32)
@@ -805,6 +808,19 @@ enum target_cpu_default
#define STACK_SLOT_ALIGNMENT(TYPE, MODE, ALIGN) \
ix86_local_alignment ((TYPE), (MODE), (ALIGN))
+/* If defined, a C expression to compute the alignment for a local
+ variable DECL.
+
+ If this macro is not defined, then
+ LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL)) will be used.
+
+ One use of this macro is to increase alignment of medium-size
+ data to make it all fit in fewer cache lines. */
+
+#define LOCAL_DECL_ALIGNMENT(DECL) \
+ ix86_local_alignment ((DECL), VOIDmode, DECL_ALIGN (DECL))
+
+
/* If defined, a C expression that gives the alignment boundary, in
bits, of an argument with the specified mode and type. If it is
not defined, `PARM_BOUNDARY' is used for all arguments. */
@@ -873,7 +889,7 @@ enum target_cpu_default
1, 1, 1, 1, 1, \
/*xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7*/ \
0, 0, 0, 0, 0, 0, 0, 0, \
-/*mmx0,mmx1,mmx2,mmx3,mmx4,mmx5,mmx6,mmx7*/ \
+/* mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7*/ \
0, 0, 0, 0, 0, 0, 0, 0, \
/* r8, r9, r10, r11, r12, r13, r14, r15*/ \
2, 2, 2, 2, 2, 2, 2, 2, \
@@ -901,7 +917,7 @@ enum target_cpu_default
1, 1, 1, 1, 1, \
/*xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7*/ \
1, 1, 1, 1, 1, 1, 1, 1, \
-/*mmx0,mmx1,mmx2,mmx3,mmx4,mmx5,mmx6,mmx7*/ \
+/* mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7*/ \
1, 1, 1, 1, 1, 1, 1, 1, \
/* r8, r9, r10, r11, r12, r13, r14, r15*/ \
1, 1, 1, 1, 2, 2, 2, 2, \
@@ -947,47 +963,32 @@ do { \
} \
j = PIC_OFFSET_TABLE_REGNUM; \
if (j != INVALID_REGNUM) \
- { \
- fixed_regs[j] = 1; \
- call_used_regs[j] = 1; \
- } \
+ fixed_regs[j] = call_used_regs[j] = 1; \
if (TARGET_64BIT \
- && ((cfun && cfun->machine->call_abi == MS_ABI) \
- || (!cfun && DEFAULT_ABI == MS_ABI))) \
+ && ((cfun && cfun->machine->call_abi == MS_ABI) \
+ || (!cfun && ix86_abi == MS_ABI))) \
{ \
- int i; \
- call_used_regs[4 /*RSI*/] = 0; \
- call_used_regs[5 /*RDI*/] = 0; \
- for (i = 0; i < 8; i++) \
- call_used_regs[45+i] = 0; \
- call_used_regs[27] = call_used_regs[28] = 0; \
+ call_used_regs[SI_REG] = 0; \
+ call_used_regs[DI_REG] = 0; \
+ call_used_regs[XMM6_REG] = 0; \
+ call_used_regs[XMM7_REG] = 0; \
+ for (i = FIRST_REX_SSE_REG; i <= LAST_REX_SSE_REG; i++) \
+ call_used_regs[i] = 0; \
} \
if (! TARGET_MMX) \
- { \
- int i; \
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) \
- if (TEST_HARD_REG_BIT (reg_class_contents[(int)MMX_REGS], i)) \
- fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = ""; \
- } \
+ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) \
+ if (TEST_HARD_REG_BIT (reg_class_contents[(int)MMX_REGS], i)) \
+ fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = ""; \
if (! TARGET_SSE) \
- { \
- int i; \
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) \
- if (TEST_HARD_REG_BIT (reg_class_contents[(int)SSE_REGS], i)) \
- fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = ""; \
- } \
- if (! TARGET_80387 && ! TARGET_FLOAT_RETURNS_IN_80387) \
- { \
- int i; \
- HARD_REG_SET x; \
- COPY_HARD_REG_SET (x, reg_class_contents[(int)FLOAT_REGS]); \
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) \
- if (TEST_HARD_REG_BIT (x, i)) \
- fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = ""; \
- } \
+ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) \
+ if (TEST_HARD_REG_BIT (reg_class_contents[(int)SSE_REGS], i)) \
+ fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = ""; \
+ if (! (TARGET_80387 || TARGET_FLOAT_RETURNS_IN_80387)) \
+ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) \
+ if (TEST_HARD_REG_BIT (reg_class_contents[(int)FLOAT_REGS], i)) \
+ fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = ""; \
if (! TARGET_64BIT) \
{ \
- int i; \
for (i = FIRST_REX_INT_REG; i <= LAST_REX_INT_REG; i++) \
reg_names[i] = ""; \
for (i = FIRST_REX_SSE_REG; i <= LAST_REX_SSE_REG; i++) \
@@ -1102,7 +1103,7 @@ do { \
: (MODE) == VOIDmode && (NREGS) != 1 ? VOIDmode \
: (MODE) == VOIDmode ? choose_hard_reg_mode ((REGNO), (NREGS), false) \
: (MODE) == HImode && !TARGET_PARTIAL_REG_STALL ? SImode \
- : (MODE) == QImode && (REGNO) >= 4 && !TARGET_64BIT ? SImode \
+ : (MODE) == QImode && (REGNO) > BX_REG && !TARGET_64BIT ? SImode \
: (MODE))
/* Specify the registers used for certain standard purposes.
@@ -1339,7 +1340,7 @@ enum reg_class
#define SMALL_REGISTER_CLASSES 1
-#define QI_REG_P(X) (REG_P (X) && REGNO (X) < 4)
+#define QI_REG_P(X) (REG_P (X) && REGNO (X) <= BX_REG)
#define GENERAL_REGNO_P(N) \
((N) <= STACK_POINTER_REGNUM || REX_INT_REGNO_P (N))
@@ -1537,7 +1538,8 @@ enum reg_class
prologue and apilogue. This is not possible without
ACCUMULATE_OUTGOING_ARGS. */
-#define ACCUMULATE_OUTGOING_ARGS (TARGET_ACCUMULATE_OUTGOING_ARGS || ix86_cfun_abi () == MS_ABI)
+#define ACCUMULATE_OUTGOING_ARGS \
+ (TARGET_ACCUMULATE_OUTGOING_ARGS || ix86_cfun_abi () == MS_ABI)
/* If defined, a C expression whose value is nonzero when we want to use PUSH
instructions to pass outgoing arguments. */
@@ -1624,7 +1626,7 @@ typedef struct ix86_args {
int maybe_vaarg; /* true for calls to possibly vardic fncts. */
int float_in_sse; /* 1 if in 32-bit mode SFmode (2 for DFmode) should
be passed in SSE registers. Otherwise 0. */
- int call_abi; /* Set to SYSV_ABI for sysv abi. Otherwise
+ enum calling_abi call_abi; /* Set to SYSV_ABI for sysv abi. Otherwise
MS_ABI for ms abi. */
} CUMULATIVE_ARGS;
@@ -2443,7 +2445,7 @@ struct machine_function GTY(())
int tls_descriptor_call_expanded_p;
/* This value is used for amd64 targets and specifies the current abi
to be used. MS_ABI means ms abi. Otherwise SYSV_ABI means sysv abi. */
- int call_abi;
+ enum calling_abi call_abi;
};
#define ix86_stack_locals (cfun->machine->stack_locals)
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 9c38ee848cd..9592f91ff7e 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -264,6 +264,14 @@
(DI_REG 5)
(BP_REG 6)
(SP_REG 7)
+ (ST0_REG 8)
+ (ST1_REG 9)
+ (ST2_REG 10)
+ (ST3_REG 11)
+ (ST4_REG 12)
+ (ST5_REG 13)
+ (ST6_REG 14)
+ (ST7_REG 15)
(FLAGS_REG 17)
(FPSR_REG 18)
(FPCR_REG 19)
@@ -275,6 +283,16 @@
(XMM5_REG 26)
(XMM6_REG 27)
(XMM7_REG 28)
+ (MM0_REG 29)
+ (MM1_REG 30)
+ (MM2_REG 31)
+ (MM3_REG 32)
+ (MM4_REG 33)
+ (MM5_REG 34)
+ (MM6_REG 35)
+ (MM7_REG 36)
+ (R8_REG 37)
+ (R9_REG 38)
(R10_REG 39)
(R11_REG 40)
(R13_REG 42)
@@ -4440,35 +4458,33 @@
(set_attr "mode" "SF")])
(define_insn "*truncdfsf_mixed"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=m,?fx*r,Y2")
+ [(set (match_operand:SF 0 "nonimmediate_operand" "=m,Y2 ,?f,?x,?*r")
(float_truncate:SF
- (match_operand:DF 1 "nonimmediate_operand" "f ,f ,Y2m")))
- (clobber (match_operand:SF 2 "memory_operand" "=X,m ,X"))]
+ (match_operand:DF 1 "nonimmediate_operand" "f ,Y2m,f ,f ,f")))
+ (clobber (match_operand:SF 2 "memory_operand" "=X,X ,m ,m ,m"))]
"TARGET_MIX_SSE_I387"
{
switch (which_alternative)
{
case 0:
return output_387_reg_move (insn, operands);
-
case 1:
- return "#";
- case 2:
return "%vcvtsd2ss\t{%1, %d0|%d0, %1}";
+
default:
- gcc_unreachable ();
+ return "#";
}
}
- [(set_attr "type" "fmov,multi,ssecvt")
- (set_attr "unit" "*,i387,*")
- (set_attr "prefix" "orig,orig,maybe_vex")
+ [(set_attr "type" "fmov,ssecvt,multi,multi,multi")
+ (set_attr "unit" "*,*,i387,i387,i387")
+ (set_attr "prefix" "orig,maybe_vex,orig,orig,orig")
(set_attr "mode" "SF")])
(define_insn "*truncdfsf_i387"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=m,?fx*r")
+ [(set (match_operand:SF 0 "nonimmediate_operand" "=m,?f,?x,?*r")
(float_truncate:SF
- (match_operand:DF 1 "nonimmediate_operand" "f,f")))
- (clobber (match_operand:SF 2 "memory_operand" "=X,m"))]
+ (match_operand:DF 1 "nonimmediate_operand" "f ,f ,f ,f")))
+ (clobber (match_operand:SF 2 "memory_operand" "=X,m ,m ,m"))]
"TARGET_80387"
{
switch (which_alternative)
@@ -4476,14 +4492,12 @@
case 0:
return output_387_reg_move (insn, operands);
- case 1:
- return "#";
default:
- gcc_unreachable ();
+ return "#";
}
}
- [(set_attr "type" "fmov,multi")
- (set_attr "unit" "*,i387")
+ [(set_attr "type" "fmov,multi,multi,multi")
+ (set_attr "unit" "*,i387,i387,i387")
(set_attr "mode" "SF")])
(define_insn "*truncdfsf2_i387_1"
@@ -4534,31 +4548,31 @@
})
(define_insn "*truncxfsf2_mixed"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=m,?fx*r")
+ [(set (match_operand:SF 0 "nonimmediate_operand" "=m,?f,?x,?*r")
(float_truncate:SF
- (match_operand:XF 1 "register_operand" "f,f")))
- (clobber (match_operand:SF 2 "memory_operand" "=X,m"))]
+ (match_operand:XF 1 "register_operand" "f ,f ,f ,f")))
+ (clobber (match_operand:SF 2 "memory_operand" "=X,m ,m ,m"))]
"TARGET_80387"
{
gcc_assert (!which_alternative);
return output_387_reg_move (insn, operands);
}
- [(set_attr "type" "fmov,multi")
- (set_attr "unit" "*,i387")
+ [(set_attr "type" "fmov,multi,multi,multi")
+ (set_attr "unit" "*,i387,i387,i387")
(set_attr "mode" "SF")])
(define_insn "*truncxfdf2_mixed"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=m,?fY2*r")
+ [(set (match_operand:DF 0 "nonimmediate_operand" "=m,?f,?Y2,?*r")
(float_truncate:DF
- (match_operand:XF 1 "register_operand" "f,f")))
- (clobber (match_operand:DF 2 "memory_operand" "=X,m"))]
+ (match_operand:XF 1 "register_operand" "f ,f ,f ,f")))
+ (clobber (match_operand:DF 2 "memory_operand" "=X,m ,m ,m"))]
"TARGET_80387"
{
gcc_assert (!which_alternative);
return output_387_reg_move (insn, operands);
}
- [(set_attr "type" "fmov,multi")
- (set_attr "unit" "*,i387")
+ [(set_attr "type" "fmov,multi,multi,multi")
+ (set_attr "unit" "*,i387,i387,i387")
(set_attr "mode" "DF")])
(define_insn "truncxf<mode>2_i387_noop"
@@ -15076,16 +15090,16 @@
[(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rsm"))
(match_operand 1 "" ""))
(unspec [(const_int 0)] UNSPEC_MS_TO_SYSV_CALL)
- (clobber (reg:TI 27))
- (clobber (reg:TI 28))
- (clobber (reg:TI 45))
- (clobber (reg:TI 46))
- (clobber (reg:TI 47))
- (clobber (reg:TI 48))
- (clobber (reg:TI 49))
- (clobber (reg:TI 50))
- (clobber (reg:TI 51))
- (clobber (reg:TI 52))
+ (clobber (reg:TI XMM6_REG))
+ (clobber (reg:TI XMM7_REG))
+ (clobber (reg:TI XMM8_REG))
+ (clobber (reg:TI XMM9_REG))
+ (clobber (reg:TI XMM10_REG))
+ (clobber (reg:TI XMM11_REG))
+ (clobber (reg:TI XMM12_REG))
+ (clobber (reg:TI XMM13_REG))
+ (clobber (reg:TI XMM14_REG))
+ (clobber (reg:TI XMM15_REG))
(clobber (reg:DI SI_REG))
(clobber (reg:DI DI_REG))]
"!SIBLING_CALL_P (insn) && TARGET_64BIT"
@@ -15172,13 +15186,19 @@
/* In order to give reg-stack an easier job in validating two
coprocessor registers as containing a possible return value,
simply pretend the untyped call returns a complex long double
- value. */
+ value.
+
+ We can't use SSE_REGPARM_MAX here since callee is unprototyped
+ and should have the default ABI. */
ix86_expand_call ((TARGET_FLOAT_RETURNS_IN_80387
? gen_rtx_REG (XCmode, FIRST_FLOAT_REG) : NULL),
operands[0], const0_rtx,
- GEN_INT ((DEFAULT_ABI == SYSV_ABI ? X86_64_SSE_REGPARM_MAX
- : X64_SSE_REGPARM_MAX)
+ GEN_INT ((TARGET_64BIT
+ ? (ix86_abi == SYSV_ABI
+ ? X86_64_SSE_REGPARM_MAX
+ : X64_SSE_REGPARM_MAX)
+ : X86_32_SSE_REGPARM_MAX)
- 1),
NULL, 0);
@@ -20834,7 +20854,7 @@
[(match_dup 0)
(match_operand:SI 2 "memory_operand" "")]))
(clobber (reg:CC FLAGS_REG))])]
- "operands[0] != operands[1]
+ "REGNO (operands[0]) != REGNO (operands[1])
&& GENERAL_REGNO_P (REGNO (operands[0]))
&& GENERAL_REGNO_P (REGNO (operands[1]))"
[(set (match_dup 0) (match_dup 4))
@@ -20850,7 +20870,7 @@
(match_operator 3 "commutative_operator"
[(match_dup 0)
(match_operand 2 "memory_operand" "")]))]
- "operands[0] != operands[1]
+ "REGNO (operands[0]) != REGNO (operands[1])
&& ((MMX_REG_P (operands[0]) && MMX_REG_P (operands[1]))
|| (SSE_REG_P (operands[0]) && SSE_REG_P (operands[1])))"
[(set (match_dup 0) (match_dup 2))
@@ -21544,16 +21564,16 @@
(call (mem:QI (match_operand:DI 1 "constant_call_address_operand" ""))
(match_operand:DI 2 "const_int_operand" "")))
(unspec [(const_int 0)] UNSPEC_MS_TO_SYSV_CALL)
- (clobber (reg:TI 27))
- (clobber (reg:TI 28))
- (clobber (reg:TI 45))
- (clobber (reg:TI 46))
- (clobber (reg:TI 47))
- (clobber (reg:TI 48))
- (clobber (reg:TI 49))
- (clobber (reg:TI 50))
- (clobber (reg:TI 51))
- (clobber (reg:TI 52))
+ (clobber (reg:TI XMM6_REG))
+ (clobber (reg:TI XMM7_REG))
+ (clobber (reg:TI XMM8_REG))
+ (clobber (reg:TI XMM9_REG))
+ (clobber (reg:TI XMM10_REG))
+ (clobber (reg:TI XMM11_REG))
+ (clobber (reg:TI XMM12_REG))
+ (clobber (reg:TI XMM13_REG))
+ (clobber (reg:TI XMM14_REG))
+ (clobber (reg:TI XMM15_REG))
(clobber (reg:DI SI_REG))
(clobber (reg:DI DI_REG))]
"!SIBLING_CALL_P (insn) && TARGET_64BIT"
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
index 853059081d2..6fd218f8ede 100644
--- a/gcc/config/i386/i386.opt
+++ b/gcc/config/i386/i386.opt
@@ -228,6 +228,10 @@ mtune=
Target RejectNegative Joined Var(ix86_tune_string)
Schedule code for given CPU
+mabi=
+Target RejectNegative Joined Var(ix86_abi_string)
+Generate code that conforms to the given ABI
+
mveclibabi=
Target RejectNegative Joined Var(ix86_veclibabi_string)
Vector library ABI to use
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
index f3fbe8c5865..746d7d105da 100644
--- a/gcc/config/i386/mingw32.h
+++ b/gcc/config/i386/mingw32.h
@@ -38,7 +38,7 @@ along with GCC; see the file COPYING3. If not see
builtin_define_std ("WINNT"); \
builtin_define_with_int_value ("_INTEGRAL_MAX_BITS", \
TYPE_PRECISION (intmax_type_node));\
- if (TARGET_64BIT && DEFAULT_ABI == MS_ABI) \
+ if (TARGET_64BIT && ix86_abi == MS_ABI) \
{ \
builtin_define ("__MINGW64__"); \
builtin_define_std ("WIN64"); \
diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index 870fc8855e7..5184b1d7f5c 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -1583,22 +1583,22 @@
(define_insn "mmx_emms"
[(unspec_volatile [(const_int 0)] UNSPECV_EMMS)
- (clobber (reg:XF 8))
- (clobber (reg:XF 9))
- (clobber (reg:XF 10))
- (clobber (reg:XF 11))
- (clobber (reg:XF 12))
- (clobber (reg:XF 13))
- (clobber (reg:XF 14))
- (clobber (reg:XF 15))
- (clobber (reg:DI 29))
- (clobber (reg:DI 30))
- (clobber (reg:DI 31))
- (clobber (reg:DI 32))
- (clobber (reg:DI 33))
- (clobber (reg:DI 34))
- (clobber (reg:DI 35))
- (clobber (reg:DI 36))]
+ (clobber (reg:XF ST0_REG))
+ (clobber (reg:XF ST1_REG))
+ (clobber (reg:XF ST2_REG))
+ (clobber (reg:XF ST3_REG))
+ (clobber (reg:XF ST4_REG))
+ (clobber (reg:XF ST5_REG))
+ (clobber (reg:XF ST6_REG))
+ (clobber (reg:XF ST7_REG))
+ (clobber (reg:DI MM0_REG))
+ (clobber (reg:DI MM1_REG))
+ (clobber (reg:DI MM2_REG))
+ (clobber (reg:DI MM3_REG))
+ (clobber (reg:DI MM4_REG))
+ (clobber (reg:DI MM5_REG))
+ (clobber (reg:DI MM6_REG))
+ (clobber (reg:DI MM7_REG))]
"TARGET_MMX"
"emms"
[(set_attr "type" "mmx")
@@ -1606,22 +1606,22 @@
(define_insn "mmx_femms"
[(unspec_volatile [(const_int 0)] UNSPECV_FEMMS)
- (clobber (reg:XF 8))
- (clobber (reg:XF 9))
- (clobber (reg:XF 10))
- (clobber (reg:XF 11))
- (clobber (reg:XF 12))
- (clobber (reg:XF 13))
- (clobber (reg:XF 14))
- (clobber (reg:XF 15))
- (clobber (reg:DI 29))
- (clobber (reg:DI 30))
- (clobber (reg:DI 31))
- (clobber (reg:DI 32))
- (clobber (reg:DI 33))
- (clobber (reg:DI 34))
- (clobber (reg:DI 35))
- (clobber (reg:DI 36))]
+ (clobber (reg:XF ST0_REG))
+ (clobber (reg:XF ST1_REG))
+ (clobber (reg:XF ST2_REG))
+ (clobber (reg:XF ST3_REG))
+ (clobber (reg:XF ST4_REG))
+ (clobber (reg:XF ST5_REG))
+ (clobber (reg:XF ST6_REG))
+ (clobber (reg:XF ST7_REG))
+ (clobber (reg:DI MM0_REG))
+ (clobber (reg:DI MM1_REG))
+ (clobber (reg:DI MM2_REG))
+ (clobber (reg:DI MM3_REG))
+ (clobber (reg:DI MM4_REG))
+ (clobber (reg:DI MM5_REG))
+ (clobber (reg:DI MM6_REG))
+ (clobber (reg:DI MM7_REG))]
"TARGET_3DNOW"
"femms"
[(set_attr "type" "mmx")
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index b2bef6470be..f1c71033333 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -887,6 +887,34 @@
return parts.disp != NULL_RTX;
})
+;; Returns 1 if OP is memory operand which will need zero or
+;; one register at most, not counting stack pointer or frame pointer.
+(define_predicate "cmpxchg8b_pic_memory_operand"
+ (match_operand 0 "memory_operand")
+{
+ struct ix86_address parts;
+ int ok;
+
+ ok = ix86_decompose_address (XEXP (op, 0), &parts);
+ gcc_assert (ok);
+ if (parts.base == NULL_RTX
+ || parts.base == arg_pointer_rtx
+ || parts.base == frame_pointer_rtx
+ || parts.base == hard_frame_pointer_rtx
+ || parts.base == stack_pointer_rtx)
+ return 1;
+
+ if (parts.index == NULL_RTX
+ || parts.index == arg_pointer_rtx
+ || parts.index == frame_pointer_rtx
+ || parts.index == hard_frame_pointer_rtx
+ || parts.index == stack_pointer_rtx)
+ return 1;
+
+ return 0;
+})
+
+
;; Returns 1 if OP is memory operand that cannot be represented
;; by the modRM array.
(define_predicate "long_memory_operand"
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index a54133378b5..e6d1fd14b2d 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -1101,7 +1101,7 @@
(match_operand:V8SF 1 "register_operand" "x")
(match_operand:V8SF 2 "nonimmediate_operand" "xm"))
(minus:V8SF (match_dup 1) (match_dup 2))
- (const_int 85)))]
+ (const_int 170)))]
"TARGET_AVX"
"vaddsubps\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "sseadd")
@@ -1115,7 +1115,7 @@
(match_operand:V4DF 1 "register_operand" "x")
(match_operand:V4DF 2 "nonimmediate_operand" "xm"))
(minus:V4DF (match_dup 1) (match_dup 2))
- (const_int 5)))]
+ (const_int 10)))]
"TARGET_AVX"
"vaddsubpd\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "sseadd")
@@ -1129,7 +1129,7 @@
(match_operand:V4SF 1 "register_operand" "x")
(match_operand:V4SF 2 "nonimmediate_operand" "xm"))
(minus:V4SF (match_dup 1) (match_dup 2))
- (const_int 5)))]
+ (const_int 10)))]
"TARGET_AVX"
"vaddsubps\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "sseadd")
@@ -1143,7 +1143,7 @@
(match_operand:V4SF 1 "register_operand" "0")
(match_operand:V4SF 2 "nonimmediate_operand" "xm"))
(minus:V4SF (match_dup 1) (match_dup 2))
- (const_int 5)))]
+ (const_int 10)))]
"TARGET_SSE3"
"addsubps\t{%2, %0|%0, %2}"
[(set_attr "type" "sseadd")
@@ -1157,7 +1157,7 @@
(match_operand:V2DF 1 "register_operand" "x")
(match_operand:V2DF 2 "nonimmediate_operand" "xm"))
(minus:V2DF (match_dup 1) (match_dup 2))
- (const_int 1)))]
+ (const_int 2)))]
"TARGET_AVX"
"vaddsubpd\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "sseadd")
@@ -1171,7 +1171,7 @@
(match_operand:V2DF 1 "register_operand" "0")
(match_operand:V2DF 2 "nonimmediate_operand" "xm"))
(minus:V2DF (match_dup 1) (match_dup 2))
- (const_int 1)))]
+ (const_int 2)))]
"TARGET_SSE3"
"addsubpd\t{%2, %0|%0, %2}"
[(set_attr "type" "sseadd")
@@ -3059,10 +3059,10 @@
(vec_concat:V16SF
(match_operand:V8SF 1 "register_operand" "x")
(match_operand:V8SF 2 "nonimmediate_operand" "xm"))
- (parallel [(const_int 2) (const_int 6)
- (const_int 3) (const_int 7)
- (const_int 10) (const_int 14)
- (const_int 11) (const_int 15)])))]
+ (parallel [(const_int 2) (const_int 10)
+ (const_int 3) (const_int 11)
+ (const_int 6) (const_int 14)
+ (const_int 7) (const_int 15)])))]
"TARGET_AVX"
"vunpckhps\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "sselog")
@@ -3102,10 +3102,10 @@
(vec_concat:V16SF
(match_operand:V8SF 1 "register_operand" "x")
(match_operand:V8SF 2 "nonimmediate_operand" "xm"))
- (parallel [(const_int 0) (const_int 4)
- (const_int 1) (const_int 5)
- (const_int 8) (const_int 12)
- (const_int 9) (const_int 13)])))]
+ (parallel [(const_int 0) (const_int 8)
+ (const_int 1) (const_int 9)
+ (const_int 4) (const_int 12)
+ (const_int 5) (const_int 13)])))]
"TARGET_AVX"
"vunpcklps\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "sselog")
@@ -3902,7 +3902,7 @@
(vec_concat:V8DF
(match_operand:V4DF 1 "register_operand" "x")
(match_operand:V4DF 2 "nonimmediate_operand" "xm"))
- (parallel [(const_int 2) (const_int 6)
+ (parallel [(const_int 1) (const_int 5)
(const_int 3) (const_int 7)])))]
"TARGET_AVX"
"vunpckhpd\t{%2, %1, %0|%0, %1, %2}"
@@ -4023,7 +4023,7 @@
(match_operand:V4DF 1 "register_operand" "x")
(match_operand:V4DF 2 "nonimmediate_operand" "xm"))
(parallel [(const_int 0) (const_int 4)
- (const_int 1) (const_int 5)])))]
+ (const_int 2) (const_int 6)])))]
"TARGET_AVX"
"vunpcklpd\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "sselog")
diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md
index e2675744b01..05aad00ba94 100644
--- a/gcc/config/i386/sync.md
+++ b/gcc/config/i386/sync.md
@@ -1,5 +1,5 @@
;; GCC machine description for i386 synchronization instructions.
-;; Copyright (C) 2005, 2006, 2007, 2008
+;; Copyright (C) 2005, 2006, 2007, 2008, 2009
;; Free Software Foundation, Inc.
;;
;; This file is part of GCC.
@@ -82,8 +82,15 @@
low = force_reg (hmode, low);
high = force_reg (hmode, high);
if (<MODE>mode == DImode)
- emit_insn (gen_sync_double_compare_and_swapdi
- (operands[0], operands[1], operands[2], low, high));
+ {
+ if (flag_pic && !cmpxchg8b_pic_memory_operand (operands[1], DImode))
+ operands[1] = replace_equiv_address (operands[1],
+ force_reg (Pmode,
+ XEXP (operands[1],
+ 0)));
+ emit_insn (gen_sync_double_compare_and_swapdi
+ (operands[0], operands[1], operands[2], low, high));
+ }
else if (<MODE>mode == TImode)
emit_insn (gen_sync_double_compare_and_swapti
(operands[0], operands[1], operands[2], low, high));
@@ -131,7 +138,7 @@
;; are just esi and edi.
(define_insn "*sync_double_compare_and_swapdi_pic"
[(set (match_operand:DI 0 "register_operand" "=A")
- (match_operand:DI 1 "memory_operand" "+m"))
+ (match_operand:DI 1 "cmpxchg8b_pic_memory_operand" "+m"))
(set (match_dup 1)
(unspec_volatile:DI
[(match_dup 1)
@@ -173,8 +180,15 @@
low = force_reg (hmode, low);
high = force_reg (hmode, high);
if (<MODE>mode == DImode)
- emit_insn (gen_sync_double_compare_and_swap_ccdi
- (operands[0], operands[1], operands[2], low, high));
+ {
+ if (flag_pic && !cmpxchg8b_pic_memory_operand (operands[1], DImode))
+ operands[1] = replace_equiv_address (operands[1],
+ force_reg (Pmode,
+ XEXP (operands[1],
+ 0)));
+ emit_insn (gen_sync_double_compare_and_swap_ccdi
+ (operands[0], operands[1], operands[2], low, high));
+ }
else if (<MODE>mode == TImode)
emit_insn (gen_sync_double_compare_and_swap_ccti
(operands[0], operands[1], operands[2], low, high));
@@ -224,7 +238,7 @@
;; operand 3.
(define_insn "*sync_double_compare_and_swap_ccdi_pic"
[(set (match_operand:DI 0 "register_operand" "=A")
- (match_operand:DI 1 "memory_operand" "+m"))
+ (match_operand:DI 1 "cmpxchg8b_pic_memory_operand" "+m"))
(set (match_dup 1)
(unspec_volatile:DI
[(match_dup 1)
diff --git a/gcc/config/i386/x-mingw32 b/gcc/config/i386/x-mingw32
index 7ae61522a56..0af4f5c3f41 100644
--- a/gcc/config/i386/x-mingw32
+++ b/gcc/config/i386/x-mingw32
@@ -8,6 +8,6 @@ local_includedir=$(libsubdir)/$(unlibsubdir)/..`echo $(exec_prefix) | sed -e 's|
WERROR_FLAGS += -Wno-format
host-mingw32.o : $(srcdir)/config/i386/host-mingw32.c $(CONFIG_H) $(SYSTEM_H) \
- coretypes.h hosthooks.h hosthooks-def.h toplev.h diagnostic.h $(HOOKS_H)
+ coretypes.h hosthooks.h hosthooks-def.h toplev.h $(DIAGNOSTIC_H) $(HOOKS_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/i386/host-mingw32.c
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 420a8e46327..da96fce6d4f 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -7274,6 +7274,8 @@ ia64_set_sched_flags (spec_info_t spec_info)
spec_info->flags |= COUNT_SPEC_IN_CRITICAL_PATH;
}
}
+ else
+ spec_info->mask = 0;
}
/* If INSN is an appropriate load return its mode.
diff --git a/gcc/config/ia64/sync.md b/gcc/config/ia64/sync.md
index e356081202e..b40e208b6a0 100644
--- a/gcc/config/ia64/sync.md
+++ b/gcc/config/ia64/sync.md
@@ -151,10 +151,10 @@
(unspec:I124MODE
[(match_dup 1)
(match_operand:DI 2 "ar_ccv_reg_operand" "")
- (match_operand:I124MODE 3 "gr_register_operand" "r")]
+ (match_operand:I124MODE 3 "gr_reg_or_0_operand" "rO")]
UNSPEC_CMPXCHG_ACQ))]
""
- "cmpxchg<modesuffix>.rel %0 = %1, %3, %2"
+ "cmpxchg<modesuffix>.rel %0 = %1, %r3, %2"
[(set_attr "itanium_class" "sem")])
(define_insn "cmpxchg_rel_di"
@@ -163,19 +163,19 @@
(set (match_dup 1)
(unspec:DI [(match_dup 1)
(match_operand:DI 2 "ar_ccv_reg_operand" "")
- (match_operand:DI 3 "gr_register_operand" "r")]
+ (match_operand:DI 3 "gr_reg_or_0_operand" "rO")]
UNSPEC_CMPXCHG_ACQ))]
""
- "cmpxchg8.rel %0 = %1, %3, %2"
+ "cmpxchg8.rel %0 = %1, %r3, %2"
[(set_attr "itanium_class" "sem")])
(define_insn "sync_lock_test_and_set<mode>"
[(set (match_operand:IMODE 0 "gr_register_operand" "=r")
(match_operand:IMODE 1 "not_postinc_memory_operand" "+S"))
(set (match_dup 1)
- (match_operand:IMODE 2 "gr_register_operand" "r"))]
+ (match_operand:IMODE 2 "gr_reg_or_0_operand" "rO"))]
""
- "xchg<modesuffix> %0 = %1, %2"
+ "xchg<modesuffix> %0 = %1, %r2"
[(set_attr "itanium_class" "sem")])
(define_expand "sync_lock_release<mode>"
diff --git a/gcc/config/libgloss.h b/gcc/config/libgloss.h
deleted file mode 100644
index 2e4553b3b42..00000000000
--- a/gcc/config/libgloss.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* libgloss.h -- operating system specific defines to be used when
- targeting GCC for Libgloss supported targets.
- Copyright (C) 1996, 2004, 2007 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/>. */
-
-/* This file should not be used for ELF targets, as this definition of
- STARTFILE_SPEC is all wrong. */
-
-/* The libgloss standard for crt0.s has the name based on the command line
- option. */
-#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%{!shared:%{pg:pgcrt0%O%s}%{!pg:%{p:pcrt0%O%s}%{!p:crt0%O%s}}}"
-
-/* This file used to force LINK_SPEC to be the null string, but that is not
- correct. LINK_SPEC is used to pass machine specific arguments to the
- linker and hence cannot be redefined here. LINK_SPEC is never used to
- specify startup files or libraries, so it should never conflict with
- libgloss. */
-
-/* Don't set the target flags, this is done by the linker script */
-#undef LIB_SPEC
-#define LIB_SPEC ""
diff --git a/gcc/config/m32r/t-linux b/gcc/config/m32r/t-linux
index 311c4e7ef9b..1ccdcc93473 100644
--- a/gcc/config/m32r/t-linux
+++ b/gcc/config/m32r/t-linux
@@ -27,10 +27,6 @@ dp-bit.c: $(srcdir)/config/fp-bit.c
CRTSTUFF_T_CFLAGS_S = -fPIC
-
-# Don't run fixproto
-STMP_FIXPROTO =
-
# Don't install "assert.h" in gcc. We use the one in glibc.
INSTALL_ASSERT_H =
diff --git a/gcc/config/m68k/coff.h b/gcc/config/m68k/coff.h
deleted file mode 100644
index cb548abd020..00000000000
--- a/gcc/config/m68k/coff.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Definitions of target machine for GNU compiler.
- m68k series COFF object files and debugging, version.
- Copyright (C) 1994, 1996, 1997, 2000, 2002, 2003, 2004, 2007
- 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/>. */
-
-/* This file is included after m68k.h by CPU COFF specific files. It
- is not a complete target itself. */
-
-/* Used in m68k.c to include required support code. */
-
-#define M68K_TARGET_COFF 1
-
-/* Generate sdb debugging information. */
-
-#define SDB_DEBUGGING_INFO 1
-
-/* COFF symbols don't start with an underscore. */
-
-#undef USER_LABEL_PREFIX
-#define USER_LABEL_PREFIX ""
-
-/* Use a prefix for local labels, just to be on the save side. */
-
-#undef LOCAL_LABEL_PREFIX
-#define LOCAL_LABEL_PREFIX "."
-
-/* Use a register prefix to avoid clashes with external symbols (classic
- example: `extern char PC;' in termcap). */
-
-#undef REGISTER_PREFIX
-#define REGISTER_PREFIX "%"
-
-/* config/m68k.md has an explicit reference to the program counter,
- prefix this by the register prefix. */
-
-#define ASM_RETURN_CASE_JUMP \
- do { \
- if (TARGET_COLDFIRE) \
- { \
- if (ADDRESS_REG_P (operands[0])) \
- return "jmp %%pc@(2,%0:l)"; \
- else \
- return "ext%.l %0\n\tjmp %%pc@(2,%0:l)"; \
- } \
- else \
- return "jmp %%pc@(2,%0:w)"; \
- } while (0)
-
-#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
-
-/* If defined, a C expression whose value is a string containing the
- assembler operation to identify the following data as uninitialized global
- data. */
-
-#define BSS_SECTION_ASM_OP "\t.section\t.bss"
-
-/* A C statement (sans semicolon) to output to the stdio stream
- FILE the assembler definition of uninitialized global DECL named
- NAME whose size is SIZE bytes and alignment is ALIGN bytes.
- Try to use asm_output_aligned_bss to implement this macro. */
-
-#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
- asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
-
-/* Switch into a generic section. */
-#undef TARGET_ASM_NAMED_SECTION
-#define TARGET_ASM_NAMED_SECTION m68k_coff_asm_named_section
-
-/* Don't assume anything about startfiles. */
-
-#undef STARTFILE_SPEC
-#define STARTFILE_SPEC ""
diff --git a/gcc/config/m68k/m68k-aout.h b/gcc/config/m68k/m68k-aout.h
deleted file mode 100644
index df2cdf7a44a..00000000000
--- a/gcc/config/m68k/m68k-aout.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Definitions of target machine for GNU compiler. "naked" 68020,
- a.out object files and debugging, version.
- Copyright (C) 1994, 1996, 2003, 2007 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/>. */
-
-#define DBX_DEBUGGING_INFO 1
-#undef SDB_DEBUGGING_INFO
-
-/* If defined, a C expression whose value is a string containing the
- assembler operation to identify the following data as uninitialized global
- data. */
-#define BSS_SECTION_ASM_OP "\t.bss"
-
-/* A C statement (sans semicolon) to output to the stdio stream
- FILE the assembler definition of uninitialized global DECL named
- NAME whose size is SIZE bytes. The variable ROUNDED
- is the size rounded up to whatever alignment the caller wants.
- Try to use asm_output_bss to implement this macro. */
-/* a.out files typically can't handle arbitrary variable alignments so
- define ASM_OUTPUT_BSS instead of ASM_OUTPUT_ALIGNED_BSS. */
-#define ASM_OUTPUT_BSS(FILE, DECL, NAME, SIZE, ROUNDED) \
- asm_output_bss ((FILE), (DECL), (NAME), (SIZE), (ROUNDED))
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 2f931c6be42..bccb8348a55 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -1,6 +1,6 @@
/* Subroutines for insn-output.c for Motorola 68000 family.
Copyright (C) 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2003, 2004, 2005, 2006, 2007, 2008
+ 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -134,9 +134,6 @@ static int m68k_sched_first_cycle_multipass_dfa_lookahead (void);
static bool m68k_handle_option (size_t, const char *, int);
static rtx find_addr_reg (rtx);
static const char *singlemove_string (rtx *);
-#ifdef M68K_TARGET_COFF
-static void m68k_coff_asm_named_section (const char *, unsigned int, tree);
-#endif /* M68K_TARGET_COFF */
static void m68k_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
HOST_WIDE_INT, tree);
static rtx m68k_struct_value_rtx (tree, int);
@@ -4336,26 +4333,6 @@ output_sibcall (rtx x)
return "jmp %a0";
}
-#ifdef M68K_TARGET_COFF
-
-/* Output assembly to switch to section NAME with attribute FLAGS. */
-
-static void
-m68k_coff_asm_named_section (const char *name, unsigned int flags,
- tree decl ATTRIBUTE_UNUSED)
-{
- char flagchar;
-
- if (flags & SECTION_WRITE)
- flagchar = 'd';
- else
- flagchar = 'x';
-
- fprintf (asm_out_file, "\t.section\t%s,\"%c\"\n", name, flagchar);
-}
-
-#endif /* M68K_TARGET_COFF */
-
static void
m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
diff --git a/gcc/config/m68k/t-rtems b/gcc/config/m68k/t-rtems
index 2b0750f0f05..0997afebc94 100644
--- a/gcc/config/m68k/t-rtems
+++ b/gcc/config/m68k/t-rtems
@@ -4,5 +4,6 @@ M68K_MLIB_CPU += && (match(MLIB, "^68") \
|| MLIB == "5206" \
|| MLIB == "5208" \
|| MLIB == "5307" \
+ || MLIB == "5329" \
|| MLIB == "5407" \
|| MLIB == "5475")
diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h
index 6e26d5e7b35..278c1b248ee 100644
--- a/gcc/config/mcore/mcore.h
+++ b/gcc/config/mcore/mcore.h
@@ -50,8 +50,6 @@
} \
while (0)
-/* If -m4align is ever re-enabled then add this line to the definition of CPP_SPEC
- %{!m4align:-D__MCORE_ALIGN_8__} %{m4align:-D__MCORE__ALIGN_4__}. */
#undef CPP_SPEC
#define CPP_SPEC "%{m210:%{mlittle-endian:%ethe m210 does not have little endian support}}"
@@ -67,7 +65,6 @@
#define TARGET_DEFAULT \
(MASK_HARDLIT \
- | MASK_8ALIGN \
| MASK_DIV \
| MASK_RELAX_IMM \
| MASK_M340 \
diff --git a/gcc/config/mcore/mcore.opt b/gcc/config/mcore/mcore.opt
index 1eae8901e6e..c445237301a 100644
--- a/gcc/config/mcore/mcore.opt
+++ b/gcc/config/mcore/mcore.opt
@@ -1,6 +1,6 @@
; Options for the Motorola MCore port of the compiler.
-; Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+; Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
@@ -26,18 +26,10 @@ m340
Target RejectNegative Report Mask(M340)
Generate code for the M*Core M340
-m4align
-Target RejectNegative Report InverseMask(8ALIGN)
-Set maximum alignment to 4
-
m4byte-functions
Target Report Mask(OVERALIGN_FUNC)
Force functions to be aligned to a 4 byte boundary
-m8align
-Target RejectNegative Report Mask(8ALIGN)
-Set maximum alignment to 8
-
mbig-endian
Target RejectNegative Report InverseMask(LITTLE_END)
Generate big-endian code
@@ -60,7 +52,8 @@ Generate little-endian code
; Not used by the compiler proper.
mno-lsim
-Target RejectNegative Undocumented
+Target RejectNegative
+Assume that run-time support has been provided, so omit -lsim from the linker command line
mrelax-immediates
Target Report Mask(RELAX_IMM)
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 64da58a7f12..f153d137411 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -7782,7 +7782,7 @@ mips_mdebug_abi_name (void)
case ABI_N32:
return "abiN32";
case ABI_64:
- return "abiN64";
+ return "abi64";
case ABI_EABI:
return TARGET_64BIT ? "eabi64" : "eabi32";
default:
diff --git a/gcc/config/mips/t-iris b/gcc/config/mips/t-iris
index 4a7143f9ddd..a200cf8c19c 100644
--- a/gcc/config/mips/t-iris
+++ b/gcc/config/mips/t-iris
@@ -1,6 +1,3 @@
-# Find all of the declarations from the header files
-FIXPROTO_DEFINES = -D__EXTENSIONS__ -D_SGI_SOURCE -D_LANGUAGE_C_PLUS_PLUS
-
$(T)irix-crti.o: $(srcdir)/config/mips/irix-crti.asm $(GCC_PASSES)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
-c -o $@ -x assembler-with-cpp $<
diff --git a/gcc/config/pa/t-pa-hpux b/gcc/config/pa/t-pa-hpux
index 1c62f4ee237..63eab636200 100644
--- a/gcc/config/pa/t-pa-hpux
+++ b/gcc/config/pa/t-pa-hpux
@@ -1,6 +1,3 @@
-# So putenv and other functions get seen by fixproto.
-FIXPROTO_DEFINES = -D_HPUX_SOURCE -D_HIUX_SOURCE
-
lib2funcs.asm: $(srcdir)/config/pa/lib2funcs.asm
rm -f lib2funcs.asm
cp $(srcdir)/config/pa/lib2funcs.asm .
diff --git a/gcc/config/pdp11/2bsd.h b/gcc/config/pdp11/2bsd.h
deleted file mode 100644
index c96065a6490..00000000000
--- a/gcc/config/pdp11/2bsd.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Definitions of target machine for GNU compiler, for a PDP with 2BSD
- Copyright (C) 1995, 1996, 1999, 2000, 2007 Free Software Foundation, Inc.
- Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
-
-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/>. */
-
-#define TWO_BSD
-
-/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
- the stack pointer does not matter. The value is tested only in
- functions that have frame pointers.
- No definition is equivalent to always zero. */
-
-#undef EXIT_IGNORE_STACK
-#define EXIT_IGNORE_STACK 1
-
-#undef INITIAL_FRAME_POINTER_OFFSET
-#define INITIAL_FRAME_POINTER_OFFSET(DEPTH_VAR) \
-{ \
- int offset; \
- offset = get_frame_size(); \
- offset = (offset <= 2)? 0: (offset -2); \
- (DEPTH_VAR) = offset+10; \
-}
-
-/* Value should be nonzero if functions must have frame pointers.
- Zero means the frame pointer need not be set up (and parms
- may be accessed via the stack pointer) in functions that seem suitable.
- This is computed in `reload', in reload1.c.
- */
-
-#undef FRAME_POINTER_REQUIRED
-#define FRAME_POINTER_REQUIRED 1
-
-/* Offset within stack frame to start allocating local variables at.
- If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
- first local allocated. Otherwise, it is the offset to the BEGINNING
- of the first local allocated. */
-#undef STARTING_FRAME_OFFSET
-#define STARTING_FRAME_OFFSET -8
-
-
-#undef ASM_DECLARE_FUNCTION_NAME
-#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
-do { \
-ASM_OUTPUT_LABEL (STREAM, NAME); \
-fprintf (STREAM, "~~%s:\n", NAME); \
-} while (0)
-
-#undef TARGET_UNIX_ASM_DEFAULT
-#define TARGET_UNIX_ASM_DEFAULT MASK_UNIX_ASM
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c
index f6171356a12..6e8941d75e9 100644
--- a/gcc/config/pdp11/pdp11.c
+++ b/gcc/config/pdp11/pdp11.c
@@ -1,6 +1,6 @@
/* Subroutines for gcc2 for pdp11.
Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2004, 2005,
- 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
This file is part of GCC.
@@ -241,23 +241,6 @@ expand_shift_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
knowing which registers should not be saved even if used.
*/
-#ifdef TWO_BSD
-
-static void
-pdp11_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
-{
- fprintf (stream, "\tjsr r5, csv\n");
- if (size)
- {
- fprintf (stream, "\t/*abuse empty parameter slot for locals!*/\n");
- if (size > 2)
- asm_fprintf (stream, "\tsub $%#wo, sp\n", size - 2);
-
- }
-}
-
-#else /* !TWO_BSD */
-
static void
pdp11_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
{
@@ -331,8 +314,6 @@ pdp11_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
fprintf (stream, "\t;/* end of prologue */\n\n");
}
-#endif /* !TWO_BSD */
-
/*
The function epilogue should not depend on the current stack pointer!
It should use the frame pointer only. This is mandatory because
@@ -352,18 +333,6 @@ pdp11_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
maybe as option if you want to generate code for kernel mode? */
-#ifdef TWO_BSD
-
-static void
-pdp11_output_function_epilogue (FILE *stream,
- HOST_WIDE_INT size ATTRIBUTE_UNUSED)
-{
- fprintf (stream, "\t/* SP ignored by cret? */\n");
- fprintf (stream, "\tjmp cret\n");
-}
-
-#else /* !TWO_BSD */
-
static void
pdp11_output_function_epilogue (FILE *stream, HOST_WIDE_INT size)
{
@@ -469,8 +438,6 @@ pdp11_output_function_epilogue (FILE *stream, HOST_WIDE_INT size)
fprintf (stream, "\t;/* end of epilogue*/\n\n\n");
}
-#endif /* !TWO_BSD */
-
/* Return the best assembler insn template
for moving operands[1] into operands[0] as a fullword. */
static const char *
diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c
index b77b30186fc..e9b61563153 100644
--- a/gcc/config/picochip/picochip.c
+++ b/gcc/config/picochip/picochip.c
@@ -3898,23 +3898,6 @@ picochip_generate_halt (void)
return const0_rtx;
}
-static rtx
-picochip_generate_profile (tree arglist)
-{
- tree arg0 = TREE_VALUE (arglist);
- rtx op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0);
-
- start_sequence();
- emit_insn (gen_profile (op0));
-
- rtx insns = get_insns();
- end_sequence();
- emit_insn (insns);
-
- return const0_rtx;
-}
-
-
/* Initialise the builtin functions. Start by initialising
descriptions of different types of functions (e.g., void fn(int),
int fn(void)), and then use these to define the builtins. */
@@ -3996,14 +3979,6 @@ picochip_init_builtins (void)
BUILT_IN_MD, NULL, NULL_TREE);
/* Initialise the bit reverse function. */
- add_builtin_function ("__builtin_profile", void_ftype_int,
- PICOCHIP_BUILTIN_PROFILE, BUILT_IN_MD, NULL,
- NULL_TREE);
- add_builtin_function ("picoProfile", void_ftype_int,
- PICOCHIP_BUILTIN_PROFILE, BUILT_IN_MD, NULL,
- NULL_TREE);
-
- /* Initialise the bit reverse function. */
add_builtin_function ("__builtin_brev", unsigned_ftype_unsigned,
PICOCHIP_BUILTIN_BREV, BUILT_IN_MD, NULL,
NULL_TREE);
@@ -4135,9 +4110,6 @@ picochip_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
case PICOCHIP_BUILTIN_HALT:
return picochip_generate_halt ();
- case PICOCHIP_BUILTIN_PROFILE:
- return picochip_generate_profile (arglist);
-
default:
gcc_unreachable();
diff --git a/gcc/config/picochip/picochip.h b/gcc/config/picochip/picochip.h
index 6c92fb48a69..dc57364f2b7 100644
--- a/gcc/config/picochip/picochip.h
+++ b/gcc/config/picochip/picochip.h
@@ -736,7 +736,6 @@ enum picochip_builtins
PICOCHIP_BUILTIN_PUT_ARRAY,
PICOCHIP_BUILTIN_TESTPORT_ARRAY,
PICOCHIP_BUILTIN_ASRI,
- PICOCHIP_BUILTIN_PROFILE,
PICOCHIP_BUILTIN_HALT
};
diff --git a/gcc/config/picochip/picochip.md b/gcc/config/picochip/picochip.md
index e1f3b388f68..657629c96fa 100644
--- a/gcc/config/picochip/picochip.md
+++ b/gcc/config/picochip/picochip.md
@@ -111,9 +111,6 @@
; Internal TSTPORT instruction, used to generate a single TSTPORT
; instruction for use in the testport branch split.
(UNSPEC_INTERNAL_TESTPORT 19)
-
- ; instruction for use in the profile based optimizations.
- (UNSPEC_INTERNAL_PROFILE 20)
]
)
@@ -2228,14 +2225,6 @@
[(set_attr "length" "1")
(set_attr "type" "unknown")])
-(define_insn "profile"
- [(unspec_volatile [(match_operand:HI 0 "const_int_operand" "i")]
- UNSPEC_INTERNAL_PROFILE)]
- ""
- "PROFILE_DUMMY %0 \t// (profile instruction %0)"
- [(set_attr "length" "1")
- (set_attr "type" "unknown")])
-
(define_insn "internal_testport"
[(set (reg:CC CC_REGNUM)
(unspec_volatile:CC [(match_operand:HI 0 "const_int_operand" "i")]
diff --git a/gcc/config/rs6000/aix41.h b/gcc/config/rs6000/aix41.h
deleted file mode 100644
index a109084994a..00000000000
--- a/gcc/config/rs6000/aix41.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Definitions of target machine for GNU compiler,
- for IBM RS/6000 POWER running AIX version 4.1.
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004,
- 2005, 2007
- Free Software Foundation, Inc.
- Contributed by David Edelsohn (edelsohn@gnu.org).
-
- 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/>. */
-
-#undef ASM_SPEC
-#define ASM_SPEC "-u %(asm_cpu)"
-
-#undef ASM_DEFAULT_SPEC
-#define ASM_DEFAULT_SPEC "-mcom"
-
-#undef TARGET_OS_CPP_BUILTINS
-#define TARGET_OS_CPP_BUILTINS() \
- do \
- { \
- TARGET_OS_AIX_CPP_BUILTINS (); \
- } \
- while (0)
-
-#undef CPP_SPEC
-#define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
- %{ansi: -D_ANSI_C_SOURCE}\
- %{mpe: -I/usr/lpp/ppe.poe/include}\
- %{pthread: -D_THREAD_SAFE}"
-
-#undef TARGET_DEFAULT
-#define TARGET_DEFAULT MASK_NEW_MNEMONICS
-
-#undef PROCESSOR_DEFAULT
-#define PROCESSOR_DEFAULT PROCESSOR_PPC601
-
-/* AIX does not support Altivec. */
-#undef TARGET_ALTIVEC
-#define TARGET_ALTIVEC 0
-#undef TARGET_ALTIVEC_ABI
-#define TARGET_ALTIVEC_ABI 0
-
-/* Define this macro as a C expression for the initializer of an
- array of string to tell the driver program which options are
- defaults for this target and thus do not need to be handled
- specially when using `MULTILIB_OPTIONS'.
-
- Do not define this macro if `MULTILIB_OPTIONS' is not defined in
- the target makefile fragment or if none of the options listed in
- `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
-
-#undef MULTILIB_DEFAULTS
-#define MULTILIB_DEFAULTS { "mcpu=common" }
-
-#undef LIB_SPEC
-#define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\
- %{p:-L/lib/profiled -L/usr/lib/profiled} %{!shared:%{g*:-lg}}\
- %{mpe:-L/usr/lpp/ppe.poe/lib -lmpi -lvtd}\
- %{pthread: -L/usr/lib/threads -lpthreads -lc_r /usr/lib/libc.a}\
- %{!pthread: -lc}"
-
-#undef LINK_SPEC
-#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\
- %{static:-bnso %(link_syscalls) } %{!shared: %{g*: %(link_libg) }}\
- %{shared:-bM:SRE %{!e:-bnoentry}}"
-
-#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%{!shared:\
- %{mpe:%{pg:/usr/lpp/ppe.poe/lib/gcrt0.o}\
- %{!pg:%{p:/usr/lpp/ppe.poe/lib/mcrt0.o}\
- %{!p:/usr/lpp/ppe.poe/lib/crt0.o}}}\
- %{!mpe:\
- %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
- %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}"
-
-/* AIX 4 uses PowerPC nop (ori 0,0,0) instruction as call glue for PowerPC
- and "cror 31,31,31" for POWER architecture. */
-
-#undef RS6000_CALL_GLUE
-#define RS6000_CALL_GLUE "{cror 31,31,31|nop}"
-
-/* The IBM AIX 4.x assembler doesn't support forward references in
- .set directives. We handle this by deferring the output of .set
- directives to the end of the compilation unit. */
-#define TARGET_DEFERRED_OUTPUT_DEFS(DECL,TARGET) true
-
-#undef TARGET_64BIT
-#define TARGET_64BIT 0
diff --git a/gcc/config/rs6000/aix41.opt b/gcc/config/rs6000/aix41.opt
deleted file mode 100644
index 62e37679f7f..00000000000
--- a/gcc/config/rs6000/aix41.opt
+++ /dev/null
@@ -1,24 +0,0 @@
-; Options for AIX4.1.
-;
-; Copyright (C) 2005, 2007 Free Software Foundation, Inc.
-; Contributed by Aldy Hernandez <aldy@quesejoda.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/>.
-
-mpe
-Target Report RejectNegative Var(internal_nothing_1)
-Support message passing with the Parallel Environment
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index 46cb876ed2d..ad2eb4b7fea 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -152,7 +152,7 @@ extern int dot_symbols;
#define ASM_SPEC32 "-a32 %{n} %{T} %{Ym,*} %{Yd,*} \
%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \
-%{memb} %{!memb: %{msdata: -memb} %{msdata=eabi: -memb}} \
+%{memb} %{!memb: %{msdata=eabi: -memb}} \
%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
%{mcall-freebsd: -mbig} \
%{mcall-i960-old: -mlittle} \
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index f968b2f1467..3aa17143b67 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -188,7 +188,19 @@ rs6000_macro_to_expand (cpp_reader *pfile, const cpp_token *tok)
tok = cpp_peek_token (pfile, idx++);
while (tok->type == CPP_PADDING);
ident = altivec_categorize_keyword (tok);
- if (ident)
+ if (ident == C_CPP_HASHNODE (__pixel_keyword))
+ {
+ expand_this = C_CPP_HASHNODE (__vector_keyword);
+ expand_bool_pixel = __pixel_keyword;
+ rid_code = RID_MAX;
+ }
+ else if (ident == C_CPP_HASHNODE (__bool_keyword))
+ {
+ expand_this = C_CPP_HASHNODE (__vector_keyword);
+ expand_bool_pixel = __bool_keyword;
+ rid_code = RID_MAX;
+ }
+ else if (ident)
rid_code = (enum rid)(ident->rid_code);
}
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 3073561c9f0..17622c26f00 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -15254,7 +15254,7 @@ rs6000_ra_ever_killed (void)
rtx reg;
rtx insn;
- if (crtl->is_thunk)
+ if (cfun->is_thunk)
return 0;
/* regs_ever_live has LR marked as used if any sibcalls are present,
@@ -17556,7 +17556,7 @@ rs6000_output_function_epilogue (FILE *file,
System V.4 Powerpc's (and the embedded ABI derived from it) use a
different traceback table. */
if (DEFAULT_ABI == ABI_AIX && ! flag_inhibit_size_directive
- && rs6000_traceback != traceback_none && !crtl->is_thunk)
+ && rs6000_traceback != traceback_none && !cfun->is_thunk)
{
const char *fname = NULL;
const char *language_string = lang_hooks.name;
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 5290e2b68c1..e7daff15bab 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -9278,7 +9278,7 @@
"TARGET_POWERPC64 && (gpc_reg_operand (operands[0], TImode)
|| gpc_reg_operand (operands[1], TImode))"
"#"
- [(set_attr "type" "*,load,store")])
+ [(set_attr "type" "*,store,load")])
(define_split
[(set (match_operand:TI 0 "gpc_reg_operand" "")
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 69ccb58a1ff..1deb0eb8cfd 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -588,7 +588,7 @@ extern int fixuplabelno;
%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \
SVR4_ASM_SPEC \
"%{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \
-%{memb|msdata|msdata=eabi: -memb} \
+%{memb|msdata=eabi: -memb} \
%{mlittle|mlittle-endian:-mlittle; \
mbig|mbig-endian :-mbig; \
mcall-aixdesc | \
diff --git a/gcc/config/rs6000/sysv4.opt b/gcc/config/rs6000/sysv4.opt
index 5de03b34a84..01b087dedcf 100644
--- a/gcc/config/rs6000/sysv4.opt
+++ b/gcc/config/rs6000/sysv4.opt
@@ -94,7 +94,8 @@ mregnames
Target Mask(REGNAMES)
Use alternate register names
-;; FIXME: Does nothing.
+;; This option does nothing and only exists because the compiler
+;; driver passes all -m* options through.
msdata
Target
no description yet
diff --git a/gcc/config/rs6000/t-newas b/gcc/config/rs6000/t-newas
deleted file mode 100644
index eed66bf5f09..00000000000
--- a/gcc/config/rs6000/t-newas
+++ /dev/null
@@ -1,37 +0,0 @@
-# Build the libraries for both hard and soft floating point and all of the
-# different processor models
-
-MULTILIB_OPTIONS = msoft-float \
- mcpu=common/mcpu=power/mcpu=powerpc
-
-MULTILIB_DIRNAMES = soft-float \
- common power powerpc
-
-MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT) \
- mcpu?power=mpower \
- mcpu?power=mrios1 \
- mcpu?power=mcpu?rios1 \
- mcpu?power=mcpu?rsc \
- mcpu?power=mcpu?rsc1 \
- mcpu?power=mpower2 \
- mcpu?power=mrios2 \
- mcpu?power=mcpu=rios2 \
- mcpu?powerpc=mcpu?601 \
- mcpu?powerpc=mcpu?602 \
- mcpu?powerpc=mcpu?603 \
- mcpu?powerpc=mcpu?603e \
- mcpu?powerpc=mcpu?604 \
- mcpu?powerpc=mcpu?620 \
- mcpu?powerpc=mcpu?403 \
- mcpu?powerpc=mpowerpc \
- mcpu?powerpc=mpowerpc-gpopt \
- mcpu?powerpc=mpowerpc-gfxopt
-
-# GCC 128-bit long double support routines.
-LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble.c
-
-# Aix 3.2.x needs milli.exp for -mcpu=common
-EXTRA_PARTS = milli.exp
-$(T)milli.exp: $(srcdir)/config/rs6000/milli.exp
- rm -f $(T)milli.exp
- cp $(srcdir)/config/rs6000/milli.exp $(T)milli.exp
diff --git a/gcc/config/rs6000/t-rtems b/gcc/config/rs6000/t-rtems
index b3db9498a23..c0fd8bf3b07 100644
--- a/gcc/config/rs6000/t-rtems
+++ b/gcc/config/rs6000/t-rtems
@@ -10,8 +10,6 @@ m403 m505 m601 m603e m604 m860 m7400 \
mpc8260 \
nof
-MULTILIB_EXTRA_OPTS = mrelocatable-lib mno-eabi mstrict-align
-
# MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT}
MULTILIB_MATCHES =
MULTILIB_MATCHES += ${MULTILIB_MATCHES_ENDIAN}
diff --git a/gcc/config/sh/coff.h b/gcc/config/sh/coff.h
deleted file mode 100644
index a3242c54a76..00000000000
--- a/gcc/config/sh/coff.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Definitions of target machine for gcc for Renesas / SuperH SH using ELF.
- Copyright (C) 1997, 1998, 2001, 2002, 2007 Free Software Foundation, Inc.
- Contributed by Jörn Rennecke <joern.rennecke@superh.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/>. */
-
-/* Generate SDB debugging information. */
-
-#define SDB_DEBUGGING_INFO 1
-
-#define SDB_DELIM ";"
-
-#ifndef MAX_OFILE_ALIGNMENT
-#define MAX_OFILE_ALIGNMENT 128
-#endif
-
-#define IDENT_ASM_OP "\t.ident\t"
-
-/* Switch into a generic section. */
-#define TARGET_ASM_NAMED_SECTION default_coff_asm_named_section
-
-/* The prefix to add to user-visible assembler symbols. */
-
-#define USER_LABEL_PREFIX "_"
-
-/* The prefix to add to an internally generated label. */
-
-#define LOCAL_LABEL_PREFIX ""
-
-/* Make an internal label into a string. */
-#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
- sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM))
-
-/* This is how to output an assembler line
- that says to advance the location counter by SIZE bytes. */
-
-#define ASM_OUTPUT_SKIP(FILE,SIZE) \
- fprintf ((FILE), "\t.space %d\n", (int)(SIZE))
-
-/* This says how to output an assembler line
- to define a global common symbol. */
-
-#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
-( fputs ("\t.comm ", (FILE)), \
- assemble_name ((FILE), (NAME)), \
- fprintf ((FILE), ",%d\n", (int)(SIZE)))
-
-/* This says how to output an assembler line
- to define a local common symbol. */
-
-#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
-( fputs ("\t.lcomm ", (FILE)), \
- assemble_name ((FILE), (NAME)), \
- fprintf ((FILE), ",%d\n", (int)(SIZE)))
-
-#define DWARF2_UNWIND_INFO 0
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 3c57730b83e..c8f4c85ee75 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -5966,7 +5966,9 @@ calc_live_regs (HARD_REG_SET *live_regs_mask)
&& crtl->args.info.call_cookie
&& reg == PIC_OFFSET_TABLE_REGNUM)
|| (df_regs_ever_live_p (reg)
- && (!call_really_used_regs[reg]
+ && ((!call_really_used_regs[reg]
+ && !(reg != PIC_OFFSET_TABLE_REGNUM
+ && fixed_regs[reg] && call_used_regs[reg]))
|| (trapa_handler && reg == FPSCR_REG && TARGET_FPU_ANY)))
|| (crtl->calls_eh_return
&& (reg == EH_RETURN_DATA_REGNO (0)
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index e20bfbdb45b..7e6a358f89b 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -282,7 +282,7 @@ static GTY(()) alias_set_type struct_value_alias_set;
/* Save the operands last given to a compare for use when we
generate a scc or bcc insn. */
-rtx sparc_compare_op0, sparc_compare_op1, sparc_compare_emitted;
+rtx sparc_compare_op0, sparc_compare_op1;
/* Vector to say how input registers are mapped to output registers.
HARD_FRAME_POINTER_REGNUM cannot be remapped by this function to
@@ -2006,17 +2006,15 @@ select_cc_mode (enum rtx_code op, rtx x, rtx y ATTRIBUTE_UNUSED)
rtx
gen_compare_reg (enum rtx_code code)
{
- rtx x = sparc_compare_op0;
- rtx y = sparc_compare_op1;
- enum machine_mode mode = SELECT_CC_MODE (code, x, y);
- rtx cc_reg;
+ enum machine_mode mode;
+ rtx x, y, cc_reg;
- if (sparc_compare_emitted != NULL_RTX)
- {
- cc_reg = sparc_compare_emitted;
- sparc_compare_emitted = NULL_RTX;
- return cc_reg;
- }
+ if (GET_MODE_CLASS (GET_MODE (sparc_compare_op0)) == MODE_CC)
+ return sparc_compare_op0;
+
+ x = sparc_compare_op0;
+ y = sparc_compare_op1;
+ mode = SELECT_CC_MODE (code, x, y);
/* ??? We don't have movcc patterns so we cannot generate pseudo regs for the
fcc regs (cse can't tell they're really call clobbered regs and will
@@ -2198,7 +2196,7 @@ gen_v9_scc (enum rtx_code compare_code, register rtx *operands)
void
emit_v9_brxx_insn (enum rtx_code code, rtx op0, rtx label)
{
- gcc_assert (sparc_compare_emitted == NULL_RTX);
+ gcc_assert (GET_MODE_CLASS (GET_MODE (sparc_compare_op0)) != MODE_CC);
emit_jump_insn (gen_rtx_SET (VOIDmode,
pc_rtx,
gen_rtx_IF_THEN_ELSE (VOIDmode,
@@ -9026,7 +9024,8 @@ sparc_expand_compare_and_swap_12 (rtx result, rtx mem, rtx oldval, rtx newval)
emit_insn (gen_rtx_SET (VOIDmode, val, resv));
- sparc_compare_emitted = cc;
+ sparc_compare_op0 = cc;
+ sparc_compare_op1 = const0_rtx;
emit_jump_insn (gen_bne (loop_label));
emit_label (end_label);
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 6271a943d19..6a46093dfd3 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -1558,12 +1558,10 @@ function_arg_padding ((MODE), (TYPE))
? 128 : PARM_BOUNDARY)
/* Define the information needed to generate branch and scc insns. This is
- stored from the compare operation. Note that we can't use "rtx" here
- since it hasn't been defined! */
+ stored from the compare operation. */
extern GTY(()) rtx sparc_compare_op0;
extern GTY(()) rtx sparc_compare_op1;
-extern GTY(()) rtx sparc_compare_emitted;
/* Generate the special assembly code needed to tell the assembler whatever
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index d78d6e93b43..8e8991129aa 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -7082,10 +7082,10 @@
[(unspec_volatile [(const_int 0)] UNSPECV_SETJMP)]
""
{
- if (! cfun->calls_alloca)
+ if (!cfun->calls_alloca)
return "";
- if (! TARGET_V9)
- return "\tta\t3\n";
+ if (!TARGET_V9)
+ return "ta\t3";
fputs ("\tflushw\n", asm_out_file);
if (flag_pic)
fprintf (asm_out_file, "\tst%c\t%%l7, [%%sp+%d]\n",
@@ -8076,9 +8076,8 @@
else
{
emit_insn (gen_stack_protect_testsi (operands[0], operands[1]));
- sparc_compare_op0 = operands[0];
- sparc_compare_op1 = operands[1];
- sparc_compare_emitted = gen_rtx_REG (CCmode, SPARC_ICC_REG);
+ sparc_compare_op0 = gen_rtx_REG (CCmode, SPARC_ICC_REG);
+ sparc_compare_op1 = const0_rtx;
}
emit_jump_insn (gen_beq (operands[2]));
DONE;
@@ -8173,7 +8172,7 @@
;; (ior (not (op1)) (not (op2))) is the canonical form of NAND.
-(define_insn "*nand<V64mode>_vis"
+(define_insn "*nand<V64:mode>_vis"
[(set (match_operand:V64 0 "register_operand" "=e")
(ior:V64 (not:V64 (match_operand:V64 1 "register_operand" "e"))
(not:V64 (match_operand:V64 2 "register_operand" "e"))))]
@@ -8182,7 +8181,7 @@
[(set_attr "type" "fga")
(set_attr "fptype" "double")])
-(define_insn "*nand<V32mode>_vis"
+(define_insn "*nand<V32:mode>_vis"
[(set (match_operand:V32 0 "register_operand" "=f")
(ior:V32 (not:V32 (match_operand:V32 1 "register_operand" "f"))
(not:V32 (match_operand:V32 2 "register_operand" "f"))))]
diff --git a/gcc/config/spu/divv2df3.c b/gcc/config/spu/divv2df3.c
new file mode 100644
index 00000000000..cd7126bb733
--- /dev/null
+++ b/gcc/config/spu/divv2df3.c
@@ -0,0 +1,198 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+
+ This file is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your option)
+ any later version.
+
+ This file is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this file; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* As a special exception, if you link this library with files compiled with
+ GCC to produce an executable, this does not cause the resulting executable
+ to be covered by the GNU General Public License. The exception does not
+ however invalidate any other reasons why the executable file might be covered
+ by the GNU General Public License. */
+
+
+#include <spu_intrinsics.h>
+
+vector double __divv2df3 (vector double a_in, vector double b_in);
+
+/* __divv2df3 divides the vector dividend a by the vector divisor b and
+ returns the resulting vector quotient. Maximum error about 0.5 ulp
+ over entire double range including denorms, compared to true result
+ in round-to-nearest rounding mode. Handles Inf or NaN operands and
+ results correctly. */
+
+vector double
+__divv2df3 (vector double a_in, vector double b_in)
+{
+ /* Variables */
+ vec_int4 exp, exp_bias;
+ vec_uint4 no_underflow, overflow;
+ vec_float4 mant_bf, inv_bf;
+ vec_ullong2 exp_a, exp_b;
+ vec_ullong2 a_nan, a_zero, a_inf, a_denorm, a_denorm0;
+ vec_ullong2 b_nan, b_zero, b_inf, b_denorm, b_denorm0;
+ vec_ullong2 nan;
+ vec_uint4 a_exp, b_exp;
+ vec_ullong2 a_mant_0, b_mant_0;
+ vec_ullong2 a_exp_1s, b_exp_1s;
+ vec_ullong2 sign_exp_mask;
+
+ vec_double2 a, b;
+ vec_double2 mant_a, mant_b, inv_b, q0, q1, q2, mult;
+
+ /* Constants */
+ vec_uint4 exp_mask_u32 = spu_splats((unsigned int)0x7FF00000);
+ vec_uchar16 splat_hi = (vec_uchar16){0,1,2,3, 0,1,2,3, 8, 9,10,11, 8,9,10,11};
+ vec_uchar16 swap_32 = (vec_uchar16){4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11};
+ vec_ullong2 exp_mask = spu_splats(0x7FF0000000000000ULL);
+ vec_ullong2 sign_mask = spu_splats(0x8000000000000000ULL);
+ vec_float4 onef = spu_splats(1.0f);
+ vec_double2 one = spu_splats(1.0);
+ vec_double2 exp_53 = (vec_double2)spu_splats(0x0350000000000000ULL);
+
+ sign_exp_mask = spu_or(sign_mask, exp_mask);
+
+ /* Extract the floating point components from each of the operands including
+ * exponent and mantissa.
+ */
+ a_exp = (vec_uint4)spu_and((vec_uint4)a_in, exp_mask_u32);
+ a_exp = spu_shuffle(a_exp, a_exp, splat_hi);
+ b_exp = (vec_uint4)spu_and((vec_uint4)b_in, exp_mask_u32);
+ b_exp = spu_shuffle(b_exp, b_exp, splat_hi);
+
+ a_mant_0 = (vec_ullong2)spu_cmpeq((vec_uint4)spu_andc((vec_ullong2)a_in, sign_exp_mask), 0);
+ a_mant_0 = spu_and(a_mant_0, spu_shuffle(a_mant_0, a_mant_0, swap_32));
+
+ b_mant_0 = (vec_ullong2)spu_cmpeq((vec_uint4)spu_andc((vec_ullong2)b_in, sign_exp_mask), 0);
+ b_mant_0 = spu_and(b_mant_0, spu_shuffle(b_mant_0, b_mant_0, swap_32));
+
+ a_exp_1s = (vec_ullong2)spu_cmpeq(a_exp, exp_mask_u32);
+ b_exp_1s = (vec_ullong2)spu_cmpeq(b_exp, exp_mask_u32);
+
+ /* Identify all possible special values that must be accomodated including:
+ * +-denorm, +-0, +-infinity, and NaNs.
+ */
+ a_denorm0= (vec_ullong2)spu_cmpeq(a_exp, 0);
+ a_nan = spu_andc(a_exp_1s, a_mant_0);
+ a_zero = spu_and (a_denorm0, a_mant_0);
+ a_inf = spu_and (a_exp_1s, a_mant_0);
+ a_denorm = spu_andc(a_denorm0, a_zero);
+
+ b_denorm0= (vec_ullong2)spu_cmpeq(b_exp, 0);
+ b_nan = spu_andc(b_exp_1s, b_mant_0);
+ b_zero = spu_and (b_denorm0, b_mant_0);
+ b_inf = spu_and (b_exp_1s, b_mant_0);
+ b_denorm = spu_andc(b_denorm0, b_zero);
+
+ /* Scale denorm inputs to into normalized numbers by conditionally scaling the
+ * input parameters.
+ */
+ a = spu_sub(spu_or(a_in, exp_53), spu_sel(exp_53, a_in, sign_mask));
+ a = spu_sel(a_in, a, a_denorm);
+
+ b = spu_sub(spu_or(b_in, exp_53), spu_sel(exp_53, b_in, sign_mask));
+ b = spu_sel(b_in, b, b_denorm);
+
+ /* Extract the divisor and dividend exponent and force parameters into the signed
+ * range [1.0,2.0) or [-1.0,2.0).
+ */
+ exp_a = spu_and((vec_ullong2)a, exp_mask);
+ exp_b = spu_and((vec_ullong2)b, exp_mask);
+
+ mant_a = spu_sel(a, one, (vec_ullong2)exp_mask);
+ mant_b = spu_sel(b, one, (vec_ullong2)exp_mask);
+
+ /* Approximate the single reciprocal of b by using
+ * the single precision reciprocal estimate followed by one
+ * single precision iteration of Newton-Raphson.
+ */
+ mant_bf = spu_roundtf(mant_b);
+ inv_bf = spu_re(mant_bf);
+ inv_bf = spu_madd(spu_nmsub(mant_bf, inv_bf, onef), inv_bf, inv_bf);
+
+ /* Perform 2 more Newton-Raphson iterations in double precision. The
+ * result (q1) is in the range (0.5, 2.0).
+ */
+ inv_b = spu_extend(inv_bf);
+ inv_b = spu_madd(spu_nmsub(mant_b, inv_b, one), inv_b, inv_b);
+ q0 = spu_mul(mant_a, inv_b);
+ q1 = spu_madd(spu_nmsub(mant_b, q0, mant_a), inv_b, q0);
+
+ /* Determine the exponent correction factor that must be applied
+ * to q1 by taking into account the exponent of the normalized inputs
+ * and the scale factors that were applied to normalize them.
+ */
+ exp = spu_rlmaska(spu_sub((vec_int4)exp_a, (vec_int4)exp_b), -20);
+ exp = spu_add(exp, (vec_int4)spu_add(spu_and((vec_int4)a_denorm, -0x34), spu_and((vec_int4)b_denorm, 0x34)));
+
+ /* Bias the quotient exponent depending on the sign of the exponent correction
+ * factor so that a single multiplier will ensure the entire double precision
+ * domain (including denorms) can be achieved.
+ *
+ * exp bias q1 adjust exp
+ * ===== ======== ==========
+ * positive 2^+65 -65
+ * negative 2^-64 +64
+ */
+ exp_bias = spu_xor(spu_rlmaska(exp, -31), 64);
+ exp = spu_sub(exp, exp_bias);
+
+ q1 = spu_sel(q1, (vec_double2)spu_add((vec_int4)q1, spu_sl(exp_bias, 20)), exp_mask);
+
+ /* Compute a multiplier (mult) to applied to the quotient (q1) to produce the
+ * expected result. On overflow, clamp the multiplier to the maximum non-infinite
+ * number in case the rounding mode is not round-to-nearest.
+ */
+ exp = spu_add(exp, 0x3FF);
+ no_underflow = spu_cmpgt(exp, 0);
+ overflow = spu_cmpgt(exp, 0x7FE);
+ exp = spu_and(spu_sl(exp, 20), (vec_int4)no_underflow);
+ exp = spu_and(exp, (vec_int4)exp_mask);
+
+ mult = spu_sel((vec_double2)exp, (vec_double2)(spu_add((vec_uint4)exp_mask, -1)), (vec_ullong2)overflow);
+
+ /* Handle special value conditions. These include:
+ *
+ * 1) IF either operand is a NaN OR both operands are 0 or INFINITY THEN a NaN
+ * results.
+ * 2) ELSE IF the dividend is an INFINITY OR the divisor is 0 THEN a INFINITY results.
+ * 3) ELSE IF the dividend is 0 OR the divisor is INFINITY THEN a 0 results.
+ */
+ mult = spu_andc(mult, (vec_double2)spu_or(a_zero, b_inf));
+ mult = spu_sel(mult, (vec_double2)exp_mask, spu_or(a_inf, b_zero));
+
+ nan = spu_or(a_nan, b_nan);
+ nan = spu_or(nan, spu_and(a_zero, b_zero));
+ nan = spu_or(nan, spu_and(a_inf, b_inf));
+
+ mult = spu_or(mult, (vec_double2)nan);
+
+ /* Scale the final quotient */
+
+ q2 = spu_mul(q1, mult);
+
+ return (q2);
+}
+
+
+/* We use the same function for vector and scalar division. Provide the
+ scalar entry point as an alias. */
+double __divdf3 (double a, double b)
+ __attribute__ ((__alias__ ("__divv2df3")));
+
+/* Some toolchain builds used the __fast_divdf3 name for this helper function.
+ Provide this as another alternate entry point for compatibility. */
+double __fast_divdf3 (double a, double b)
+ __attribute__ ((__alias__ ("__divv2df3")));
+
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index a29125269e5..6e0001b0a05 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -143,6 +143,7 @@ static bool spu_vector_alignment_reachable (const_tree, bool);
static tree spu_builtin_vec_perm (tree, tree *);
static int spu_sms_res_mii (struct ddg *g);
static void asm_file_start (void);
+static unsigned int spu_section_type_flags (tree, const char *, int);
extern const char *reg_names[];
rtx spu_compare_op0, spu_compare_op1;
@@ -329,6 +330,9 @@ const struct attribute_spec spu_attribute_table[];
#undef TARGET_ASM_FILE_START
#define TARGET_ASM_FILE_START asm_file_start
+#undef TARGET_SECTION_TYPE_FLAGS
+#define TARGET_SECTION_TYPE_FLAGS spu_section_type_flags
+
struct gcc_target targetm = TARGET_INITIALIZER;
void
@@ -4110,17 +4114,16 @@ spu_expand_mov (rtx * ops, enum machine_mode mode)
if (GET_CODE (ops[1]) == SUBREG && !valid_subreg (ops[1]))
{
rtx from = SUBREG_REG (ops[1]);
- enum machine_mode imode = GET_MODE (from);
+ enum machine_mode imode = int_mode_for_mode (GET_MODE (from));
gcc_assert (GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_CLASS (imode) == MODE_INT
&& subreg_lowpart_p (ops[1]));
if (GET_MODE_SIZE (imode) < 4)
- {
- from = gen_rtx_SUBREG (SImode, from, 0);
- imode = SImode;
- }
+ imode = SImode;
+ if (imode != GET_MODE (from))
+ from = gen_rtx_SUBREG (imode, from, 0);
if (GET_MODE_SIZE (mode) < GET_MODE_SIZE (imode))
{
@@ -6285,3 +6288,13 @@ asm_file_start (void)
default_file_start ();
}
+/* Implement targetm.section_type_flags. */
+static unsigned int
+spu_section_type_flags (tree decl, const char *name, int reloc)
+{
+ /* .toe needs to have type @nobits. */
+ if (strcmp (name, ".toe") == 0)
+ return SECTION_BSS;
+ return default_section_type_flags (decl, name, reloc);
+}
+
diff --git a/gcc/config/spu/t-spu-elf b/gcc/config/spu/t-spu-elf
index 2e1928707df..f8c5ba5b01d 100644
--- a/gcc/config/spu/t-spu-elf
+++ b/gcc/config/spu/t-spu-elf
@@ -29,6 +29,10 @@ TARGET_LIBGCC2_CFLAGS = -fPIC -mwarn-reloc -D__IN_LIBGCC2
# own versions below.
LIB2FUNCS_EXCLUDE = _floatdisf _floatundisf
+# We provide our own version of __divdf3 that performs better and has
+# better support for non-default rounding modes.
+DPBIT_FUNCS := $(filter-out _div_df, $(DPBIT_FUNCS))
+
LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/spu/float_unssidf.c \
$(srcdir)/config/spu/float_unsdidf.c \
$(srcdir)/config/spu/float_unsdisf.c \
@@ -39,7 +43,8 @@ LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/spu/float_unssidf.c \
$(srcdir)/config/spu/mfc_multi_tag_reserve.c \
$(srcdir)/config/spu/mfc_multi_tag_release.c \
$(srcdir)/config/spu/multi3.c \
- $(srcdir)/config/spu/divmodti4.c
+ $(srcdir)/config/spu/divmodti4.c \
+ $(srcdir)/config/spu/divv2df3.c
LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
$(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
diff --git a/gcc/config/t-svr4 b/gcc/config/t-svr4
index 3ea1174580d..6e75eea1f6e 100644
--- a/gcc/config/t-svr4
+++ b/gcc/config/t-svr4
@@ -6,6 +6,3 @@
CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
TARGET_LIBGCC2_CFLAGS = -fPIC
-
-# See all the declarations.
-FIXPROTO_DEFINES = -D_XOPEN_SOURCE
diff --git a/gcc/config/t-vxworks b/gcc/config/t-vxworks
index c9d69e0edce..ebedb1f5056 100644
--- a/gcc/config/t-vxworks
+++ b/gcc/config/t-vxworks
@@ -1,6 +1,3 @@
-# Don't run fixproto.
-STMP_FIXPROTO =
-
# Build libgcc using the multilib mechanism
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
diff --git a/gcc/configure b/gcc/configure
index 0fd692dc881..d8577c36de4 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -458,7 +458,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump gcc_cv_readelf libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines use_gcc_stdint c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump gcc_cv_readelf libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines use_gcc_stdint c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC LIBOBJS LTLIBOBJS'
ac_subst_files='language_hooks'
ac_pwd=`pwd`
@@ -10413,150 +10413,6 @@ _ACEOF
fi
-# Try to determine the array type of the second argument of getgroups
-# for the target system (int or gid_t).
-echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
-echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
-if test "${ac_cv_type_uid_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "uid_t" >/dev/null 2>&1; then
- ac_cv_type_uid_t=yes
-else
- ac_cv_type_uid_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
-echo "${ECHO_T}$ac_cv_type_uid_t" >&6
-if test $ac_cv_type_uid_t = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define uid_t int
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define gid_t int
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
-echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
-if test "${ac_cv_type_getgroups+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_type_getgroups=cross
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Thanks to Mike Rendell for this test. */
-#include <sys/types.h>
-#define NGID 256
-#undef MAX
-#define MAX(x, y) ((x) > (y) ? (x) : (y))
-
-int
-main ()
-{
- gid_t gidset[NGID];
- int i, n;
- union { gid_t gval; long lval; } val;
-
- val.lval = -1;
- for (i = 0; i < NGID; i++)
- gidset[i] = val.gval;
- n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
- gidset);
- /* Exit non-zero if getgroups seems to require an array of ints. This
- happens when gid_t is short but getgroups modifies an array of ints. */
- exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_getgroups=gid_t
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_type_getgroups=int
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-if test $ac_cv_type_getgroups = cross; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <unistd.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
- ac_cv_type_getgroups=gid_t
-else
- ac_cv_type_getgroups=int
-fi
-rm -f conftest*
-
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
-echo "${ECHO_T}$ac_cv_type_getgroups" >&6
-
-cat >>confdefs.h <<_ACEOF
-#define GETGROUPS_T $ac_cv_type_getgroups
-_ACEOF
-
-
-if test "${target}" = "${build}"; then
- TARGET_GETGROUPS_T=$ac_cv_type_getgroups
-else
- case "${target}" in
- # This condition may need some tweaking. It should include all
- # targets where the array type of the second argument of getgroups
- # is int and the type of gid_t is not equivalent to int.
- *-*-sunos* | *-*-ultrix*)
- TARGET_GETGROUPS_T=int
- ;;
- *)
- TARGET_GETGROUPS_T=gid_t
- ;;
- esac
-fi
-
-
echo "$as_me:$LINENO: checking for sys/mman.h" >&5
echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
@@ -14019,7 +13875,7 @@ fi
# When building gcc with a cross-compiler, we need to adjust things so
# that the generator programs are still built with the native compiler.
-# Also, we cannot run fixincludes or fix-header.
+# Also, we cannot run fixincludes.
# These are the normal (build=host) settings:
CC_FOR_BUILD='$(CC)'
@@ -14027,28 +13883,11 @@ BUILD_CFLAGS='$(ALL_CFLAGS)'
BUILD_LDFLAGS='$(LDFLAGS)'
STMP_FIXINC=stmp-fixinc
-# Possibly disable fixproto, on a per-target basis.
-case ${use_fixproto} in
- no)
- STMP_FIXPROTO=
- ;;
- yes)
- STMP_FIXPROTO=stmp-fixproto
- ;;
-esac
-
-
# And these apply if build != host, or we are generating coverage data
if test x$build != x$host || test "x$coverage_flags" != x
then
BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
-
- if test "x$TARGET_SYSTEM_ROOT" = x; then
- if test "x$STMP_FIXPROTO" != x; then
- STMP_FIXPROTO=stmp-install-fixproto
- fi
- fi
fi
# Expand extra_headers to include complete path.
@@ -14509,13 +14348,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:14512: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:14351: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:14515: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:14354: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:14518: output\"" >&5)
+ (eval echo "\"\$as_me:14357: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -14969,7 +14808,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -15672,7 +15511,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 15675 "configure"' > conftest.$ac_ext
+ echo '#line 15514 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -16971,11 +16810,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16974: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16813: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16978: \$? = $ac_status" >&5
+ echo "$as_me:16817: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -17140,7 +16979,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -17310,11 +17149,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17313: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17152: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17317: \$? = $ac_status" >&5
+ echo "$as_me:17156: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -17415,11 +17254,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17418: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17257: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17422: \$? = $ac_status" >&5
+ echo "$as_me:17261: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17470,11 +17309,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17473: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17312: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17477: \$? = $ac_status" >&5
+ echo "$as_me:17316: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17701,7 +17540,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -19250,7 +19089,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -20282,7 +20121,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 20285 "configure"
+#line 20124 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -20378,7 +20217,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 20381 "configure"
+#line 20220 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -21976,6 +21815,17 @@ foo: .long 25
tls_first_minor=13
tls_as_opt=--fatal-warnings
;;
+ cris-*-*|crisv32-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+x: .long 25
+ .text
+ move.d x:IE,$r10
+ nop'
+ tls_first_major=2
+ tls_first_minor=20
+ tls_as_opt=--fatal-warnings
+ ;;
frv*-*-*)
conftest_s='
.section ".tdata","awT",@progbits
@@ -23660,7 +23510,7 @@ esac
case "$target" in
i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
| x86_64*-*-* | hppa*-*-* | arm*-*-* \
- | xstormy16*-*-* | cris-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
+ | xstormy16*-*-* | cris-*-* | crisv32-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
| spu-*-* | fido*-*-* | m32c-*-*)
insn="nop"
;;
@@ -25506,7 +25356,6 @@ s,@AR@,$AR,;t t
s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
s,@LDEXP_LIB@,$LDEXP_LIB,;t t
-s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
s,@LIBICONV@,$LIBICONV,;t t
s,@LTLIBICONV@,$LTLIBICONV,;t t
s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
@@ -25535,7 +25384,6 @@ s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
s,@STMP_FIXINC@,$STMP_FIXINC,;t t
-s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
s,@collect2@,$collect2,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@SED@,$SED,;t t
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 9d7abad7814..d9cc2c1d627 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to generate a configuration script.
# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008 Free Software Foundation, Inc.
+# 2007, 2008, 2009 Free Software Foundation, Inc.
#This file is part of GCC.
@@ -1022,26 +1022,6 @@ fi
AC_CHECK_TYPE(ssize_t, int)
AC_CHECK_TYPE(caddr_t, char *)
-# Try to determine the array type of the second argument of getgroups
-# for the target system (int or gid_t).
-AC_TYPE_GETGROUPS
-if test "${target}" = "${build}"; then
- TARGET_GETGROUPS_T=$ac_cv_type_getgroups
-else
- case "${target}" in
- # This condition may need some tweaking. It should include all
- # targets where the array type of the second argument of getgroups
- # is int and the type of gid_t is not equivalent to int.
- *-*-sunos* | *-*-ultrix*)
- TARGET_GETGROUPS_T=int
- ;;
- *)
- TARGET_GETGROUPS_T=gid_t
- ;;
- esac
-fi
-AC_SUBST(TARGET_GETGROUPS_T)
-
gcc_AC_FUNC_MMAP_BLACKLIST
case "${host}" in
@@ -1742,7 +1722,7 @@ AC_SUBST(inhibit_libc)
# When building gcc with a cross-compiler, we need to adjust things so
# that the generator programs are still built with the native compiler.
-# Also, we cannot run fixincludes or fix-header.
+# Also, we cannot run fixincludes.
# These are the normal (build=host) settings:
CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
@@ -1750,28 +1730,11 @@ BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
-# Possibly disable fixproto, on a per-target basis.
-case ${use_fixproto} in
- no)
- STMP_FIXPROTO=
- ;;
- yes)
- STMP_FIXPROTO=stmp-fixproto
- ;;
-esac
-AC_SUBST(STMP_FIXPROTO)
-
# And these apply if build != host, or we are generating coverage data
if test x$build != x$host || test "x$coverage_flags" != x
then
BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
-
- if test "x$TARGET_SYSTEM_ROOT" = x; then
- if test "x$STMP_FIXPROTO" != x; then
- STMP_FIXPROTO=stmp-install-fixproto
- fi
- fi
fi
# Expand extra_headers to include complete path.
@@ -2444,6 +2407,17 @@ foo: .long 25
tls_first_minor=13
tls_as_opt=--fatal-warnings
;;
+ cris-*-*|crisv32-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+x: .long 25
+ .text
+ move.d x:IE,$r10
+ nop'
+ tls_first_major=2
+ tls_first_minor=20
+ tls_as_opt=--fatal-warnings
+ ;;
frv*-*-*)
conftest_s='
.section ".tdata","awT",@progbits
@@ -3213,7 +3187,7 @@ esac
case "$target" in
i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
| x86_64*-*-* | hppa*-*-* | arm*-*-* \
- | xstormy16*-*-* | cris-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
+ | xstormy16*-*-* | cris-*-* | crisv32-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
| spu-*-* | fido*-*-* | m32c-*-*)
insn="nop"
;;
diff --git a/gcc/coverage.c b/gcc/coverage.c
index b2ac87651d3..8eb30acb90d 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -459,6 +459,8 @@ tree_coverage_counter_addr (unsigned counter, unsigned no)
gcc_assert (no < fn_n_ctrs[counter] - fn_b_ctrs[counter]);
no += prg_n_ctrs[counter] + fn_b_ctrs[counter];
+ TREE_ADDRESSABLE (tree_ctr_tables[counter]) = 1;
+
/* "no" here is an array index, scaled to bytes later. */
return build_fold_addr_expr (build4 (ARRAY_REF, gcov_type_node,
tree_ctr_tables[counter],
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9d1ab5a6211..54011417160 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,233 @@
+2009-03-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR preprocessor/34695
+ * cp-tree.h (cp_cpp_error): Remove.
+ * error.c (cp_cpp_error): Remove.
+ * parser.c (cp_lexer_new_main): Set done_lexing instead of
+ client_diagnostic and error callback.
+
+2009-03-28 Paolo Bonzini <bonzini@gnu.org>
+
+ * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
+ * cp/cp-objcp-common.c (cxx_staticp): Remove.
+ * cp/cp-tree.h (cxx_staticp): Remove.
+
+2009-03-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/39554
+ * parser.c (cp_parser_postfix_expression): Don't call
+ warning_if_disallowed_function_p.
+
+2009-03-27 Jan Hubicka <jh@suse.cz>
+
+ * except.c (choose_personality_routine): Set terminate_node to abort
+ for java exceptions.
+
+2009-03-27 Dodji Seketeli <dodji@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/37959
+ * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
+ (cp_function_decl_explicit_p): New prototype.
+ * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
+
+2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR c++/38638
+ * parser.c (cp_parser_elaborated_type_specifier): If we have a
+ typename tag and don't have either a TYPE_DECL or a
+ TEMPLATE_ID_EXPR, set the type to NULL.
+
+2009-03-27 Simon Martin <simartin@users.sourceforge.net>
+
+ PR c++/37647
+ * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
+ scope.
+
+2009-03-27 Simon Martin <simartin@users.sourceforge.net>
+
+ PR c++/29727
+ * decl.c (check_array_designated_initializer): Handle error_mark_node.
+
+2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ PR c++/35652
+ * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
+
+2009-03-26 Andrew Haley <aph@redhat.com>
+
+ PR C++/39380
+ * decl2.c (possibly_inlined_p): If java exceptions are in use
+ don't inline a decl unless it is explicitly marked inline.
+ * lex.c: (pragma_java_exceptions): New variable.
+ (handle_pragma_java_exceptions): Set pragma_java_exceptions.
+ * cp-tree.h (pragma_java_exceptions): Declare new variable.
+
+2009-03-24 Jason Merrill <jason@redhat.com>
+
+ PR c++/28274
+ * name-lookup.c (pushdecl_maybe_friend): Check default args later.
+
+2009-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/39495
+ * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
+ code if iter is the second operand.
+ * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
+ argument. If it is set, don't build the toplevel expression with
+ build_x_binary_op, but build2.
+ (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
+ callers.
+ (cp_parser_omp_for_cond): Don't assume the first operand of the
+ comparison must be decl.
+
+2009-03-23 Jason Merrill <jason@redhat.com>
+
+ PR c++/37729
+ * pt.c (make_fnparm_pack): Split out from...
+ (instantiate_decl): ...here.
+ (tsubst_pack_expansion): Handle being called in a late-specified
+ return type.
+
+ PR c++/39526
+ * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
+ a parm with a parm.
+
+2009-03-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/28879
+ * parser.c (cp_parser_direct_declarator): In a template, wrap
+ non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
+ * pt.c (tsubst): Preserve it in a partial instantiation.
+ (dependent_type_p_r): Don't check value_dependent_expression_p.
+ * decl.c (compute_array_index_type): Don't check
+ value_dependent_expression_p if TREE_SIDE_EFFECTS.
+
+ C++ core issue 703
+ * typeck2.c (check_narrowing): Don't complain about loss of
+ precision when converting a floating-point constant.
+
+2009-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/39495
+ * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
+ (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
+
+2009-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
+ (eof_token): Adjust.
+
+2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR c++/39425
+ * parser.c (cp_parser_explicit_specialization): Don't skip the
+ rest of the specialization when begin_specialization returns
+ false.
+
+2009-03-17 Jason Merrill <jason@redhat.com>
+
+ * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
+ (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
+ * pt.c (check_explicit_specialization): Likewise.
+ (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
+ local specialization.
+ * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
+ * decl2.c (parm_index): New fn.
+ * semantics.c (finish_decltype_type): Don't use describable_type.
+ * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
+ Give a sorry for unsupported codes rather than crash. Mangle
+ conversions with other than 1 operand. New mangling for PARM_DECL.
+ * operators.def (ALIGNOF_EXPR): Mangle as "az".
+
+2009-03-17 Jing Yu <jingyu@google.com>
+
+ PR middle-end/39378
+ * method.c (use_thunk): Change is_thunk from crtl to cfun.
+
+2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/39475
+ * semantics.c (check_trait_type): New.
+ (finish_trait_expr): Use it.
+
+2009-03-17 Jakub Jelinek <jakub@redhat.com>
+
+ * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
+ instead of calling imported_module_or_decl debug hook if
+ building_stmt_tree ().
+ * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
+ is a NAMESPACE_DECL.
+
+ PR debug/37890
+ * name-lookup.c (do_namespace_alias): Don't call global_decl debug
+ hook at function scope.
+
+ PR debug/39471
+ * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
+ on IMPORTED_DECL.
+
+2009-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/39371
+ * semantics.c (finish_switch_cond): Don't call get_unwidened.
+ * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
+ instead of TREE_TYPE (cond).
+
+2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR c++/39060
+ * parser.c (cp_parser_late_parsing_default_args): Continue
+ the loop when cp_parser_assignment_expression returns
+ error_mark_node.
+
+2009-03-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/39367
+ * init.c (build_new_1): Don't use a VLA type.
+ (build_vec_init): Handle getting a pointer for BASE.
+
+2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR c++/37520
+ * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
+ when mangling symbols.
+
+2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/33492
+ * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
+
+2009-03-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * decl.c (record_builtin_java_type): Use canonicalized integer
+ types.
+
+2009-03-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/38908
+ * class.c (is_really_empty_class): New fn.
+ * cp-tree.h: Declare it.
+ * cp-objcp-common.c (cp_expr_size): Use it.
+
+ PR c++/13549
+ * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
+ * parser.c (cp_parser_postfix_expression): Call it for
+ TEMPLATE_ID_EXPR.
+ * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
+ (get_first_fn): Likewise.
+
+ PR c++/9634
+ PR c++/29469
+ PR c++/29607
+ Implement DR 224.
+ * decl.c (make_typename_type): Do look inside currently open classes.
+ * parser.c (cp_parser_lookup_name): Likewise.
+ (cp_parser_template_name): Likewise.
+ * pt.c (dependent_scope_p): New function.
+ * cp-tree.h: Declare it.
+ * class.c (currently_open_class): Return fast if T isn't a class.
+
2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
PR c++/37789
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 13fa99027aa..b8553effc03 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -5787,6 +5787,9 @@ currently_open_class (tree t)
{
int i;
+ if (!CLASS_TYPE_P (t))
+ return false;
+
/* We start looking from 1 because entry 0 is from global scope,
and has no type. */
for (i = current_class_depth; i > 0; --i)
@@ -6458,7 +6461,7 @@ is_empty_class (tree type)
if (type == error_mark_node)
return 0;
- if (! MAYBE_CLASS_TYPE_P (type))
+ if (! CLASS_TYPE_P (type))
return 0;
/* In G++ 3.2, whether or not a class was empty was determined by
@@ -6498,6 +6501,37 @@ contains_empty_class_p (tree type)
return false;
}
+/* Returns true if TYPE contains no actual data, just various
+ possible combinations of empty classes. */
+
+bool
+is_really_empty_class (tree type)
+{
+ if (is_empty_class (type))
+ return true;
+ if (CLASS_TYPE_P (type))
+ {
+ tree field;
+ tree binfo;
+ tree base_binfo;
+ int i;
+
+ for (binfo = TYPE_BINFO (type), i = 0;
+ BINFO_BASE_ITERATE (binfo, i, base_binfo); ++i)
+ if (!is_really_empty_class (BINFO_TYPE (base_binfo)))
+ return false;
+ for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
+ if (TREE_CODE (field) == FIELD_DECL
+ && !DECL_ARTIFICIAL (field)
+ && !is_really_empty_class (TREE_TYPE (field)))
+ return false;
+ return true;
+ }
+ else if (TREE_CODE (type) == ARRAY_TYPE)
+ return is_really_empty_class (TREE_TYPE (type));
+ return false;
+}
+
/* Note that NAME was looked up while the current class was being
defined and that the result of that lookup was DECL. */
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index 838a9d6fa42..bb12988d1fa 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -585,16 +585,13 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
if (block)
{
tree using_directive;
- gcc_assert (TREE_OPERAND (*expr_p,0)
- && NAMESPACE_DECL_CHECK (TREE_OPERAND (*expr_p, 0)));
+ gcc_assert (TREE_OPERAND (*expr_p, 0));
using_directive = make_node (IMPORTED_DECL);
TREE_TYPE (using_directive) = void_type_node;
IMPORTED_DECL_ASSOCIATED_DECL (using_directive)
= TREE_OPERAND (*expr_p, 0);
- DECL_NAME (using_directive)
- = DECL_NAME (TREE_OPERAND (*expr_p, 0));
TREE_CHAIN (using_directive) = BLOCK_VARS (block);
BLOCK_VARS (block) = using_directive;
}
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c
index 7d2e870bc80..2363cd7abdb 100644
--- a/gcc/cp/cp-objcp-common.c
+++ b/gcc/cp/cp-objcp-common.c
@@ -1,5 +1,5 @@
/* Some code common to C++ and ObjC++ front ends.
- Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Ziemowit Laski <zlaski@apple.com>
This file is part of GCC.
@@ -101,7 +101,7 @@ cp_expr_size (const_tree exp)
constructed, this is a valid transformation. */
|| CP_AGGREGATE_TYPE_P (type))
/* This would be wrong for a type with virtual bases. */
- return (is_empty_class (type)
+ return (is_really_empty_class (type)
? size_zero_node
: CLASSTYPE_SIZE_UNIT (type));
else
@@ -188,19 +188,14 @@ cxx_types_compatible_p (tree x, tree y)
return same_type_ignoring_top_level_qualifiers_p (x, y);
}
-tree
-cxx_staticp (tree arg)
-{
- switch (TREE_CODE (arg))
- {
- case BASELINK:
- return staticp (BASELINK_FUNCTIONS (arg));
+/* Return true if DECL is explicit member function. */
- default:
- break;
- }
-
- return NULL_TREE;
+bool
+cp_function_decl_explicit_p (tree decl)
+{
+ return (decl
+ && FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node
+ && DECL_NONCONVERTING_P (decl));
}
/* Stubs to keep c-opts.c happy. */
diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h
index f24107598aa..1ce9d36a652 100644
--- a/gcc/cp/cp-objcp-common.h
+++ b/gcc/cp/cp-objcp-common.h
@@ -1,5 +1,5 @@
/* Language hooks common to C++ and ObjC++ front ends.
- Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Ziemowit Laski <zlaski@apple.com>
This file is part of GCC.
@@ -26,6 +26,8 @@ along with GCC; see the file COPYING3. If not see
extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
tree, bool);
+extern bool cp_function_decl_explicit_p (tree decl);
+
/* Lang hooks that are shared between C++ and ObjC++ are defined here. Hooks
specific to C++ or ObjC++ go in cp/cp-lang.c and objcp/objcp-lang.c,
respectively. */
@@ -50,12 +52,8 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
#define LANG_HOOKS_POST_OPTIONS c_common_post_options
#undef LANG_HOOKS_GET_ALIAS_SET
#define LANG_HOOKS_GET_ALIAS_SET cxx_get_alias_set
-#undef LANG_HOOKS_EXPAND_EXPR
-#define LANG_HOOKS_EXPAND_EXPR c_expand_expr
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE c_common_parse_file
-#undef LANG_HOOKS_STATICP
-#define LANG_HOOKS_STATICP cxx_staticp
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl
#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
@@ -131,6 +129,8 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
#define LANG_HOOKS_TO_TARGET_CHARSET c_common_to_target_charset
#undef LANG_HOOKS_GIMPLIFY_EXPR
#define LANG_HOOKS_GIMPLIFY_EXPR cp_gimplify_expr
+#undef LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P
+#define LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P cp_function_decl_explicit_p
#undef LANG_HOOKS_OMP_PREDETERMINED_SHARING
#define LANG_HOOKS_OMP_PREDETERMINED_SHARING cxx_omp_predetermined_sharing
#undef LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 46ff9222b97..ca198561e93 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -43,9 +43,6 @@ along with GCC; see the file COPYING3. If not see
#else
#define ATTRIBUTE_GCC_CXXDIAG(m, n) ATTRIBUTE_NONNULL(m)
#endif
-extern void cp_cpp_error (cpp_reader *, int,
- const char *, va_list *)
- ATTRIBUTE_GCC_CXXDIAG(3,0);
#ifdef GCC_TOPLEV_H
#error \
In order for the format checking to accept the C++ front end diagnostic \
@@ -3660,20 +3657,8 @@ extern GTY(()) VEC(tree,gc) *local_classes;
at a particular location, we can index into the string at
any other location that provides distinguishing characters). */
-/* Define NO_DOLLAR_IN_LABEL in your favorite tm file if your assembler
- doesn't allow '$' in symbol names. */
-#ifndef NO_DOLLAR_IN_LABEL
-
-#define JOINER '$'
-
-#define AUTO_TEMP_NAME "_$tmp_"
-#define VFIELD_BASE "$vf"
-#define VFIELD_NAME "_vptr$"
-#define VFIELD_NAME_FORMAT "_vptr$%s"
-#define ANON_AGGRNAME_FORMAT "$_%d"
-
-#else /* NO_DOLLAR_IN_LABEL */
-
+/* Define NO_DOT_IN_LABEL in your favorite tm file if your assembler
+ doesn't allow '.' in symbol names. */
#ifndef NO_DOT_IN_LABEL
#define JOINER '.'
@@ -3687,6 +3672,18 @@ extern GTY(()) VEC(tree,gc) *local_classes;
#else /* NO_DOT_IN_LABEL */
+#ifndef NO_DOLLAR_IN_LABEL
+
+#define JOINER '$'
+
+#define AUTO_TEMP_NAME "_$tmp_"
+#define VFIELD_BASE "$vf"
+#define VFIELD_NAME "_vptr$"
+#define VFIELD_NAME_FORMAT "_vptr$%s"
+#define ANON_AGGRNAME_FORMAT "$_%d"
+
+#else /* NO_DOLLAR_IN_LABEL */
+
#define IN_CHARGE_NAME "__in_chrg"
#define AUTO_TEMP_NAME "__tmp_"
#define TEMP_NAME_P(ID_NODE) \
@@ -3709,8 +3706,8 @@ extern GTY(()) VEC(tree,gc) *local_classes;
sizeof (ANON_AGGRNAME_PREFIX) - 1))
#define ANON_AGGRNAME_FORMAT "__anon_%d"
-#endif /* NO_DOT_IN_LABEL */
#endif /* NO_DOLLAR_IN_LABEL */
+#endif /* NO_DOT_IN_LABEL */
#define THIS_NAME "this"
@@ -4171,6 +4168,9 @@ struct tinst_level GTY(())
e.g "int f(void)". */
extern cp_parameter_declarator *no_parameters;
+/* True if we saw "#pragma GCC java_exceptions". */
+extern bool pragma_java_exceptions;
+
/* in call.c */
extern bool check_dtor_name (tree, tree);
@@ -4240,6 +4240,7 @@ extern void finish_struct_1 (tree);
extern int resolves_to_fixed_type_p (tree, int *);
extern void init_class_processing (void);
extern int is_empty_class (tree);
+extern bool is_really_empty_class (tree);
extern void pushclass (tree);
extern void popclass (void);
extern void push_nested_class (tree);
@@ -4435,6 +4436,7 @@ extern bool decl_needed_p (tree);
extern void note_vague_linkage_fn (tree);
extern tree build_artificial_parm (tree, tree);
extern bool possibly_inlined_p (tree);
+extern int parm_index (tree);
/* in error.c */
extern void init_error (void);
@@ -4594,6 +4596,7 @@ extern struct tinst_level *current_instantiation(void);
extern tree maybe_get_template_decl_from_type_decl (tree);
extern int processing_template_parmlist;
extern bool dependent_type_p (tree);
+extern bool dependent_scope_p (tree);
extern bool any_dependent_template_arguments_p (const_tree);
extern bool dependent_template_p (tree);
extern bool dependent_template_id_p (tree, tree);
@@ -5047,7 +5050,6 @@ extern bool cp_var_mod_type_p (tree, tree);
extern void cxx_initialize_diagnostics (struct diagnostic_context *);
extern int cxx_types_compatible_p (tree, tree);
extern void init_shadowed_var_for_decl (void);
-extern tree cxx_staticp (tree);
/* in cp-gimplify.c */
extern int cp_gimplify_expr (tree *, gimple_seq *,
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 551764dc29c..b16ae262bea 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -1684,8 +1684,14 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
= DECL_SOURCE_LOCATION (newdecl);
DECL_INITIAL (old_result) = DECL_INITIAL (new_result);
if (DECL_FUNCTION_TEMPLATE_P (newdecl))
- DECL_ARGUMENTS (old_result)
- = DECL_ARGUMENTS (new_result);
+ {
+ tree parm;
+ DECL_ARGUMENTS (old_result)
+ = DECL_ARGUMENTS (new_result);
+ for (parm = DECL_ARGUMENTS (old_result); parm;
+ parm = TREE_CHAIN (parm))
+ DECL_CONTEXT (parm) = old_result;
+ }
}
return olddecl;
@@ -1918,6 +1924,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
if (TREE_CODE (newdecl) == FUNCTION_DECL)
{
+ tree parm;
+
if (DECL_TEMPLATE_INSTANTIATION (olddecl)
&& !DECL_TEMPLATE_INSTANTIATION (newdecl))
{
@@ -1974,6 +1982,11 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
/* Preserve abstractness on cloned [cd]tors. */
DECL_ABSTRACT (newdecl) = DECL_ABSTRACT (olddecl);
+ /* Update newdecl's parms to point at olddecl. */
+ for (parm = DECL_ARGUMENTS (newdecl); parm;
+ parm = TREE_CHAIN (parm))
+ DECL_CONTEXT (parm) = olddecl;
+
if (! types_match)
{
SET_DECL_LANGUAGE (olddecl, DECL_LANGUAGE (newdecl));
@@ -2006,7 +2019,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
}
DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
- /* Don't clear out the arguments if we're redefining a function. */
+ /* Don't clear out the arguments if we're just redeclaring a
+ function. */
if (DECL_ARGUMENTS (olddecl))
DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
}
@@ -2806,7 +2820,8 @@ finish_case_label (tree low_value, tree high_value)
if (!check_switch_goto (switch_stack->level))
return error_mark_node;
- r = c_add_case_label (switch_stack->cases, cond, TREE_TYPE (cond),
+ r = c_add_case_label (switch_stack->cases, cond,
+ SWITCH_STMT_TYPE (switch_stack->switch_stmt),
low_value, high_value);
/* After labels, make any new cleanups in the function go into their
@@ -2977,12 +2992,6 @@ make_typename_type (tree context, tree name, enum tag_types tag_type,
gcc_assert (TREE_CODE (name) == IDENTIFIER_NODE);
gcc_assert (TYPE_P (context));
- /* When the CONTEXT is a dependent type, NAME could refer to a
- dependent base class of CONTEXT. So we cannot peek inside it,
- even if CONTEXT is a currently open scope. */
- if (dependent_type_p (context))
- return build_typename_type (context, name, fullname, tag_type);
-
if (!MAYBE_CLASS_TYPE_P (context))
{
if (complain & tf_error)
@@ -2990,11 +2999,23 @@ make_typename_type (tree context, tree name, enum tag_types tag_type,
return error_mark_node;
}
+ /* When the CONTEXT is a dependent type, NAME could refer to a
+ dependent base class of CONTEXT. But look inside it anyway
+ if CONTEXT is a currently open scope, in case it refers to a
+ member of the current instantiation or a non-dependent base;
+ lookup will stop when we hit a dependent base. */
+ if (!dependent_scope_p (context))
+ /* We should only set WANT_TYPE when we're a nested typename type.
+ Then we can give better diagnostics if we find a non-type. */
+ t = lookup_field (context, name, 0, /*want_type=*/true);
+ else
+ t = NULL_TREE;
+
+ if (!t && dependent_type_p (context))
+ return build_typename_type (context, name, fullname, tag_type);
+
want_template = TREE_CODE (fullname) == TEMPLATE_ID_EXPR;
- /* We should only set WANT_TYPE when we're a nested typename type.
- Then we can give better diagnostics if we find a non-type. */
- t = lookup_field (context, name, 0, /*want_type=*/true);
if (!t)
{
if (complain & tf_error)
@@ -3162,10 +3183,18 @@ record_builtin_java_type (const char* name, int size)
{
tree type, decl;
if (size > 0)
- type = make_signed_type (size);
+ type = build_nonstandard_integer_type (size, 0);
else if (size > -32)
- { /* "__java_char" or ""__java_boolean". */
- type = make_unsigned_type (-size);
+ {
+ tree stype;
+ /* "__java_char" or ""__java_boolean". */
+ type = build_nonstandard_integer_type (-size, 1);
+ /* Get the signed type cached and attached to the unsigned type,
+ so it doesn't get garbage-collected at "random" times,
+ causing potential codegen differences out of different UIDs
+ and different alias set numbers. */
+ stype = build_nonstandard_integer_type (-size, 0);
+ TREE_CHAIN (type) = stype;
/*if (size == -1) TREE_SET_CODE (type, BOOLEAN_TYPE);*/
}
else
@@ -4390,9 +4419,15 @@ check_array_designated_initializer (const constructor_elt *ce)
{
/* The parser only allows identifiers as designated
initializers. */
- gcc_assert (TREE_CODE (ce->index) == IDENTIFIER_NODE);
- error ("name %qD used in a GNU-style designated "
- "initializer for an array", ce->index);
+ if (ce->index == error_mark_node)
+ error ("name used in a GNU-style designated "
+ "initializer for an array");
+ else
+ {
+ gcc_assert (TREE_CODE (ce->index) == IDENTIFIER_NODE);
+ error ("name %qD used in a GNU-style designated "
+ "initializer for an array", ce->index);
+ }
return false;
}
@@ -6540,6 +6575,8 @@ grokfndecl (tree ctype,
parms = parm;
}
DECL_ARGUMENTS (decl) = parms;
+ for (t = parms; t; t = TREE_CHAIN (t))
+ DECL_CONTEXT (t) = decl;
/* Propagate volatile out from type to decl. */
if (TYPE_VOLATILE (type))
TREE_THIS_VOLATILE (decl) = 1;
@@ -7148,13 +7185,22 @@ compute_array_index_type (tree name, tree size)
type = TREE_TYPE (size);
}
- if (value_dependent_expression_p (size))
+ /* We can only call value_dependent_expression_p on integral constant
+ expressions; the parser adds a dummy NOP_EXPR with TREE_SIDE_EFFECTS
+ set if this isn't one. */
+ if (processing_template_decl
+ && (TREE_SIDE_EFFECTS (size) || value_dependent_expression_p (size)))
{
- /* We cannot do any checking for a value-dependent SIZE. Just
- build the index type and mark that it requires structural
- equality checks. */
+ /* We cannot do any checking for a SIZE that isn't known to be
+ constant. Just build the index type and mark that it requires
+ structural equality checks. */
itype = build_index_type (build_min (MINUS_EXPR, sizetype,
size, integer_one_node));
+ if (!TREE_SIDE_EFFECTS (size))
+ {
+ TYPE_DEPENDENT_P (itype) = 1;
+ TYPE_DEPENDENT_P_VALID (itype) = 1;
+ }
SET_TYPE_STRUCTURAL_EQUALITY (itype);
return itype;
}
@@ -9300,6 +9346,14 @@ grokdeclarator (const cp_declarator *declarator,
error ("virtual non-class function %qs", name);
virtualp = 0;
}
+ else if (sfk == sfk_constructor
+ || sfk == sfk_destructor)
+ {
+ error (funcdef_flag
+ ? "%qs defined in a non-class scope"
+ : "%qs declared in a non-class scope", name);
+ sfk = sfk_none;
+ }
}
else if (TREE_CODE (type) == FUNCTION_TYPE && staticp < 2
&& !NEW_DELETE_OPNAME_P (original_name))
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index d57015005b4..2be621da7c5 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3772,7 +3772,7 @@ possibly_inlined_p (tree decl)
gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
if (DECL_UNINLINABLE (decl))
return false;
- if (!optimize)
+ if (!optimize || pragma_java_exceptions)
return DECL_DECLARED_INLINE_P (decl);
/* When optimizing, we might inline everything when flatten
attribute or heuristics inlining for size or autoinlining
@@ -3907,4 +3907,27 @@ mark_used (tree decl)
processing_template_decl = saved_processing_template_decl;
}
+/* Given function PARM_DECL PARM, return its index in the function's list
+ of parameters, beginning with 1. */
+
+int
+parm_index (tree parm)
+{
+ int index;
+ tree arg;
+
+ for (index = 1, arg = DECL_ARGUMENTS (DECL_CONTEXT (parm));
+ arg;
+ ++index, arg = TREE_CHAIN (arg))
+ {
+ if (DECL_NAME (parm) == DECL_NAME (arg))
+ break;
+ if (DECL_ARTIFICIAL (arg))
+ --index;
+ }
+
+ gcc_assert (arg);
+ return index;
+}
+
#include "gt-cp-decl2.h"
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index e2cb8bf0ecc..161fa55a17f 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1508,8 +1508,9 @@ dump_expr (tree t, int flags)
break;
case THROW_EXPR:
- pp_cxx_identifier (cxx_pp, "throw");
- dump_expr (TREE_OPERAND (t, 0), flags);
+ /* While waiting for caret diagnostics, avoid printing
+ __cxa_allocate_exception, __cxa_throw, and the like. */
+ pp_cxx_identifier (cxx_pp, "<throw-expression>");
break;
case PTRMEM_CST:
@@ -2665,39 +2666,6 @@ cp_printer (pretty_printer *pp, text_info *text, const char *spec,
#undef next_int
}
-/* Callback from cpp_error for PFILE to print diagnostics arising from
- interpreting strings. The diagnostic is of type LEVEL; MSG is the
- translated message and AP the arguments. */
-
-void
-cp_cpp_error (cpp_reader *pfile ATTRIBUTE_UNUSED, int level,
- const char *msg, va_list *ap)
-{
- diagnostic_info diagnostic;
- diagnostic_t dlevel;
- switch (level)
- {
- case CPP_DL_WARNING:
- case CPP_DL_WARNING_SYSHDR:
- dlevel = DK_WARNING;
- break;
- case CPP_DL_PEDWARN:
- dlevel = DK_PEDWARN;
- break;
- case CPP_DL_ERROR:
- dlevel = DK_ERROR;
- break;
- case CPP_DL_ICE:
- dlevel = DK_ICE;
- break;
- default:
- gcc_unreachable ();
- }
- diagnostic_set_info_translated (&diagnostic, msg, ap,
- input_location, dlevel);
- report_diagnostic (&diagnostic);
-}
-
/* Warn about the use of C++0x features when appropriate. */
void
maybe_warn_cpp0x (const char* str)
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 7813d087405..2638ccc90d9 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -353,6 +353,7 @@ choose_personality_routine (enum languages lang)
case lang_java:
state = chose_java;
+ terminate_node = built_in_decls [BUILT_IN_ABORT];
eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
? "__gcj_personality_sj0"
: "__gcj_personality_v0");
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 85c496bbaf2..8e3e4895264 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -1787,23 +1787,14 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
/* True iff this is a call to "operator new[]" instead of just
"operator new". */
bool array_p = false;
- /* True iff ARRAY_P is true and the bound of the array type is
- not necessarily a compile time constant. For example, VLA_P is
- true for "new int[f()]". */
- bool vla_p = false;
- /* The type being allocated. If ARRAY_P is true, this will be an
- ARRAY_TYPE. */
- tree full_type;
- /* If ARRAY_P is true, the element type of the array. This is an
- never ARRAY_TYPE; for something like "new int[3][4]", the
+ /* If ARRAY_P is true, the element type of the array. This is never
+ an ARRAY_TYPE; for something like "new int[3][4]", the
ELT_TYPE is "int". If ARRAY_P is false, this is the same type as
- FULL_TYPE. */
+ TYPE. */
tree elt_type;
/* The type of the new-expression. (This type is always a pointer
type.) */
tree pointer_type;
- /* A pointer type pointing to the FULL_TYPE. */
- tree full_pointer_type;
tree outer_nelts = NULL_TREE;
tree alloc_call, alloc_expr;
/* The address returned by the call to "operator new". This node is
@@ -1834,35 +1825,15 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
if (nelts)
{
- tree index;
-
outer_nelts = nelts;
array_p = true;
-
- /* ??? The middle-end will error on us for building a VLA outside a
- function context. Methinks that's not it's purvey. So we'll do
- our own VLA layout later. */
- vla_p = true;
- index = convert (sizetype, nelts);
- index = size_binop (MINUS_EXPR, index, size_one_node);
- index = build_index_type (index);
- full_type = build_cplus_array_type (type, NULL_TREE);
- /* We need a copy of the type as build_array_type will return a shared copy
- of the incomplete array type. */
- full_type = build_distinct_type_copy (full_type);
- TYPE_DOMAIN (full_type) = index;
- SET_TYPE_STRUCTURAL_EQUALITY (full_type);
}
- else
+ else if (TREE_CODE (type) == ARRAY_TYPE)
{
- full_type = type;
- if (TREE_CODE (type) == ARRAY_TYPE)
- {
- array_p = true;
- nelts = array_type_nelts_top (type);
- outer_nelts = nelts;
- type = TREE_TYPE (type);
- }
+ array_p = true;
+ nelts = array_type_nelts_top (type);
+ outer_nelts = nelts;
+ type = TREE_TYPE (type);
}
/* If our base type is an array, then make sure we know how many elements
@@ -1897,21 +1868,7 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
size = size_in_bytes (elt_type);
if (array_p)
- {
- size = size_binop (MULT_EXPR, size, convert (sizetype, nelts));
- if (vla_p)
- {
- tree n, bitsize;
-
- /* Do our own VLA layout. Setting TYPE_SIZE/_UNIT is
- necessary in order for the <INIT_EXPR <*foo> <CONSTRUCTOR
- ...>> to be valid. */
- TYPE_SIZE_UNIT (full_type) = size;
- n = convert (bitsizetype, nelts);
- bitsize = size_binop (MULT_EXPR, TYPE_SIZE (elt_type), n);
- TYPE_SIZE (full_type) = bitsize;
- }
- }
+ size = size_binop (MULT_EXPR, size, convert (sizetype, nelts));
alloc_fn = NULL_TREE;
@@ -2139,8 +2096,9 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
}
/* Now use a pointer to the type we've actually allocated. */
- full_pointer_type = build_pointer_type (full_type);
- data_addr = fold_convert (full_pointer_type, data_addr);
+ data_addr = fold_convert (pointer_type, data_addr);
+ /* Any further uses of alloc_node will want this type, too. */
+ alloc_node = fold_convert (pointer_type, alloc_node);
/* Now initialize the allocated object. Note that we preevaluate the
initialization expression, apart from the actual constructor call or
@@ -2152,8 +2110,6 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
bool stable;
bool explicit_value_init_p = false;
- init_expr = cp_build_indirect_ref (data_addr, NULL, complain);
-
if (init == void_zero_node)
{
init = NULL_TREE;
@@ -2170,7 +2126,7 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
return error_mark_node;
}
init_expr
- = build_vec_init (init_expr,
+ = build_vec_init (data_addr,
cp_build_binary_op (input_location,
MINUS_EXPR, outer_nelts,
integer_one_node,
@@ -2187,6 +2143,8 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
}
else
{
+ init_expr = cp_build_indirect_ref (data_addr, NULL, complain);
+
if (TYPE_NEEDS_CONSTRUCTING (type) && !explicit_value_init_p)
{
init_expr = build_special_member_call (init_expr,
@@ -2198,8 +2156,8 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
else if (explicit_value_init_p)
{
/* Something like `new int()'. */
- init_expr = build2 (INIT_EXPR, full_type,
- init_expr, build_value_init (full_type));
+ init_expr = build2 (INIT_EXPR, type,
+ init_expr, build_value_init (type));
}
else
{
@@ -2240,7 +2198,7 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
functions that we use for finding allocation functions. */
cleanup = (build_op_delete_call
(dcode,
- fold_convert (full_pointer_type, alloc_node),
+ alloc_node,
size,
globally_qualified_p,
placement_allocation_fn_p ? alloc_call : NULL_TREE,
@@ -2323,9 +2281,6 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
if (init_preeval_expr)
rval = build2 (COMPOUND_EXPR, TREE_TYPE (rval), init_preeval_expr, rval);
- /* Convert to the final type. */
- rval = build_nop (pointer_type, rval);
-
/* A new-expression is never an lvalue. */
gcc_assert (!lvalue_p (rval));
@@ -2665,9 +2620,10 @@ get_temp_regvar (tree type, tree init)
/* `build_vec_init' returns tree structure that performs
initialization of a vector of aggregate types.
- BASE is a reference to the vector, of ARRAY_TYPE.
+ BASE is a reference to the vector, of ARRAY_TYPE, or a pointer
+ to the first element, of POINTER_TYPE.
MAXINDEX is the maximum index of the array (one less than the
- number of elements). It is only used if
+ number of elements). It is only used if BASE is a pointer or
TYPE_DOMAIN (TREE_TYPE (BASE)) == NULL_TREE.
INIT is the (possibly NULL) initializer.
@@ -2692,7 +2648,7 @@ build_vec_init (tree base, tree maxindex, tree init,
tree size;
tree itype = NULL_TREE;
tree iterator;
- /* The type of the array. */
+ /* The type of BASE. */
tree atype = TREE_TYPE (base);
/* The type of an element in the array. */
tree type = TREE_TYPE (atype);
@@ -2708,7 +2664,7 @@ build_vec_init (tree base, tree maxindex, tree init,
int num_initialized_elts = 0;
bool is_global;
- if (TYPE_DOMAIN (atype))
+ if (TREE_CODE (atype) == ARRAY_TYPE && TYPE_DOMAIN (atype))
maxindex = array_type_nelts (atype);
if (maxindex == NULL_TREE || maxindex == error_mark_node)
@@ -2717,7 +2673,7 @@ build_vec_init (tree base, tree maxindex, tree init,
if (explicit_value_init_p)
gcc_assert (!init);
- inner_elt_type = strip_array_types (atype);
+ inner_elt_type = strip_array_types (type);
if (init
&& (from_array == 2
? (!CLASS_TYPE_P (inner_elt_type)
@@ -2734,15 +2690,20 @@ build_vec_init (tree base, tree maxindex, tree init,
brace-enclosed initializers. In this case, digest_init and
store_constructor will handle the semantics for us. */
+ gcc_assert (TREE_CODE (atype) == ARRAY_TYPE);
stmt_expr = build2 (INIT_EXPR, atype, base, init);
return stmt_expr;
}
maxindex = cp_convert (ptrdiff_type_node, maxindex);
- ptype = build_pointer_type (type);
size = size_in_bytes (type);
- if (TREE_CODE (TREE_TYPE (base)) == ARRAY_TYPE)
- base = cp_convert (ptype, decay_conversion (base));
+ if (TREE_CODE (atype) == ARRAY_TYPE)
+ {
+ ptype = build_pointer_type (type);
+ base = cp_convert (ptype, decay_conversion (base));
+ }
+ else
+ ptype = atype;
/* The code we are generating looks like:
({
@@ -2954,10 +2915,13 @@ build_vec_init (tree base, tree maxindex, tree init,
stmt_expr = finish_init_stmts (is_global, stmt_expr, compound_stmt);
- /* Now convert make the result have the correct type. */
- atype = build_pointer_type (atype);
- stmt_expr = build1 (NOP_EXPR, atype, stmt_expr);
- stmt_expr = cp_build_indirect_ref (stmt_expr, NULL, complain);
+ /* Now make the result have the correct type. */
+ if (TREE_CODE (atype) == ARRAY_TYPE)
+ {
+ atype = build_pointer_type (atype);
+ stmt_expr = build1 (NOP_EXPR, atype, stmt_expr);
+ stmt_expr = cp_build_indirect_ref (stmt_expr, NULL, complain);
+ }
current_stmt_tree ()->stmts_are_full_exprs_p = destroy_temps;
return stmt_expr;
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index d708b09658b..66377ff1564 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -81,6 +81,8 @@ struct impl_files
static struct impl_files *impl_file_chain;
+/* True if we saw "#pragma GCC java_exceptions". */
+bool pragma_java_exceptions;
void
cxx_finish (void)
@@ -430,6 +432,7 @@ handle_pragma_java_exceptions (cpp_reader* dfile ATTRIBUTE_UNUSED)
warning (0, "junk at end of #pragma GCC java_exceptions");
choose_personality_routine (lang_java);
+ pragma_java_exceptions = true;
}
/* Issue an error message indicating that the lookup of NAME (an
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index c72747c768e..eabab7fb510 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -2143,27 +2143,6 @@ write_expression (tree expr)
{
enum tree_code code = TREE_CODE (expr);
- /* Inside decltype we can simplify some expressions, since we're only
- interested in the type. */
- if (skip_evaluation)
- {
- tree type = describable_type (expr);
- if (type == NULL_TREE)
- ;
- else if (TREE_CODE (type) == REFERENCE_TYPE)
- {
- write_string ("sT");
- write_type (TREE_TYPE (type));
- return;
- }
- else
- {
- write_string ("sR");
- write_type (type);
- return;
- }
- }
-
/* Skip NOP_EXPRs. They can occur when (say) a pointer argument
is converted (via qualification conversions) to another
type. */
@@ -2210,10 +2189,12 @@ write_expression (tree expr)
write_template_arg_literal (expr);
else if (code == PARM_DECL)
{
- /* A function parameter used under decltype in a late-specified
- return type. Represented with a type placeholder. */
- write_string ("sT");
- write_type (non_reference (TREE_TYPE (expr)));
+ /* A function parameter used in a late-specified return type. */
+ int index = parm_index (expr);
+ write_string ("fp");
+ if (index > 1)
+ write_unsigned_number (index - 2);
+ write_char ('_');
}
else if (DECL_P (expr))
{
@@ -2231,6 +2212,12 @@ write_expression (tree expr)
write_string ("st");
write_type (TREE_OPERAND (expr, 0));
}
+ else if (TREE_CODE (expr) == ALIGNOF_EXPR
+ && TYPE_P (TREE_OPERAND (expr, 0)))
+ {
+ write_string ("at");
+ write_type (TREE_OPERAND (expr, 0));
+ }
else if (abi_version_at_least (2) && TREE_CODE (expr) == SCOPE_REF)
{
tree scope = TREE_OPERAND (expr, 0);
@@ -2298,9 +2285,16 @@ write_expression (tree expr)
write_template_args (template_args);
}
}
+ else if (TREE_CODE (expr) == INDIRECT_REF
+ && TREE_TYPE (TREE_OPERAND (expr, 0))
+ && TREE_CODE (TREE_TYPE (TREE_OPERAND (expr, 0))) == REFERENCE_TYPE)
+ {
+ write_expression (TREE_OPERAND (expr, 0));
+ }
else
{
int i;
+ const char *name;
/* When we bind a variable or function to a non-type template
argument with reference type, we create an ADDR_EXPR to show
@@ -2338,7 +2332,14 @@ write_expression (tree expr)
}
/* If it wasn't any of those, recursively expand the expression. */
- write_string (operator_name_info[(int) code].mangled_name);
+ name = operator_name_info[(int) code].mangled_name;
+ if (name == NULL)
+ {
+ sorry ("mangling %C", code);
+ return;
+ }
+ else
+ write_string (name);
switch (code)
{
@@ -2351,23 +2352,29 @@ write_expression (tree expr)
case CAST_EXPR:
write_type (TREE_TYPE (expr));
- /* There is no way to mangle a zero-operand cast like
- "T()". */
- if (!TREE_OPERAND (expr, 0))
- sorry ("zero-operand casts cannot be mangled due to a defect "
- "in the C++ ABI");
- else if (list_length (TREE_OPERAND (expr, 0)) > 1)
- sorry ("mangling function-style cast with more than one argument");
- else
+ if (list_length (TREE_OPERAND (expr, 0)) == 1)
write_expression (TREE_VALUE (TREE_OPERAND (expr, 0)));
+ else
+ {
+ tree args = TREE_OPERAND (expr, 0);
+ write_char ('_');
+ for (; args; args = TREE_CHAIN (args))
+ write_expression (TREE_VALUE (args));
+ write_char ('E');
+ }
break;
+ /* FIXME these should have a distinct mangling. */
case STATIC_CAST_EXPR:
case CONST_CAST_EXPR:
write_type (TREE_TYPE (expr));
write_expression (TREE_OPERAND (expr, 0));
break;
+ case NEW_EXPR:
+ sorry ("mangling new-expression");
+ break;
+
/* Handle pointers-to-members specially. */
case SCOPE_REF:
write_type (TREE_OPERAND (expr, 0));
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 5b4c273dda9..e632fe0c9e6 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -436,7 +436,7 @@ use_thunk (tree thunk_fndecl, bool emit_p)
BLOCK_VARS (fn_block) = a;
DECL_INITIAL (thunk_fndecl) = fn_block;
init_function_start (thunk_fndecl);
- crtl->is_thunk = 1;
+ cfun->is_thunk = 1;
assemble_start_function (thunk_fndecl, fnname);
targetm.asm_out.output_mi_thunk (asm_out_file, thunk_fndecl,
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index b31742c669c..5a92dc6ed89 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -813,9 +813,6 @@ pushdecl_maybe_friend (tree x, bool is_friend)
}
}
- if (TREE_CODE (x) == FUNCTION_DECL || DECL_FUNCTION_TEMPLATE_P (x))
- check_default_args (x);
-
check_template_shadow (x);
/* If this is a function conjured up by the back end, massage it
@@ -826,11 +823,10 @@ pushdecl_maybe_friend (tree x, bool is_friend)
SET_DECL_LANGUAGE (x, lang_c);
}
+ t = x;
if (DECL_NON_THUNK_FUNCTION_P (x) && ! DECL_FUNCTION_MEMBER_P (x))
{
t = push_overloaded_decl (x, PUSH_LOCAL, is_friend);
- if (t != x)
- POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, t);
if (!namespace_bindings_p ())
/* We do not need to create a binding for this name;
push_overloaded_decl will have already done so if
@@ -842,9 +838,14 @@ pushdecl_maybe_friend (tree x, bool is_friend)
t = push_overloaded_decl (x, PUSH_GLOBAL, is_friend);
if (t == x)
add_decl_to_level (x, NAMESPACE_LEVEL (CP_DECL_CONTEXT (t)));
- POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, t);
}
+ if (TREE_CODE (x) == FUNCTION_DECL || DECL_FUNCTION_TEMPLATE_P (x))
+ check_default_args (x);
+
+ if (t != x || DECL_FUNCTION_TEMPLATE_P (t))
+ POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, t);
+
/* If declaring a type as a typedef, copy the type (unless we're
at line 0), and install this TYPE_DECL as the new type's typedef
name. See the extensive comment in ../c-decl.c (pushdecl). */
@@ -1031,7 +1032,10 @@ pushdecl_maybe_friend (tree x, bool is_friend)
}
}
- if (warn_shadow && !err)
+ if (warn_shadow && !err
+ /* Don't complain about the parms we push and then pop
+ while tentatively parsing a function declarator. */
+ && !(TREE_CODE (x) == PARM_DECL && DECL_CONTEXT (x) == NULL_TREE))
{
warning (OPT_Wshadow, "declaration of %q#D shadows a parameter", x);
warning (OPT_Wshadow, "%Jshadowed declaration is here", oldlocal);
@@ -3337,7 +3341,8 @@ do_namespace_alias (tree alias, tree name_space)
pushdecl (alias);
/* Emit debug info for namespace alias. */
- (*debug_hooks->global_decl) (alias);
+ if (!building_stmt_tree ())
+ (*debug_hooks->global_decl) (alias);
}
/* Like pushdecl, only it places X in the current namespace,
@@ -5386,7 +5391,12 @@ cp_emit_debug_info_for_using (tree t, tree context)
/* FIXME: Handle TEMPLATE_DECLs. */
for (t = OVL_CURRENT (t); t; t = OVL_NEXT (t))
if (TREE_CODE (t) != TEMPLATE_DECL)
- (*debug_hooks->imported_module_or_decl) (t, NULL_TREE, context, false);
+ {
+ if (building_stmt_tree ())
+ add_stmt (build_stmt (USING_STMT, t));
+ else
+ (*debug_hooks->imported_module_or_decl) (t, NULL_TREE, context, false);
+ }
}
#include "gt-cp-name-lookup.h"
diff --git a/gcc/cp/operators.def b/gcc/cp/operators.def
index 698f0de43f4..20d811b812b 100644
--- a/gcc/cp/operators.def
+++ b/gcc/cp/operators.def
@@ -94,7 +94,7 @@ DEF_SIMPLE_OPERATOR ("++", PREINCREMENT_EXPR, "pp", 1)
DEF_SIMPLE_OPERATOR ("--", PREDECREMENT_EXPR, "mm", 1)
DEF_SIMPLE_OPERATOR ("sizeof", SIZEOF_EXPR, "sz", 1)
/* These are extensions. */
-DEF_SIMPLE_OPERATOR ("alignof", ALIGNOF_EXPR, "v17alignof", 1)
+DEF_SIMPLE_OPERATOR ("alignof", ALIGNOF_EXPR, "az", 1)
DEF_SIMPLE_OPERATOR ("__imag__", IMAGPART_EXPR, "v18__imag__", 1)
DEF_SIMPLE_OPERATOR ("__real__", REALPART_EXPR, "v18__real__", 1)
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 80a767ebe2d..09e19a23a5f 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -77,6 +77,8 @@ typedef struct cp_token GTY (())
KEYWORD is RID_MAX) iff this name was looked up and found to be
ambiguous. An error has already been reported. */
BOOL_BITFIELD ambiguous_p : 1;
+ /* The location at which this token was found. */
+ location_t location;
/* The value associated with this token, if any. */
union cp_token_value {
/* Used for CPP_NESTED_NAME_SPECIFIER and CPP_TEMPLATE_ID. */
@@ -84,8 +86,6 @@ typedef struct cp_token GTY (())
/* Use for all other tokens. */
tree GTY((tag ("0"))) value;
} GTY((desc ("(%1.type == CPP_TEMPLATE_ID) || (%1.type == CPP_NESTED_NAME_SPECIFIER)"))) u;
- /* The location at which this token was found. */
- location_t location;
} cp_token;
/* We use a stack of token pointer for saving token sets. */
@@ -95,8 +95,7 @@ DEF_VEC_ALLOC_P (cp_token_position,heap);
static cp_token eof_token =
{
- CPP_EOF, RID_MAX, 0, PRAGMA_NONE, false, 0, { NULL },
- 0
+ CPP_EOF, RID_MAX, 0, PRAGMA_NONE, false, 0, 0, { NULL }
};
/* The cp_lexer structure represents the C++ lexer. It is responsible
@@ -310,8 +309,7 @@ cp_lexer_new_main (void)
/* Subsequent preprocessor diagnostics should use compiler
diagnostic functions to get the compiler source location. */
- cpp_get_options (parse_in)->client_diagnostic = true;
- cpp_get_callbacks (parse_in)->error = cp_cpp_error;
+ done_lexing = true;
gcc_assert (lexer->next_token->type != CPP_PURGED);
return lexer;
@@ -1616,7 +1614,7 @@ static tree cp_parser_delete_expression
static tree cp_parser_cast_expression
(cp_parser *, bool, bool, cp_id_kind *);
static tree cp_parser_binary_expression
- (cp_parser *, bool, enum cp_parser_prec, cp_id_kind *);
+ (cp_parser *, bool, bool, enum cp_parser_prec, cp_id_kind *);
static tree cp_parser_question_colon_clause
(cp_parser *, tree);
static tree cp_parser_assignment_expression
@@ -4732,7 +4730,8 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
}
koenig_p = false;
- if (idk == CP_ID_KIND_UNQUALIFIED)
+ if (idk == CP_ID_KIND_UNQUALIFIED
+ || idk == CP_ID_KIND_TEMPLATE_ID)
{
if (TREE_CODE (postfix_expression) == IDENTIFIER_NODE)
{
@@ -4823,9 +4822,6 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
koenig_p,
tf_warning_or_error);
- if (warn_disallowed_functions)
- warn_if_disallowed_function_p (postfix_expression);
-
/* The POSTFIX_EXPRESSION is certainly no longer an id. */
idk = CP_ID_KIND_NONE;
}
@@ -6215,6 +6211,7 @@ cp_parser_cast_expression (cp_parser *parser, bool address_p, bool cast_p,
static tree
cp_parser_binary_expression (cp_parser* parser, bool cast_p,
+ bool no_toplevel_fold_p,
enum cp_parser_prec prec,
cp_id_kind * pidk)
{
@@ -6297,6 +6294,7 @@ cp_parser_binary_expression (cp_parser* parser, bool cast_p,
goto get_rhs;
pop:
+ lookahead_prec = new_prec;
/* If the stack is not empty, we have parsed into LHS the right side
(`4' in the example above) of an expression we had suspended.
We can use the information on the stack to recover the LHS (`3')
@@ -6321,8 +6319,14 @@ cp_parser_binary_expression (cp_parser* parser, bool cast_p,
pass the correct tree_code unless the unary expression was
surrounded by parentheses.
*/
- lhs = build_x_binary_op (tree_type, lhs, lhs_type, rhs, rhs_type,
- &overloaded_p, tf_warning_or_error);
+ if (no_toplevel_fold_p
+ && lookahead_prec <= prec
+ && sp == stack
+ && TREE_CODE_CLASS (tree_type) == tcc_comparison)
+ lhs = build2 (tree_type, boolean_type_node, lhs, rhs);
+ else
+ lhs = build_x_binary_op (tree_type, lhs, lhs_type, rhs, rhs_type,
+ &overloaded_p, tf_warning_or_error);
lhs_type = tree_type;
/* If the binary operator required the use of an overloaded operator,
@@ -6408,7 +6412,8 @@ cp_parser_assignment_expression (cp_parser* parser, bool cast_p,
else
{
/* Parse the binary expressions (logical-or-expression). */
- expr = cp_parser_binary_expression (parser, cast_p, PREC_NOT_OPERATOR, pidk);
+ expr = cp_parser_binary_expression (parser, cast_p, false,
+ PREC_NOT_OPERATOR, pidk);
/* If the next token is a `?' then we're actually looking at a
conditional-expression. */
if (cp_lexer_next_token_is (parser->lexer, CPP_QUERY))
@@ -10323,7 +10328,7 @@ cp_parser_template_name (cp_parser* parser,
&& !template_keyword_p
&& parser->scope && TYPE_P (parser->scope)
&& check_dependency_p
- && dependent_type_p (parser->scope)
+ && dependent_scope_p (parser->scope)
/* Do not do this for dtors (or ctors), since they never
need the template keyword before their name. */
&& !constructor_name_p (identifier, parser->scope))
@@ -10882,7 +10887,6 @@ cp_parser_explicit_specialization (cp_parser* parser)
if (!begin_specialization ())
{
end_specialization ();
- cp_parser_skip_to_end_of_block_or_statement (parser);
return;
}
@@ -11580,7 +11584,11 @@ cp_parser_elaborated_type_specifier (cp_parser* parser,
type = make_typename_type (parser->scope, decl,
typename_type,
/*complain=*/tf_error);
- else
+ /* If the `typename' keyword is in effect and DECL is not a type
+ decl. Then type is non existant. */
+ else if (tag_type == typename_type && TREE_CODE (decl) != TYPE_DECL)
+ type = NULL_TREE;
+ else
type = TREE_TYPE (decl);
}
@@ -13268,6 +13276,13 @@ cp_parser_direct_declarator (cp_parser* parser,
&non_constant_p);
if (!non_constant_p)
bounds = fold_non_dependent_expr (bounds);
+ else if (processing_template_decl)
+ {
+ /* Remember this wasn't a constant-expression. */
+ bounds = build_nop (TREE_TYPE (bounds), bounds);
+ TREE_SIDE_EFFECTS (bounds) = 1;
+ }
+
/* Normally, the array bound must be an integral constant
expression. However, as an extension, we allow VLAs
in function scopes. */
@@ -17023,35 +17038,11 @@ cp_parser_lookup_name (cp_parser *parser, tree name,
cannot look up the name if the scope is not a class type; it
might, for example, be a template type parameter. */
dependent_p = (TYPE_P (parser->scope)
- && !(parser->in_declarator_p
- && currently_open_class (parser->scope))
- && dependent_type_p (parser->scope));
+ && dependent_scope_p (parser->scope));
if ((check_dependency || !CLASS_TYPE_P (parser->scope))
- && dependent_p)
- {
- if (tag_type)
- {
- tree type;
-
- /* The resolution to Core Issue 180 says that `struct
- A::B' should be considered a type-name, even if `A'
- is dependent. */
- type = make_typename_type (parser->scope, name, tag_type,
- /*complain=*/tf_error);
- decl = TYPE_NAME (type);
- }
- else if (is_template
- && (cp_parser_next_token_ends_template_argument_p (parser)
- || cp_lexer_next_token_is (parser->lexer,
- CPP_CLOSE_PAREN)))
- decl = make_unbound_class_template (parser->scope,
- name, NULL_TREE,
- /*complain=*/tf_error);
- else
- decl = build_qualified_name (/*type=*/NULL_TREE,
- parser->scope, name,
- is_template);
- }
+ && dependent_p)
+ /* Defer lookup. */
+ decl = error_mark_node;
else
{
tree pushed_scope = NULL_TREE;
@@ -17072,14 +17063,42 @@ cp_parser_lookup_name (cp_parser *parser, tree name,
/*complain=*/true);
/* If we have a single function from a using decl, pull it out. */
- if (decl
- && TREE_CODE (decl) == OVERLOAD
+ if (TREE_CODE (decl) == OVERLOAD
&& !really_overloaded_fn (decl))
decl = OVL_FUNCTION (decl);
if (pushed_scope)
pop_scope (pushed_scope);
}
+
+ /* If the scope is a dependent type and either we deferred lookup or
+ we did lookup but didn't find the name, rememeber the name. */
+ if (decl == error_mark_node && TYPE_P (parser->scope)
+ && dependent_type_p (parser->scope))
+ {
+ if (tag_type)
+ {
+ tree type;
+
+ /* The resolution to Core Issue 180 says that `struct
+ A::B' should be considered a type-name, even if `A'
+ is dependent. */
+ type = make_typename_type (parser->scope, name, tag_type,
+ /*complain=*/tf_error);
+ decl = TYPE_NAME (type);
+ }
+ else if (is_template
+ && (cp_parser_next_token_ends_template_argument_p (parser)
+ || cp_lexer_next_token_is (parser->lexer,
+ CPP_CLOSE_PAREN)))
+ decl = make_unbound_class_template (parser->scope,
+ name, NULL_TREE,
+ /*complain=*/tf_error);
+ else
+ decl = build_qualified_name (/*type=*/NULL_TREE,
+ parser->scope, name,
+ is_template);
+ }
parser->qualifying_scope = parser->scope;
parser->object_scope = NULL_TREE;
}
@@ -18286,6 +18305,11 @@ cp_parser_late_parsing_default_args (cp_parser *parser, tree fn)
/* Parse the assignment-expression. */
parsed_arg = cp_parser_assignment_expression (parser, /*cast_p=*/false, NULL);
+ if (parsed_arg == error_mark_node)
+ {
+ cp_parser_pop_lexer (parser);
+ continue;
+ }
if (!processing_template_decl)
parsed_arg = check_default_argument (TREE_VALUE (parm), parsed_arg);
@@ -21000,41 +21024,39 @@ cp_parser_omp_flush (cp_parser *parser, cp_token *pragma_tok)
static tree
cp_parser_omp_for_cond (cp_parser *parser, tree decl)
{
- tree lhs = cp_parser_cast_expression (parser, false, false, NULL), rhs;
- enum tree_code op;
- cp_token *token;
+ tree cond = cp_parser_binary_expression (parser, false, true,
+ PREC_NOT_OPERATOR, NULL);
+ bool overloaded_p;
- if (lhs != decl)
+ if (cond == error_mark_node
+ || cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON))
{
cp_parser_skip_to_end_of_statement (parser);
return error_mark_node;
}
- token = cp_lexer_peek_token (parser->lexer);
- op = binops_by_token [token->type].tree_type;
- switch (op)
+ switch (TREE_CODE (cond))
{
- case LT_EXPR:
- case LE_EXPR:
case GT_EXPR:
case GE_EXPR:
+ case LT_EXPR:
+ case LE_EXPR:
break;
default:
- cp_parser_skip_to_end_of_statement (parser);
return error_mark_node;
}
- cp_lexer_consume_token (parser->lexer);
- rhs = cp_parser_binary_expression (parser, false,
- PREC_RELATIONAL_EXPRESSION, NULL);
- if (rhs == error_mark_node
- || cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON))
- {
- cp_parser_skip_to_end_of_statement (parser);
- return error_mark_node;
- }
+ /* If decl is an iterator, preserve LHS and RHS of the relational
+ expr until finish_omp_for. */
+ if (decl
+ && (type_dependent_expression_p (decl)
+ || CLASS_TYPE_P (TREE_TYPE (decl))))
+ return cond;
- return build2 (op, boolean_type_node, lhs, rhs);
+ return build_x_binary_op (TREE_CODE (cond),
+ TREE_OPERAND (cond, 0), ERROR_MARK,
+ TREE_OPERAND (cond, 1), ERROR_MARK,
+ &overloaded_p, tf_warning_or_error);
}
/* Helper function, to parse omp for increment expression. */
@@ -21083,7 +21105,7 @@ cp_parser_omp_for_incr (cp_parser *parser, tree decl)
return build2 (MODIFY_EXPR, TREE_TYPE (decl), decl, rhs);
}
- lhs = cp_parser_binary_expression (parser, false,
+ lhs = cp_parser_binary_expression (parser, false, false,
PREC_ADDITIVE_EXPRESSION, NULL);
token = cp_lexer_peek_token (parser->lexer);
decl_first = lhs == decl;
@@ -21097,7 +21119,7 @@ cp_parser_omp_for_incr (cp_parser *parser, tree decl)
{
op = token->type == CPP_PLUS ? PLUS_EXPR : MINUS_EXPR;
cp_lexer_consume_token (parser->lexer);
- rhs = cp_parser_binary_expression (parser, false,
+ rhs = cp_parser_binary_expression (parser, false, false,
PREC_ADDITIVE_EXPRESSION, NULL);
token = cp_lexer_peek_token (parser->lexer);
if (token->type == CPP_PLUS || token->type == CPP_MINUS || decl_first)
@@ -21406,16 +21428,7 @@ cp_parser_omp_for_loop (cp_parser *parser, tree clauses, tree *par_clauses)
cond = NULL;
if (cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON))
- {
- /* If decl is an iterator, preserve LHS and RHS of the relational
- expr until finish_omp_for. */
- if (decl
- && (type_dependent_expression_p (decl)
- || CLASS_TYPE_P (TREE_TYPE (decl))))
- cond = cp_parser_omp_for_cond (parser, decl);
- else
- cond = cp_parser_condition (parser);
- }
+ cond = cp_parser_omp_for_cond (parser, decl);
cp_parser_require (parser, CPP_SEMICOLON, "%<;%>");
incr = NULL;
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index dacc8689f38..5092c72b177 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -174,6 +174,7 @@ static tree tsubst (tree, tree, tsubst_flags_t, tree);
static tree tsubst_expr (tree, tree, tsubst_flags_t, tree, bool);
static tree tsubst_copy (tree, tree, tsubst_flags_t, tree);
static tree tsubst_pack_expansion (tree, tree, tsubst_flags_t, tree);
+static tree tsubst_decl (tree, tree, tsubst_flags_t);
/* Make the current scope suitable for access checking when we are
processing T. T can be FUNCTION_DECL for instantiated function
@@ -2217,17 +2218,21 @@ check_explicit_specialization (tree declarator,
the specialization of it. */
if (tsk == tsk_template)
{
+ tree result = DECL_TEMPLATE_RESULT (tmpl);
SET_DECL_TEMPLATE_SPECIALIZATION (tmpl);
- DECL_INITIAL (DECL_TEMPLATE_RESULT (tmpl)) = NULL_TREE;
+ DECL_INITIAL (result) = NULL_TREE;
if (have_def)
{
+ tree parm;
DECL_SOURCE_LOCATION (tmpl) = DECL_SOURCE_LOCATION (decl);
- DECL_SOURCE_LOCATION (DECL_TEMPLATE_RESULT (tmpl))
+ DECL_SOURCE_LOCATION (result)
= DECL_SOURCE_LOCATION (decl);
/* We want to use the argument list specified in the
definition, not in the original declaration. */
- DECL_ARGUMENTS (DECL_TEMPLATE_RESULT (tmpl))
- = DECL_ARGUMENTS (decl);
+ DECL_ARGUMENTS (result) = DECL_ARGUMENTS (decl);
+ for (parm = DECL_ARGUMENTS (result); parm;
+ parm = TREE_CHAIN (parm))
+ DECL_CONTEXT (parm) = result;
}
return tmpl;
}
@@ -7431,6 +7436,37 @@ tsubst_template_arg (tree t, tree args, tsubst_flags_t complain, tree in_decl)
return r;
}
+/* Give a chain SPEC_PARM of PARM_DECLs, pack them into a
+ NONTYPE_ARGUMENT_PACK. */
+
+static tree
+make_fnparm_pack (tree spec_parm)
+{
+ /* Collect all of the extra "packed" parameters into an
+ argument pack. */
+ tree parmvec;
+ tree parmtypevec;
+ tree argpack = make_node (NONTYPE_ARGUMENT_PACK);
+ tree argtypepack = make_node (TYPE_ARGUMENT_PACK);
+ int i, len = list_length (spec_parm);
+
+ /* Fill in PARMVEC and PARMTYPEVEC with all of the parameters. */
+ parmvec = make_tree_vec (len);
+ parmtypevec = make_tree_vec (len);
+ for (i = 0; i < len; i++, spec_parm = TREE_CHAIN (spec_parm))
+ {
+ TREE_VEC_ELT (parmvec, i) = spec_parm;
+ TREE_VEC_ELT (parmtypevec, i) = TREE_TYPE (spec_parm);
+ }
+
+ /* Build the argument packs. */
+ SET_ARGUMENT_PACK_ARGS (argpack, parmvec);
+ SET_ARGUMENT_PACK_ARGS (argtypepack, parmtypevec);
+ TREE_TYPE (argpack) = argtypepack;
+
+ return argpack;
+}
+
/* Substitute ARGS into T, which is an pack expansion
(i.e. TYPE_PACK_EXPANSION or EXPR_PACK_EXPANSION). Returns a
TREE_VEC with the substituted arguments, a PACK_EXPANSION_* node
@@ -7445,6 +7481,7 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
tree first_arg_pack; int i, len = -1;
tree result;
int incomplete = 0;
+ bool very_local_specializations = false;
gcc_assert (PACK_EXPANSION_P (t));
pattern = PACK_EXPANSION_PATTERN (t);
@@ -7461,7 +7498,18 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
tree orig_arg = NULL_TREE;
if (TREE_CODE (parm_pack) == PARM_DECL)
- arg_pack = retrieve_local_specialization (parm_pack);
+ {
+ arg_pack = retrieve_local_specialization (parm_pack);
+ if (arg_pack == NULL_TREE)
+ {
+ /* This can happen for a parameter name used later in a function
+ declaration (such as in a late-specified return type). Just
+ make a dummy decl, since it's only used for its type. */
+ gcc_assert (skip_evaluation);
+ arg_pack = tsubst_decl (parm_pack, args, complain);
+ arg_pack = make_fnparm_pack (arg_pack);
+ }
+ }
else
{
int level, idx, levels;
@@ -7555,6 +7603,17 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
if (len < 0)
return error_mark_node;
+ if (!local_specializations)
+ {
+ /* We're in a late-specified return type, so we don't have a local
+ specializations table. Create one for doing this expansion. */
+ very_local_specializations = true;
+ local_specializations = htab_create (37,
+ hash_local_specialization,
+ eq_local_specializations,
+ NULL);
+ }
+
/* For each argument in each argument pack, substitute into the
pattern. */
result = make_tree_vec (len + incomplete);
@@ -7616,7 +7675,7 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
break;
}
}
-
+
/* Update ARGS to restore the substitution from parameter packs to
their argument packs. */
for (pack = packs; pack; pack = TREE_CHAIN (pack))
@@ -7639,6 +7698,12 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
}
}
+ if (very_local_specializations)
+ {
+ htab_delete (local_specializations);
+ local_specializations = NULL;
+ }
+
return result;
}
@@ -9080,8 +9145,19 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
/*integral_constant_expression_p=*/false);
max = fold_decl_constant_value (max);
+ /* If we're in a partial instantiation, preserve the magic NOP_EXPR
+ with TREE_SIDE_EFFECTS that indicates this is not an integral
+ constant expression. */
+ if (processing_template_decl
+ && TREE_SIDE_EFFECTS (omax) && TREE_CODE (omax) == NOP_EXPR)
+ {
+ gcc_assert (TREE_CODE (max) == NOP_EXPR);
+ TREE_SIDE_EFFECTS (max) = 1;
+ }
+
if (TREE_CODE (max) != INTEGER_CST
&& !at_function_scope_p ()
+ && !TREE_SIDE_EFFECTS (max)
&& !value_dependent_expression_p (max))
{
if (complain & tf_error)
@@ -9898,16 +9974,14 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
if (r == NULL)
{
/* This can happen for a parameter name used later in a function
- declaration (such as in a late-specified return type).
- Replace it with an arbitrary expression with the same type
- (*(T*)0). This should only occur in an unevaluated context
- (i.e. decltype). */
- gcc_assert (skip_evaluation);
- r = non_reference (TREE_TYPE (t));
- r = tsubst (r, args, complain, in_decl);
- r = build_pointer_type (r);
- r = build_c_cast (r, null_node);
- return cp_build_indirect_ref (r, NULL, tf_warning_or_error);
+ declaration (such as in a late-specified return type). Just
+ make a dummy decl, since it's only used for its type. */
+ gcc_assert (skip_evaluation);
+ r = tsubst_decl (t, args, complain);
+ /* Give it the template pattern as its context; its true context
+ hasn't been instantiated yet and this is good enough for
+ mangling. */
+ DECL_CONTEXT (r) = DECL_CONTEXT (t);
}
if (TREE_CODE (r) == ARGUMENT_PACK_SELECT)
@@ -15464,37 +15538,12 @@ instantiate_decl (tree d, int defer_ok,
}
if (tmpl_parm && FUNCTION_PARAMETER_PACK_P (tmpl_parm))
{
- /* Collect all of the extra "packed" parameters into an
- argument pack. */
- tree parmvec;
- tree parmtypevec;
- tree argpack = make_node (NONTYPE_ARGUMENT_PACK);
- tree argtypepack = make_node (TYPE_ARGUMENT_PACK);
- int i, len = 0;
- tree t;
-
- /* Count how many parameters remain. */
- for (t = spec_parm; t; t = TREE_CHAIN (t))
- len++;
-
- /* Fill in PARMVEC and PARMTYPEVEC with all of the parameters. */
- parmvec = make_tree_vec (len);
- parmtypevec = make_tree_vec (len);
- for(i = 0; i < len; i++, spec_parm = TREE_CHAIN (spec_parm))
- {
- TREE_VEC_ELT (parmvec, i) = spec_parm;
- TREE_VEC_ELT (parmtypevec, i) = TREE_TYPE (spec_parm);
- }
-
- /* Build the argument packs. */
- SET_ARGUMENT_PACK_ARGS (argpack, parmvec);
- SET_ARGUMENT_PACK_ARGS (argtypepack, parmtypevec);
- TREE_TYPE (argpack) = argtypepack;
-
/* Register the (value) argument pack as a specialization of
TMPL_PARM, then move on. */
+ tree argpack = make_fnparm_pack (spec_parm);
register_local_specialization (argpack, tmpl_parm);
tmpl_parm = TREE_CHAIN (tmpl_parm);
+ spec_parm = NULL_TREE;
}
gcc_assert (!spec_parm);
@@ -15970,9 +16019,9 @@ dependent_type_p_r (tree type)
&& !TREE_CONSTANT (TYPE_MAX_VALUE (type)))
{
/* If this is the TYPE_DOMAIN of an array type, consider it
- dependent. */
- return (value_dependent_expression_p (TYPE_MAX_VALUE (type))
- || type_dependent_expression_p (TYPE_MAX_VALUE (type)));
+ dependent. We already checked for value-dependence in
+ compute_array_index_type. */
+ return type_dependent_expression_p (TYPE_MAX_VALUE (type));
}
/* -- a template-id in which either the template name is a template
@@ -16067,6 +16116,16 @@ dependent_type_p (tree type)
return TYPE_DEPENDENT_P (type);
}
+/* Returns TRUE if SCOPE is a dependent scope, in which we can't do any
+ lookup. In other words, a dependent type that is not the current
+ instantiation. */
+
+bool
+dependent_scope_p (tree scope)
+{
+ return dependent_type_p (scope) && !currently_open_class (scope);
+}
+
/* Returns TRUE if EXPRESSION is dependent, according to CRITERION. */
static bool
@@ -16088,7 +16147,7 @@ dependent_scope_ref_p (tree expression, bool criterion (tree))
An id-expression is type-dependent if it contains a
nested-name-specifier that contains a class-name that names a
dependent type. */
- /* The suggested resolution to Core Issue 2 implies that if the
+ /* The suggested resolution to Core Issue 224 implies that if the
qualifying type is the current class, then we must peek
inside it. */
if (DECL_P (name)
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 840b0e0d394..71fc43e855a 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -945,8 +945,6 @@ finish_switch_cond (tree cond, tree switch_stmt)
tree orig_type = NULL;
if (!processing_template_decl)
{
- tree index;
-
/* Convert the condition to an integer or enumeration type. */
cond = build_expr_type_conversion (WANT_INT | WANT_ENUM, cond, true);
if (cond == NULL_TREE)
@@ -963,18 +961,6 @@ finish_switch_cond (tree cond, tree switch_stmt)
cond = perform_integral_promotions (cond);
cond = maybe_cleanup_point_expr (cond);
}
-
- if (cond != error_mark_node)
- {
- index = get_unwidened (cond, NULL_TREE);
- /* We can't strip a conversion from a signed type to an unsigned,
- because if we did, int_fits_type_p would do the wrong thing
- when checking case values for being in range,
- and it's too hard to do the right thing. */
- if (TYPE_UNSIGNED (TREE_TYPE (cond))
- == TYPE_UNSIGNED (TREE_TYPE (index)))
- cond = index;
- }
}
if (check_for_bare_parameter_packs (cond))
cond = error_mark_node;
@@ -1801,6 +1787,13 @@ perform_koenig_lookup (tree fn, tree args)
{
tree identifier = NULL_TREE;
tree functions = NULL_TREE;
+ tree tmpl_args = NULL_TREE;
+
+ if (TREE_CODE (fn) == TEMPLATE_ID_EXPR)
+ {
+ tmpl_args = TREE_OPERAND (fn, 1);
+ fn = TREE_OPERAND (fn, 0);
+ }
/* Find the name of the overloaded function. */
if (TREE_CODE (fn) == IDENTIFIER_NODE)
@@ -1820,7 +1813,8 @@ perform_koenig_lookup (tree fn, tree args)
Do Koenig lookup -- unless any of the arguments are
type-dependent. */
- if (!any_type_dependent_arguments_p (args))
+ if (!any_type_dependent_arguments_p (args)
+ && !any_dependent_template_arguments_p (tmpl_args))
{
fn = lookup_arg_dependent (identifier, functions, args);
if (!fn)
@@ -1828,6 +1822,9 @@ perform_koenig_lookup (tree fn, tree args)
fn = unqualified_fn_lookup_error (identifier);
}
+ if (fn && tmpl_args)
+ fn = build_nt (TEMPLATE_ID_EXPR, fn, tmpl_args);
+
return fn;
}
@@ -3924,6 +3921,9 @@ handle_omp_for_class_iterator (int i, location_t locus, tree declv, tree initv,
case GE_EXPR:
case LT_EXPR:
case LE_EXPR:
+ if (TREE_OPERAND (cond, 1) == iter)
+ cond = build2 (swap_tree_comparison (TREE_CODE (cond)),
+ TREE_TYPE (cond), iter, TREE_OPERAND (cond, 0));
if (TREE_OPERAND (cond, 0) != iter)
cond = error_mark_node;
else
@@ -4588,8 +4588,6 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p)
break;
}
}
- else
- type = describable_type (expr);
if (type && !type_uses_auto (type))
return type;
@@ -4905,6 +4903,24 @@ trait_expr_value (cp_trait_kind kind, tree type1, tree type2)
}
}
+/* Returns true if TYPE is a complete type, an array of unknown bound,
+ or (possibly cv-qualified) void, returns false otherwise. */
+
+static bool
+check_trait_type (tree type)
+{
+ if (COMPLETE_TYPE_P (type))
+ return true;
+
+ if (TREE_CODE (type) == ARRAY_TYPE && !TYPE_DOMAIN (type))
+ return true;
+
+ if (VOID_TYPE_P (type))
+ return true;
+
+ return false;
+}
+
/* Process a trait expression. */
tree
@@ -4953,14 +4969,45 @@ finish_trait_expr (cp_trait_kind kind, tree type1, tree type2)
if (type2)
complete_type (type2);
- /* The only required diagnostic. */
- if (kind == CPTK_IS_BASE_OF
- && NON_UNION_CLASS_TYPE_P (type1) && NON_UNION_CLASS_TYPE_P (type2)
- && !same_type_ignoring_top_level_qualifiers_p (type1, type2)
- && !COMPLETE_TYPE_P (type2))
+ switch (kind)
{
- error ("incomplete type %qT not allowed", type2);
- return error_mark_node;
+ case CPTK_HAS_NOTHROW_ASSIGN:
+ case CPTK_HAS_TRIVIAL_ASSIGN:
+ case CPTK_HAS_NOTHROW_CONSTRUCTOR:
+ case CPTK_HAS_TRIVIAL_CONSTRUCTOR:
+ case CPTK_HAS_NOTHROW_COPY:
+ case CPTK_HAS_TRIVIAL_COPY:
+ case CPTK_HAS_TRIVIAL_DESTRUCTOR:
+ case CPTK_HAS_VIRTUAL_DESTRUCTOR:
+ case CPTK_IS_ABSTRACT:
+ case CPTK_IS_EMPTY:
+ case CPTK_IS_POD:
+ case CPTK_IS_POLYMORPHIC:
+ if (!check_trait_type (type1))
+ {
+ error ("incomplete type %qT not allowed", type1);
+ return error_mark_node;
+ }
+ break;
+
+ case CPTK_IS_BASE_OF:
+ if (NON_UNION_CLASS_TYPE_P (type1) && NON_UNION_CLASS_TYPE_P (type2)
+ && !same_type_ignoring_top_level_qualifiers_p (type1, type2)
+ && !COMPLETE_TYPE_P (type2))
+ {
+ error ("incomplete type %qT not allowed", type2);
+ return error_mark_node;
+ }
+ break;
+
+ case CPTK_IS_CLASS:
+ case CPTK_IS_ENUM:
+ case CPTK_IS_UNION:
+ break;
+
+ case CPTK_IS_CONVERTIBLE_TO:
+ default:
+ gcc_unreachable ();
}
return (trait_expr_value (kind, type1, type2)
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 456abfc9443..2287f11f04b 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1175,8 +1175,9 @@ is_overloaded_fn (tree x)
x = TREE_OPERAND (x, 1);
if (BASELINK_P (x))
x = BASELINK_FUNCTIONS (x);
- if (TREE_CODE (x) == TEMPLATE_ID_EXPR
- || DECL_FUNCTION_TEMPLATE_P (OVL_CURRENT (x))
+ if (TREE_CODE (x) == TEMPLATE_ID_EXPR)
+ x = TREE_OPERAND (x, 0);
+ if (DECL_FUNCTION_TEMPLATE_P (OVL_CURRENT (x))
|| (TREE_CODE (x) == OVERLOAD && OVL_CHAIN (x)))
return 2;
return (TREE_CODE (x) == FUNCTION_DECL
@@ -1202,6 +1203,8 @@ get_first_fn (tree from)
from = TREE_OPERAND (from, 1);
if (BASELINK_P (from))
from = BASELINK_FUNCTIONS (from);
+ if (TREE_CODE (from) == TEMPLATE_ID_EXPR)
+ from = TREE_OPERAND (from, 0);
return OVL_CURRENT (from);
}
@@ -1878,9 +1881,8 @@ cp_tree_equal (tree t1, tree t2)
case PARM_DECL:
/* For comparing uses of parameters in late-specified return types
with an out-of-class definition of the function. */
- if ((!DECL_CONTEXT (t1) || !DECL_CONTEXT (t2))
- && same_type_p (TREE_TYPE (t1), TREE_TYPE (t2))
- && DECL_NAME (t1) == DECL_NAME (t2))
+ if (same_type_p (TREE_TYPE (t1), TREE_TYPE (t2))
+ && parm_index (t1) == parm_index (t2))
return true;
else
return false;
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index a6986f94b63..3788a7e8b9e 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -4031,7 +4031,7 @@ cp_pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop)
pointer_int_sum() anyway. */
complete_type (TREE_TYPE (res_type));
- return pointer_int_sum (resultcode, ptrop,
+ return pointer_int_sum (input_location, resultcode, ptrop,
fold_if_not_in_template (intop));
}
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 637076554fb..747c964706c 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -677,18 +677,18 @@ check_narrowing (tree type, tree init)
{
if (TYPE_PRECISION (type) < TYPE_PRECISION (ftype))
{
- ok = false;
if (TREE_CODE (init) == REAL_CST)
{
+ /* Issue 703: Loss of precision is OK as long as the value is
+ within the representable range of the new type. */
+ REAL_VALUE_TYPE r;
d = TREE_REAL_CST (init);
- if (exact_real_truncate (TYPE_MODE (type), &d)
- /* FIXME: As a temporary workaround for PR 36963, don't
- complain about narrowing from a floating
- literal. Hopefully this will be resolved at the
- September 2008 C++ meeting. */
- || !was_decl)
- ok = true;
+ real_convert (&r, TYPE_MODE (type), &d);
+ if (real_isinf (&r))
+ ok = false;
}
+ else
+ ok = false;
}
}
else if (INTEGRAL_OR_ENUMERATION_TYPE_P (ftype)
diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c
index 49e68cdebbb..5e4d1a1d9b3 100644
--- a/gcc/crtstuff.c
+++ b/gcc/crtstuff.c
@@ -1,7 +1,7 @@
/* Specialized bits of code needed to support construction and
destruction of file-scope objects in C++ code.
- Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ 2002, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com).
This file is part of GCC.
@@ -58,11 +58,9 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
identified the set of defines that need to go into auto-target.h,
this will have to do. */
#include "auto-host.h"
-#undef gid_t
#undef pid_t
#undef rlim_t
#undef ssize_t
-#undef uid_t
#undef vfork
#include "tconfig.h"
#include "tsystem.h"
diff --git a/gcc/cse.c b/gcc/cse.c
index 91cb108e94c..04f52fb7d77 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3464,6 +3464,7 @@ fold_rtx (rtx x, rtx insn)
int is_shift
= (code == ASHIFT || code == ASHIFTRT || code == LSHIFTRT);
rtx y, inner_const, new_const;
+ rtx canon_const_arg1 = const_arg1;
enum rtx_code associate_code;
if (is_shift
@@ -3471,8 +3472,9 @@ fold_rtx (rtx x, rtx insn)
|| INTVAL (const_arg1) < 0))
{
if (SHIFT_COUNT_TRUNCATED)
- const_arg1 = GEN_INT (INTVAL (const_arg1)
- & (GET_MODE_BITSIZE (mode) - 1));
+ canon_const_arg1 = GEN_INT (INTVAL (const_arg1)
+ & (GET_MODE_BITSIZE (mode)
+ - 1));
else
break;
}
@@ -3531,7 +3533,8 @@ fold_rtx (rtx x, rtx insn)
associate_code = (is_shift || code == MINUS ? PLUS : code);
new_const = simplify_binary_operation (associate_code, mode,
- const_arg1, inner_const);
+ canon_const_arg1,
+ inner_const);
if (new_const == 0)
break;
@@ -4483,7 +4486,8 @@ cse_insn (rtx insn)
enum machine_mode wider_mode;
for (wider_mode = GET_MODE_WIDER_MODE (mode);
- GET_MODE_BITSIZE (wider_mode) <= BITS_PER_WORD
+ wider_mode != VOIDmode
+ && GET_MODE_BITSIZE (wider_mode) <= BITS_PER_WORD
&& src_related == 0;
wider_mode = GET_MODE_WIDER_MODE (wider_mode))
{
diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def
index 5330c72680f..5a2f8f0c505 100644
--- a/gcc/dbgcnt.def
+++ b/gcc/dbgcnt.def
@@ -142,6 +142,7 @@ echo ubound: $ub
/* Debug counter definitions. */
DEBUG_COUNTER (auto_inc_dec)
+DEBUG_COUNTER (ccp)
DEBUG_COUNTER (cfg_cleanup)
DEBUG_COUNTER (cse2_move2add)
DEBUG_COUNTER (cprop1)
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 1641c8263cd..a1863cd1309 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -947,6 +947,11 @@ along with GCC; see the file COPYING3. If not see
((TYPE) ? LOCAL_ALIGNMENT ((TYPE), (ALIGN)) : (ALIGN))
#endif
+#ifndef LOCAL_DECL_ALIGNMENT
+#define LOCAL_DECL_ALIGNMENT(DECL) \
+ LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL))
+#endif
+
/* Alignment value for attribute ((aligned)). */
#ifndef ATTRIBUTE_ALIGNED_VALUE
#define ATTRIBUTE_ALIGNED_VALUE BIGGEST_ALIGNMENT
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index 6888fb42ee3..d8ad4a06698 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -1,6 +1,6 @@
/* Scanning of rtl for dataflow analysis.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008 Free Software Foundation, Inc.
+ 2008, 2009 Free Software Foundation, Inc.
Originally contributed by Michael P. Hayes
(m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com)
Major rewrite contributed by Danny Berlin (dberlin@dberlin.org)
@@ -85,12 +85,12 @@ static HARD_REG_SET elim_reg_set;
struct df_collection_rec
{
df_ref * def_vec;
- unsigned int next_def;
df_ref * use_vec;
+ unsigned int next_def;
unsigned int next_use;
df_ref * eq_use_vec;
- unsigned int next_eq_use;
struct df_mw_hardreg **mw_vec;
+ unsigned int next_eq_use;
unsigned int next_mw;
};
diff --git a/gcc/df.h b/gcc/df.h
index dd00d9284d1..639c52157b4 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -1,6 +1,6 @@
/* Form lists of pseudo register references for autoinc optimization
for GNU compiler. This is part of flow optimization.
- Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Originally contributed by Michael P. Hayes
(m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com)
@@ -535,7 +535,6 @@ struct df
struct dataflow *problems_in_order[DF_LAST_PROBLEM_PLUS1];
struct dataflow *problems_by_index[DF_LAST_PROBLEM_PLUS1];
- int num_problems_defined;
/* If not NULL, this subset of blocks of the program to be
considered for analysis. At certain times, this will contain all
@@ -543,14 +542,6 @@ struct df
of if we are analyzing a subset. See analyze_subset. */
bitmap blocks_to_analyze;
- /* If this is true, then only a subset of the blocks of the program
- is considered to compute the solutions of dataflow problems. */
- bool analyze_subset;
-
- /* True if someone added or deleted something from regs_ever_live so
- that the entry and exit blocks need be reprocessed. */
- bool redo_entry_and_exit;
-
/* The following information is really the problem data for the
scanning instance but it is used too often by the other problems
to keep getting it from there. */
@@ -568,6 +559,9 @@ struct df
struct df_insn_info **insns; /* Insn table, indexed by insn UID. */
unsigned int insns_size; /* Size of insn table. */
+
+ int num_problems_defined;
+
bitmap hardware_regs_used; /* The set of hardware registers used. */
/* The set of hard regs that are in the artificial uses at the end
of a regular basic block. */
@@ -609,7 +603,15 @@ struct df
unsigned int ref_order;
/* Problem specific control information. */
- enum df_changeable_flags changeable_flags;
+ ENUM_BITFIELD (df_changeable_flags) changeable_flags : 8;
+
+ /* If this is true, then only a subset of the blocks of the program
+ is considered to compute the solutions of dataflow problems. */
+ bool analyze_subset;
+
+ /* True if someone added or deleted something from regs_ever_live so
+ that the entry and exit blocks need be reprocessed. */
+ bool redo_entry_and_exit;
};
#define DF_SCAN_BB_INFO(BB) (df_scan_get_bb_info((BB)->index))
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index f323f363ae5..8d012491577 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -1,6 +1,6 @@
/* Language-independent diagnostic subroutines for the GNU Compiler Collection
- Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
This file is part of GCC.
@@ -126,6 +126,7 @@ diagnostic_set_info_translated (diagnostic_info *diagnostic, const char *msg,
diagnostic->message.args_ptr = args;
diagnostic->message.format_spec = msg;
diagnostic->location = location;
+ diagnostic->override_column = 0;
diagnostic->kind = kind;
diagnostic->option_index = 0;
}
@@ -153,6 +154,8 @@ diagnostic_build_prefix (diagnostic_info *diagnostic)
};
const char *text = _(diagnostic_kind_text[diagnostic->kind]);
expanded_location s = expand_location (diagnostic->location);
+ if (diagnostic->override_column)
+ s.column = diagnostic->override_column;
gcc_assert (diagnostic->kind < DK_LAST_DIAGNOSTIC_KIND);
return
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index 19bc5e9c8d0..998c11ec1f6 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -1,5 +1,5 @@
/* Various declarations for language-independent diagnostics subroutines.
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
@@ -41,6 +41,7 @@ typedef struct diagnostic_info
{
text_info message;
location_t location;
+ unsigned int override_column;
/* TREE_BLOCK if the diagnostic is to be reported in some inline
function inlined into other function, otherwise NULL. */
tree abstract_origin;
@@ -185,6 +186,10 @@ extern diagnostic_context *global_dc;
#define report_diagnostic(D) diagnostic_report_diagnostic (global_dc, D)
+/* Override the column number to be used for reporting a
+ diagnostic. */
+#define diagnostic_override_column(DI, COL) (DI)->override_column = (COL)
+
/* Diagnostic related functions. */
extern void diagnostic_initialize (diagnostic_context *);
extern void diagnostic_report_current_module (diagnostic_context *);
diff --git a/gcc/doc/c-tree.texi b/gcc/doc/c-tree.texi
index 6eabd34a7b1..0039228f18b 100644
--- a/gcc/doc/c-tree.texi
+++ b/gcc/doc/c-tree.texi
@@ -2636,10 +2636,10 @@ declaration order. You should not assume that all fields will be
represented. Unrepresented fields will be set to zero.
@item COMPOUND_LITERAL_EXPR
-@findex COMPOUND_LITERAL_EXPR_DECL_STMT
+@findex COMPOUND_LITERAL_EXPR_DECL_EXPR
@findex COMPOUND_LITERAL_EXPR_DECL
These nodes represent ISO C99 compound literals. The
-@code{COMPOUND_LITERAL_EXPR_DECL_STMT} is a @code{DECL_STMT}
+@code{COMPOUND_LITERAL_EXPR_DECL_EXPR} is a @code{DECL_EXPR}
containing an anonymous @code{VAR_DECL} for
the unnamed object represented by the compound literal; the
@code{DECL_INITIAL} of that @code{VAR_DECL} is a @code{CONSTRUCTOR}
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index b6cf7a1c3ea..9500feb1112 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2440,6 +2440,11 @@ to run as a thread. The compiler omits generate prologue/epilogue
sequences and replaces the return instruction with a @code{sleep}
instruction. This attribute is available only on fido.
+@item isr
+@cindex interrupt service routines on ARM
+Use this attribute on ARM to write Interrupt Service Routines. This is an
+alias to the @code{interrupt} attribute above.
+
@item kspisusp
@cindex User stack pointer in interrupts on the Blackfin
When used together with @code{interrupt_handler}, @code{exception_handler}
@@ -2552,7 +2557,7 @@ defined by shared libraries.
@cindex @code{ms_abi} attribute
@cindex @code{sysv_abi} attribute
-On 64-bit x86_65-*-* targets, you can use an ABI attribute to indicate
+On 64-bit x86_64-*-* targets, you can use an ABI attribute to indicate
which calling convention should be used for a function. The @code{ms_abi}
attribute tells the compiler to use the Microsoft ABI, while the
@code{sysv_abi} attribute tells the compiler to use the ABI used on
@@ -2791,7 +2796,7 @@ default). Lazy binding will send the first call via resolving code in
the loader, which might assume EAX, EDX and ECX can be clobbered, as
per the standard calling conventions. Solaris 8 is affected by this.
GNU systems with GLIBC 2.1 or higher, and FreeBSD, are believed to be
-safe since the loaders there save all registers. (Lazy binding can be
+safe since the loaders there save EAX, EDX and ECX. (Lazy binding can be
disabled with the linker or the loader if desired, to avoid the
problem.)
@@ -3068,7 +3073,7 @@ Do/do not align destination of inlined string operations.
@itemx no-recip
@cindex @code{target("recip")} attribute
Enable/disable the generation of RCPSS, RCPPS, RSQRTSS and RSQRTPS
-instructions followed an additional Newton-Rhapson step instead of
+instructions followed an additional Newton-Raphson step instead of
doing a floating point division.
@item arch=@var{ARCH}
@@ -3860,7 +3865,7 @@ struct foo
@emph{Note:} The 4.1, 4.2 and 4.3 series of GCC ignore the
@code{packed} attribute on bit-fields of type @code{char}. This has
been fixed in GCC 4.4 but the change can lead to differences in the
-structure layout. See the documention of
+structure layout. See the documentation of
@option{-Wpacked-bitfield-compat} for more information.
@item section ("@var{section-name}")
@@ -3876,7 +3881,7 @@ section. For example, this small program uses several specific section names:
struct duart a __attribute__ ((section ("DUART_A"))) = @{ 0 @};
struct duart b __attribute__ ((section ("DUART_B"))) = @{ 0 @};
char stack[10000] __attribute__ ((section ("STACK"))) = @{ 0 @};
-int init_data __attribute__ ((section ("INITDATA"))) = 0;
+int init_data __attribute__ ((section ("INITDATA")));
main()
@{
@@ -3893,18 +3898,19 @@ main()
@end smallexample
@noindent
-Use the @code{section} attribute with an @emph{initialized} definition
-of a @emph{global} variable, as shown in the example. GCC issues
-a warning and otherwise ignores the @code{section} attribute in
-uninitialized variable declarations.
+Use the @code{section} attribute with
+@emph{global} variables and not @emph{local} variables,
+as shown in the example.
-You may only use the @code{section} attribute with a fully initialized
-global definition because of the way linkers work. The linker requires
+You may use the @code{section} attribute with initialized or
+uninitialized global variables but the linker requires
each object be defined once, with the exception that uninitialized
variables tentatively go in the @code{common} (or @code{bss}) section
-and can be multiply ``defined''. You can force a variable to be
-initialized with the @option{-fno-common} flag or the @code{nocommon}
-attribute.
+and can be multiply ``defined''. Using the @code{section} attribute
+will change what section the variable goes into and may cause the
+linker to issue an error if an uninitialized variable has multiple
+definitions. You can force a variable to be initialized with the
+@option{-fno-common} flag or the @code{nocommon} attribute.
Some file formats do not support arbitrary sections so the @code{section}
attribute is not available on all platforms.
@@ -7781,6 +7787,11 @@ The following floating point built-in functions are made available in the
@table @code
@item __float128 __builtin_infq (void)
Similar to @code{__builtin_inf}, except the return type is @code{__float128}.
+@findex __builtin_infq
+
+@item __float128 __builtin_huge_valq (void)
+Similar to @code{__builtin_huge_val}, except the return type is @code{__float128}.
+@findex __builtin_huge_valq
@end table
The following built-in functions are made available by @option{-mmmx}.
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index b0c2e849c16..616babcb344 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -653,7 +653,7 @@ provide a configure target when configuring a native compiler.
@item
@var{target} must be specified as @option{--target=@var{target}}
when configuring a cross compiler; examples of valid targets would be
-m68k-coff, sh-elf, etc.
+m68k-elf, sh-elf, etc.
@item
Specifying just @var{target} instead of @option{--target=@var{target}}
@@ -1476,6 +1476,15 @@ you can explicitly specify the directory where they are installed
shorthand assumptions are not correct, you can use the explicit
include and lib options directly.
+@item --with-host-libstdcxx=@var{linker-args}
+If you are linking with a static copy of PPL, you can use this option
+to specify how the linker should find the standard C++ library used
+internally by PPL. Typical values of @var{linker-args} might be
+@samp{-lstdc++} or @samp{-Wl,-Bstatic,-lstdc++,-Bdynamic -lm}. If you are
+linking with a shared copy of PPL, you probably do not need this
+option; shared library dependencies will cause the linker to search
+for the standard C++ library automatically.
+
@item --with-debug-prefix-map=@var{map}
Convert source directory names using @option{-fdebug-prefix-map} when
building runtime libraries. @samp{@var{map}} is a space-separated
@@ -2616,8 +2625,6 @@ information are.
@uref{#arc-x-elf,,arc-*-elf}
@item
@uref{#arm-x-elf,,arm-*-elf}
-@uref{#arm-x-coff,,arm-*-coff}
-@uref{#arm-x-aout,,arm-*-aout}
@item
@uref{#avr,,avr}
@item
@@ -2841,21 +2848,6 @@ and @code{arm-*-rtems}.
@html
<hr />
@end html
-@heading @anchor{arm-x-coff}arm-*-coff
-ARM-family processors. Note that there are two different varieties
-of PE format subtarget supported: @code{arm-wince-pe} and
-@code{arm-pe} as well as a standard COFF target @code{arm-*-coff}.
-
-@html
-<hr />
-@end html
-@heading @anchor{arm-x-aout}arm-*-aout
-ARM-family processors. These targets support the AOUT file format:
-@code{arm-*-aout}, @code{arm-*-netbsd}.
-
-@html
-<hr />
-@end html
@heading @anchor{avr}avr
ATMEL AVR-family micro controllers. These are used in embedded
@@ -3307,6 +3299,7 @@ removed and the system libunwind library will always be used.
@end html
@heading @anchor{x-ibm-aix}*-ibm-aix*
Support for AIX version 3 and older was discontinued in GCC 3.4.
+Support for AIX version 4.2 and older was discontinued in GCC 4.5.
``out of memory'' bootstrap failures may indicate a problem with
process resource limits (ulimit). Hard limits are configured in the
@@ -3427,9 +3420,6 @@ GCC does not produce the same floating-point formats that the assembler
expects. If one encounters this problem, set the @env{LANG}
environment variable to @samp{C} or @samp{En_US}.
-By default, GCC for AIX 4.1 and above produces code that can be used on
-both Power or PowerPC processors.
-
A default can be specified with the @option{-mcpu=@var{cpu_type}}
switch and using the configure option @option{--with-cpu-@var{cpu_type}}.
@@ -3472,7 +3462,7 @@ applications. There are no standard Unix configurations.
<hr />
@end html
@heading @anchor{m68k-x-x}m68k-*-*
-By default, @samp{m68k-*-aout}, @samp{m68k-*-coff*},
+By default,
@samp{m68k-*-elf*}, @samp{m68k-*-rtems}, @samp{m68k-*-uclinux} and
@samp{m68k-*-linux}
build libraries for both M680x0 and ColdFire processors. If you only
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 8ca8e10f33b..ebf14d2081a 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -148,7 +148,6 @@ only one of these two forms, whichever one is not the default.
and register usage.
* Environment Variables:: Env vars that affect GCC.
* Precompiled Headers:: Compiling a header once, and using it many times.
-* Running Protoize:: Automatically adding or removing function prototypes.
@end menu
@c man begin OPTIONS
@@ -163,7 +162,7 @@ in the following sections.
@item Overall Options
@xref{Overall Options,,Options Controlling the Kind of Output}.
@gccoptlist{-c -S -E -o @var{file} -combine -pipe -pass-exit-codes @gol
--x @var{language} -v -### --help@r{[}=@var{class}@r{]} --target-help @gol
+-x @var{language} -v -### --help@r{[}=@var{class}@r{[},@dots{}@r{]]} --target-help @gol
--version -wrapper@@@var{file}}
@item C Language Options
@@ -233,7 +232,6 @@ Objective-C and Objective-C++ Dialects}.
-Wchar-subscripts -Wclobbered -Wcomment @gol
-Wconversion -Wcoverage-mismatch -Wno-deprecated @gol
-Wno-deprecated-declarations -Wdisabled-optimization @gol
--Wdisallowed-function-list=@var{sym},@var{sym},@dots{} @gol
-Wno-div-by-zero -Wempty-body -Wenum-compare -Wno-endif-labels @gol
-Werror -Werror=* @gol
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
@@ -526,6 +524,9 @@ Objective-C and Objective-C++ Dialects}.
@emph{DEC Alpha/VMS Options}
@gccoptlist{-mvms-return-codes}
+@emph{FR30 Options}
+@gccoptlist{-msmall-model -mno-lsim}
+
@emph{FRV Options}
@gccoptlist{-mgpr-32 -mgpr-64 -mfpr-32 -mfpr-64 @gol
-mhard-float -msoft-float @gol
@@ -583,7 +584,7 @@ Objective-C and Objective-C++ Dialects}.
-m96bit-long-double -mregparm=@var{num} -msseregparm @gol
-mveclibabi=@var{type} -mpc32 -mpc64 -mpc80 -mstackrealign @gol
-momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol
--mcmodel=@var{code-model} @gol
+-mcmodel=@var{code-model} -mabi=@var{name} @gol
-m32 -m64 -mlarge-data-threshold=@var{num} @gol
-mfused-madd -mno-fused-madd -msse2avx}
@@ -824,6 +825,10 @@ See RS/6000 and PowerPC Options.
@emph{x86-64 Options}
See i386 and x86-64 Options.
+@emph{i386 and x86-64 Windows Options}
+@gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll
+-mnop-fun-dllimport -mthread -mwin32 -mwindows}
+
@emph{Xstormy16 Options}
@gccoptlist{-msim}
@@ -1159,11 +1164,10 @@ Print (on the standard output) a description of target-specific command
line options for each tool. For some targets extra target-specific
information may also be printed.
-@item --help=@var{class}@r{[},@var{qualifier}@r{]}
+@item --help=@{@var{class}@r{|[}^@r{]}@var{qualifier}@}@r{[},@dots{}@r{]}
Print (on the standard output) a description of the command line
-options understood by the compiler that fit into a specific class.
-The class can be one of @samp{optimizers}, @samp{warnings}, @samp{target},
-@samp{params}, or @var{language}:
+options understood by the compiler that fit into all specified classes
+and qualifiers. These are the supported classes:
@table @asis
@item @samp{optimizers}
@@ -1193,9 +1197,7 @@ version of GCC.
This will display the options that are common to all languages.
@end table
-It is possible to further refine the output of the @option{--help=}
-option by adding a comma separated list of qualifiers after the
-class. These can be any from the following list:
+These are the supported qualifiers:
@table @asis
@item @samp{undocumented}
@@ -1219,7 +1221,7 @@ switches supported by the compiler the following can be used:
@end smallexample
The sense of a qualifier can be inverted by prefixing it with the
-@var{^} character, so for example to display all binary warning
+@samp{^} character, so for example to display all binary warning
options (i.e., ones that are either on or off and that do not take an
argument), which have a description the following can be used:
@@ -1227,7 +1229,10 @@ argument), which have a description the following can be used:
--help=warnings,^joined,^undocumented
@end smallexample
-A class can also be used as a qualifier, although this usually
+The argument to @option{--help=} should not consist solely of inverted
+qualifiers.
+
+Combining several classes is possible, although this usually
restricts the output by so much that there is nothing to display. One
case where it does work however is when one of the classes is
@var{target}. So for example to display all the target-specific
@@ -1263,7 +1268,7 @@ options, so for example it is possible to find out which optimizations
are enabled at @option{-O2} by using:
@smallexample
--O2 --help=optimizers
+-Q -O2 --help=optimizers
@end smallexample
Alternatively you can discover which binary optimizations are enabled
@@ -3151,7 +3156,7 @@ and lacks a @code{case} for one or more of the named codes of that
enumeration. @code{case} labels outside the enumeration range also
provoke warnings when this option is used.
-@item -Wsync-nand
+@item -Wsync-nand @r{(C and C++ only)}
@opindex Wsync-nand
@opindex Wno-sync-nand
Warn when @code{__sync_fetch_and_nand} and @code{__sync_nand_and_fetch}
@@ -3605,7 +3610,7 @@ assume anything on the bounds of the loop indices. With
@option{-funsafe-loop-optimizations} warn if the compiler made
such assumptions.
-@item -Wno-pedantic-ms-format
+@item -Wno-pedantic-ms-format @r{(MinGW targets only)}
@opindex Wno-pedantic-ms-format
@opindex Wpedantic-ms-format
Disables the warnings about non-ISO @code{printf} / @code{scanf} format
@@ -4183,13 +4188,6 @@ minimum maximum, so we do not diagnose overlength strings in C++@.
This option is implied by @option{-pedantic}, and can be disabled with
@option{-Wno-overlength-strings}.
-
-@item -Wdisallowed-function-list=@var{sym},@var{sym},@dots{}
-@opindex Wdisallowed-function-list
-
-If any of @var{sym} is called, GCC will issue a warning. This can be useful
-in enforcing coding conventions that ban calls to certain functions, for
-example, @code{alloca}, @code{malloc}, etc.
@end table
@node Debugging Options
@@ -4406,11 +4404,11 @@ This option works only with DWARF 2.
@item -fno-merge-debug-strings
@opindex fmerge-debug-strings
@opindex fno-merge-debug-strings
-Direct the linker to merge together strings which are identical in
-different object files. This is not supported by all assemblers or
-linker. This decreases the size of the debug information in the
-output file at the cost of increasing link processing time. This is
-on by default.
+Direct the linker to not merge together strings in the debugging
+information which are identical in different object files. Merging is
+not supported by all assemblers or linkers. Merging decreases the size
+of the debug information in the output file at the cost of increasing
+link processing time. Merging is enabled by default.
@item -fdebug-prefix-map=@var{old}=@var{new}
@opindex fdebug-prefix-map
@@ -4614,7 +4612,7 @@ Dump after the RTL instruction combination pass.
@item -fdump-rtl-compgotos
@opindex fdump-rtl-compgotos
-Dump after dumplicating the computed gotos.
+Dump after duplicating the computed gotos.
@item -fdump-rtl-ce1
@itemx -fdump-rtl-ce2
@@ -6142,7 +6140,7 @@ Matrix flattening tries to replace a m-dimensional matrix
with its equivalent n-dimensional matrix, where n < m.
This reduces the level of indirection needed for accessing the elements
of the matrix. The second optimization is matrix transposing that
-attemps to change the order of the matrix's dimensions in order to
+attempts to change the order of the matrix's dimensions in order to
improve cache locality.
Both optimizations need the @option{-fwhole-program} flag.
Transposing is enabled only if profiling information is available.
@@ -6232,7 +6230,9 @@ because in Fortran, the elements of an array are stored in memory
contiguously by column, and the original loop iterates over rows,
potentially creating at each access a cache miss. This optimization
applies to all the languages supported by GCC and is not limited to
-Fortran.
+Fortran. To use this code transformation, GCC has to be configured
+with @option{--with-ppl} and @option{--with-cloog} to enable the
+Graphite loop transformation infrastructure.
@item -floop-strip-mine
Perform loop strip mining transformations on loops. Strip mining
@@ -6253,7 +6253,9 @@ DO II = 1, N, 4
ENDDO
@end smallexample
This optimization applies to all the languages supported by GCC and is
-not limited to Fortran.
+not limited to Fortran. To use this code transformation, GCC has to
+be configured with @option{--with-ppl} and @option{--with-cloog} to
+enable the Graphite loop transformation infrastructure.
@item -floop-block
Perform loop blocking transformations on loops. Blocking strip mines
@@ -6281,7 +6283,10 @@ ENDDO
which can be beneficial when @code{M} is larger than the caches,
because the innermost loop will iterate over a smaller amount of data
that can be kept in the caches. This optimization applies to all the
-languages supported by GCC and is not limited to Fortran.
+languages supported by GCC and is not limited to Fortran. To use this
+code transformation, GCC has to be configured with @option{--with-ppl}
+and @option{--with-cloog} to enable the Graphite loop transformation
+infrastructure.
@item -fcheck-data-deps
@opindex fcheck-data-deps
@@ -8845,11 +8850,13 @@ platform.
* Darwin Options::
* DEC Alpha Options::
* DEC Alpha/VMS Options::
+* FR30 Options::
* FRV Options::
* GNU/Linux Options::
* H8/300 Options::
* HPPA Options::
* i386 and x86-64 Options::
+* i386 and x86-64 Windows Options::
* IA-64 Options::
* M32C Options::
* M32R/D Options::
@@ -9163,10 +9170,6 @@ long_calls_off} directive. Note these switches have no effect on how
the compiler generates code to handle function calls via function
pointers.
-@item -mnop-fun-dllimport
-@opindex mnop-fun-dllimport
-Disable support for the @code{dllimport} attribute.
-
@item -msingle-pic-base
@opindex msingle-pic-base
Treat the register used for PIC addressing as read-only, rather than
@@ -10235,11 +10238,21 @@ Schedules as an EV6 and supports the BWX, FIX, and MAX extensions.
Schedules as an EV6 and supports the BWX, CIX, FIX, and MAX extensions.
@end table
+Native Linux/GNU toolchains also support the value @samp{native},
+which selects the best architecture option for the host processor.
+@option{-mcpu=native} has no effect if GCC does not recognize
+the processor.
+
@item -mtune=@var{cpu_type}
@opindex mtune
Set only the instruction scheduling parameters for machine type
@var{cpu_type}. The instruction set is not changed.
+Native Linux/GNU toolchains also support the value @samp{native},
+which selects the best architecture option for the host processor.
+@option{-mtune=native} has no effect if GCC does not recognize
+the processor.
+
@item -mmemory-latency=@var{time}
@opindex mmemory-latency
Sets the latency the scheduler should assume for typical memory
@@ -10277,6 +10290,28 @@ Return VMS condition codes from main. The default is to return POSIX
style condition (e.g.@: error) codes.
@end table
+@node FR30 Options
+@subsection FR30 Options
+@cindex FR30 Options
+
+These options are defined specifically for the FR30 port.
+
+@table @gcctabopt
+
+@item -msmall-model
+@opindex msmall-model
+Use the small address space model. This can produce smaller code, but
+it does assume that all symbolic values and addresses will fit into a
+20-bit range.
+
+@item -mno-lsim
+@opindex mno-lsim
+Assume that run-time support has been provided and so there is no need
+to include the simulator library (@file{libsim.a}) on the linker
+command line.
+
+@end table
+
@node FRV Options
@subsection FRV Options
@cindex FRV Options
@@ -11350,7 +11385,7 @@ or @code{remainder} built-in functions: see @ref{Other Builtins} for details.
@item -mrecip
@opindex mrecip
This option will enable GCC to use RCPSS and RSQRTSS instructions (and their
-vectorized variants RCPPS and RSQRTPS) with an additional Newton-Rhapson step
+vectorized variants RCPPS and RSQRTPS) with an additional Newton-Raphson step
to increase precision instead of DIVSS and SQRTSS (and their vectorized
variants) for single precision floating point arguments. These instructions
are generated only when @option{-funsafe-math-optimizations} is enabled
@@ -11383,6 +11418,16 @@ when @option{-mveclibabi=acml} is used. Both @option{-ftree-vectorize} and
@option{-funsafe-math-optimizations} have to be enabled. A SVML or ACML ABI
compatible library will have to be specified at link time.
+@item -mabi=@var{name}
+@opindex mabi
+Generate code for the specified calling convention. Permissible values
+are: @samp{sysv} for the ABI used on GNU/Linux and other systems and
+@samp{ms} for the Microsoft ABI. The default is to use the Microsoft
+ABI when targeting Windows. On all other systems, the default is the
+SYSV ABI. You can control this behavior for a specific function by
+using the function attribute @samp{ms_abi}/@samp{sysv_abi}.
+@xref{Function Attributes}.
+
@item -mpush-args
@itemx -mno-push-args
@opindex mpush-args
@@ -12439,6 +12484,20 @@ Generate code for a little endian target.
@opindex m210
@opindex m340
Generate code for the 210 processor.
+
+@item -mno-lsim
+@opindex no-lsim
+Assume that run-time support has been provided and so omit the
+simulator library (@file{libsim.a)} from the linker command line.
+
+@item -mstack-increment=@var{size}
+@opindex mstack-increment
+Set the maximum amount for a single stack increment operation. Large
+values can increase the speed of programs which contain functions
+that need a large amount of stack space, but they can also trigger a
+segmentation fault if the stack is extended too much. The default
+value is 0x1000.
+
@end table
@node MIPS Options
@@ -14280,8 +14339,8 @@ On System V.4 and embedded PowerPC systems, if @option{-meabi} is used,
compile code the same as @option{-msdata=eabi}, otherwise compile code the
same as @option{-msdata=sysv}.
-@item -msdata-data
-@opindex msdata-data
+@item -msdata=data
+@opindex msdata=data
On System V.4 and embedded PowerPC systems, put small global
data in the @samp{.sdata} section. Put small uninitialized global
data in the @samp{.sbss} section. Do not use register @code{r13}
@@ -15447,6 +15506,71 @@ is defined for compatibility with Diab.
These are listed under @xref{i386 and x86-64 Options}.
+@node i386 and x86-64 Windows Options
+@subsection i386 and x86-64 Windows Options
+@cindex i386 and x86-64 Windows Options
+
+These additional options are available for Windows targets:
+
+@table @gcctabopt
+@item -mconsole
+@opindex mconsole
+This option is available for Cygwin and MinGW targets. It
+specifies that a console application is to be generated, by
+instructing the linker to set the PE header subsystem type
+required for console applications.
+This is the default behaviour for Cygwin and MinGW targets.
+
+@item -mcygwin
+@opindex mcygwin
+This option is available for Cygwin targets. It specifies that
+the Cygwin internal interface is to be used for predefined
+preprocessor macros, C runtime libraries and related linker
+paths and options. For Cygwin targets this is the default behaviour.
+This option is deprecated and will be removed in a future release.
+
+@item -mno-cygwin
+@opindex mno-cygwin
+This option is available for Cygwin targets. It specifies that
+the MinGW internal interface is to be used instead of Cygwin's, by
+setting MinGW-related predefined macros and linker paths and default
+library options.
+This option is deprecated and will be removed in a future release.
+
+@item -mdll
+@opindex mdll
+This option is available for Cygwin and MinGW targets. It
+specifies that a DLL - a dynamic link library - is to be
+generated, enabling the selection of the required runtime
+startup object and entry point.
+
+@item -mnop-fun-dllimport
+@opindex mnop-fun-dllimport
+This option is available for Cygwin and MinGW targets. It
+specifies that the dllimport attribute should be ignored.
+
+@item -mthread
+@opindex mthread
+This option is available for MinGW targets. It specifies
+that MinGW-specific thread support is to be used.
+
+@item -mwin32
+@opindex mwin32
+This option is available for Cygwin and MinGW targets. It
+specifies that the typical Windows pre-defined macros are to
+be set in the pre-processor, but does not influence the choice
+of runtime library/startup code.
+
+@item -mwindows
+@opindex mwindows
+This option is available for Cygwin and MinGW targets. It
+specifies that a GUI application is to be generated by
+instructing the linker to set the PE header subsystem type
+appropriately.
+@end table
+
+See also under @ref{i386 and x86-64 Options} for standard options.
+
@node Xstormy16 Options
@subsection Xstormy16 Options
@cindex Xstormy16 Options
@@ -15696,12 +15820,25 @@ Use it to conform to a non-default application binary interface.
@item -fno-common
@opindex fno-common
-In C, allocate even uninitialized global variables in the data section of the
-object file, rather than generating them as common blocks. This has the
-effect that if the same variable is declared (without @code{extern}) in
-two different compilations, you will get an error when you link them.
-The only reason this might be useful is if you wish to verify that the
-program will work on other systems which always work this way.
+In C code, controls the placement of uninitialized global variables.
+Unix C compilers have traditionally permitted multiple definitions of
+such variables in different compilation units by placing the variables
+in a common block.
+This is the behavior specified by @option{-fcommon}, and is the default
+for GCC on most targets.
+On the other hand, this behavior is not required by ISO C, and on some
+targets may carry a speed or code size penalty on variable references.
+The @option{-fno-common} option specifies that the compiler should place
+uninitialized global variables in the data section of the object file,
+rather than generating them as common blocks.
+This has the effect that if the same variable is declared
+(without @code{extern}) in two different compilations,
+you will get a multiple-definition error when you link them.
+In this case, you must compile with @option{-fcommon} instead.
+Compiling with @option{-fno-common} is useful on targets for which
+it provides better performance, or if you wish to verify that the
+program will work on other systems which always treat uninitialized
+variable declarations this way.
@item -fno-ident
@opindex fno-ident
@@ -16375,156 +16512,3 @@ precompiled header, the actual behavior will be a mixture of the
behavior for the options. For instance, if you use @option{-g} to
generate the precompiled header but not when using it, you may or may
not get debugging information for routines in the precompiled header.
-
-@node Running Protoize
-@section Running Protoize
-
-The program @code{protoize} is an optional part of GCC@. You can use
-it to add prototypes to a program, thus converting the program to ISO
-C in one respect. The companion program @code{unprotoize} does the
-reverse: it removes argument types from any prototypes that are found.
-
-When you run these programs, you must specify a set of source files as
-command line arguments. The conversion programs start out by compiling
-these files to see what functions they define. The information gathered
-about a file @var{foo} is saved in a file named @file{@var{foo}.X}.
-
-After scanning comes actual conversion. The specified files are all
-eligible to be converted; any files they include (whether sources or
-just headers) are eligible as well.
-
-But not all the eligible files are converted. By default,
-@code{protoize} and @code{unprotoize} convert only source and header
-files in the current directory. You can specify additional directories
-whose files should be converted with the @option{-d @var{directory}}
-option. You can also specify particular files to exclude with the
-@option{-x @var{file}} option. A file is converted if it is eligible, its
-directory name matches one of the specified directory names, and its
-name within the directory has not been excluded.
-
-Basic conversion with @code{protoize} consists of rewriting most
-function definitions and function declarations to specify the types of
-the arguments. The only ones not rewritten are those for varargs
-functions.
-
-@code{protoize} optionally inserts prototype declarations at the
-beginning of the source file, to make them available for any calls that
-precede the function's definition. Or it can insert prototype
-declarations with block scope in the blocks where undeclared functions
-are called.
-
-Basic conversion with @code{unprotoize} consists of rewriting most
-function declarations to remove any argument types, and rewriting
-function definitions to the old-style pre-ISO form.
-
-Both conversion programs print a warning for any function declaration or
-definition that they can't convert. You can suppress these warnings
-with @option{-q}.
-
-The output from @code{protoize} or @code{unprotoize} replaces the
-original source file. The original file is renamed to a name ending
-with @samp{.save} (for DOS, the saved filename ends in @samp{.sav}
-without the original @samp{.c} suffix). If the @samp{.save} (@samp{.sav}
-for DOS) file already exists, then the source file is simply discarded.
-
-@code{protoize} and @code{unprotoize} both depend on GCC itself to
-scan the program and collect information about the functions it uses.
-So neither of these programs will work until GCC is installed.
-
-Here is a table of the options you can use with @code{protoize} and
-@code{unprotoize}. Each option works with both programs unless
-otherwise stated.
-
-@table @code
-@item -B @var{directory}
-Look for the file @file{SYSCALLS.c.X} in @var{directory}, instead of the
-usual directory (normally @file{/usr/local/lib}). This file contains
-prototype information about standard system functions. This option
-applies only to @code{protoize}.
-
-@item -c @var{compilation-options}
-Use @var{compilation-options} as the options when running @command{gcc} to
-produce the @samp{.X} files. The special option @option{-aux-info} is
-always passed in addition, to tell @command{gcc} to write a @samp{.X} file.
-
-Note that the compilation options must be given as a single argument to
-@code{protoize} or @code{unprotoize}. If you want to specify several
-@command{gcc} options, you must quote the entire set of compilation options
-to make them a single word in the shell.
-
-There are certain @command{gcc} arguments that you cannot use, because they
-would produce the wrong kind of output. These include @option{-g},
-@option{-O}, @option{-c}, @option{-S}, and @option{-o} If you include these in
-the @var{compilation-options}, they are ignored.
-
-@item -C
-Rename files to end in @samp{.C} (@samp{.cc} for DOS-based file
-systems) instead of @samp{.c}. This is convenient if you are converting
-a C program to C++. This option applies only to @code{protoize}.
-
-@item -g
-Add explicit global declarations. This means inserting explicit
-declarations at the beginning of each source file for each function
-that is called in the file and was not declared. These declarations
-precede the first function definition that contains a call to an
-undeclared function. This option applies only to @code{protoize}.
-
-@item -i @var{string}
-Indent old-style parameter declarations with the string @var{string}.
-This option applies only to @code{protoize}.
-
-@code{unprotoize} converts prototyped function definitions to old-style
-function definitions, where the arguments are declared between the
-argument list and the initial @samp{@{}. By default, @code{unprotoize}
-uses five spaces as the indentation. If you want to indent with just
-one space instead, use @option{-i " "}.
-
-@item -k
-Keep the @samp{.X} files. Normally, they are deleted after conversion
-is finished.
-
-@item -l
-Add explicit local declarations. @code{protoize} with @option{-l} inserts
-a prototype declaration for each function in each block which calls the
-function without any declaration. This option applies only to
-@code{protoize}.
-
-@item -n
-Make no real changes. This mode just prints information about the conversions
-that would have been done without @option{-n}.
-
-@item -N
-Make no @samp{.save} files. The original files are simply deleted.
-Use this option with caution.
-
-@item -p @var{program}
-Use the program @var{program} as the compiler. Normally, the name
-@file{gcc} is used.
-
-@item -q
-Work quietly. Most warnings are suppressed.
-
-@item -v
-Print the version number, just like @option{-v} for @command{gcc}.
-@end table
-
-If you need special compiler options to compile one of your program's
-source files, then you should generate that file's @samp{.X} file
-specially, by running @command{gcc} on that source file with the
-appropriate options and the option @option{-aux-info}. Then run
-@code{protoize} on the entire set of files. @code{protoize} will use
-the existing @samp{.X} file because it is newer than the source file.
-For example:
-
-@smallexample
-gcc -Dfoo=bar file1.c -aux-info file1.X
-protoize *.c
-@end smallexample
-
-@noindent
-You need to include the special files along with the rest in the
-@code{protoize} command, even though their @samp{.X} files already
-exist, because otherwise they won't get converted.
-
-@xref{Protoize Caveats}, for more information on how to use
-@code{protoize} successfully.
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index ae1c59afb30..18a1a4df27d 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -7506,6 +7506,11 @@ be ignored for this case. The additional guard is necessary to
recognize complicated bypasses, e.g.@: when the consumer is only an address
of insn @samp{store} (not a stored value).
+If there are more one bypass with the same output and input insns, the
+chosen bypass is the first bypass with a guard in description whose
+guard function returns nonzero. If there is no such bypass, then
+bypass without the guard function is chosen.
+
@findex exclusion_set
@findex presence_set
@findex final_presence_set
diff --git a/gcc/doc/options.texi b/gcc/doc/options.texi
index 96ce749dc17..a05a6b2c333 100644
--- a/gcc/doc/options.texi
+++ b/gcc/doc/options.texi
@@ -41,6 +41,7 @@ records have two fields: the string @samp{TargetSave}, and a
declaration type to go in the @code{cl_target_option} structure.
@item
+An option definition record. These records have the following fields:
@enumerate
@item
the name of the option, with the leading ``-'' removed
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index ff2e1fcf242..665b2693e2f 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -1215,6 +1215,18 @@ This macro is to set alignment of stack slot to the maximum alignment
of all possible modes which the slot may have.
@end defmac
+@defmac LOCAL_DECL_ALIGNMENT (@var{decl})
+If defined, a C expression to compute the alignment for a local
+variable @var{decl}.
+
+If this macro is not defined, then
+@code{LOCAL_ALIGNMENT (TREE_TYPE (@var{decl}), DECL_ALIGN (@var{decl}))}
+is used.
+
+One use of this macro is to increase alignment of medium-size data to
+make it all fit in fewer cache lines.
+@end defmac
+
@defmac EMPTY_FIELD_BOUNDARY
Alignment in bits to be given to a structure bit-field that follows an
empty field such as @code{int : 0;}.
@@ -4349,20 +4361,12 @@ a new target instead.
@defmac LIBCALL_VALUE (@var{mode})
A C expression to create an RTX representing the place where a library
-function returns a value of mode @var{mode}. If the precise function
-being called is known, @var{func} is a tree node
-(@code{FUNCTION_DECL}) for it; otherwise, @var{func} is a null
-pointer. This makes it possible to use a different value-returning
-convention for specific functions when all their calls are
-known.
+function returns a value of mode @var{mode}.
Note that ``library function'' in this context means a compiler
support routine, used to perform arithmetic, whose name is known
specially by the compiler and was not mentioned in the C code being
compiled.
-
-The definition of @code{LIBRARY_VALUE} need not be concerned aggregate
-data types, because none of the library functions returns such types.
@end defmac
@defmac FUNCTION_VALUE_REGNO_P (@var{regno})
diff --git a/gcc/doc/trouble.texi b/gcc/doc/trouble.texi
index 3f04f00ad4c..a3d8187e649 100644
--- a/gcc/doc/trouble.texi
+++ b/gcc/doc/trouble.texi
@@ -1,5 +1,5 @@
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-@c 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008
+@c 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009
@c Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@@ -30,7 +30,6 @@ where people's opinions differ as to what is best.
compliant with the ISO C standard.
* Disappointments:: Regrettable things we can't change, but not quite bugs.
* C++ Misunderstandings:: Common misunderstandings with GNU C++.
-* Protoize Caveats:: Things to watch out for when using @code{protoize}.
* Non-bugs:: Things we think are right, but some others disagree.
* Warnings and Errors:: Which problems in your code get warnings,
and which get errors.
@@ -45,13 +44,6 @@ The @code{fixincludes} script interacts badly with automounters; if the
directory of system header files is automounted, it tends to be
unmounted while @code{fixincludes} is running. This would seem to be a
bug in the automounter. We don't know any good way to work around it.
-
-@item
-The @code{fixproto} script will sometimes add prototypes for the
-@code{sigsetjmp} and @code{siglongjmp} functions that reference the
-@code{jmp_buf} type before that type is defined. To work around this,
-edit the offending file and place the typedef in front of the
-prototypes.
@end itemize
@node Cross-Compiler Problems
@@ -939,92 +931,6 @@ copy-assignment operator removes any uncertainties. With such an
operator, the application can define whether and how the virtual base
subobject is assigned.
-@node Protoize Caveats
-@section Caveats of using @command{protoize}
-
-The conversion programs @command{protoize} and @command{unprotoize} can
-sometimes change a source file in a way that won't work unless you
-rearrange it.
-
-@itemize @bullet
-@item
-@command{protoize} can insert references to a type name or type tag before
-the definition, or in a file where they are not defined.
-
-If this happens, compiler error messages should show you where the new
-references are, so fixing the file by hand is straightforward.
-
-@item
-There are some C constructs which @command{protoize} cannot figure out.
-For example, it can't determine argument types for declaring a
-pointer-to-function variable; this you must do by hand. @command{protoize}
-inserts a comment containing @samp{???} each time it finds such a
-variable; so you can find all such variables by searching for this
-string. ISO C does not require declaring the argument types of
-pointer-to-function types.
-
-@item
-Using @command{unprotoize} can easily introduce bugs. If the program
-relied on prototypes to bring about conversion of arguments, these
-conversions will not take place in the program without prototypes.
-One case in which you can be sure @command{unprotoize} is safe is when
-you are removing prototypes that were made with @command{protoize}; if
-the program worked before without any prototypes, it will work again
-without them.
-
-@opindex Wtraditional-conversion
-You can find all the places where this problem might occur by compiling
-the program with the @option{-Wtraditional-conversion} option. It
-prints a warning whenever an argument is converted.
-
-@item
-Both conversion programs can be confused if there are macro calls in and
-around the text to be converted. In other words, the standard syntax
-for a declaration or definition must not result from expanding a macro.
-This problem is inherent in the design of C and cannot be fixed. If
-only a few functions have confusing macro calls, you can easily convert
-them manually.
-
-@item
-@command{protoize} cannot get the argument types for a function whose
-definition was not actually compiled due to preprocessing conditionals.
-When this happens, @command{protoize} changes nothing in regard to such
-a function. @command{protoize} tries to detect such instances and warn
-about them.
-
-You can generally work around this problem by using @command{protoize} step
-by step, each time specifying a different set of @option{-D} options for
-compilation, until all of the functions have been converted. There is
-no automatic way to verify that you have got them all, however.
-
-@item
-Confusion may result if there is an occasion to convert a function
-declaration or definition in a region of source code where there is more
-than one formal parameter list present. Thus, attempts to convert code
-containing multiple (conditionally compiled) versions of a single
-function header (in the same vicinity) may not produce the desired (or
-expected) results.
-
-If you plan on converting source files which contain such code, it is
-recommended that you first make sure that each conditionally compiled
-region of source code which contains an alternative function header also
-contains at least one additional follower token (past the final right
-parenthesis of the function header). This should circumvent the
-problem.
-
-@item
-@command{unprotoize} can become confused when trying to convert a function
-definition or declaration which contains a declaration for a
-pointer-to-function formal argument which has the same name as the
-function being defined or declared. We recommend you avoid such choices
-of formal parameter names.
-
-@item
-You might also want to correct some of the indentation by hand and break
-long lines. (The conversion programs don't write lines longer than
-eighty characters in any case.)
-@end itemize
-
@node Non-bugs
@section Certain Changes We Don't Want to Make
diff --git a/gcc/dojump.c b/gcc/dojump.c
index 060eb51e77e..715e7373eee 100644
--- a/gcc/dojump.c
+++ b/gcc/dojump.c
@@ -257,8 +257,7 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
if (! SLOW_BYTE_ACCESS
&& type != 0 && bitsize >= 0
&& TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (exp))
- && (optab_handler (cmp_optab, TYPE_MODE (type))->insn_code
- != CODE_FOR_nothing))
+ && have_insn_for (COMPARE, TYPE_MODE (type)))
{
do_jump (fold_convert (type, exp), if_false_label, if_true_label);
break;
@@ -499,8 +498,7 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
&& (mode = mode_for_size (i + 1, MODE_INT, 0)) != BLKmode
&& (type = lang_hooks.types.type_for_mode (mode, 1)) != 0
&& TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (exp))
- && (optab_handler (cmp_optab, TYPE_MODE (type))->insn_code
- != CODE_FOR_nothing))
+ && have_insn_for (COMPARE, TYPE_MODE (type)))
{
do_jump (fold_convert (type, exp), if_false_label, if_true_label);
break;
diff --git a/gcc/dse.c b/gcc/dse.c
index 666a2f00164..a35f07bb113 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -1,5 +1,5 @@
/* RTL dead store elimination.
- Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Richard Sandiford <rsandifor@codesourcery.com>
and Kenneth Zadeck <zadeck@naturalbridge.com>
@@ -464,6 +464,14 @@ struct group_info
canonical ordering of these that is not based on addresses. */
int id;
+ /* True if there are any positions that are to be processed
+ globally. */
+ bool process_globally;
+
+ /* True if the base of this group is either the frame_pointer or
+ hard_frame_pointer. */
+ bool frame_related;
+
/* A mem wrapped around the base pointer for the group in order to
do read dependency. */
rtx base_mem;
@@ -494,14 +502,6 @@ struct group_info
the positions that are occupied by stores for this group. */
bitmap group_kill;
- /* True if there are any positions that are to be processed
- globally. */
- bool process_globally;
-
- /* True if the base of this group is either the frame_pointer or
- hard_frame_pointer. */
- bool frame_related;
-
/* The offset_map is used to map the offsets from this base into
positions in the global bitmaps. It is only created after all of
the all of stores have been scanned and we know which ones we
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 9d39a455e85..1bc17306c09 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -3231,7 +3231,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
fde->dw_fde_end = NULL;
fde->dw_fde_cfi = NULL;
fde->funcdef_number = current_function_funcdef_no;
- fde->nothrow = TREE_NOTHROW (current_function_decl);
+ fde->nothrow = crtl->nothrow;
fde->uses_eh_lsda = crtl->uses_eh_lsda;
fde->all_throwers_are_sibcalls = crtl->all_throwers_are_sibcalls;
fde->drap_reg = INVALID_REGNUM;
@@ -3405,6 +3405,17 @@ typedef const struct die_struct *const_dw_die_ref;
typedef struct dw_loc_descr_struct *dw_loc_descr_ref;
typedef struct dw_loc_list_struct *dw_loc_list_ref;
+typedef struct deferred_locations_struct GTY(())
+{
+ tree variable;
+ dw_die_ref die;
+} deferred_locations;
+
+DEF_VEC_O(deferred_locations);
+DEF_VEC_ALLOC_O(deferred_locations,gc);
+
+static GTY(()) VEC(deferred_locations, gc) *deferred_locations_list;
+
/* Each DIE may have a series of attribute/value pairs. Values
can take on several forms. The forms that are used in this
implementation are listed below. */
@@ -3488,9 +3499,9 @@ typedef struct dw_loc_descr_struct GTY(())
{
dw_loc_descr_ref dw_loc_next;
enum dwarf_location_atom dw_loc_opc;
+ int dw_loc_addr;
dw_val_node dw_loc_oprnd1;
dw_val_node dw_loc_oprnd2;
- int dw_loc_addr;
}
dw_loc_descr_node;
@@ -5117,7 +5128,7 @@ static void add_byte_size_attribute (dw_die_ref, tree);
static void add_bit_offset_attribute (dw_die_ref, tree);
static void add_bit_size_attribute (dw_die_ref, tree);
static void add_prototyped_attribute (dw_die_ref, tree);
-static void add_abstract_origin_attribute (dw_die_ref, tree);
+static dw_die_ref add_abstract_origin_attribute (dw_die_ref, tree);
static void add_pure_or_virtual_attribute (dw_die_ref, tree);
static void add_src_coords_attributes (dw_die_ref, tree);
static void add_name_and_src_coords_attributes (dw_die_ref, tree);
@@ -5138,15 +5149,12 @@ static void gen_descr_array_type_die (tree, struct array_descr_info *, dw_die_re
#if 0
static void gen_entry_point_die (tree, dw_die_ref);
#endif
-static void gen_inlined_enumeration_type_die (tree, dw_die_ref);
-static void gen_inlined_structure_type_die (tree, dw_die_ref);
-static void gen_inlined_union_type_die (tree, dw_die_ref);
static dw_die_ref gen_enumeration_type_die (tree, dw_die_ref);
-static dw_die_ref gen_formal_parameter_die (tree, dw_die_ref);
+static dw_die_ref gen_formal_parameter_die (tree, tree, dw_die_ref);
static void gen_unspecified_parameters_die (tree, dw_die_ref);
static void gen_formal_types_die (tree, dw_die_ref);
static void gen_subprogram_die (tree, dw_die_ref);
-static void gen_variable_die (tree, dw_die_ref);
+static void gen_variable_die (tree, tree, dw_die_ref);
static void gen_const_die (tree, dw_die_ref);
static void gen_label_die (tree, dw_die_ref);
static void gen_lexical_block_die (tree, dw_die_ref, int);
@@ -5161,12 +5169,11 @@ static void gen_struct_or_union_type_die (tree, dw_die_ref,
static void gen_subroutine_type_die (tree, dw_die_ref);
static void gen_typedef_die (tree, dw_die_ref);
static void gen_type_die (tree, dw_die_ref);
-static void gen_tagged_type_instantiation_die (tree, dw_die_ref);
static void gen_block_die (tree, dw_die_ref, int);
static void decls_for_scope (tree, dw_die_ref, int);
static int is_redundant_typedef (const_tree);
-static void gen_namespace_die (tree);
-static void gen_decl_die (tree, dw_die_ref);
+static void gen_namespace_die (tree, dw_die_ref);
+static void gen_decl_die (tree, tree, dw_die_ref);
static dw_die_ref force_decl_die (tree);
static dw_die_ref force_type_die (tree);
static dw_die_ref setup_namespace_context (tree, dw_die_ref);
@@ -5592,6 +5599,8 @@ dwarf_attr_name (unsigned int attr)
return "DW_AT_encoding";
case DW_AT_external:
return "DW_AT_external";
+ case DW_AT_explicit:
+ return "DW_AT_explicit";
case DW_AT_frame_base:
return "DW_AT_frame_base";
case DW_AT_friend:
@@ -11310,7 +11319,7 @@ reference_to_unused (tree * tp, int * walk_subtrees,
&& (!DECL_EXTERNAL (*tp) || DECL_DECLARED_INLINE_P (*tp)))
{
struct cgraph_node *node = cgraph_node (*tp);
- if (!node->output)
+ if (node->process || TREE_ASM_WRITTEN (*tp))
return *tp;
}
else if (TREE_CODE (*tp) == STRING_CST && !TREE_ASM_WRITTEN (*tp))
@@ -11858,6 +11867,17 @@ add_location_or_const_value_attribute (dw_die_ref die, tree decl,
tree_add_const_value_attribute (die, decl);
}
+/* Add VARIABLE and DIE into deferred locations list. */
+
+static void
+defer_location (tree variable, dw_die_ref die)
+{
+ deferred_locations entry;
+ entry.variable = variable;
+ entry.die = die;
+ VEC_safe_push (deferred_locations, gc, deferred_locations_list, &entry);
+}
+
/* Helper function for tree_add_const_value_attribute. Natively encode
initializer INIT into an array. Return true if successful. */
@@ -12457,7 +12477,7 @@ add_prototyped_attribute (dw_die_ref die, tree func_type)
by looking in either the type declaration or object declaration
equate table. */
-static inline void
+static inline dw_die_ref
add_abstract_origin_attribute (dw_die_ref die, tree origin)
{
dw_die_ref origin_die = NULL;
@@ -12495,7 +12515,8 @@ add_abstract_origin_attribute (dw_die_ref die, tree origin)
here. */
if (origin_die)
- add_AT_die_ref (die, DW_AT_abstract_origin, origin_die);
+ add_AT_die_ref (die, DW_AT_abstract_origin, origin_die);
+ return origin_die;
}
/* We do not currently support the pure_virtual attribute. */
@@ -13126,18 +13147,6 @@ retry_incomplete_types (void)
gen_type_die (VEC_index (tree, incomplete_types, i), comp_unit_die);
}
-/* Generate a DIE to represent an inlined instance of an enumeration type. */
-
-static void
-gen_inlined_enumeration_type_die (tree type, dw_die_ref context_die)
-{
- dw_die_ref type_die = new_die (DW_TAG_enumeration_type, context_die, type);
-
- /* We do not check for TREE_ASM_WRITTEN (type) being set, as the type may
- be incomplete and such types are not marked. */
- add_abstract_origin_attribute (type_die, type);
-}
-
/* Determine what tag to use for a record type. */
static enum dwarf_tag
@@ -13162,30 +13171,6 @@ record_type_tag (tree type)
}
}
-/* Generate a DIE to represent an inlined instance of a structure type. */
-
-static void
-gen_inlined_structure_type_die (tree type, dw_die_ref context_die)
-{
- dw_die_ref type_die = new_die (record_type_tag (type), context_die, type);
-
- /* We do not check for TREE_ASM_WRITTEN (type) being set, as the type may
- be incomplete and such types are not marked. */
- add_abstract_origin_attribute (type_die, type);
-}
-
-/* Generate a DIE to represent an inlined instance of a union type. */
-
-static void
-gen_inlined_union_type_die (tree type, dw_die_ref context_die)
-{
- dw_die_ref type_die = new_die (DW_TAG_union_type, context_die, type);
-
- /* We do not check for TREE_ASM_WRITTEN (type) being set, as the type may
- be incomplete and such types are not marked. */
- add_abstract_origin_attribute (type_die, type);
-}
-
/* Generate a DIE to represent an enumeration type. Note that these DIEs
include all of the information about the enumeration values also. Each
enumerated type name/value is listed as a child of the enumerated type
@@ -13271,16 +13256,17 @@ gen_enumeration_type_die (tree type, dw_die_ref context_die)
argument type of some subprogram type. */
static dw_die_ref
-gen_formal_parameter_die (tree node, dw_die_ref context_die)
+gen_formal_parameter_die (tree node, tree origin, dw_die_ref context_die)
{
+ tree node_or_origin = node ? node : origin;
dw_die_ref parm_die
= new_die (DW_TAG_formal_parameter, context_die, node);
- tree origin;
- switch (TREE_CODE_CLASS (TREE_CODE (node)))
+ switch (TREE_CODE_CLASS (TREE_CODE (node_or_origin)))
{
case tcc_declaration:
- origin = decl_ultimate_origin (node);
+ if (!origin)
+ origin = decl_ultimate_origin (node);
if (origin != NULL)
add_abstract_origin_attribute (parm_die, origin);
else
@@ -13299,15 +13285,17 @@ gen_formal_parameter_die (tree node, dw_die_ref context_die)
add_AT_flag (parm_die, DW_AT_artificial, 1);
}
- equate_decl_number_to_die (node, parm_die);
- if (! DECL_ABSTRACT (node))
- add_location_or_const_value_attribute (parm_die, node, DW_AT_location);
+ if (node)
+ equate_decl_number_to_die (node, parm_die);
+ if (! DECL_ABSTRACT (node_or_origin))
+ add_location_or_const_value_attribute (parm_die, node_or_origin,
+ DW_AT_location);
break;
case tcc_type:
/* We were called with some kind of a ..._TYPE node. */
- add_type_attribute (parm_die, node, 0, 0, context_die);
+ add_type_attribute (parm_die, node_or_origin, 0, 0, context_die);
break;
default:
@@ -13360,7 +13348,7 @@ gen_formal_types_die (tree function_or_method_type, dw_die_ref context_die)
break;
/* Output a (nameless) DIE to represent the formal parameter itself. */
- parm_die = gen_formal_parameter_die (formal_type, context_die);
+ parm_die = gen_formal_parameter_die (formal_type, NULL, context_die);
if ((TREE_CODE (function_or_method_type) == METHOD_TYPE
&& link == first_parm_type)
|| (arg && DECL_ARTIFICIAL (arg)))
@@ -13420,7 +13408,7 @@ gen_type_die_for_member (tree type, tree member, dw_die_ref context_die)
}
}
else
- gen_variable_die (member, type_die);
+ gen_variable_die (member, NULL_TREE, type_die);
pop_decl_scope ();
}
@@ -13625,6 +13613,11 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
{
add_AT_flag (subr_die, DW_AT_declaration, 1);
+ /* If this is an explicit function declaration then generate
+ a DW_AT_explicit attribute. */
+ if (lang_hooks.decls.function_decl_explicit_p (decl))
+ add_AT_flag (subr_die, DW_AT_explicit, 1);
+
/* The first time we see a member function, it is in the context of
the class to which it belongs. We make sure of this by emitting
the class first. The next time is the definition, which is
@@ -13765,7 +13758,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
"__builtin_va_alist"))
gen_unspecified_parameters_die (parm, subr_die);
else
- gen_decl_die (parm, subr_die);
+ gen_decl_die (parm, NULL, subr_die);
}
/* Decide whether we need an unspecified_parameters DIE at the end.
@@ -13807,7 +13800,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
{
/* Emit a DW_TAG_variable DIE for a named return value. */
if (DECL_NAME (DECL_RESULT (decl)))
- gen_decl_die (DECL_RESULT (decl), subr_die);
+ gen_decl_die (DECL_RESULT (decl), NULL, subr_die);
current_function_has_inlines = 0;
decls_for_scope (outer_scope, subr_die, 0);
@@ -13849,17 +13842,19 @@ common_block_die_table_eq (const void *x, const void *y)
return d->decl_id == e->decl_id && d->die_parent == e->die_parent;
}
-/* Generate a DIE to represent a declared data object. */
+/* Generate a DIE to represent a declared data object.
+ Either DECL or ORIGIN must be non-null. */
static void
-gen_variable_die (tree decl, dw_die_ref context_die)
+gen_variable_die (tree decl, tree origin, dw_die_ref context_die)
{
HOST_WIDE_INT off;
tree com_decl;
+ tree decl_or_origin = decl ? decl : origin;
dw_die_ref var_die;
- tree origin = decl_ultimate_origin (decl);
- dw_die_ref old_die = lookup_decl_die (decl);
- int declaration = (DECL_EXTERNAL (decl)
+ dw_die_ref old_die = decl ? lookup_decl_die (decl) : NULL;
+ dw_die_ref origin_die;
+ int declaration = (DECL_EXTERNAL (decl_or_origin)
/* If DECL is COMDAT and has not actually been
emitted, we cannot take its address; there
might end up being no definition anywhere in
@@ -13877,11 +13872,15 @@ gen_variable_die (tree decl, dw_die_ref context_die)
Here, S<int>::i is not DECL_EXTERNAL, but no
definition is required, so the compiler will
not emit a definition. */
- || (TREE_CODE (decl) == VAR_DECL
- && DECL_COMDAT (decl) && !TREE_ASM_WRITTEN (decl))
+ || (TREE_CODE (decl_or_origin) == VAR_DECL
+ && DECL_COMDAT (decl_or_origin)
+ && !TREE_ASM_WRITTEN (decl_or_origin))
|| class_or_namespace_scope_p (context_die));
- com_decl = fortran_common (decl, &off);
+ if (!origin)
+ origin = decl_ultimate_origin (decl);
+
+ com_decl = fortran_common (decl_or_origin, &off);
/* Symbol in common gets emitted as a child of the common block, in the form
of a data member. */
@@ -13892,7 +13891,7 @@ gen_variable_die (tree decl, dw_die_ref context_die)
dw_loc_descr_ref loc;
die_node com_die_arg;
- var_die = lookup_decl_die (decl);
+ var_die = lookup_decl_die (decl_or_origin);
if (var_die)
{
if (get_AT (var_die, DW_AT_location) == NULL)
@@ -13986,10 +13985,19 @@ gen_variable_die (tree decl, dw_die_ref context_die)
return;
}
+ /* If the compiler emitted a definition for the DECL declaration
+ and if we already emitted a DIE for it, don't emit a second
+ DIE for it again. */
+ if (old_die
+ && declaration
+ && old_die->die_parent == context_die)
+ return;
+
var_die = new_die (DW_TAG_variable, context_die, decl);
+ origin_die = NULL;
if (origin != NULL)
- add_abstract_origin_attribute (var_die, origin);
+ origin_die = add_abstract_origin_attribute (var_die, origin);
/* Loop unrolling can create multiple blocks that refer to the same
static variable, so we must test for the DW_AT_declaration flag.
@@ -14049,16 +14057,32 @@ gen_variable_die (tree decl, dw_die_ref context_die)
if (declaration)
add_AT_flag (var_die, DW_AT_declaration, 1);
- if (DECL_ABSTRACT (decl) || declaration)
+ if (decl && (DECL_ABSTRACT (decl) || declaration))
equate_decl_number_to_die (decl, var_die);
- if (! declaration && ! DECL_ABSTRACT (decl))
- {
- add_location_or_const_value_attribute (var_die, decl, DW_AT_location);
- add_pubname (decl, var_die);
+ if (! declaration
+ && (! DECL_ABSTRACT (decl_or_origin)
+ /* Local static vars are shared between all clones/inlines,
+ so emit DW_AT_location on the abstract DIE if DECL_RTL is
+ already set. */
+ || (TREE_CODE (decl_or_origin) == VAR_DECL
+ && TREE_STATIC (decl_or_origin)
+ && DECL_RTL_SET_P (decl_or_origin)))
+ /* When abstract origin already has DW_AT_location attribute, no need
+ to add it again. */
+ && (origin_die == NULL || get_AT (origin_die, DW_AT_location) == NULL))
+ {
+ if (TREE_CODE (decl_or_origin) == VAR_DECL && TREE_STATIC (decl_or_origin)
+ && !TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl_or_origin)))
+ defer_location (decl_or_origin, var_die);
+ else
+ add_location_or_const_value_attribute (var_die,
+ decl_or_origin,
+ DW_AT_location);
+ add_pubname (decl_or_origin, var_die);
}
else
- tree_add_const_value_attribute (var_die, decl);
+ tree_add_const_value_attribute (var_die, decl_or_origin);
}
/* Generate a DIE to represent a named constant. */
@@ -14183,7 +14207,7 @@ gen_lexical_block_die (tree stmt, dw_die_ref context_die, int depth)
{
dw_die_ref stmt_die = new_die (DW_TAG_lexical_block, context_die, stmt);
- if (! BLOCK_ABSTRACT (stmt))
+ if (! BLOCK_ABSTRACT (stmt) && TREE_ASM_WRITTEN (stmt))
add_high_low_attributes (stmt, stmt_die);
decls_for_scope (stmt, stmt_die, depth);
@@ -14208,7 +14232,8 @@ gen_inlined_subroutine_die (tree stmt, dw_die_ref context_die, int depth)
= new_die (DW_TAG_inlined_subroutine, context_die, stmt);
add_abstract_origin_attribute (subr_die, decl);
- add_high_low_attributes (stmt, subr_die);
+ if (TREE_ASM_WRITTEN (stmt))
+ add_high_low_attributes (stmt, subr_die);
add_call_src_coords_attributes (stmt, subr_die);
decls_for_scope (stmt, subr_die, depth);
@@ -14440,7 +14465,7 @@ gen_member_die (tree type, dw_die_ref context_die)
if (child)
splice_child_die (context_die, child);
else
- gen_decl_die (member, context_die);
+ gen_decl_die (member, NULL, context_die);
}
/* Now output info about the function members (if any). */
@@ -14454,7 +14479,7 @@ gen_member_die (tree type, dw_die_ref context_die)
if (child)
splice_child_die (context_die, child);
else
- gen_decl_die (member, context_die);
+ gen_decl_die (member, NULL, context_die);
}
}
@@ -14629,7 +14654,7 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die,
gcc_assert (DECL_ORIGINAL_TYPE (TYPE_NAME (type)) != type);
TREE_ASM_WRITTEN (type) = 1;
- gen_decl_die (TYPE_NAME (type), context_die);
+ gen_decl_die (TYPE_NAME (type), NULL, context_die);
return;
}
@@ -14785,46 +14810,6 @@ gen_type_die (tree type, dw_die_ref context_die)
gen_type_die_with_usage (type, context_die, DINFO_USAGE_DIR_USE);
}
-/* Generate a DIE for a tagged type instantiation. */
-
-static void
-gen_tagged_type_instantiation_die (tree type, dw_die_ref context_die)
-{
- if (type == NULL_TREE || type == error_mark_node)
- return;
-
- /* We are going to output a DIE to represent the unqualified version of
- this type (i.e. without any const or volatile qualifiers) so make sure
- that we have the main variant (i.e. the unqualified version) of this
- type now. */
- gcc_assert (type == type_main_variant (type));
-
- /* Do not check TREE_ASM_WRITTEN (type) as it may not be set if this is
- an instance of an unresolved type. */
-
- switch (TREE_CODE (type))
- {
- case ERROR_MARK:
- break;
-
- case ENUMERAL_TYPE:
- gen_inlined_enumeration_type_die (type, context_die);
- break;
-
- case RECORD_TYPE:
- gen_inlined_structure_type_die (type, context_die);
- break;
-
- case UNION_TYPE:
- case QUAL_UNION_TYPE:
- gen_inlined_union_type_die (type, context_die);
- break;
-
- default:
- gcc_unreachable ();
- }
-}
-
/* Generate a DW_TAG_lexical_block DIE followed by DIEs to represent all of the
things which are local to the given block. */
@@ -14832,7 +14817,6 @@ static void
gen_block_die (tree stmt, dw_die_ref context_die, int depth)
{
int must_output_die = 0;
- tree decl;
bool inlined_func;
/* Ignore blocks that are NULL. */
@@ -14867,21 +14851,16 @@ gen_block_die (tree stmt, dw_die_ref context_die, int depth)
if (debug_info_level > DINFO_LEVEL_TERSE)
/* We are not in terse mode so *any* local declaration counts
as being a "significant" one. */
- must_output_die = (BLOCK_VARS (stmt) != NULL
+ must_output_die = ((BLOCK_VARS (stmt) != NULL
+ || BLOCK_NUM_NONLOCALIZED_VARS (stmt))
&& (TREE_USED (stmt)
|| TREE_ASM_WRITTEN (stmt)
|| BLOCK_ABSTRACT (stmt)));
- else
- /* We are in terse mode, so only local (nested) function
- definitions count as "significant" local declarations. */
- for (decl = BLOCK_VARS (stmt);
- decl != NULL; decl = TREE_CHAIN (decl))
- if (TREE_CODE (decl) == FUNCTION_DECL
- && DECL_INITIAL (decl))
- {
- must_output_die = 1;
- break;
- }
+ else if ((TREE_USED (stmt)
+ || TREE_ASM_WRITTEN (stmt)
+ || BLOCK_ABSTRACT (stmt))
+ && !dwarf2out_ignore_block (stmt))
+ must_output_die = 1;
}
/* It would be a waste of space to generate a Dwarf DW_TAG_lexical_block
@@ -14902,6 +14881,35 @@ gen_block_die (tree stmt, dw_die_ref context_die, int depth)
decls_for_scope (stmt, context_die, depth);
}
+/* Process variable DECL (or variable with origin ORIGIN) within
+ block STMT and add it to CONTEXT_DIE. */
+static void
+process_scope_var (tree stmt, tree decl, tree origin, dw_die_ref context_die)
+{
+ dw_die_ref die;
+ tree decl_or_origin = decl ? decl : origin;
+ tree ultimate_origin = origin ? decl_ultimate_origin (origin) : NULL;
+
+ if (ultimate_origin)
+ origin = ultimate_origin;
+
+ if (TREE_CODE (decl_or_origin) == FUNCTION_DECL)
+ die = lookup_decl_die (decl_or_origin);
+ else if (TREE_CODE (decl_or_origin) == TYPE_DECL
+ && TYPE_DECL_IS_STUB (decl_or_origin))
+ die = lookup_type_die (TREE_TYPE (decl_or_origin));
+ else
+ die = NULL;
+
+ if (die != NULL && die->die_parent == NULL)
+ add_child_die (context_die, die);
+ else if (TREE_CODE (decl_or_origin) == IMPORTED_DECL)
+ dwarf2out_imported_module_or_decl_1 (decl_or_origin, DECL_NAME (decl_or_origin),
+ stmt, context_die);
+ else
+ gen_decl_die (decl, origin, context_die);
+}
+
/* Generate all of the decls declared within a given scope and (recursively)
all of its sub-blocks. */
@@ -14909,48 +14917,22 @@ static void
decls_for_scope (tree stmt, dw_die_ref context_die, int depth)
{
tree decl;
+ unsigned int i;
tree subblocks;
/* Ignore NULL blocks. */
if (stmt == NULL_TREE)
return;
- if (TREE_USED (stmt))
- {
- /* Output the DIEs to represent all of the data objects and typedefs
- declared directly within this block but not within any nested
- sub-blocks. Also, nested function and tag DIEs have been
- generated with a parent of NULL; fix that up now. */
- for (decl = BLOCK_VARS (stmt); decl != NULL; decl = TREE_CHAIN (decl))
- {
- dw_die_ref die;
-
- if (TREE_CODE (decl) == FUNCTION_DECL)
- die = lookup_decl_die (decl);
- else if (TREE_CODE (decl) == TYPE_DECL && TYPE_DECL_IS_STUB (decl))
- die = lookup_type_die (TREE_TYPE (decl));
- else
- die = NULL;
-
- if (die != NULL && die->die_parent == NULL)
- add_child_die (context_die, die);
- /* Do not produce debug information for static variables since
- these might be optimized out. We are called for these later
- in varpool_analyze_pending_decls.
-
- But *do* produce it for Fortran COMMON variables because,
- even though they are static, their names can differ depending
- on the scope, which we need to preserve. */
- if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
- && !(is_fortran () && TREE_PUBLIC (decl)))
- ;
- else if (TREE_CODE (decl) == IMPORTED_DECL)
- dwarf2out_imported_module_or_decl_1 (decl, DECL_NAME (decl),
- stmt, context_die);
- else
- gen_decl_die (decl, context_die);
- }
- }
+ /* Output the DIEs to represent all of the data objects and typedefs
+ declared directly within this block but not within any nested
+ sub-blocks. Also, nested function and tag DIEs have been
+ generated with a parent of NULL; fix that up now. */
+ for (decl = BLOCK_VARS (stmt); decl != NULL; decl = TREE_CHAIN (decl))
+ process_scope_var (stmt, decl, NULL_TREE, context_die);
+ for (i = 0; i < BLOCK_NUM_NONLOCALIZED_VARS (stmt); i++)
+ process_scope_var (stmt, NULL, BLOCK_NONLOCALIZED_VAR (stmt, i),
+ context_die);
/* If we're at -g1, we're not interested in subblocks. */
if (debug_info_level <= DINFO_LEVEL_TERSE)
@@ -15033,7 +15015,7 @@ force_decl_die (tree decl)
gen_decl_die() call. */
saved_external_flag = DECL_EXTERNAL (decl);
DECL_EXTERNAL (decl) = 1;
- gen_decl_die (decl, context_die);
+ gen_decl_die (decl, NULL, context_die);
DECL_EXTERNAL (decl) = saved_external_flag;
break;
@@ -15116,7 +15098,7 @@ declare_in_namespace (tree thing, dw_die_ref context_die)
if (is_fortran ())
return ns_context;
if (DECL_P (thing))
- gen_decl_die (thing, ns_context);
+ gen_decl_die (thing, NULL, ns_context);
else
gen_type_die (thing, ns_context);
}
@@ -15126,18 +15108,19 @@ declare_in_namespace (tree thing, dw_die_ref context_die)
/* Generate a DIE for a namespace or namespace alias. */
static void
-gen_namespace_die (tree decl)
+gen_namespace_die (tree decl, dw_die_ref context_die)
{
- dw_die_ref context_die = setup_namespace_context (decl, comp_unit_die);
+ dw_die_ref namespace_die;
/* Namespace aliases have a DECL_ABSTRACT_ORIGIN of the namespace
they are an alias of. */
if (DECL_ABSTRACT_ORIGIN (decl) == NULL)
{
/* Output a real namespace or module. */
- dw_die_ref namespace_die
- = new_die (is_fortran () ? DW_TAG_module : DW_TAG_namespace,
- context_die, decl);
+ context_die = setup_namespace_context (decl, comp_unit_die);
+ namespace_die = new_die (is_fortran ()
+ ? DW_TAG_module : DW_TAG_namespace,
+ context_die, decl);
/* For Fortran modules defined in different CU don't add src coords. */
if (namespace_die->die_tag == DW_TAG_module && DECL_EXTERNAL (decl))
add_name_attribute (namespace_die, dwarf2_name (decl, 0));
@@ -15155,9 +15138,11 @@ gen_namespace_die (tree decl)
dw_die_ref origin_die
= force_decl_die (DECL_ABSTRACT_ORIGIN (decl));
+ if (DECL_CONTEXT (decl) == NULL_TREE
+ || TREE_CODE (DECL_CONTEXT (decl)) == NAMESPACE_DECL)
+ context_die = setup_namespace_context (decl, comp_unit_die);
/* Now create the namespace alias DIE. */
- dw_die_ref namespace_die
- = new_die (DW_TAG_imported_declaration, context_die, decl);
+ namespace_die = new_die (DW_TAG_imported_declaration, context_die, decl);
add_name_and_src_coords_attributes (namespace_die, decl);
add_AT_die_ref (namespace_die, DW_AT_import, origin_die);
equate_decl_number_to_die (decl, namespace_die);
@@ -15167,14 +15152,15 @@ gen_namespace_die (tree decl)
/* Generate Dwarf debug information for a decl described by DECL. */
static void
-gen_decl_die (tree decl, dw_die_ref context_die)
+gen_decl_die (tree decl, tree origin, dw_die_ref context_die)
{
- tree origin;
+ tree decl_or_origin = decl ? decl : origin;
+ tree class_origin = NULL;
- if (DECL_P (decl) && DECL_IGNORED_P (decl))
+ if (DECL_P (decl_or_origin) && DECL_IGNORED_P (decl_or_origin))
return;
- switch (TREE_CODE (decl))
+ switch (TREE_CODE (decl_or_origin))
{
case ERROR_MARK:
break;
@@ -15199,8 +15185,10 @@ gen_decl_die (tree decl, dw_die_ref context_die)
case FUNCTION_DECL:
/* Don't output any DIEs to represent mere function declarations,
unless they are class members or explicit block externs. */
- if (DECL_INITIAL (decl) == NULL_TREE && DECL_CONTEXT (decl) == NULL_TREE
- && (current_function_decl == NULL_TREE || DECL_ARTIFICIAL (decl)))
+ if (DECL_INITIAL (decl_or_origin) == NULL_TREE
+ && DECL_CONTEXT (decl_or_origin) == NULL_TREE
+ && (current_function_decl == NULL_TREE
+ || DECL_ARTIFICIAL (decl_or_origin)))
break;
#if 0
@@ -15212,8 +15200,8 @@ gen_decl_die (tree decl, dw_die_ref context_die)
#endif
/* If we're emitting a clone, emit info for the abstract instance. */
- if (DECL_ORIGIN (decl) != decl)
- dwarf2out_abstract_function (DECL_ABSTRACT_ORIGIN (decl));
+ if (origin || DECL_ORIGIN (decl) != decl)
+ dwarf2out_abstract_function (origin ? origin : DECL_ABSTRACT_ORIGIN (decl));
/* If we're emitting an out-of-line copy of an inline function,
emit info for the abstract instance and set up to refer to it. */
@@ -15241,7 +15229,8 @@ gen_decl_die (tree decl, dw_die_ref context_die)
gen_type_die (DECL_CONTEXT (decl), context_die);
/* And its containing type. */
- origin = decl_class_context (decl);
+ if (!origin)
+ origin = decl_class_context (decl);
if (origin != NULL_TREE)
gen_type_die_for_member (origin, decl, context_die);
@@ -15250,7 +15239,8 @@ gen_decl_die (tree decl, dw_die_ref context_die)
}
/* Now output a DIE to represent the function itself. */
- gen_subprogram_die (decl, context_die);
+ if (decl)
+ gen_subprogram_die (decl, context_die);
break;
case TYPE_DECL:
@@ -15263,14 +15253,14 @@ gen_decl_die (tree decl, dw_die_ref context_die)
of some type tag, if the given TYPE_DECL is marked as having been
instantiated from some other (original) TYPE_DECL node (e.g. one which
was generated within the original definition of an inline function) we
- have to generate a special (abbreviated) DW_TAG_structure_type,
- DW_TAG_union_type, or DW_TAG_enumeration_type DIE here. */
- if (TYPE_DECL_IS_STUB (decl) && decl_ultimate_origin (decl) != NULL_TREE
- && is_tagged_type (TREE_TYPE (decl)))
- {
- gen_tagged_type_instantiation_die (TREE_TYPE (decl), context_die);
- break;
- }
+ used to generate a special (abbreviated) DW_TAG_structure_type,
+ DW_TAG_union_type, or DW_TAG_enumeration_type DIE here. But nothing
+ should be actually referencing those DIEs, as variable DIEs with that
+ type would be emitted already in the abstract origin, so it was always
+ removed during unused type prunning. Don't add anything in this
+ case. */
+ if (TYPE_DECL_IS_STUB (decl) && decl_ultimate_origin (decl) != NULL_TREE)
+ break;
if (is_redundant_typedef (decl))
gen_type_die (TREE_TYPE (decl), context_die);
@@ -15293,28 +15283,30 @@ gen_decl_die (tree decl, dw_die_ref context_die)
/* Output any DIEs that are needed to specify the type of this data
object. */
- if (TREE_CODE (decl) == RESULT_DECL && DECL_BY_REFERENCE (decl))
- gen_type_die (TREE_TYPE (TREE_TYPE (decl)), context_die);
+ if (TREE_CODE (decl_or_origin) == RESULT_DECL
+ && DECL_BY_REFERENCE (decl_or_origin))
+ gen_type_die (TREE_TYPE (TREE_TYPE (decl_or_origin)), context_die);
else
- gen_type_die (TREE_TYPE (decl), context_die);
+ gen_type_die (TREE_TYPE (decl_or_origin), context_die);
/* And its containing type. */
- origin = decl_class_context (decl);
- if (origin != NULL_TREE)
- gen_type_die_for_member (origin, decl, context_die);
+ class_origin = decl_class_context (decl_or_origin);
+ if (class_origin != NULL_TREE)
+ gen_type_die_for_member (class_origin, decl_or_origin, context_die);
/* And its containing namespace. */
- context_die = declare_in_namespace (decl, context_die);
+ context_die = declare_in_namespace (decl_or_origin, context_die);
/* Now output the DIE to represent the data object itself. This gets
complicated because of the possibility that the VAR_DECL really
represents an inlined instance of a formal parameter for an inline
function. */
- origin = decl_ultimate_origin (decl);
+ if (!origin)
+ origin = decl_ultimate_origin (decl);
if (origin != NULL_TREE && TREE_CODE (origin) == PARM_DECL)
- gen_formal_parameter_die (decl, context_die);
+ gen_formal_parameter_die (decl, origin, context_die);
else
- gen_variable_die (decl, context_die);
+ gen_variable_die (decl, origin, context_die);
break;
case FIELD_DECL:
@@ -15330,16 +15322,16 @@ gen_decl_die (tree decl, dw_die_ref context_die)
break;
case PARM_DECL:
- if (DECL_BY_REFERENCE (decl))
- gen_type_die (TREE_TYPE (TREE_TYPE (decl)), context_die);
+ if (DECL_BY_REFERENCE (decl_or_origin))
+ gen_type_die (TREE_TYPE (TREE_TYPE (decl_or_origin)), context_die);
else
- gen_type_die (TREE_TYPE (decl), context_die);
- gen_formal_parameter_die (decl, context_die);
+ gen_type_die (TREE_TYPE (decl_or_origin), context_die);
+ gen_formal_parameter_die (decl, origin, context_die);
break;
case NAMESPACE_DECL:
case IMPORTED_DECL:
- gen_namespace_die (decl);
+ gen_namespace_die (decl, context_die);
break;
default:
@@ -15387,6 +15379,15 @@ dwarf2out_imported_module_or_decl_1 (tree decl,
dw_die_ref imported_die = NULL;
dw_die_ref at_import_die;
+ if (TREE_CODE (decl) == IMPORTED_DECL)
+ {
+ xloc = expand_location (DECL_SOURCE_LOCATION (decl));
+ decl = IMPORTED_DECL_ASSOCIATED_DECL (decl);
+ gcc_assert (decl);
+ }
+ else
+ xloc = expand_location (input_location);
+
if (TREE_CODE (decl) == TYPE_DECL || TREE_CODE (decl) == CONST_DECL)
{
if (is_base_type (TREE_TYPE (decl)))
@@ -15404,19 +15405,6 @@ dwarf2out_imported_module_or_decl_1 (tree decl,
gcc_assert (at_import_die);
}
}
- else if (TREE_CODE (decl) == IMPORTED_DECL)
- {
- tree imported_ns_decl;
- /* IMPORTED_DECL nodes that are not imported namespace are just not
- supported yet. */
- gcc_assert (DECL_INITIAL (decl)
- && TREE_CODE (DECL_INITIAL (decl)) == NAMESPACE_DECL);
- imported_ns_decl = DECL_INITIAL (decl);
- at_import_die = lookup_decl_die (imported_ns_decl);
- if (!at_import_die)
- at_import_die = force_decl_die (imported_ns_decl);
- gcc_assert (at_import_die);
- }
else
{
at_import_die = lookup_decl_die (decl);
@@ -15449,7 +15437,6 @@ dwarf2out_imported_module_or_decl_1 (tree decl,
lexical_block_die,
lexical_block);
- xloc = expand_location (input_location);
add_AT_file (imported_die, DW_AT_decl_file, lookup_filename (xloc.file));
add_AT_unsigned (imported_die, DW_AT_decl_line, xloc.line);
if (name)
@@ -15625,7 +15612,7 @@ dwarf2out_decl (tree decl)
return;
}
- gen_decl_die (decl, context_die);
+ gen_decl_die (decl, NULL, context_die);
}
/* Output a marker (i.e. a label) for the beginning of the generated code for
@@ -15660,11 +15647,19 @@ static bool
dwarf2out_ignore_block (const_tree block)
{
tree decl;
+ unsigned int i;
for (decl = BLOCK_VARS (block); decl; decl = TREE_CHAIN (decl))
if (TREE_CODE (decl) == FUNCTION_DECL
|| (TREE_CODE (decl) == TYPE_DECL && TYPE_DECL_IS_STUB (decl)))
return 0;
+ for (i = 0; i < BLOCK_NUM_NONLOCALIZED_VARS (block); i++)
+ {
+ decl = BLOCK_NONLOCALIZED_VAR (block, i);
+ if (TREE_CODE (decl) == FUNCTION_DECL
+ || (TREE_CODE (decl) == TYPE_DECL && TYPE_DECL_IS_STUB (decl)))
+ return 0;
+ }
return 1;
}
@@ -16443,6 +16438,7 @@ dwarf2out_finish (const char *filename)
{
limbo_die_node *node, *next_node;
dw_die_ref die = 0;
+ unsigned int i;
/* Add the name for the main input file now. We delayed this from
dwarf2out_init to avoid complications with PCH. */
@@ -16457,6 +16453,14 @@ dwarf2out_finish (const char *filename)
add_comp_dir_attribute (comp_unit_die);
}
+ for (i = 0; i < VEC_length (deferred_locations, deferred_locations_list); i++)
+ {
+ add_location_or_const_value_attribute (
+ VEC_index (deferred_locations, deferred_locations_list, i)->die,
+ VEC_index (deferred_locations, deferred_locations_list, i)->variable,
+ DW_AT_location);
+ }
+
/* Traverse the limbo die list, and add parent/child links. The only
dies without parents that should be here are concrete instances of
inline functions, and the comp_unit_die. We can ignore the comp_unit_die.
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 679e95ea8a2..1f51e125f35 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1495,7 +1495,7 @@ mem_expr_equal_p (const_tree expr1, const_tree expr2)
-1 if not known. */
int
-get_mem_align_offset (rtx mem, int align)
+get_mem_align_offset (rtx mem, unsigned int align)
{
tree expr;
unsigned HOST_WIDE_INT offset;
@@ -2008,6 +2008,7 @@ adjust_address_1 (rtx memref, enum machine_mode mode, HOST_WIDE_INT offset,
rtx memoffset = MEM_OFFSET (memref);
rtx size = 0;
unsigned int memalign = MEM_ALIGN (memref);
+ int pbits;
/* If there are no changes, just return the original memory reference. */
if (mode == GET_MODE (memref) && !offset
@@ -2019,6 +2020,16 @@ adjust_address_1 (rtx memref, enum machine_mode mode, HOST_WIDE_INT offset,
(plus (plus reg reg) const_int) -- so do this always. */
addr = copy_rtx (addr);
+ /* Convert a possibly large offset to a signed value within the
+ range of the target address space. */
+ pbits = GET_MODE_BITSIZE (Pmode);
+ if (HOST_BITS_PER_WIDE_INT > pbits)
+ {
+ int shift = HOST_BITS_PER_WIDE_INT - pbits;
+ offset = (((HOST_WIDE_INT) ((unsigned HOST_WIDE_INT) offset << shift))
+ >> shift);
+ }
+
if (adjust)
{
/* If MEMREF is a LO_SUM and the offset is within the alignment of the
diff --git a/gcc/except.c b/gcc/except.c
index c762edc022e..41f799af07e 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -227,8 +227,6 @@ static hashval_t t2r_hash (const void *);
static void add_type_for_runtime (tree);
static tree lookup_type_for_runtime (tree);
-static void remove_unreachable_regions (rtx);
-
static int ttypes_filter_eq (const void *, const void *);
static hashval_t ttypes_filter_hash (const void *);
static int ehspec_filter_eq (const void *, const void *);
@@ -271,7 +269,7 @@ enum reachable_code
struct reachable_info;
static enum reachable_code reachable_next_level (struct eh_region *, tree,
- struct reachable_info *);
+ struct reachable_info *, bool);
static int action_record_eq (const void *, const void *);
static hashval_t action_record_hash (const void *);
@@ -622,69 +620,145 @@ collect_eh_region_array (void)
}
}
-/* Remove all regions whose labels are not reachable from insns. */
+/* R is MUST_NOT_THROW region that is not reachable via local
+ RESX instructions. It still must be kept in the tree in case runtime
+ can unwind through it, or we will eliminate out terminate call
+ runtime would do otherwise. Return TRUE if R contains throwing statements
+ or some of the exceptions in inner regions can be unwound up to R.
+
+ CONTAINS_STMT is bitmap of all regions that contains some throwing
+ statements.
+
+ Function looks O(^3) at first sight. In fact the function is called at most
+ once for every MUST_NOT_THROW in EH tree from remove_unreachable_regions
+ Because the outer loop walking subregions does not dive in MUST_NOT_THROW,
+ the outer loop examines every region at most once. The inner loop
+ is doing unwinding from the throwing statement same way as we do during
+ CFG construction, so it is O(^2) in size of EH tree, but O(n) in size
+ of CFG. In practice Eh trees are wide, not deep, so this is not
+ a problem. */
-static void
-remove_unreachable_regions (rtx insns)
+static bool
+can_be_reached_by_runtime (sbitmap contains_stmt, struct eh_region *r)
{
- int i, *uid_region_num;
- bool *reachable;
- struct eh_region *r;
- rtx insn;
-
- uid_region_num = XCNEWVEC (int, get_max_uid ());
- reachable = XCNEWVEC (bool, cfun->eh->last_region_number + 1);
-
- for (i = cfun->eh->last_region_number; i > 0; --i)
+ struct eh_region *i = r->inner;
+ unsigned n;
+ bitmap_iterator bi;
+
+ if (TEST_BIT (contains_stmt, r->region_number))
+ return true;
+ if (r->aka)
+ EXECUTE_IF_SET_IN_BITMAP (r->aka, 0, n, bi)
+ if (TEST_BIT (contains_stmt, n))
+ return true;
+ if (!i)
+ return false;
+ while (1)
{
- r = VEC_index (eh_region, cfun->eh->region_array, i);
- if (!r || r->region_number != i)
- continue;
-
- if (r->resume)
+ /* It is pointless to look into MUST_NOT_THROW
+ or dive into subregions. They never unwind up. */
+ if (i->type != ERT_MUST_NOT_THROW)
{
- gcc_assert (!uid_region_num[INSN_UID (r->resume)]);
- uid_region_num[INSN_UID (r->resume)] = i;
+ bool found = TEST_BIT (contains_stmt, i->region_number);
+ if (!found)
+ EXECUTE_IF_SET_IN_BITMAP (i->aka, 0, n, bi)
+ if (TEST_BIT (contains_stmt, n))
+ {
+ found = true;
+ break;
+ }
+ /* We have nested region that contains throwing statement.
+ See if resuming might lead up to the resx or we get locally
+ caught sooner. If we get locally caught sooner, we either
+ know region R is not reachable or it would have direct edge
+ from the EH resx and thus consider region reachable at
+ firest place. */
+ if (found)
+ {
+ struct eh_region *i1 = i;
+ tree type_thrown = NULL_TREE;
+
+ if (i1->type == ERT_THROW)
+ {
+ type_thrown = i1->u.eh_throw.type;
+ i1 = i1->outer;
+ }
+ for (; i1 != r; i1 = i1->outer)
+ if (reachable_next_level (i1, type_thrown, NULL,
+ false) >= RNL_CAUGHT)
+ break;
+ if (i1 == r)
+ return true;
+ }
}
- if (r->label)
+ /* If there are sub-regions, process them. */
+ if (i->type != ERT_MUST_NOT_THROW && i->inner)
+ i = i->inner;
+ /* If there are peers, process them. */
+ else if (i->next_peer)
+ i = i->next_peer;
+ /* Otherwise, step back up the tree to the next peer. */
+ else
{
- gcc_assert (!uid_region_num[INSN_UID (r->label)]);
- uid_region_num[INSN_UID (r->label)] = i;
+ do
+ {
+ i = i->outer;
+ if (i == r)
+ return false;
+ }
+ while (i->next_peer == NULL);
+ i = i->next_peer;
}
}
+}
- for (insn = insns; insn; insn = NEXT_INSN (insn))
- reachable[uid_region_num[INSN_UID (insn)]] = true;
+/* Remove all regions whose labels are not reachable.
+ REACHABLE is bitmap of all regions that are used by the function
+ CONTAINS_STMT is bitmap of all regions that contains stmt (or NULL). */
+void
+remove_unreachable_regions (sbitmap reachable, sbitmap contains_stmt)
+{
+ int i;
+ struct eh_region *r;
for (i = cfun->eh->last_region_number; i > 0; --i)
{
r = VEC_index (eh_region, cfun->eh->region_array, i);
- if (r && r->region_number == i && !reachable[i])
+ if (!r)
+ continue;
+ if (r->region_number == i && !TEST_BIT (reachable, i) && !r->resume)
{
bool kill_it = true;
+
+ r->tree_label = NULL;
switch (r->type)
{
case ERT_THROW:
/* Don't remove ERT_THROW regions if their outer region
- is reachable. */
- if (r->outer && reachable[r->outer->region_number])
+ is reachable. */
+ if (r->outer && TEST_BIT (reachable, r->outer->region_number))
kill_it = false;
break;
-
case ERT_MUST_NOT_THROW:
/* MUST_NOT_THROW regions are implementable solely in the
- runtime, but their existence continues to affect calls
- within that region. Never delete them here. */
- kill_it = false;
+ runtime, but we need them when inlining function.
+
+ Keep them if outer region is not MUST_NOT_THROW a well
+ and if they contain some statement that might unwind through
+ them. */
+ if ((!r->outer || r->outer->type != ERT_MUST_NOT_THROW)
+ && (!contains_stmt
+ || can_be_reached_by_runtime (contains_stmt, r)))
+ kill_it = false;
break;
-
case ERT_TRY:
{
/* TRY regions are reachable if any of its CATCH regions
are reachable. */
struct eh_region *c;
- for (c = r->u.eh_try.eh_catch; c ; c = c->u.eh_catch.next_catch)
- if (reachable[c->region_number])
+ for (c = r->u.eh_try.eh_catch; c;
+ c = c->u.eh_catch.next_catch)
+ if (TEST_BIT (reachable, c->region_number))
{
kill_it = false;
break;
@@ -697,11 +771,91 @@ remove_unreachable_regions (rtx insns)
}
if (kill_it)
- remove_eh_handler (r);
+ {
+ if (dump_file)
+ fprintf (dump_file, "Removing unreachable eh region %i\n",
+ r->region_number);
+ remove_eh_handler (r);
+ }
+ }
+ }
+#ifdef ENABLE_CHECKING
+ verify_eh_tree (cfun);
+#endif
+}
+
+/* Return array mapping LABEL_DECL_UID to region such that region's tree_label
+ is identical to label. */
+
+VEC(int,heap) *
+label_to_region_map (void)
+{
+ VEC(int,heap) * label_to_region = NULL;
+ int i;
+
+ VEC_safe_grow_cleared (int, heap, label_to_region,
+ cfun->cfg->last_label_uid + 1);
+ for (i = cfun->eh->last_region_number; i > 0; --i)
+ {
+ struct eh_region *r = VEC_index (eh_region, cfun->eh->region_array, i);
+ if (r && r->tree_label && LABEL_DECL_UID (r->tree_label) >= 0)
+ {
+ if ((unsigned) LABEL_DECL_UID (r->tree_label) >
+ VEC_length (int, label_to_region))
+ VEC_safe_grow_cleared (int, heap, label_to_region,
+ LABEL_DECL_UID (r->tree_label));
+ VEC_replace (int, label_to_region, LABEL_DECL_UID (r->tree_label),
+ i);
}
}
+ return label_to_region;
+}
+
+/* Return number of EH regions. */
+int
+num_eh_regions (void)
+{
+ return cfun->eh->last_region_number + 1;
+}
+
+/* Remove all regions whose labels are not reachable from insns. */
+
+static void
+rtl_remove_unreachable_regions (rtx insns)
+{
+ int i, *uid_region_num;
+ sbitmap reachable;
+ struct eh_region *r;
+ rtx insn;
- free (reachable);
+ uid_region_num = XCNEWVEC (int, get_max_uid ());
+ reachable = sbitmap_alloc (cfun->eh->last_region_number + 1);
+ sbitmap_zero (reachable);
+
+ for (i = cfun->eh->last_region_number; i > 0; --i)
+ {
+ r = VEC_index (eh_region, cfun->eh->region_array, i);
+ if (!r || r->region_number != i)
+ continue;
+
+ if (r->resume)
+ {
+ gcc_assert (!uid_region_num[INSN_UID (r->resume)]);
+ uid_region_num[INSN_UID (r->resume)] = i;
+ }
+ if (r->label)
+ {
+ gcc_assert (!uid_region_num[INSN_UID (r->label)]);
+ uid_region_num[INSN_UID (r->label)] = i;
+ }
+ }
+
+ for (insn = insns; insn; insn = NEXT_INSN (insn))
+ SET_BIT (reachable, uid_region_num[INSN_UID (insn)]);
+
+ remove_unreachable_regions (reachable, NULL);
+
+ sbitmap_free (reachable);
free (uid_region_num);
}
@@ -726,7 +880,7 @@ convert_from_eh_region_ranges (void)
region->label = DECL_RTL_IF_SET (region->tree_label);
}
- remove_unreachable_regions (insns);
+ rtl_remove_unreachable_regions (insns);
}
static void
@@ -821,6 +975,17 @@ current_function_has_exception_handlers (void)
static void
duplicate_eh_regions_0 (eh_region o, int *min, int *max)
{
+ int i;
+
+ if (o->aka)
+ {
+ i = bitmap_first_set_bit (o->aka);
+ if (i < *min)
+ *min = i;
+ i = bitmap_last_set_bit (o->aka);
+ if (i > *max)
+ *max = i;
+ }
if (o->region_number < *min)
*min = o->region_number;
if (o->region_number > *max)
@@ -852,7 +1017,18 @@ duplicate_eh_regions_1 (eh_region old, eh_region outer, int eh_offset)
*n = *old;
n->outer = outer;
n->next_peer = NULL;
- gcc_assert (!old->aka);
+ if (old->aka)
+ {
+ unsigned i;
+ bitmap_iterator bi;
+ n->aka = BITMAP_GGC_ALLOC ();
+
+ EXECUTE_IF_SET_IN_BITMAP (old->aka, 0, i, bi)
+ {
+ bitmap_set_bit (n->aka, i + eh_offset);
+ VEC_replace (eh_region, cfun->eh->region_array, i + eh_offset, n);
+ }
+ }
n->region_number += eh_offset;
VEC_replace (eh_region, cfun->eh->region_array, n->region_number, n);
@@ -883,8 +1059,11 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
int i, min_region, max_region, eh_offset, cfun_last_region_number;
int num_regions;
- if (!ifun->eh->region_tree)
+ if (!ifun->eh)
return 0;
+#ifdef ENABLE_CHECKING
+ verify_eh_tree (ifun);
+#endif
/* Find the range of region numbers to be copied. The interface we
provide here mandates a single offset to find new number from old,
@@ -905,23 +1084,18 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
eh_offset = cfun_last_region_number + 1 - min_region;
/* If we've not yet created a region array, do so now. */
- VEC_safe_grow (eh_region, gc, cfun->eh->region_array,
- cfun_last_region_number + 1 + num_regions);
- cfun->eh->last_region_number = max_region + eh_offset;
-
- /* We may have just allocated the array for the first time.
- Make sure that element zero is null. */
- VEC_replace (eh_region, cfun->eh->region_array, 0, 0);
-
- /* Zero all entries in the range allocated. */
- memset (VEC_address (eh_region, cfun->eh->region_array)
- + cfun_last_region_number + 1, 0, num_regions * sizeof (eh_region));
+ cfun->eh->last_region_number = cfun_last_region_number + num_regions;
+ VEC_safe_grow_cleared (eh_region, gc, cfun->eh->region_array,
+ cfun->eh->last_region_number + 1);
/* Locate the spot at which to insert the new tree. */
if (outer_region > 0)
{
outer = VEC_index (eh_region, cfun->eh->region_array, outer_region);
- splice = &outer->inner;
+ if (outer)
+ splice = &outer->inner;
+ else
+ splice = &cfun->eh->region_tree;
}
else
{
@@ -931,6 +1105,20 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
while (*splice)
splice = &(*splice)->next_peer;
+ if (!ifun->eh->region_tree)
+ {
+ if (outer)
+ for (i = cfun_last_region_number + 1;
+ i <= cfun->eh->last_region_number; i++)
+ {
+ VEC_replace (eh_region, cfun->eh->region_array, i, outer);
+ if (outer->aka == NULL)
+ outer->aka = BITMAP_GGC_ALLOC ();
+ bitmap_set_bit (outer->aka, i);
+ }
+ return eh_offset;
+ }
+
/* Copy all the regions in the subtree. */
if (copy_region > 0)
{
@@ -960,9 +1148,9 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
the prev_try short-cuts for ERT_CLEANUP regions. */
prev_try = NULL;
if (outer_region > 0)
- for (prev_try = VEC_index (eh_region, cfun->eh->region_array, outer_region);
- prev_try && prev_try->type != ERT_TRY;
- prev_try = prev_try->outer)
+ for (prev_try =
+ VEC_index (eh_region, cfun->eh->region_array, outer_region);
+ prev_try && prev_try->type != ERT_TRY; prev_try = prev_try->outer)
if (prev_try->type == ERT_MUST_NOT_THROW
|| (prev_try->type == ERT_ALLOWED_EXCEPTIONS
&& !prev_try->u.allowed.type_list))
@@ -978,7 +1166,23 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
for (i = cfun_last_region_number + 1;
VEC_iterate (eh_region, cfun->eh->region_array, i, cur); ++i)
{
+ /* All removed EH that is toplevel in input function is now
+ in outer EH of output function. */
if (cur == NULL)
+ {
+ gcc_assert (VEC_index
+ (eh_region, ifun->eh->region_array,
+ i - eh_offset) == NULL);
+ if (outer)
+ {
+ VEC_replace (eh_region, cfun->eh->region_array, i, outer);
+ if (outer->aka == NULL)
+ outer->aka = BITMAP_GGC_ALLOC ();
+ bitmap_set_bit (outer->aka, i);
+ }
+ continue;
+ }
+ if (i != cur->region_number)
continue;
#define REMAP(REG) \
@@ -1014,6 +1218,9 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
#undef REMAP
}
+#ifdef ENABLE_CHECKING
+ verify_eh_tree (cfun);
+#endif
return eh_offset;
}
@@ -1660,7 +1867,7 @@ sjlj_find_directly_reachable_regions (struct sjlj_lp_info *lp_info)
rc = RNL_NOT_CAUGHT;
for (; region; region = region->outer)
{
- rc = reachable_next_level (region, type_thrown, NULL);
+ rc = reachable_next_level (region, type_thrown, NULL, false);
if (rc != RNL_NOT_CAUGHT)
break;
}
@@ -2017,11 +2224,13 @@ sjlj_build_landing_pads (void)
if (sjlj_find_directly_reachable_regions (lp_info))
{
rtx dispatch_label = gen_label_rtx ();
-
+ int align = STACK_SLOT_ALIGNMENT (sjlj_fc_type_node,
+ TYPE_MODE (sjlj_fc_type_node),
+ TYPE_ALIGN (sjlj_fc_type_node));
crtl->eh.sjlj_fc
= assign_stack_local (TYPE_MODE (sjlj_fc_type_node),
int_size_in_bytes (sjlj_fc_type_node),
- TYPE_ALIGN (sjlj_fc_type_node));
+ align);
sjlj_assign_call_site_values (dispatch_label, lp_info);
sjlj_mark_call_sites (lp_info);
@@ -2269,6 +2478,17 @@ maybe_remove_eh_handler (rtx label)
remove_eh_handler (region);
}
+/* Remove Eh region R that has turned out to have no code in its handler. */
+
+void
+remove_eh_region (int r)
+{
+ struct eh_region *region;
+
+ region = VEC_index (eh_region, cfun->eh->region_array, r);
+ remove_eh_handler (region);
+}
+
/* Invokes CALLBACK for every exception handler label. Only used by old
loop hackery; should not be used by new code. */
@@ -2314,7 +2534,6 @@ struct reachable_info
tree types_allowed;
void (*callback) (struct eh_region *, void *);
void *callback_data;
- bool saw_any_handlers;
};
/* A subroutine of reachable_next_level. Return true if TYPE, or a
@@ -2357,8 +2576,6 @@ add_reachable_handler (struct reachable_info *info,
if (! info)
return;
- info->saw_any_handlers = true;
-
if (crtl->eh.built_landing_pads)
info->callback (lp_region, info->callback_data);
else
@@ -2372,7 +2589,8 @@ add_reachable_handler (struct reachable_info *info,
static enum reachable_code
reachable_next_level (struct eh_region *region, tree type_thrown,
- struct reachable_info *info)
+ struct reachable_info *info,
+ bool maybe_resx)
{
switch (region->type)
{
@@ -2508,15 +2726,16 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
case ERT_MUST_NOT_THROW:
/* Here we end our search, since no exceptions may propagate.
- If we've touched down at some landing pad previous, then the
- explicit function call we generated may be used. Otherwise
- the call is made by the runtime.
+
+ Local landing pads of ERT_MUST_NOT_THROW instructions are reachable
+ only via locally handled RESX instructions.
- Before inlining, do not perform this optimization. We may
- inline a subroutine that contains handlers, and that will
- change the value of saw_any_handlers. */
+ When we inline a function call, we can bring in new handlers. In order
+ to avoid ERT_MUST_NOT_THROW landing pads from being deleted as unreachable
+ assume that such handlers exists prior for any inlinable call prior
+ inlining decisions are fixed. */
- if ((info && info->saw_any_handlers) || !cfun->after_inlining)
+ if (maybe_resx)
{
add_reachable_handler (info, region, region);
return RNL_CAUGHT;
@@ -2537,7 +2756,7 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
/* Invoke CALLBACK on each region reachable from REGION_NUMBER. */
void
-foreach_reachable_handler (int region_number, bool is_resx,
+foreach_reachable_handler (int region_number, bool is_resx, bool inlinable_call,
void (*callback) (struct eh_region *, void *),
void *callback_data)
{
@@ -2550,6 +2769,8 @@ foreach_reachable_handler (int region_number, bool is_resx,
info.callback_data = callback_data;
region = VEC_index (eh_region, cfun->eh->region_array, region_number);
+ if (!region)
+ return;
type_thrown = NULL_TREE;
if (is_resx)
@@ -2568,7 +2789,8 @@ foreach_reachable_handler (int region_number, bool is_resx,
while (region)
{
- if (reachable_next_level (region, type_thrown, &info) >= RNL_CAUGHT)
+ if (reachable_next_level (region, type_thrown, &info,
+ inlinable_call || is_resx) >= RNL_CAUGHT)
break;
/* If we have processed one cleanup, there is no point in
processing any more of them. Each cleanup will have an edge
@@ -2620,7 +2842,7 @@ reachable_handlers (rtx insn)
region_number = INTVAL (XEXP (note, 0));
}
- foreach_reachable_handler (region_number, is_resx,
+ foreach_reachable_handler (region_number, is_resx, false,
(crtl->eh.built_landing_pads
? arh_to_landing_pad
: arh_to_label),
@@ -2633,12 +2855,14 @@ reachable_handlers (rtx insn)
within the function. */
bool
-can_throw_internal_1 (int region_number, bool is_resx)
+can_throw_internal_1 (int region_number, bool is_resx, bool inlinable_call)
{
struct eh_region *region;
tree type_thrown;
region = VEC_index (eh_region, cfun->eh->region_array, region_number);
+ if (!region)
+ return false;
type_thrown = NULL_TREE;
if (is_resx)
@@ -2654,7 +2878,8 @@ can_throw_internal_1 (int region_number, bool is_resx)
regions, which also do not require processing internally. */
for (; region; region = region->outer)
{
- enum reachable_code how = reachable_next_level (region, type_thrown, 0);
+ enum reachable_code how = reachable_next_level (region, type_thrown, 0,
+ inlinable_call || is_resx);
if (how == RNL_BLOCKED)
return false;
if (how != RNL_NOT_CAUGHT)
@@ -2675,7 +2900,7 @@ can_throw_internal (const_rtx insn)
if (JUMP_P (insn)
&& GET_CODE (PATTERN (insn)) == RESX
&& XINT (PATTERN (insn), 0) > 0)
- return can_throw_internal_1 (XINT (PATTERN (insn), 0), true);
+ return can_throw_internal_1 (XINT (PATTERN (insn), 0), true, false);
if (NONJUMP_INSN_P (insn)
&& GET_CODE (PATTERN (insn)) == SEQUENCE)
@@ -2686,19 +2911,21 @@ can_throw_internal (const_rtx insn)
if (!note || INTVAL (XEXP (note, 0)) <= 0)
return false;
- return can_throw_internal_1 (INTVAL (XEXP (note, 0)), false);
+ return can_throw_internal_1 (INTVAL (XEXP (note, 0)), false, false);
}
/* Determine if the given INSN can throw an exception that is
visible outside the function. */
bool
-can_throw_external_1 (int region_number, bool is_resx)
+can_throw_external_1 (int region_number, bool is_resx, bool inlinable_call)
{
struct eh_region *region;
tree type_thrown;
region = VEC_index (eh_region, cfun->eh->region_array, region_number);
+ if (!region)
+ return true;
type_thrown = NULL_TREE;
if (is_resx)
@@ -2712,7 +2939,8 @@ can_throw_external_1 (int region_number, bool is_resx)
/* If the exception is caught or blocked by any containing region,
then it is not seen by any calling function. */
for (; region ; region = region->outer)
- if (reachable_next_level (region, type_thrown, NULL) >= RNL_CAUGHT)
+ if (reachable_next_level (region, type_thrown, NULL,
+ inlinable_call || is_resx) >= RNL_CAUGHT)
return false;
return true;
@@ -2729,7 +2957,7 @@ can_throw_external (const_rtx insn)
if (JUMP_P (insn)
&& GET_CODE (PATTERN (insn)) == RESX
&& XINT (PATTERN (insn), 0) > 0)
- return can_throw_external_1 (XINT (PATTERN (insn), 0), true);
+ return can_throw_external_1 (XINT (PATTERN (insn), 0), true, false);
if (NONJUMP_INSN_P (insn)
&& GET_CODE (PATTERN (insn)) == SEQUENCE)
@@ -2750,7 +2978,7 @@ can_throw_external (const_rtx insn)
if (INTVAL (XEXP (note, 0)) <= 0)
return false;
- return can_throw_external_1 (INTVAL (XEXP (note, 0)), false);
+ return can_throw_external_1 (INTVAL (XEXP (note, 0)), false, false);
}
/* Set TREE_NOTHROW and crtl->all_throwers_are_sibcalls. */
@@ -2760,13 +2988,7 @@ set_nothrow_function_flags (void)
{
rtx insn;
- /* If we don't know that this implementation of the function will
- actually be used, then we must not set TREE_NOTHROW, since
- callers must not assume that this function does not throw. */
- if (DECL_REPLACEABLE_P (current_function_decl))
- return 0;
-
- TREE_NOTHROW (current_function_decl) = 1;
+ crtl->nothrow = 1;
/* Assume crtl->all_throwers_are_sibcalls until we encounter
something that can throw an exception. We specifically exempt
@@ -2776,13 +2998,19 @@ set_nothrow_function_flags (void)
crtl->all_throwers_are_sibcalls = 1;
+ /* If we don't know that this implementation of the function will
+ actually be used, then we must not set TREE_NOTHROW, since
+ callers must not assume that this function does not throw. */
+ if (TREE_NOTHROW (current_function_decl))
+ return 0;
+
if (! flag_exceptions)
return 0;
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
if (can_throw_external (insn))
{
- TREE_NOTHROW (current_function_decl) = 0;
+ crtl->nothrow = 0;
if (!CALL_P (insn) || !SIBLING_CALL_P (insn))
{
@@ -2795,7 +3023,7 @@ set_nothrow_function_flags (void)
insn = XEXP (insn, 1))
if (can_throw_external (insn))
{
- TREE_NOTHROW (current_function_decl) = 0;
+ crtl->nothrow = 0;
if (!CALL_P (insn) || !SIBLING_CALL_P (insn))
{
@@ -2803,6 +3031,10 @@ set_nothrow_function_flags (void)
return 0;
}
}
+ if (crtl->nothrow
+ && (cgraph_function_body_availability (cgraph_node (current_function_decl))
+ >= AVAIL_AVAILABLE))
+ TREE_NOTHROW (current_function_decl) = 1;
return 0;
}
@@ -3793,30 +4025,80 @@ get_eh_throw_stmt_table (struct function *fun)
}
/* Dump EH information to OUT. */
+
void
-dump_eh_tree (FILE *out, struct function *fun)
+dump_eh_tree (FILE * out, struct function *fun)
{
struct eh_region *i;
int depth = 0;
- static const char * const type_name[] = {"unknown", "cleanup", "try", "catch",
- "allowed_exceptions", "must_not_throw",
- "throw"};
+ static const char *const type_name[] = { "unknown", "cleanup", "try", "catch",
+ "allowed_exceptions", "must_not_throw",
+ "throw"
+ };
i = fun->eh->region_tree;
- if (! i)
+ if (!i)
return;
fprintf (out, "Eh tree:\n");
while (1)
{
fprintf (out, " %*s %i %s", depth * 2, "",
- i->region_number, type_name [(int)i->type]);
+ i->region_number, type_name[(int) i->type]);
if (i->tree_label)
{
- fprintf (out, " tree_label:");
+ fprintf (out, " tree_label:");
print_generic_expr (out, i->tree_label, 0);
}
- fprintf (out, "\n");
+ switch (i->type)
+ {
+ case ERT_CLEANUP:
+ if (i->u.cleanup.prev_try)
+ fprintf (out, " prev try:%i",
+ i->u.cleanup.prev_try->region_number);
+ break;
+
+ case ERT_TRY:
+ {
+ struct eh_region *c;
+ fprintf (out, " catch regions:");
+ for (c = i->u.eh_try.eh_catch; c; c = c->u.eh_catch.next_catch)
+ fprintf (out, " %i", c->region_number);
+ }
+ break;
+
+ case ERT_CATCH:
+ if (i->u.eh_catch.prev_catch)
+ fprintf (out, " prev: %i",
+ i->u.eh_catch.prev_catch->region_number);
+ if (i->u.eh_catch.next_catch)
+ fprintf (out, " next %i",
+ i->u.eh_catch.next_catch->region_number);
+ break;
+
+ case ERT_ALLOWED_EXCEPTIONS:
+ fprintf (out, "filter :%i types:", i->u.allowed.filter);
+ print_generic_expr (out, i->u.allowed.type_list, 0);
+ break;
+
+ case ERT_THROW:
+ fprintf (out, "type:");
+ print_generic_expr (out, i->u.eh_throw.type, 0);
+ break;
+
+ case ERT_MUST_NOT_THROW:
+ break;
+
+ case ERT_UNKNOWN:
+ break;
+ }
+ if (i->aka)
+ {
+ fprintf (out, " also known as:");
+ dump_bitmap (out, i->aka);
+ }
+ else
+ fprintf (out, "\n");
/* If there are sub-regions, process them. */
if (i->inner)
i = i->inner, depth++;
@@ -3826,12 +4108,14 @@ dump_eh_tree (FILE *out, struct function *fun)
/* Otherwise, step back up the tree to the next peer. */
else
{
- do {
- i = i->outer;
- depth--;
- if (i == NULL)
- return;
- } while (i->next_peer == NULL);
+ do
+ {
+ i = i->outer;
+ depth--;
+ if (i == NULL)
+ return;
+ }
+ while (i->next_peer == NULL);
i = i->next_peer;
}
}
@@ -3849,23 +4133,25 @@ verify_eh_tree (struct function *fun)
int j;
int depth = 0;
- i = fun->eh->region_tree;
- if (! i)
+ if (!fun->eh->region_tree)
return;
for (j = fun->eh->last_region_number; j > 0; --j)
- if ((i = VEC_index (eh_region, cfun->eh->region_array, j)))
+ if ((i = VEC_index (eh_region, fun->eh->region_array, j)))
{
- count++;
- if (i->region_number != j)
+ if (i->region_number == j)
+ count++;
+ if (i->region_number != j && (!i->aka || !bitmap_bit_p (i->aka, j)))
{
- error ("region_array is corrupted for region %i", i->region_number);
+ error ("region_array is corrupted for region %i",
+ i->region_number);
err = true;
}
}
+ i = fun->eh->region_tree;
while (1)
{
- if (VEC_index (eh_region, cfun->eh->region_array, i->region_number) != i)
+ if (VEC_index (eh_region, fun->eh->region_array, i->region_number) != i)
{
error ("region_array is corrupted for region %i", i->region_number);
err = true;
@@ -3877,8 +4163,9 @@ verify_eh_tree (struct function *fun)
}
if (i->may_contain_throw && outer && !outer->may_contain_throw)
{
- error ("region %i may contain throw and is contained in region that may not",
- i->region_number);
+ error
+ ("region %i may contain throw and is contained in region that may not",
+ i->region_number);
err = true;
}
if (depth < 0)
@@ -3886,7 +4173,7 @@ verify_eh_tree (struct function *fun)
error ("negative nesting depth of region %i", i->region_number);
err = true;
}
- nvisited ++;
+ nvisited++;
/* If there are sub-regions, process them. */
if (i->inner)
outer = i, i = i->inner, depth++;
@@ -3896,30 +4183,32 @@ verify_eh_tree (struct function *fun)
/* Otherwise, step back up the tree to the next peer. */
else
{
- do {
- i = i->outer;
- depth--;
- if (i == NULL)
- {
- if (depth != -1)
- {
- error ("tree list ends on depth %i", depth + 1);
- err = true;
- }
- if (count != nvisited)
- {
- error ("array does not match the region tree");
- err = true;
- }
- if (err)
- {
- dump_eh_tree (stderr, fun);
- internal_error ("verify_eh_tree failed");
- }
- return;
- }
- outer = i->outer;
- } while (i->next_peer == NULL);
+ do
+ {
+ i = i->outer;
+ depth--;
+ if (i == NULL)
+ {
+ if (depth != -1)
+ {
+ error ("tree list ends on depth %i", depth + 1);
+ err = true;
+ }
+ if (count != nvisited)
+ {
+ error ("array does not match the region tree");
+ err = true;
+ }
+ if (err)
+ {
+ dump_eh_tree (stderr, fun);
+ internal_error ("verify_eh_tree failed");
+ }
+ return;
+ }
+ outer = i->outer;
+ }
+ while (i->next_peer == NULL);
i = i->next_peer;
}
}
diff --git a/gcc/except.h b/gcc/except.h
index 9f83a9948f8..e407ec2c7f8 100644
--- a/gcc/except.h
+++ b/gcc/except.h
@@ -19,6 +19,8 @@ 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 "sbitmap.h"
+#include "vecprim.h"
struct function;
@@ -44,9 +46,9 @@ extern void for_each_eh_label (void (*) (rtx));
extern void for_each_eh_region (void (*) (struct eh_region *));
/* Determine if the given INSN can throw an exception. */
-extern bool can_throw_internal_1 (int, bool);
+extern bool can_throw_internal_1 (int, bool, bool);
extern bool can_throw_internal (const_rtx);
-extern bool can_throw_external_1 (int, bool);
+extern bool can_throw_external_1 (int, bool, bool);
extern bool can_throw_external (const_rtx);
/* Set TREE_NOTHROW and cfun->all_throwers_are_sibcalls. */
@@ -61,6 +63,7 @@ extern void init_eh_for_function (void);
extern rtx reachable_handlers (rtx);
extern void maybe_remove_eh_handler (rtx);
+void remove_eh_region (int);
extern void convert_from_eh_region_ranges (void);
extern unsigned int convert_to_eh_region_ranges (void);
@@ -97,7 +100,7 @@ extern bool get_eh_region_may_contain_throw (struct eh_region *);
extern tree get_eh_region_tree_label (struct eh_region *);
extern void set_eh_region_tree_label (struct eh_region *, tree);
-extern void foreach_reachable_handler (int, bool,
+extern void foreach_reachable_handler (int, bool, bool,
void (*) (struct eh_region *, void *),
void *);
@@ -174,3 +177,6 @@ struct throw_stmt_node GTY(())
extern struct htab *get_eh_throw_stmt_table (struct function *);
extern void set_eh_throw_stmt_table (struct function *, struct htab *);
+extern void remove_unreachable_regions (sbitmap, sbitmap);
+extern VEC(int,heap) * label_to_region_map (void);
+extern int num_eh_regions (void);
diff --git a/gcc/explow.c b/gcc/explow.c
index c9bf675d36f..11c2a477b84 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -248,7 +248,7 @@ expr_size (tree exp)
{
size = lang_hooks.expr_size (exp);
gcc_assert (size);
- size = SUBSTITUTE_PLACEHOLDER_IN_EXPR (size, exp);
+ gcc_assert (size == SUBSTITUTE_PLACEHOLDER_IN_EXPR (size, exp));
}
return expand_expr (size, NULL_RTX, TYPE_MODE (sizetype), EXPAND_NORMAL);
diff --git a/gcc/expr.c b/gcc/expr.c
index 9eb1ae70a0d..ff3867e59ec 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6821,9 +6821,10 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machine_mode tmode,
CONSTRUCTORs too, which should yield a memory reference for the
constructor's contents. Assume language specific tree nodes can
be expanded in some interesting way. */
+ gcc_assert (TREE_CODE (exp) < LAST_AND_UNUSED_TREE_CODE);
if (DECL_P (exp)
|| TREE_CODE (exp) == CONSTRUCTOR
- || TREE_CODE (exp) >= LAST_AND_UNUSED_TREE_CODE)
+ || TREE_CODE (exp) == COMPOUND_LITERAL_EXPR)
{
result = expand_expr (exp, target, tmode,
modifier == EXPAND_INITIALIZER
@@ -8061,18 +8062,16 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
if (fndecl
&& (attr = lookup_attribute ("warning",
DECL_ATTRIBUTES (fndecl))) != NULL)
- warning (0, "%Kcall to %qs declared with attribute warning: %s",
- exp, lang_hooks.decl_printable_name (fndecl, 1),
- TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr))));
+ warning_at (tree_nonartificial_location (exp),
+ 0, "%Kcall to %qs declared with attribute warning: %s",
+ exp, lang_hooks.decl_printable_name (fndecl, 1),
+ TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr))));
/* Check for a built-in function. */
if (fndecl && DECL_BUILT_IN (fndecl))
{
- if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_FRONTEND)
- return lang_hooks.expand_expr (exp, original_target,
- tmode, modifier, alt_rtl);
- else
- return expand_builtin (exp, target, subtarget, tmode, ignore);
+ gcc_assert (DECL_BUILT_IN_CLASS (fndecl) != BUILT_IN_FRONTEND);
+ return expand_builtin (exp, target, subtarget, tmode, ignore);
}
}
return expand_call (exp, target, ignore);
@@ -9459,9 +9458,29 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)));
goto binop;
+ 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 lang_hooks.expand_expr (exp, original_target, tmode,
- modifier, alt_rtl);
+ gcc_unreachable ();
}
/* Here to do an ordinary binary operator. */
diff --git a/gcc/expr.h b/gcc/expr.h
index 730f8052692..7e7e08843c8 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -1,6 +1,6 @@
/* Definitions for code generation pass of GNU compiler.
Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -699,7 +699,7 @@ extern void set_mem_attributes_minus_bitpos (rtx, tree, int, HOST_WIDE_INT);
/* Return OFFSET if XEXP (MEM, 0) - OFFSET is known to be ALIGN
bits aligned for 0 <= OFFSET < ALIGN / BITS_PER_UNIT, or
-1 if not known. */
-extern int get_mem_align_offset (rtx, int);
+extern int get_mem_align_offset (rtx, unsigned int);
/* Assemble the static constant template for function entry trampolines. */
extern rtx assemble_trampoline_template (void);
@@ -786,6 +786,7 @@ extern void init_all_optabs (void);
/* Call this to initialize an optab function entry. */
extern rtx init_one_libfunc (const char *);
+extern rtx set_user_assembler_libfunc (const char *, const char *);
extern int vector_mode_valid_p (enum machine_mode);
diff --git a/gcc/fix-header.c b/gcc/fix-header.c
deleted file mode 100644
index 6a2ebb1e841..00000000000
--- a/gcc/fix-header.c
+++ /dev/null
@@ -1,1314 +0,0 @@
-/* fix-header.c - Make C header file suitable for C++.
- Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 3, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
-
-/* This program massages a system include file (such as stdio.h),
- into a form that is compatible with GNU C and GNU C++.
-
- * extern "C" { ... } braces are added (inside #ifndef __cplusplus),
- if they seem to be needed. These prevent C++ compilers from name
- mangling the functions inside the braces.
-
- * If an old-style incomplete function declaration is seen (without
- an argument list), and it is a "standard" function listed in
- the file sys-protos.h (and with a non-empty argument list), then
- the declaration is converted to a complete prototype by replacing
- the empty parameter list with the argument list from sys-protos.h.
-
- * The program can be given a list of (names of) required standard
- functions (such as fclose for stdio.h). If a required function
- is not seen in the input, then a prototype for it will be
- written to the output.
-
- * If all of the non-comment code of the original file is protected
- against multiple inclusion:
- #ifndef FOO
- #define FOO
- <body of include file>
- #endif
- then extra matter added to the include file is placed inside the <body>.
-
- * If the input file is OK (nothing needs to be done);
- the output file is not written (nor removed if it exists).
-
- There are also some special actions that are done for certain
- well-known standard include files:
-
- * If argv[1] is "sys/stat.h", the Posix.1 macros
- S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISREG are added if
- they were missing, and the corresponding "traditional" S_IFxxx
- macros were defined.
-
- * If argv[1] is "errno.h", errno is declared if it was missing.
-
- * TODO: The input file should be read complete into memory, because:
- a) it needs to be scanned twice anyway, and
- b) it would be nice to allow update in place.
-
- Usage:
- fix-header FOO.H INFILE.H OUTFILE.H [OPTIONS]
- where:
- * FOO.H is the relative file name of the include file,
- as it would be #include'd by a C file. (E.g. stdio.h)
- * INFILE.H is a full pathname for the input file (e.g. /usr/include/stdio.h)
- * OUTFILE.H is the full pathname for where to write the output file,
- if anything needs to be done. (e.g. ./include/stdio.h)
- * OPTIONS can be -D or -I switches as you would pass to cpp.
-
- Written by Per Bothner <bothner@cygnus.com>, July 1993. */
-
-#include "bconfig.h"
-#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-#include "obstack.h"
-#include "scan.h"
-#include "cpplib.h"
-#include "incpath.h"
-#include "errors.h"
-
-#ifdef TARGET_EXTRA_INCLUDES
-void
-TARGET_EXTRA_INCLUDES (const char *sysroot ATTRIBUTE_UNUSED,
- const char *iprefix ATTRIBUTE_UNUSED,
- int stdinc ATTRIBUTE_UNUSED)
-{
-}
-#endif
-
-#ifdef TARGET_EXTRA_PRE_INCLUDES
-void
-TARGET_EXTRA_PRE_INCLUDES (const char *sysroot ATTRIBUTE_UNUSED,
- const char *iprefix ATTRIBUTE_UNUSED,
- int stdinc ATTRIBUTE_UNUSED)
-{
-}
-#endif
-
-struct line_maps line_table;
-
-sstring buf;
-
-int verbose = 0;
-int partial_count = 0;
-int warnings = 0;
-
-#if ADD_MISSING_EXTERN_C
-int missing_extern_C_count = 0;
-#endif
-
-#include "xsys-protos.h"
-
-#ifdef FIXPROTO_IGNORE_LIST
-/* This is a currently unused feature. */
-
-/* List of files and directories to ignore.
- A directory name (ending in '/') means ignore anything in that
- directory. (It might be more efficient to do directory pruning
- earlier in fixproto, but this is simpler and easier to customize.) */
-
-static const char *const files_to_ignore[] = {
- "X11/",
- FIXPROTO_IGNORE_LIST
- 0
-};
-#endif
-
-char *inf_buffer;
-char *inf_limit;
-char *inf_ptr;
-static const char *cur_file;
-
-/* Certain standard files get extra treatment */
-
-enum special_file
-{
- no_special,
-#ifdef errno_h
-#undef errno_h
-#endif
- errno_h,
-#ifdef stdio_h
-#undef stdio_h
-#endif
- stdio_h,
-#ifdef stdlib_h
-#undef stdlib_h
-#endif
- stdlib_h,
-#ifdef sys_stat_h
-#undef sys_stat_h
-#endif
- sys_stat_h
-};
-
-/* A NAMELIST is a sequence of names, separated by '\0', and terminated
- by an empty name (i.e. by "\0\0"). */
-
-typedef const char *namelist;
-
-/* The following macros provide the bits for symbol_flags. */
-typedef int symbol_flags;
-
-/* Used to mark names defined in the ANSI/ISO C standard. */
-#define ANSI_SYMBOL 1
-
-/* We no longer massage include files for POSIX or XOPEN symbols,
- as there are now several versions of the POSIX and XOPEN standards,
- and it would be a maintenance nightmare for us to track them all.
- Better to be compatible with the system include files. */
-/*#define ADD_MISSING_POSIX 1 */
-/*#define ADD_MISSING_XOPEN 1 */
-
-#if ADD_MISSING_POSIX
-/* Used to mark names defined in the Posix.1 or Posix.2 standard. */
-#define POSIX1_SYMBOL 2
-#define POSIX2_SYMBOL 4
-#else
-#define POSIX1_SYMBOL 0
-#define POSIX2_SYMBOL 0
-#endif
-
-#if ADD_MISSING_XOPEN
-/* Used to mark names defined in X/Open Portability Guide. */
-#define XOPEN_SYMBOL 8
-/* Used to mark names defined in X/Open UNIX Extensions. */
-#define XOPEN_EXTENDED_SYMBOL 16
-#else
-#define XOPEN_SYMBOL 0
-#define XOPEN_EXTENDED_SYMBOL 0
-#endif
-
-/* Used to indicate names that are not functions */
-#define MACRO_SYMBOL 512
-
-struct symbol_list {
- symbol_flags flags;
- namelist names;
-};
-
-#define SYMBOL_TABLE_SIZE 10
-struct symbol_list symbol_table[SYMBOL_TABLE_SIZE];
-int cur_symbol_table_size;
-
-static void add_symbols (symbol_flags, namelist);
-static struct fn_decl *lookup_std_proto (const char *, int);
-static void write_lbrac (void);
-static void recognized_macro (const char *);
-static void check_macro_names (cpp_reader *, namelist);
-static void read_scan_file (char *, int, char **);
-static void write_rbrac (void);
-static int inf_skip_spaces (int);
-static int inf_read_upto (sstring *, int);
-static int inf_scan_ident (sstring *, int);
-static int check_protection (int *, int *);
-static void cb_file_change (cpp_reader *, const struct line_map *);
-
-static void
-add_symbols (symbol_flags flags, namelist names)
-{
- symbol_table[cur_symbol_table_size].flags = flags;
- symbol_table[cur_symbol_table_size].names = names;
- cur_symbol_table_size++;
- if (cur_symbol_table_size >= SYMBOL_TABLE_SIZE)
- fatal ("too many calls to add_symbols");
- symbol_table[cur_symbol_table_size].names = NULL; /* Termination. */
-}
-
-struct std_include_entry {
- const char *const name;
- const symbol_flags flags;
- const namelist names;
-};
-
-const char NONE[] = ""; /* The empty namelist. */
-
-/* Special name to indicate a continuation line in std_include_table. */
-const char CONTINUED[] = "";
-
-const struct std_include_entry *include_entry;
-
-const struct std_include_entry std_include_table [] = {
- { "ctype.h", ANSI_SYMBOL,
- "isalnum\0isalpha\0iscntrl\0isdigit\0isgraph\0islower\0\
-isprint\0ispunct\0isspace\0isupper\0isxdigit\0tolower\0toupper\0" },
-
- { "dirent.h", POSIX1_SYMBOL, "closedir\0opendir\0readdir\0rewinddir\0"},
-
- { "errno.h", ANSI_SYMBOL|MACRO_SYMBOL, "errno\0" },
-
- /* ANSI_SYMBOL is wrong, but ... */
- { "curses.h", ANSI_SYMBOL, "box\0delwin\0endwin\0getcurx\0getcury\0initscr\0\
-mvcur\0mvwprintw\0mvwscanw\0newwin\0overlay\0overwrite\0\
-scroll\0subwin\0touchwin\0waddstr\0wclear\0wclrtobot\0wclrtoeol\0\
-waddch\0wdelch\0wdeleteln\0werase\0wgetch\0wgetstr\0winsch\0winsertln\0\
-wmove\0wprintw\0wrefresh\0wscanw\0wstandend\0wstandout\0" },
-
- { "fcntl.h", POSIX1_SYMBOL, "creat\0fcntl\0open\0" },
-
- /* Maybe also "getgrent fgetgrent setgrent endgrent" */
- { "grp.h", POSIX1_SYMBOL, "getgrgid\0getgrnam\0" },
-
-/*{ "limit.h", ... provided by gcc }, */
-
- { "locale.h", ANSI_SYMBOL, "localeconv\0setlocale\0" },
-
- { "math.h", ANSI_SYMBOL,
- "acos\0asin\0atan\0atan2\0ceil\0cos\0cosh\0exp\0\
-fabs\0floor\0fmod\0frexp\0ldexp\0log10\0log\0modf\0pow\0sin\0sinh\0sqrt\0\
-tan\0tanh\0" },
-
- { CONTINUED, ANSI_SYMBOL|MACRO_SYMBOL, "HUGE_VAL\0" },
-
- { "pwd.h", POSIX1_SYMBOL, "getpwnam\0getpwuid\0" },
-
- /* Left out siglongjmp sigsetjmp - these depend on sigjmp_buf. */
- { "setjmp.h", ANSI_SYMBOL, "longjmp\0setjmp\0" },
-
- /* Left out signal() - its prototype is too complex for us!
- Also left out "sigaction sigaddset sigdelset sigemptyset
- sigfillset sigismember sigpending sigprocmask sigsuspend"
- because these need sigset_t or struct sigaction.
- Most systems that provide them will also declare them. */
- { "signal.h", ANSI_SYMBOL, "raise\0" },
- { CONTINUED, POSIX1_SYMBOL, "kill\0" },
-
- { "stdio.h", ANSI_SYMBOL,
- "clearerr\0fclose\0feof\0ferror\0fflush\0fgetc\0fgetpos\0\
-fgets\0fopen\0fprintf\0fputc\0fputs\0fread\0freopen\0fscanf\0fseek\0\
-fsetpos\0ftell\0fwrite\0getc\0getchar\0gets\0perror\0\
-printf\0putc\0putchar\0puts\0remove\0rename\0rewind\0scanf\0setbuf\0\
-setvbuf\0sprintf\0sscanf\0vprintf\0vsprintf\0vfprintf\0tmpfile\0\
-tmpnam\0ungetc\0" },
- { CONTINUED, POSIX1_SYMBOL, "fdopen\0fileno\0" },
- { CONTINUED, POSIX2_SYMBOL, "pclose\0popen\0" }, /* I think ... */
-/* Should perhaps also handle NULL, EOF, ... ? */
-
- /* "div ldiv", - ignored because these depend on div_t, ldiv_t
- ignore these: "mblen mbstowcs mbstowc wcstombs wctomb"
- Left out getgroups, because SunOS4 has incompatible BSD and SVR4 versions.
- Should perhaps also add NULL */
- { "stdlib.h", ANSI_SYMBOL,
- "abort\0abs\0atexit\0atof\0atoi\0atol\0bsearch\0calloc\0\
-exit\0free\0getenv\0labs\0malloc\0qsort\0rand\0realloc\0\
-srand\0strtod\0strtol\0strtoul\0system\0" },
- { CONTINUED, ANSI_SYMBOL|MACRO_SYMBOL, "EXIT_FAILURE\0EXIT_SUCCESS\0" },
- { CONTINUED, POSIX1_SYMBOL, "putenv\0" },
-
- { "string.h", ANSI_SYMBOL, "memchr\0memcmp\0memcpy\0memmove\0memset\0\
-strcat\0strchr\0strcmp\0strcoll\0strcpy\0strcspn\0strerror\0\
-strlen\0strncat\0strncmp\0strncpy\0strpbrk\0strrchr\0strspn\0strstr\0\
-strtok\0strxfrm\0" },
-/* Should perhaps also add NULL and size_t */
-
- { "strings.h", XOPEN_EXTENDED_SYMBOL,
- "bcmp\0bcopy\0bzero\0ffs\0index\0rindex\0strcasecmp\0strncasecmp\0" },
-
- { "strops.h", XOPEN_EXTENDED_SYMBOL, "ioctl\0" },
-
- /* Actually, XPG4 does not seem to have <sys/ioctl.h>, but defines
- ioctl in <strops.h>. However, many systems have it is sys/ioctl.h,
- and many systems do have <sys/ioctl.h> but not <strops.h>. */
- { "sys/ioctl.h", XOPEN_EXTENDED_SYMBOL, "ioctl\0" },
-
- { "sys/socket.h", XOPEN_EXTENDED_SYMBOL, "socket\0" },
-
- { "sys/stat.h", POSIX1_SYMBOL,
- "chmod\0fstat\0mkdir\0mkfifo\0stat\0lstat\0umask\0" },
- { CONTINUED, POSIX1_SYMBOL|MACRO_SYMBOL,
- "S_ISDIR\0S_ISBLK\0S_ISCHR\0S_ISFIFO\0S_ISREG\0S_ISLNK\0S_IFDIR\0\
-S_IFBLK\0S_IFCHR\0S_IFIFO\0S_IFREG\0S_IFLNK\0" },
- { CONTINUED, XOPEN_EXTENDED_SYMBOL, "fchmod\0" },
-
-#if 0
-/* How do we handle fd_set? */
- { "sys/time.h", XOPEN_EXTENDED_SYMBOL, "select\0" },
- { "sys/select.h", XOPEN_EXTENDED_SYMBOL /* fake */, "select\0" },
-#endif
-
- { "sys/times.h", POSIX1_SYMBOL, "times\0" },
- /* "sys/types.h" add types (not in old g++-include) */
-
- { "sys/utsname.h", POSIX1_SYMBOL, "uname\0" },
-
- { "sys/wait.h", POSIX1_SYMBOL, "wait\0waitpid\0" },
- { CONTINUED, POSIX1_SYMBOL|MACRO_SYMBOL,
- "WEXITSTATUS\0WIFEXITED\0WIFSIGNALED\0WIFSTOPPED\0WSTOPSIG\0\
-WTERMSIG\0WNOHANG\0WNOTRACED\0" },
-
- { "tar.h", POSIX1_SYMBOL, NONE },
-
- { "termios.h", POSIX1_SYMBOL,
- "cfgetispeed\0cfgetospeed\0cfsetispeed\0cfsetospeed\0tcdrain\0tcflow\0tcflush\0tcgetattr\0tcsendbreak\0tcsetattr\0" },
-
- { "time.h", ANSI_SYMBOL,
- "asctime\0clock\0ctime\0difftime\0gmtime\0localtime\0mktime\0strftime\0time\0" },
- { CONTINUED, POSIX1_SYMBOL, "tzset\0" },
-
- { "unistd.h", POSIX1_SYMBOL,
- "_exit\0access\0alarm\0chdir\0chown\0close\0ctermid\0cuserid\0\
-dup\0dup2\0execl\0execle\0execlp\0execv\0execve\0execvp\0fork\0fpathconf\0\
-getcwd\0getegid\0geteuid\0getgid\0getlogin\0getpgrp\0getpid\0\
-getppid\0getuid\0isatty\0link\0lseek\0pathconf\0pause\0pipe\0read\0rmdir\0\
-setgid\0setpgid\0setsid\0setuid\0sleep\0sysconf\0tcgetpgrp\0tcsetpgrp\0\
-ttyname\0unlink\0write\0" },
- { CONTINUED, POSIX2_SYMBOL, "getopt\0" },
- { CONTINUED, XOPEN_EXTENDED_SYMBOL,
- "lockf\0gethostid\0gethostname\0readlink\0symlink\0" },
-
- { "utime.h", POSIX1_SYMBOL, "utime\0" },
-
- { NULL, 0, NONE }
-};
-
-enum special_file special_file_handling = no_special;
-
-/* They are set if the corresponding macro has been seen. */
-/* The following are only used when handling sys/stat.h */
-int seen_S_IFBLK = 0, seen_S_ISBLK = 0;
-int seen_S_IFCHR = 0, seen_S_ISCHR = 0;
-int seen_S_IFDIR = 0, seen_S_ISDIR = 0;
-int seen_S_IFIFO = 0, seen_S_ISFIFO = 0;
-int seen_S_IFLNK = 0, seen_S_ISLNK = 0;
-int seen_S_IFREG = 0, seen_S_ISREG = 0;
-/* The following are only used when handling errno.h */
-int seen_errno = 0;
-/* The following are only used when handling stdlib.h */
-int seen_EXIT_FAILURE = 0, seen_EXIT_SUCCESS = 0;
-
-struct obstack scan_file_obstack;
-
-/* NOTE: If you edit this, also edit gen-protos.c !! */
-
-static struct fn_decl *
-lookup_std_proto (const char *name, int name_length)
-{
- int i = hashstr (name, name_length) % HASH_SIZE;
- int i0 = i;
- for (;;)
- {
- struct fn_decl *fn;
- if (hash_tab[i] == 0)
- return NULL;
- fn = &std_protos[hash_tab[i]];
- if ((int) strlen (fn->fname) == name_length
- && strncmp (fn->fname, name, name_length) == 0)
- return fn;
- i = (i+1) % HASH_SIZE;
- gcc_assert (i != i0);
- }
-}
-
-char *inc_filename;
-int inc_filename_length;
-FILE *outf;
-sstring line;
-
-int lbrac_line, rbrac_line;
-
-int required_unseen_count = 0;
-int required_other = 0;
-
-static void
-write_lbrac (void)
-{
- if (partial_count)
- {
- fprintf (outf, "#ifndef _PARAMS\n");
- fprintf (outf, "#if defined(__STDC__) || defined(__cplusplus)\n");
- fprintf (outf, "#define _PARAMS(ARGS) ARGS\n");
- fprintf (outf, "#else\n");
- fprintf (outf, "#define _PARAMS(ARGS) ()\n");
- fprintf (outf, "#endif\n#endif /* _PARAMS */\n");
- }
-}
-
-struct partial_proto
-{
- struct partial_proto *next;
- struct fn_decl *fn;
- int line_seen;
-};
-
-struct partial_proto *partial_proto_list = NULL;
-
-struct partial_proto required_dummy_proto, seen_dummy_proto;
-#define REQUIRED(FN) ((FN)->partial == &required_dummy_proto)
-#define SET_REQUIRED(FN) ((FN)->partial = &required_dummy_proto)
-#define SET_SEEN(FN) ((FN)->partial = &seen_dummy_proto)
-#define SEEN(FN) ((FN)->partial == &seen_dummy_proto)
-
-static void
-recognized_macro (const char *fname)
-{
- /* The original include file defines fname as a macro. */
- struct fn_decl *fn = lookup_std_proto (fname, strlen (fname));
-
- /* Since fname is a macro, don't require a prototype for it. */
- if (fn)
- {
- if (REQUIRED (fn))
- required_unseen_count--;
- SET_SEEN (fn);
- }
-
- switch (special_file_handling)
- {
- case errno_h:
- if (strcmp (fname, "errno") == 0 && !seen_errno)
- seen_errno = 1, required_other--;
- break;
- case stdlib_h:
- if (strcmp (fname, "EXIT_FAILURE") == 0 && !seen_EXIT_FAILURE)
- seen_EXIT_FAILURE = 1, required_other--;
- if (strcmp (fname, "EXIT_SUCCESS") == 0 && !seen_EXIT_SUCCESS)
- seen_EXIT_SUCCESS = 1, required_other--;
- break;
- case sys_stat_h:
- if (fname[0] == 'S' && fname[1] == '_')
- {
- if (strcmp (fname, "S_IFBLK") == 0) seen_S_IFBLK++;
- else if (strcmp (fname, "S_ISBLK") == 0) seen_S_ISBLK++;
- else if (strcmp (fname, "S_IFCHR") == 0) seen_S_IFCHR++;
- else if (strcmp (fname, "S_ISCHR") == 0) seen_S_ISCHR++;
- else if (strcmp (fname, "S_IFDIR") == 0) seen_S_IFDIR++;
- else if (strcmp (fname, "S_ISDIR") == 0) seen_S_ISDIR++;
- else if (strcmp (fname, "S_IFIFO") == 0) seen_S_IFIFO++;
- else if (strcmp (fname, "S_ISFIFO") == 0) seen_S_ISFIFO++;
- else if (strcmp (fname, "S_IFLNK") == 0) seen_S_IFLNK++;
- else if (strcmp (fname, "S_ISLNK") == 0) seen_S_ISLNK++;
- else if (strcmp (fname, "S_IFREG") == 0) seen_S_IFREG++;
- else if (strcmp (fname, "S_ISREG") == 0) seen_S_ISREG++;
- }
- break;
-
- default:
- break;
- }
-}
-
-void
-recognized_extern (const cpp_token *name)
-{
- switch (special_file_handling)
- {
- case errno_h:
- if (cpp_ideq (name, "errno"))
- seen_errno = 1, required_other--;
- break;
-
- default:
- break;
- }
-}
-
-/* Called by scan_decls if it saw a function definition for a function
- named FNAME. KIND is 'I' for an inline function; 'F' if a normal
- function declaration preceded by 'extern "C"' (or nested inside
- 'extern "C"' braces); or 'f' for other function declarations. */
-
-void
-recognized_function (const cpp_token *fname, unsigned int line, int kind,
- int have_arg_list)
-{
- struct partial_proto *partial;
- int i;
- struct fn_decl *fn;
-
- fn = lookup_std_proto ((const char *) NODE_NAME (fname->val.node),
- NODE_LEN (fname->val.node));
-
- /* Remove the function from the list of required function. */
- if (fn)
- {
- if (REQUIRED (fn))
- required_unseen_count--;
- SET_SEEN (fn);
- }
-
- /* If we have a full prototype, we're done. */
- if (have_arg_list)
- return;
-
- if (kind == 'I') /* don't edit inline function */
- return;
-
- /* If the partial prototype was included from some other file,
- we don't need to patch it up (in this run). */
- i = strlen (cur_file);
- if (i < inc_filename_length
- || strcmp (inc_filename, cur_file + (i - inc_filename_length)) != 0)
- return;
-
- if (fn == NULL)
- return;
- if (fn->params[0] == '\0')
- return;
-
- /* We only have a partial function declaration,
- so remember that we have to add a complete prototype. */
- partial_count++;
- partial
- = (struct partial_proto *)
- obstack_alloc (&scan_file_obstack,
- sizeof (struct partial_proto));
- partial->line_seen = line;
- partial->fn = fn;
- fn->partial = partial;
- partial->next = partial_proto_list;
- partial_proto_list = partial;
- if (verbose)
- {
- fprintf (stderr, "(%s: %s non-prototype function declaration.)\n",
- inc_filename, fn->fname);
- }
-}
-
-/* For any name in NAMES that is defined as a macro,
- call recognized_macro on it. */
-
-static void
-check_macro_names (cpp_reader *pfile, namelist names)
-{
- size_t len;
- while (*names)
- {
- len = strlen (names);
- if (cpp_defined (pfile, (const unsigned char *)names, len))
- recognized_macro (names);
- names += len + 1;
- }
-}
-
-static void
-cb_file_change (cpp_reader *pfile ATTRIBUTE_UNUSED,
- const struct line_map *map)
-{
- /* Just keep track of current file name. */
- cur_file = map == NULL ? NULL : map->to_file;
-}
-
-static void
-read_scan_file (char *in_fname, int argc, char **argv)
-{
- cpp_reader *scan_in;
- cpp_callbacks *cb;
- cpp_options *options;
- struct fn_decl *fn;
- int i, strings_processed;
- struct symbol_list *cur_symbols;
-
- obstack_init (&scan_file_obstack);
-
- linemap_init (&line_table);
- scan_in = cpp_create_reader (CLK_GNUC89, NULL, &line_table);
- cb = cpp_get_callbacks (scan_in);
- cb->file_change = cb_file_change;
-
- /* We are going to be scanning a header file out of its proper context,
- so ignore warnings and errors. */
- options = cpp_get_options (scan_in);
- options->inhibit_warnings = 1;
- options->inhibit_errors = 1;
- cpp_post_options (scan_in);
-
- if (!cpp_read_main_file (scan_in, in_fname))
- exit (FATAL_EXIT_CODE);
-
- cpp_change_file (scan_in, LC_RENAME, "<built-in>");
- cpp_init_builtins (scan_in, true);
- cpp_change_file (scan_in, LC_RENAME, in_fname);
-
- /* Process switches after builtins so -D can override them. */
- for (i = 0; i < argc; i += strings_processed)
- {
- strings_processed = 0;
- if (argv[i][0] == '-')
- {
- if (argv[i][1] == 'I')
- {
- if (argv[i][2] != '\0')
- {
- strings_processed = 1;
- add_path (xstrdup (argv[i] + 2), BRACKET, false, false);
- }
- else if (i + 1 != argc)
- {
- strings_processed = 2;
- add_path (xstrdup (argv[i + 1]), BRACKET, false, false);
- }
- }
- else if (argv[i][1] == 'D')
- {
- if (argv[i][2] != '\0')
- strings_processed = 1, cpp_define (scan_in, argv[i] + 2);
- else if (i + 1 != argc)
- strings_processed = 2, cpp_define (scan_in, argv[i + 1]);
- }
- }
-
- if (strings_processed == 0)
- break;
- }
-
- if (i < argc)
- cpp_error (scan_in, CPP_DL_ERROR, "invalid option `%s'", argv[i]);
- if (cpp_errors (scan_in))
- exit (FATAL_EXIT_CODE);
-
- register_include_chains (scan_in, NULL /* sysroot */, NULL /* iprefix */,
- NULL /* imultilib */, true /* stdinc */,
- false /* cxx_stdinc */, false /* verbose */);
-
- /* We are scanning a system header, so mark it as such. */
- cpp_make_system_header (scan_in, 1, 0);
-
- scan_decls (scan_in, argc, argv);
- for (cur_symbols = &symbol_table[0]; cur_symbols->names; cur_symbols++)
- check_macro_names (scan_in, cur_symbols->names);
-
- /* Traditionally, getc and putc are defined in terms of _filbuf and _flsbuf.
- If so, those functions are also required. */
- if (special_file_handling == stdio_h
- && (fn = lookup_std_proto ("_filbuf", 7)) != NULL)
- {
- unsigned char getchar_call[] = "getchar();\n";
- int seen_filbuf = 0;
-
- /* Scan the macro expansion of "getchar();". */
- cpp_push_buffer (scan_in, getchar_call, sizeof(getchar_call) - 1,
- /* from_stage3 */ true);
- for (;;)
- {
- const cpp_token *t = cpp_get_token (scan_in);
-
- if (t->type == CPP_EOF)
- break;
- else if (cpp_ideq (t, "_filbuf"))
- seen_filbuf++;
- }
-
- if (seen_filbuf)
- {
- int need_filbuf = !SEEN (fn) && !REQUIRED (fn);
- struct fn_decl *flsbuf_fn = lookup_std_proto ("_flsbuf", 7);
- int need_flsbuf
- = flsbuf_fn && !SEEN (flsbuf_fn) && !REQUIRED (flsbuf_fn);
-
- /* Append "_filbuf" and/or "_flsbuf" to the required functions. */
- if (need_filbuf + need_flsbuf)
- {
- const char *new_list;
- if (need_filbuf)
- SET_REQUIRED (fn);
- if (need_flsbuf)
- SET_REQUIRED (flsbuf_fn);
- if (need_flsbuf && need_filbuf)
- new_list = "_filbuf\0_flsbuf\0";
- else if (need_flsbuf)
- new_list = "_flsbuf\0";
- else /* if (need_flsbuf) */
- new_list = "_filbuf\0";
- add_symbols (ANSI_SYMBOL, new_list);
- required_unseen_count += need_filbuf + need_flsbuf;
- }
- }
- }
-
- if (required_unseen_count + partial_count + required_other == 0)
- {
- if (verbose)
- fprintf (stderr, "%s: OK, nothing needs to be done.\n", inc_filename);
- exit (SUCCESS_EXIT_CODE);
- }
- if (!verbose)
- fprintf (stderr, "%s: fixing %s\n", progname, inc_filename);
- else
- {
- if (required_unseen_count)
- fprintf (stderr, "%s: %d missing function declarations.\n",
- inc_filename, required_unseen_count);
- if (partial_count)
- fprintf (stderr, "%s: %d non-prototype function declarations.\n",
- inc_filename, partial_count);
- }
-}
-
-static void
-write_rbrac (void)
-{
- struct fn_decl *fn;
- const char *cptr;
- struct symbol_list *cur_symbols;
-
- if (required_unseen_count)
- {
-#ifdef NO_IMPLICIT_EXTERN_C
- fprintf (outf, "#ifdef __cplusplus\nextern \"C\" {\n#endif\n");
-#endif
- }
-
- /* Now we print out prototypes for those functions that we haven't seen. */
- for (cur_symbols = &symbol_table[0]; cur_symbols->names; cur_symbols++)
- {
- int if_was_emitted = 0;
- int name_len;
- cptr = cur_symbols->names;
- for ( ; (name_len = strlen (cptr)) != 0; cptr+= name_len + 1)
- {
- int macro_protect = 0;
-
- if (cur_symbols->flags & MACRO_SYMBOL)
- continue;
-
- fn = lookup_std_proto (cptr, name_len);
- if (fn == NULL || !REQUIRED (fn))
- continue;
-
- if (!if_was_emitted)
- {
-/* what about curses. ??? or _flsbuf/_filbuf ??? */
- if (cur_symbols->flags & ANSI_SYMBOL)
- fprintf (outf,
- "#if defined(__USE_FIXED_PROTOTYPES__) || defined(__cplusplus) || defined (__STRICT_ANSI__)\n");
- else if (cur_symbols->flags & (POSIX1_SYMBOL|POSIX2_SYMBOL))
- fprintf (outf,
- "#if defined(__USE_FIXED_PROTOTYPES__) || (defined(__cplusplus) \\\n\
- ? (!defined(__STRICT_ANSI__) || defined(_POSIX_SOURCE)) \\\n\
- : (defined(__STRICT_ANSI__) && defined(_POSIX_SOURCE)))\n");
- else if (cur_symbols->flags & XOPEN_SYMBOL)
- {
- fprintf (outf,
- "#if defined(__USE_FIXED_PROTOTYPES__) \\\n\
- || (defined(__STRICT_ANSI__) && defined(_XOPEN_SOURCE))\n");
- }
- else if (cur_symbols->flags & XOPEN_EXTENDED_SYMBOL)
- {
- fprintf (outf,
- "#if defined(__USE_FIXED_PROTOTYPES__) \\\n\
- || (defined(__STRICT_ANSI__) && defined(_XOPEN_EXTENDED_SOURCE))\n");
- }
- else
- {
- fatal ("internal error for function %s", fn->fname);
- }
- if_was_emitted = 1;
- }
-
- /* In the case of memmove, protect in case the application
- defines it as a macro before including the header. */
- if (!strcmp (fn->fname, "memmove")
- || !strcmp (fn->fname, "putc")
- || !strcmp (fn->fname, "getc")
- || !strcmp (fn->fname, "vprintf")
- || !strcmp (fn->fname, "vfprintf")
- || !strcmp (fn->fname, "vsprintf")
- || !strcmp (fn->fname, "rewinddir")
- || !strcmp (fn->fname, "abort"))
- macro_protect = 1;
-
- if (macro_protect)
- fprintf (outf, "#ifndef %s\n", fn->fname);
- fprintf (outf, "extern %s %s (%s);\n",
- fn->rtype, fn->fname, fn->params);
- if (macro_protect)
- fprintf (outf, "#endif\n");
- }
- if (if_was_emitted)
- fprintf (outf,
- "#endif /* defined(__USE_FIXED_PROTOTYPES__) || ... */\n");
- }
- if (required_unseen_count)
- {
-#ifdef NO_IMPLICIT_EXTERN_C
- fprintf (outf, "#ifdef __cplusplus\n}\n#endif\n");
-#endif
- }
-
- switch (special_file_handling)
- {
- case errno_h:
- if (!seen_errno)
- fprintf (outf, "extern int errno;\n");
- break;
- case stdlib_h:
- if (!seen_EXIT_FAILURE)
- fprintf (outf, "#define EXIT_FAILURE 1\n");
- if (!seen_EXIT_SUCCESS)
- fprintf (outf, "#define EXIT_SUCCESS 0\n");
- break;
- case sys_stat_h:
- if (!seen_S_ISBLK && seen_S_IFBLK)
- fprintf (outf,
- "#define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK)\n");
- if (!seen_S_ISCHR && seen_S_IFCHR)
- fprintf (outf,
- "#define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR)\n");
- if (!seen_S_ISDIR && seen_S_IFDIR)
- fprintf (outf,
- "#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)\n");
- if (!seen_S_ISFIFO && seen_S_IFIFO)
- fprintf (outf,
- "#define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO)\n");
- if (!seen_S_ISLNK && seen_S_IFLNK)
- fprintf (outf,
- "#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)\n");
- if (!seen_S_ISREG && seen_S_IFREG)
- fprintf (outf,
- "#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)\n");
- break;
-
- default:
- break;
- }
-
-}
-
-/* Returns 1 iff the file is properly protected from multiple inclusion:
- #ifndef PROTECT_NAME
- #define PROTECT_NAME
- #endif
-
- */
-
-#define INF_GET() (inf_ptr < inf_limit ? *(unsigned char *) inf_ptr++ : EOF)
-#define INF_UNGET(c) ((c)!=EOF && inf_ptr--)
-
-static int
-inf_skip_spaces (int c)
-{
- for (;;)
- {
- if (c == ' ' || c == '\t')
- c = INF_GET ();
- else if (c == '/')
- {
- c = INF_GET ();
- if (c != '*')
- {
- (void) INF_UNGET (c);
- return '/';
- }
- c = INF_GET ();
- for (;;)
- {
- if (c == EOF)
- return EOF;
- else if (c != '*')
- {
- if (c == '\n')
- source_lineno++, lineno++;
- c = INF_GET ();
- }
- else if ((c = INF_GET ()) == '/')
- return INF_GET ();
- }
- }
- else
- break;
- }
- return c;
-}
-
-/* Read into STR from inf_buffer upto DELIM. */
-
-static int
-inf_read_upto (sstring *str, int delim)
-{
- int ch;
- for (;;)
- {
- ch = INF_GET ();
- if (ch == EOF || ch == delim)
- break;
- SSTRING_PUT (str, ch);
- }
- MAKE_SSTRING_SPACE (str, 1);
- *str->ptr = 0;
- return ch;
-}
-
-static int
-inf_scan_ident (sstring *s, int c)
-{
- s->ptr = s->base;
- if (ISIDST (c))
- {
- for (;;)
- {
- SSTRING_PUT (s, c);
- c = INF_GET ();
- if (c == EOF || !(ISIDNUM (c)))
- break;
- }
- }
- MAKE_SSTRING_SPACE (s, 1);
- *s->ptr = 0;
- return c;
-}
-
-/* Returns 1 if the file is correctly protected against multiple
- inclusion, setting *ifndef_line to the line number of the initial #ifndef
- and setting *endif_line to the final #endif.
- Otherwise return 0. */
-
-static int
-check_protection (int *ifndef_line, int *endif_line)
-{
- int c;
- int if_nesting = 1; /* Level of nesting of #if's */
- char *protect_name = NULL; /* Identifier following initial #ifndef */
- int define_seen = 0;
-
- /* Skip initial white space (including comments). */
- for (;; lineno++)
- {
- c = inf_skip_spaces (' ');
- if (c == EOF)
- return 0;
- if (c != '\n')
- break;
- }
- if (c != '#')
- return 0;
- c = inf_scan_ident (&buf, inf_skip_spaces (' '));
- if (SSTRING_LENGTH (&buf) == 0 || strcmp (buf.base, "ifndef") != 0)
- return 0;
-
- /* So far so good: We've seen an initial #ifndef. */
- *ifndef_line = lineno;
- c = inf_scan_ident (&buf, inf_skip_spaces (c));
- if (SSTRING_LENGTH (&buf) == 0 || c == EOF)
- return 0;
- protect_name = xstrdup (buf.base);
-
- (void) INF_UNGET (c);
- c = inf_read_upto (&buf, '\n');
- if (c == EOF)
- return 0;
- lineno++;
-
- for (;;)
- {
- c = inf_skip_spaces (' ');
- if (c == EOF)
- return 0;
- if (c == '\n')
- {
- lineno++;
- continue;
- }
- if (c != '#')
- goto skip_to_eol;
- c = inf_scan_ident (&buf, inf_skip_spaces (' '));
- if (SSTRING_LENGTH (&buf) == 0)
- ;
- else if (!strcmp (buf.base, "ifndef")
- || !strcmp (buf.base, "ifdef") || !strcmp (buf.base, "if"))
- {
- if_nesting++;
- }
- else if (!strcmp (buf.base, "endif"))
- {
- if_nesting--;
- if (if_nesting == 0)
- break;
- }
- else if (!strcmp (buf.base, "else"))
- {
- if (if_nesting == 1)
- return 0;
- }
- else if (!strcmp (buf.base, "define"))
- {
- c = inf_skip_spaces (c);
- c = inf_scan_ident (&buf, c);
- if (buf.base[0] > 0 && strcmp (buf.base, protect_name) == 0)
- define_seen = 1;
- }
- skip_to_eol:
- for (;;)
- {
- if (c == '\n' || c == EOF)
- break;
- c = INF_GET ();
- }
- if (c == EOF)
- return 0;
- lineno++;
- }
-
- if (!define_seen)
- return 0;
- *endif_line = lineno;
- /* Skip final white space (including comments). */
- for (;;)
- {
- c = inf_skip_spaces (' ');
- if (c == EOF)
- break;
- if (c != '\n')
- return 0;
- }
-
- return 1;
-}
-
-extern int main (int, char **);
-
-int
-main (int argc, char **argv)
-{
- int inf_fd;
- struct stat sbuf;
- int c;
-#ifdef FIXPROTO_IGNORE_LIST
- int i;
-#endif
- const char *cptr;
- int ifndef_line;
- int endif_line;
- long to_read;
- long int inf_size;
- struct symbol_list *cur_symbols;
-
- progname = "fix-header";
- if (argv[0] && argv[0][0])
- {
- char *p;
-
- progname = 0;
- for (p = argv[0]; *p; p++)
- if (*p == '/')
- progname = p;
- progname = progname ? progname+1 : argv[0];
- }
-
- if (argc < 4)
- {
- fprintf (stderr, "%s: Usage: foo.h infile.h outfile.h options\n",
- progname);
- exit (FATAL_EXIT_CODE);
- }
-
- inc_filename = argv[1];
- inc_filename_length = strlen (inc_filename);
-
-#ifdef FIXPROTO_IGNORE_LIST
- for (i = 0; files_to_ignore[i] != NULL; i++)
- {
- const char *const ignore_name = files_to_ignore[i];
- int ignore_len = strlen (ignore_name);
- if (strncmp (inc_filename, ignore_name, ignore_len) == 0)
- {
- if (ignore_name[ignore_len-1] == '/'
- || inc_filename[ignore_len] == '\0')
- {
- if (verbose)
- fprintf (stderr, "%s: ignoring %s\n", progname, inc_filename);
- exit (SUCCESS_EXIT_CODE);
- }
- }
-
- }
-#endif
-
- if (strcmp (inc_filename, "sys/stat.h") == 0)
- special_file_handling = sys_stat_h;
- else if (strcmp (inc_filename, "errno.h") == 0)
- special_file_handling = errno_h, required_other++;
- else if (strcmp (inc_filename, "stdlib.h") == 0)
- special_file_handling = stdlib_h, required_other+=2;
- else if (strcmp (inc_filename, "stdio.h") == 0)
- special_file_handling = stdio_h;
- include_entry = std_include_table;
- while (include_entry->name != NULL
- && ((strcmp (include_entry->name, CONTINUED) == 0)
- || strcmp (inc_filename, include_entry->name) != 0))
- include_entry++;
-
- if (include_entry->name != NULL)
- {
- const struct std_include_entry *entry;
- cur_symbol_table_size = 0;
- for (entry = include_entry; ;)
- {
- if (entry->flags)
- add_symbols (entry->flags, entry->names);
- entry++;
- if (!entry->name || strcmp (entry->name, CONTINUED) != 0)
- break;
- }
- }
- else
- symbol_table[0].names = NULL;
-
- /* Count and mark the prototypes required for this include file. */
- for (cur_symbols = &symbol_table[0]; cur_symbols->names; cur_symbols++)
- {
- int name_len;
- if (cur_symbols->flags & MACRO_SYMBOL)
- continue;
- cptr = cur_symbols->names;
- for ( ; (name_len = strlen (cptr)) != 0; cptr+= name_len + 1)
- {
- struct fn_decl *fn = lookup_std_proto (cptr, name_len);
- required_unseen_count++;
- if (fn == NULL)
- fprintf (stderr, "Internal error: No prototype for %s\n", cptr);
- else
- SET_REQUIRED (fn);
- }
- }
-
- read_scan_file (argv[2], argc - 4, argv + 4);
-
- inf_fd = open (argv[2], O_RDONLY, 0666);
- if (inf_fd < 0)
- {
- fprintf (stderr, "%s: Cannot open '%s' for reading -",
- progname, argv[2]);
- perror (NULL);
- exit (FATAL_EXIT_CODE);
- }
- if (fstat (inf_fd, &sbuf) < 0)
- {
- fprintf (stderr, "%s: Cannot get size of '%s' -", progname, argv[2]);
- perror (NULL);
- exit (FATAL_EXIT_CODE);
- }
- inf_size = sbuf.st_size;
- inf_buffer = XNEWVEC (char, inf_size + 2);
- inf_ptr = inf_buffer;
-
- to_read = inf_size;
- while (to_read > 0)
- {
- long i = read (inf_fd, inf_buffer + inf_size - to_read, to_read);
- if (i < 0)
- {
- fprintf (stderr, "%s: Failed to read '%s' -", progname, argv[2]);
- perror (NULL);
- exit (FATAL_EXIT_CODE);
- }
- if (i == 0)
- {
- inf_size -= to_read;
- break;
- }
- to_read -= i;
- }
-
- close (inf_fd);
-
- /* Inf_size may have changed if read was short (as on VMS) */
- inf_buffer[inf_size] = '\n';
- inf_buffer[inf_size + 1] = '\0';
- inf_limit = inf_buffer + inf_size;
-
- /* If file doesn't end with '\n', add one. */
- if (inf_limit > inf_buffer && inf_limit[-1] != '\n')
- inf_limit++;
-
- unlink (argv[3]);
- outf = fopen (argv[3], "w");
- if (outf == NULL)
- {
- fprintf (stderr, "%s: Cannot open '%s' for writing -",
- progname, argv[3]);
- perror (NULL);
- exit (FATAL_EXIT_CODE);
- }
-
- lineno = 1;
-
- if (check_protection (&ifndef_line, &endif_line))
- {
- lbrac_line = ifndef_line+1;
- rbrac_line = endif_line;
- }
- else
- {
- lbrac_line = 1;
- rbrac_line = -1;
- }
-
- /* Reset input file. */
- inf_ptr = inf_buffer;
- lineno = 1;
-
- for (;;)
- {
- if (lineno == lbrac_line)
- write_lbrac ();
- if (lineno == rbrac_line)
- write_rbrac ();
- for (;;)
- {
- struct fn_decl *fn;
- c = INF_GET ();
- if (c == EOF)
- break;
- if (ISIDST (c))
- {
- c = inf_scan_ident (&buf, c);
- (void) INF_UNGET (c);
- fputs (buf.base, outf);
- fn = lookup_std_proto (buf.base, strlen (buf.base));
- /* We only want to edit the declaration matching the one
- seen by scan-decls, as there can be multiple
- declarations, selected by #ifdef __STDC__ or whatever. */
- if (fn && fn->partial && fn->partial->line_seen == lineno)
- {
- c = inf_skip_spaces (' ');
- if (c == EOF)
- break;
- if (c == '(')
- {
- c = inf_skip_spaces (' ');
- if (c == ')')
- {
- fprintf (outf, " _PARAMS((%s))", fn->params);
- }
- else
- {
- putc ('(', outf);
- (void) INF_UNGET (c);
- }
- }
- else
- fprintf (outf, " %c", c);
- }
- }
- else
- {
- putc (c, outf);
- if (c == '\n')
- break;
- }
- }
- if (c == EOF)
- break;
- lineno++;
- }
- if (rbrac_line < 0)
- write_rbrac ();
-
- fclose (outf);
-
- return 0;
-}
diff --git a/gcc/fixproto b/gcc/fixproto
deleted file mode 100755
index 7c42d9c77ed..00000000000
--- a/gcc/fixproto
+++ /dev/null
@@ -1,340 +0,0 @@
-#!/bin/sh
-#
-# SYNOPSIS
-# fixproto TARGET-DIR SOURCE-DIR-ALL SOURCE-DIR-STD
-#
-# COPYRIGHT
-# Copyright (C) 1993, 1994, 1997, 1998, 2002, 2003, 2007, 2008
-# 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/>.
-#
-# DESCRIPTION
-# Adjunct script for GCC to populate a directory with ANSI,
-# Posix.1, and C++ compatible header files.
-#
-# Each file found under SOURCE-DIR-ALL is analyzed and "fixed."
-# Only standard ANSI/POSIX files found under SOURCE-DIR-STD
-# are analyzed and "fixed."
-# The SOURCE-DIRs are searched in order; a file found
-# under multiple SOURCE-DIRs is only handled for the first one.
-#
-# STRATEGY
-# Each include file is fed through cpp, and the scan-decls program
-# parses it, and emits any found function declarations.
-# The fix-header program analyzes the scan-decls output,
-# together with the original include file, and writes a "fixed"
-# include file, if needed.
-#
-# The comment at the beginning of fix-header.c lists specifically
-# what kind of changes are made.
-#
-# NOTE
-# Some file space will be wasted, because the original header
-# files are copied. An earlier version just included the original
-# by "reference", using GNU cpp's #include_next mechanism.
-# This is currently not done, partly because #include_next is
-# fragile (susceptible to version incompatibilities, and depends
-# and GCC-specific features), and partly for performance reasons.
-#
-# AUTHORS
-# Ron Guilmette (rfg@netcom.com) (original idea and code)
-# Per Bothner (bothner@cygnus.com) (major re-write)
-
-dirname=`echo "$0" | sed 's,^[^/]*$,.,;s,//*[^/]*$,,'`
-progname=`echo "$0" | sed 's,.*/,,'`
-original_dir=`${PWDCMD-pwd}`
-FIX_HEADER=${FIX_HEADER-$original_dir/fix-header}
-DEFINES="-D__STDC__=0 -D__cplusplus ${FIXPROTO_DEFINES}"
-
-if mkdir -p . 2> /dev/null; then
- # Great, mkdir accepts -p
- mkinstalldirs="mkdir -p"
-else
- # We expect mkinstalldirs to be passed in the environment.
- # If it is not, assume it is in the directory that contains this script.
- mkinstalldirs=${mkinstalldirs-"/bin/sh $dirname/mkinstalldirs"}
- if $mkinstalldirs . 2> /dev/null; then
- :
- else
- # But, in case of failure, fallback to plain mkdir, and hope it works
- mkinstalldirs=mkdir
- fi
-fi
-
-if [ `echo $1 | wc -w` = 0 ] ; then
- echo $progname\: usage\: $progname target-dir \[ source-dir \.\.\. \]
- exit 1
-fi
-
-std_files="ctype.h dirent.h errno.h curses.h fcntl.h grp.h locale.h math.h pwd.h setjmp.h signal.h stdio.h stdlib.h string.h sys/socket.h sys/stat.h sys/times.h sys/resource.h sys/utsname.h sys/wait.h tar.h termios.h time.h unistd.h utime.h"
-
-rel_target_dir=$1
-# All files in $src_dir_all (normally same as $rel_target_dir) are
-# processed.
-src_dir_all=$2
-# In $src_dir_std (normally same as /usr/include), only the
-# "standard" ANSI/POSIX files listed in $std_files are processed.
-src_dir_std=$3
-
-case $rel_target_dir in
- /* | [A-Za-z]:[\\/]*)
- abs_target_dir=$rel_target_dir
- ;;
- *)
- abs_target_dir=$original_dir/$rel_target_dir
- ;;
-esac
-
-# Determine whether this system has symbolic links.
-if ln -s X $rel_target_dir/ShouldNotExist 2>/dev/null; then
- rm -f $rel_target_dir/ShouldNotExist
- LINKS=true
-elif ln -s X /tmp/ShouldNotExist 2>/dev/null; then
- rm -f /tmp/ShouldNotExist
- LINKS=true
-else
- LINKS=false
-fi
-
-if [ \! -d $abs_target_dir ] ; then
- echo $progname\: creating directory $rel_target_dir
- $mkinstalldirs $abs_target_dir
-fi
-
-echo $progname\: populating \`$rel_target_dir\'
-
-include_path=""
-
-if [ `echo $* | wc -w` != 0 ] ; then
- for rel_source_dir in $src_dir_all $src_dir_std; do
- case $rel_source_dir in
- /* | [A-Za-z]:[\\/]*)
- abs_source_dir=$rel_source_dir
- ;;
- *)
- abs_source_dir=$original_dir/$rel_source_dir
- ;;
- esac
- include_path="$include_path -I$abs_source_dir"
- done
-fi
-
-done_dirs=""
-subdirs_made=""
-echo "" >fixproto.list
-
-for code in ALL STD ; do
-
- subdirs="."
-
- case $code in
- ALL)
- rel_source_dir=$src_dir_all
-
- dirs="."
- levels=2
- while $LINKS && test -n "$dirs" -a $levels -gt 0
- do
- levels=`expr $levels - 1`
- newdirs=
- for d in $dirs ; do
- # Find all directories under $d, relative to $d, excluding $d itself.
- # Assume directory names ending in CC or containing ++ are
- # for C++, so skip those.
- subdirs="$subdirs "`cd $rel_source_dir/$d; find . -type d -print | \
- sed -e '/^\.$/d' -e "s|^\./|${d}/|" -e 's|^\./||' \
- -e '/CC$/d' -e '/[+][+]/d'`
- links=
- links=`cd $rel_source_dir; find $d/. -type l -print | \
- sed -e "s|$d/./|$d/|" -e 's|^\./||'`
- for link in $links --dummy-- ; do
- test -d $rel_source_dir/$link/. && newdirs="$newdirs $link"
- done
- done
- dirs="$newdirs"
- subdirs="$subdirs $newdirs"
- done
- ;;
- STD)
- rel_source_dir=$src_dir_std
- ;;
- esac
-
- case $rel_source_dir in
- /* | [A-Za-z]:[\\/]*)
- abs_source_dir=$rel_source_dir
- ;;
- *)
- abs_source_dir=$original_dir/$rel_source_dir
- ;;
- esac
-
- if [ \! -d $abs_source_dir ] ; then
- echo $progname\: warning\: no such directory\: \`$rel_source_dir\'
- continue
- fi
-
- for rel_source_subdir in $subdirs; do
-
- abs_target_subdir=${abs_target_dir}/${rel_source_subdir}
- if [ \! -d $abs_target_subdir ] ; then
- if $mkinstalldirs $abs_target_subdir ; then
- subdirs_made="$abs_target_subdir $subdirs_made"
- fi
- fi
- # Append "/"; remove initial "./". Hence "." -> "" and "sys" -> "sys/".
- rel_source_prefix=`echo $rel_source_subdir | sed -e 's|$|/|' -e 's|^\./||'`
-
- case $code in
- ALL)
- # The 'sed' is in case the *.h matches nothing, which yields "*.h"
- # which would then get re-globbed in the current directory. Sigh.
- rel_source_files=`cd ${abs_source_dir}/${rel_source_subdir}; echo *.h | sed -e 's|[*].h|NONE|'`
- ;;
-
- STD)
- files_to_check="$std_files"
- rel_source_files=""
-
- # Also process files #included by the $std_files.
- while [ -n "${files_to_check}" ]
- do
- new_files_to_check=""
- for file in $files_to_check ; do
- xxfile=`echo $file | sed -e 's|/\([^/\.][^/\.]*\)/\.\./|/|'`
- # Create the dir where this file will go when fixed.
- xxdir=`echo ./$file | sed -e 's|/[^/]*$||'`
- if [ \! -d $abs_target_subdir/$xxdir ] ; then
- if $mkinstalldirs $abs_target_subdir/$xxdir ; then
- subdirs_made="$abs_target_subdir/$xxdir $subdirs_made"
- fi
- fi
- # Just in case we have edited out a symbolic link
- if [ -f $src_dir_std/$file -a -f $src_dir_std/$xxfile ] ; then
- file=$xxfile
- fi
- case " $rel_source_files " in
- *" ${file} "*)
- # Already seen $file; nothing to do
- ;;
- *)
- if test -f $src_dir_std/$file ; then
- rel_dir=`echo $file | sed -n -e 's|^\(.*/\)[^/]*$|\1|p'`
- # For #include "foo.h", that might be either "foo.h"
- # or "${rel_dir}foo.h (or something bogus).
- new_files_to_check="$new_files_to_check "`sed -n \
- -e 's@ @ @g' \
- -e 's@^ *# *include *<\([^>]*\)>.*$@\1@p' -e \
- 's@^ *# *include *\"\([^\"]*\)\".*$@\1 '$rel_dir'\1@p'\
- <$src_dir_std/$file`
- rel_source_files="$rel_source_files $file"
- fi
- ;;
- esac
- done
- files_to_check="$new_files_to_check"
- done
- rel_source_files="$rel_source_files"
- ;;
- esac
-
- for filename in $rel_source_files ; do
- rel_source_file=${rel_source_prefix}${filename}
- abs_source_file=$abs_source_dir/$rel_source_file
- abs_target_file=$abs_target_dir/$rel_source_file
-
- if test "$filename" = 'NONE' ; then
- echo "(No *.h files in $abs_source_dir/$rel_source_subdir)"
- # If target file exists, check if was written while processing one
- # of the earlier source directories; if so ignore it.
- elif test -f $abs_target_file -a -n "$done_dirs" \
- && grep "$rel_source_file" fixproto.list >/dev/null
- then true
- else
- $FIX_HEADER $rel_source_file $abs_source_file $abs_target_file ${DEFINES} $include_path
- if test $? != 0 ; then exit 1 ; fi
- echo "${rel_source_file}" >>fixproto.list
- fi
- done
- done
- done_dirs="$done_dir $rel_source_dir"
-done
-
-# This might be more cleanly moved into the main loop, by adding
-# a <dummy> source directory at the end. FIXME!
-
-# All the headers we create define size_t and NULL.
-for rel_source_file in unistd.h stdlib.h string.h time.h ; do
- if grep "$rel_source_file" fixproto.list >/dev/null ; then
- : # It exists, we don't need to make it
- else
- echo Adding missing $rel_source_file
- rel_source_ident=`echo $rel_source_file | tr ./ __`
- cat >tmp.h <<EOF
-/* Fake ${rel_source_file}, created by GCC.
- The functions declared in this file do not necessarily exist in
- your C library. */
-#ifndef __${rel_source_ident}
-#define __${rel_source_ident}
-
-#define __need_NULL
-#define __need_size_t
-#include <stddef.h>
-EOF
- # Insert special stuff for particular files here.
- case ${rel_source_file} in
- time.h)
- # If time.h doesn't exist, find out if sys/time.h does.
- if test -f $src_dir_std/sys/time.h \
- || grep "sys/time.h" fixproto.list >/dev/null ; then
- # It does; include it and hope it has the needed declarations.
- # Some versions require sys/types.h.
- cat >>tmp.h <<EOF
-
-#include <sys/types.h>
-#include <sys/time.h>
-EOF
- else
- # It doesn't. Make up plausible definitions for time_t, clock_t.
- # Forward-declare struct tm. Hope nobody tries to use it. (Odds
- # are they won't.)
- cat >>tmp.h <<EOF
-
-typedef long time_t;
-typedef long clock_t;
-struct tm;
-EOF
- fi ;;
- esac
- cat >>tmp.h <<EOF
-
-#endif /* __${rel_source_ident} */
-EOF
- ${FIX_HEADER} $rel_source_file tmp.h $abs_target_dir/$rel_source_file ${DEFINES} $include_path
- if test $? != 0 ; then exit 1 ; fi
- if test -f $abs_target_dir/$rel_source_file ; then
- rm tmp.h
- else
- mv tmp.h $abs_target_dir/$rel_source_file
- fi
- fi
-done
-
-# Remove any directories that we made that are still empty.
-rmdir $subdirs_made 2>/dev/null
-
-exit 0
diff --git a/gcc/flags.h b/gcc/flags.h
index 36bc626f8ec..e606f601f6e 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -1,6 +1,6 @@
/* Compilation switch flag definitions for GCC.
Copyright (C) 1987, 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -325,13 +325,6 @@ extern enum stack_check_type flag_stack_check;
instrumentation. */
extern bool flag_instrument_functions_exclude_p (tree fndecl);
-/* Emit warning if the function call is disallowed under
- -Wdisallowed-function-list=... */
-extern void warn_if_disallowed_function_p (const_tree fncall);
-
-/* True, if the -Wdisallowed-function-list=... option has been specified. */
-extern bool warn_disallowed_functions;
-
/* True if the given mode has a NaN representation and the treatment of
NaN operands is important. Certain optimizations, such as folding
x * 0 into 0, are not correct for NaN operands, and are normally
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index da4d50d5e94..a56e885fbf8 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -103,8 +103,6 @@ static tree associate_trees (tree, tree, enum tree_code, tree);
static tree const_binop (enum tree_code, tree, tree, int);
static enum comparison_code comparison_to_compcode (enum tree_code);
static enum tree_code compcode_to_comparison (enum comparison_code);
-static tree combine_comparisons (enum tree_code, enum tree_code,
- enum tree_code, tree, tree, tree);
static int operand_equal_for_comparison_p (tree, tree, tree);
static int twoval_comparison_p (tree, tree *, tree *, int *);
static tree eval_subst (tree, tree, tree, tree, tree);
@@ -1934,12 +1932,7 @@ const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc)
t = build_fixed (type, result);
/* Propagate overflow flags. */
if (overflow_p | TREE_OVERFLOW (arg1) | TREE_OVERFLOW (arg2))
- {
- TREE_OVERFLOW (t) = 1;
- TREE_CONSTANT_OVERFLOW (t) = 1;
- }
- else if (TREE_CONSTANT_OVERFLOW (arg1) | TREE_CONSTANT_OVERFLOW (arg2))
- TREE_CONSTANT_OVERFLOW (t) = 1;
+ TREE_OVERFLOW (t) = 1;
return t;
}
@@ -2306,8 +2299,6 @@ fold_convert_const_real_from_fixed (tree type, const_tree arg1)
t = build_real (type, value);
TREE_OVERFLOW (t) = TREE_OVERFLOW (arg1);
- TREE_CONSTANT_OVERFLOW (t)
- = TREE_OVERFLOW (t) | TREE_CONSTANT_OVERFLOW (arg1);
return t;
}
@@ -2327,12 +2318,7 @@ fold_convert_const_fixed_from_fixed (tree type, const_tree arg1)
/* Propagate overflow flags. */
if (overflow_p | TREE_OVERFLOW (arg1))
- {
- TREE_OVERFLOW (t) = 1;
- TREE_CONSTANT_OVERFLOW (t) = 1;
- }
- else if (TREE_CONSTANT_OVERFLOW (arg1))
- TREE_CONSTANT_OVERFLOW (t) = 1;
+ TREE_OVERFLOW (t) = 1;
return t;
}
@@ -2354,12 +2340,7 @@ fold_convert_const_fixed_from_int (tree type, const_tree arg1)
/* Propagate overflow flags. */
if (overflow_p | TREE_OVERFLOW (arg1))
- {
- TREE_OVERFLOW (t) = 1;
- TREE_CONSTANT_OVERFLOW (t) = 1;
- }
- else if (TREE_CONSTANT_OVERFLOW (arg1))
- TREE_CONSTANT_OVERFLOW (t) = 1;
+ TREE_OVERFLOW (t) = 1;
return t;
}
@@ -2380,12 +2361,7 @@ fold_convert_const_fixed_from_real (tree type, const_tree arg1)
/* Propagate overflow flags. */
if (overflow_p | TREE_OVERFLOW (arg1))
- {
- TREE_OVERFLOW (t) = 1;
- TREE_CONSTANT_OVERFLOW (t) = 1;
- }
- else if (TREE_CONSTANT_OVERFLOW (arg1))
- TREE_CONSTANT_OVERFLOW (t) = 1;
+ TREE_OVERFLOW (t) = 1;
return t;
}
@@ -7937,11 +7913,10 @@ fold_view_convert_expr (tree type, tree expr)
}
/* Build an expression for the address of T. Folds away INDIRECT_REF
- to avoid confusing the gimplify process. When IN_FOLD is true
- avoid modifications of T. */
+ to avoid confusing the gimplify process. */
-static tree
-build_fold_addr_expr_with_type_1 (tree t, tree ptrtype, bool in_fold)
+tree
+build_fold_addr_expr_with_type (tree t, tree ptrtype)
{
/* The size of the object is not relevant when talking about its address. */
if (TREE_CODE (t) == WITH_SIZE_EXPR)
@@ -7956,56 +7931,20 @@ build_fold_addr_expr_with_type_1 (tree t, tree ptrtype, bool in_fold)
if (TREE_TYPE (t) != ptrtype)
t = build1 (NOP_EXPR, ptrtype, t);
}
- else if (!in_fold)
- {
- tree base = t;
-
- while (handled_component_p (base))
- base = TREE_OPERAND (base, 0);
-
- if (DECL_P (base))
- TREE_ADDRESSABLE (base) = 1;
-
- t = build1 (ADDR_EXPR, ptrtype, t);
- }
else
t = build1 (ADDR_EXPR, ptrtype, t);
return t;
}
-/* Build an expression for the address of T with type PTRTYPE. This
- function modifies the input parameter 'T' by sometimes setting the
- TREE_ADDRESSABLE flag. */
-
-tree
-build_fold_addr_expr_with_type (tree t, tree ptrtype)
-{
- return build_fold_addr_expr_with_type_1 (t, ptrtype, false);
-}
-
-/* Build an expression for the address of T. This function modifies
- the input parameter 'T' by sometimes setting the TREE_ADDRESSABLE
- flag. When called from fold functions, use fold_addr_expr instead. */
+/* Build an expression for the address of T. */
tree
build_fold_addr_expr (tree t)
{
- return build_fold_addr_expr_with_type_1 (t,
- build_pointer_type (TREE_TYPE (t)),
- false);
-}
-
-/* Same as build_fold_addr_expr, builds an expression for the address
- of T, but avoids touching the input node 't'. Fold functions
- should use this version. */
-
-static tree
-fold_addr_expr (tree t)
-{
tree ptrtype = build_pointer_type (TREE_TYPE (t));
- return build_fold_addr_expr_with_type_1 (t, ptrtype, true);
+ return build_fold_addr_expr_with_type (t, ptrtype);
}
/* Fold a unary expression of code CODE and type TYPE with operand
@@ -8174,12 +8113,12 @@ fold_unary (enum tree_code code, tree type, tree op0)
&& inter_prec >= final_prec)
return fold_build1 (code, type, TREE_OPERAND (op0, 0));
- /* Likewise, if the intermediate and final types are either both
- float or both integer, we don't need the middle conversion if
- it is wider than the final type and doesn't change the signedness
- (for integers). Avoid this if the final type is a pointer
- since then we sometimes need the inner conversion. Likewise if
- the outer has a precision not equal to the size of its mode. */
+ /* Likewise, if the intermediate and initial types are either both
+ float or both integer, we don't need the middle conversion if the
+ former is wider than the latter and doesn't change the signedness
+ (for integers). Avoid this if the final type is a pointer since
+ then we sometimes need the middle conversion. Likewise if the
+ final type has a precision not equal to the size of its mode. */
if (((inter_int && inside_int)
|| (inter_float && inside_float)
|| (inter_vec && inside_vec))
@@ -8245,7 +8184,7 @@ fold_unary (enum tree_code code, tree type, tree op0)
if (! offset && bitpos == 0
&& TYPE_MAIN_VARIANT (TREE_TYPE (type))
== TYPE_MAIN_VARIANT (TREE_TYPE (base)))
- return fold_convert (type, fold_addr_expr (base));
+ return fold_convert (type, build_fold_addr_expr (base));
}
if (TREE_CODE (op0) == MODIFY_EXPR
@@ -9155,9 +9094,9 @@ fold_comparison (enum tree_code code, tree type, tree op0, tree op1)
&& operand_equal_p (offset0, offset1, 0))))
{
if (indirect_base0)
- base0 = fold_addr_expr (base0);
+ base0 = build_fold_addr_expr (base0);
if (indirect_base1)
- base1 = fold_addr_expr (base1);
+ base1 = build_fold_addr_expr (base1);
return fold_build2 (code, type, base0, base1);
}
}
@@ -9292,7 +9231,8 @@ fold_comparison (enum tree_code code, tree type, tree op0, tree op1)
}
/* Fold comparisons against infinity. */
- if (REAL_VALUE_ISINF (cst))
+ if (REAL_VALUE_ISINF (cst)
+ && MODE_HAS_INFINITIES (TYPE_MODE (TREE_TYPE (arg1))))
{
tem = fold_inf_compare (code, type, arg0, arg1);
if (tem != NULL_TREE)
@@ -9589,10 +9529,15 @@ fold_mult_zconjz (tree type, tree expr)
0 <= N < M as is common. In general, the precise value of P is unknown.
M is chosen as large as possible such that constant N can be determined.
- Returns M and sets *RESIDUE to N. */
+ Returns M and sets *RESIDUE to N.
+
+ If ALLOW_FUNC_ALIGN is true, do take functions' DECL_ALIGN_UNIT into
+ account. This is not always possible due to PR 35705.
+ */
static unsigned HOST_WIDE_INT
-get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue)
+get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue,
+ bool allow_func_align)
{
enum tree_code code;
@@ -9622,7 +9567,8 @@ get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue)
}
}
- if (DECL_P (expr) && TREE_CODE (expr) != FUNCTION_DECL)
+ if (DECL_P (expr)
+ && (allow_func_align || TREE_CODE (expr) != FUNCTION_DECL))
return DECL_ALIGN_UNIT (expr);
}
else if (code == POINTER_PLUS_EXPR)
@@ -9633,7 +9579,8 @@ get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue)
op0 = TREE_OPERAND (expr, 0);
STRIP_NOPS (op0);
- modulus = get_pointer_modulus_and_residue (op0, residue);
+ modulus = get_pointer_modulus_and_residue (op0, residue,
+ allow_func_align);
op1 = TREE_OPERAND (expr, 1);
STRIP_NOPS (op1);
@@ -11273,7 +11220,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
unsigned HOST_WIDE_INT modulus, residue;
unsigned HOST_WIDE_INT low = TREE_INT_CST_LOW (arg1);
- modulus = get_pointer_modulus_and_residue (arg0, &residue);
+ modulus = get_pointer_modulus_and_residue (arg0, &residue,
+ integer_onep (arg1));
/* This works because modulus is a power of 2. If this weren't the
case, we'd have to replace it by its greatest power-of-2
@@ -15258,12 +15206,7 @@ fold_negate_const (tree arg0, tree type)
t = build_fixed (type, f);
/* Propagate overflow flags. */
if (overflow_p | TREE_OVERFLOW (arg0))
- {
- TREE_OVERFLOW (t) = 1;
- TREE_CONSTANT_OVERFLOW (t) = 1;
- }
- else if (TREE_CONSTANT_OVERFLOW (arg0))
- TREE_CONSTANT_OVERFLOW (t) = 1;
+ TREE_OVERFLOW (t) = 1;
break;
}
@@ -15828,7 +15771,7 @@ split_address_to_core_and_offset (tree exp,
core = get_inner_reference (TREE_OPERAND (exp, 0), &bitsize, pbitpos,
poffset, &mode, &unsignedp, &volatilep,
false);
- core = fold_addr_expr (core);
+ core = build_fold_addr_expr (core);
}
else
{
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 6502f1a0802..d4a24ddc1f9 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,171 @@
+2009-03-30 Joseph Myers <joseph@codesourcery.com>
+
+ PR rtl-optimization/323
+ * options.c (gfc_post_options): Set
+ flag_excess_precision_cmdline. Give an error for
+ -fexcess-precision=standard for processors where the option is
+ significant.
+
+2009-03-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR preprocessor/34695
+ * cpp.c (cb_cpp_error): New.
+ (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
+ Don't check cpp_errors (cpp_in).
+ (gfc_cpp_init_0): Set cb->error.
+
+2009-03-29 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/38823
+ * gfortran.h: Add ARITH_PROHIBIT to arith enum.
+ expr.c (gfc_match_init_expr): Add global variable init_flag to
+ flag matching an initialization expression.
+ (check_intrinsic_op): Move no longer reachable error message to ...
+ * arith.c (arith_power): ... here. Remove gfc_ prefix in
+ gfc_arith_power. Use init_flag. Allow constant folding of x**y
+ when y is REAL or COMPLEX.
+ (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
+ for constant folding.
+ * gfc_power: Update gfc_arith_power to arith_power
+
+2009-03-29 Daniel Kraft <d@domob.eu>
+
+ PR fortran/37423
+ * gfortran.h (struct gfc_typebound_proc): Added new flag `deferred' and
+ added a comment explaining DEFERRED binding handling.
+ * decl.c (match_binding_attributes): Really match DEFERRED attribute.
+ (match_procedure_in_type): Really match PROCEDURE(interface) syntax
+ and do some validity checks for DEFERRED and this construct.
+ * module.c (binding_overriding): New string constant for DEFERRED.
+ (mio_typebound_proc): Module-IO DEFERRED flag.
+ * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
+ binding is not overridden by a DEFERRED one.
+ (resolve_typebound_procedure): Allow abstract interfaces as targets
+ for DEFERRED bindings.
+ (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
+ (resolve_fl_derived): Use new `ensure_not_abstract' method for
+ non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
+ binding is overridden.
+ (check_typebound_baseobject): New method.
+ (resolve_compcall), (resolve_typebound_call): Check base-object of
+ the type-bound procedure call.
+ * gfc-internals.texi (Type-bound procedures): Document a little bit
+ about internal handling of DEFERRED bindings.
+
+2008-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
+
+ PR fortran/38507
+ * gfortran.h (gfc_st_label): Fix comment.
+ (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
+ * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
+ END SELECT with labels.
+ (check_do_closure): Fix formatting.
+ (parse_do_block): Fix typo in error message.
+ * resolve.c (code_stack): Remove tail member. Update comment to
+ new use of reachable_labels.
+ (reachable_labels): Rename to ...
+ (find_reachable_labels): ... this. Overhaul. Update preceding
+ comment.
+ (resolve_branch): Fix comment preceding function. Rewrite.
+ (resolve_code): Update call to find_reachable_labels. Add code to
+ deal with EXEC_END_BLOCK.
+ * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
+ Add 2009 to copyright years.
+ * trans.c (gfc_trans_code): Likewise on both counts.
+
+2009-03-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/34656
+ * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
+ Add GFC_RTCHECK_DO support.
+ * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
+ * invoke.texi (-fcheck): Document "do" option.
+
+2009-03-28 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/38538
+ * trans-array.c (get_elemental_fcn_charlen): Remove.
+ (get_array_charlen): New function to replace previous.
+
+2009-03-28 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/38765
+ * parse.c (parse_derived): Do not break on finding pointer,
+ allocatable or private components.
+
+2009-03-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/32626
+ * option.c (gfc_handle_runtime_check_option): Enable recursion check.
+ * trans-decl.c (gfc_generate_function_code): Add recursion check.
+ * invoke.texi (-fcheck): Add recursive option.
+
+2009-03-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/38432
+ * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
+
+2009-03-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+ Paul Thomas <pault@gcc.gnu.org>
+ Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.h (gfc_option_t): Add rtcheck.
+ * lang.opt: New option -fcheck.
+ * libgfortran.h: Add GFC_RTCHECK_* constants.
+ * invoke.texi: Document -fcheck.
+ * options.c (gfc_handle_runtime_check_option): New function.
+ (gfc_init_options,gfc_post_options,gfc_handle_option):
+ Add -fcheck option.
+
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ * trans-array.c (gfc_conv_descriptor_data_addr): Use
+ gfc_build_addr_expr instead of build_fold_addr_expr.
+ (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
+ gfc_trans_constant_array_constructor, gfc_conv_array_data,
+ gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
+ * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
+ gfc_conv_function_val, gfc_conv_operator_assign,
+ gfc_conv_subref_array_arg, gfc_conv_function_call,
+ gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
+ * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
+ gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
+ gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
+ gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
+ gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
+ gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
+ gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
+ * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
+ gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
+ build_filepos, gfc_trans_inquire, gfc_trans_wait,
+ nml_get_addr_expr, transfer_namelist_element, build_dt,
+ gfc_trans_dt_end, transfer_array_component, transfer_expr,
+ transfer_array_desc, gfc_trans_transfer): Likewise.
+ * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
+ * trans.c (gfc_build_addr_expr): Mark the base of the address
+ TREE_ADDRESSABLE.
+
+2009-03-27 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
+ (gfc_expr): Add is_snan.
+ * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
+ (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
+ * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
+ * resolve.c (build_default_init_expr): Update call.
+ * target-memory.c (encode_float): Ditto.
+ * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
+
+2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
+ and -fpreprocessed.
+
+2009-03-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * simplify.c (gfc_simplify_transfer): Zero-initialize the
+ buffer.
+
2009-02-27 Tobias Burnus <burnus@net-b.de>
PR fortran/39309
diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c
index 7440be3a230..17f2221ef8c 100644
--- a/gcc/fortran/arith.c
+++ b/gcc/fortran/arith.c
@@ -932,131 +932,213 @@ complex_pow (gfc_expr *result, gfc_expr *base, mpz_t power)
}
-/* Raise a number to an integer power. */
+/* Raise a number to a power. */
static arith
-gfc_arith_power (gfc_expr *op1, gfc_expr *op2, gfc_expr **resultp)
+arith_power (gfc_expr *op1, gfc_expr *op2, gfc_expr **resultp)
{
int power_sign;
gfc_expr *result;
arith rc;
-
- gcc_assert (op2->expr_type == EXPR_CONSTANT && op2->ts.type == BT_INTEGER);
+ extern bool init_flag;
rc = ARITH_OK;
result = gfc_constant_result (op1->ts.type, op1->ts.kind, &op1->where);
- power_sign = mpz_sgn (op2->value.integer);
- if (power_sign == 0)
+ switch (op2->ts.type)
{
- /* Handle something to the zeroth power. Since we're dealing
- with integral exponents, there is no ambiguity in the
- limiting procedure used to determine the value of 0**0. */
- switch (op1->ts.type)
+ case BT_INTEGER:
+ power_sign = mpz_sgn (op2->value.integer);
+
+ if (power_sign == 0)
{
- case BT_INTEGER:
- mpz_set_ui (result->value.integer, 1);
- break;
+ /* Handle something to the zeroth power. Since we're dealing
+ with integral exponents, there is no ambiguity in the
+ limiting procedure used to determine the value of 0**0. */
+ switch (op1->ts.type)
+ {
+ case BT_INTEGER:
+ mpz_set_ui (result->value.integer, 1);
+ break;
- case BT_REAL:
- mpfr_set_ui (result->value.real, 1, GFC_RND_MODE);
- break;
+ case BT_REAL:
+ mpfr_set_ui (result->value.real, 1, GFC_RND_MODE);
+ break;
- case BT_COMPLEX:
- mpfr_set_ui (result->value.complex.r, 1, GFC_RND_MODE);
- mpfr_set_ui (result->value.complex.i, 0, GFC_RND_MODE);
- break;
+ case BT_COMPLEX:
+ mpfr_set_ui (result->value.complex.r, 1, GFC_RND_MODE);
+ mpfr_set_ui (result->value.complex.i, 0, GFC_RND_MODE);
+ break;
- default:
- gfc_internal_error ("gfc_arith_power(): Bad base");
+ default:
+ gfc_internal_error ("arith_power(): Bad base");
+ }
}
- }
- else
- {
- switch (op1->ts.type)
+ else
{
- case BT_INTEGER:
- {
- int power;
-
- /* First, we simplify the cases of op1 == 1, 0 or -1. */
- if (mpz_cmp_si (op1->value.integer, 1) == 0)
- {
- /* 1**op2 == 1 */
- mpz_set_si (result->value.integer, 1);
- }
- else if (mpz_cmp_si (op1->value.integer, 0) == 0)
- {
- /* 0**op2 == 0, if op2 > 0
- 0**op2 overflow, if op2 < 0 ; in that case, we
- set the result to 0 and return ARITH_DIV0. */
- mpz_set_si (result->value.integer, 0);
- if (mpz_cmp_si (op2->value.integer, 0) < 0)
- rc = ARITH_DIV0;
- }
- else if (mpz_cmp_si (op1->value.integer, -1) == 0)
+ switch (op1->ts.type)
+ {
+ case BT_INTEGER:
{
- /* (-1)**op2 == (-1)**(mod(op2,2)) */
- unsigned int odd = mpz_fdiv_ui (op2->value.integer, 2);
- if (odd)
- mpz_set_si (result->value.integer, -1);
+ int power;
+
+ /* First, we simplify the cases of op1 == 1, 0 or -1. */
+ if (mpz_cmp_si (op1->value.integer, 1) == 0)
+ {
+ /* 1**op2 == 1 */
+ mpz_set_si (result->value.integer, 1);
+ }
+ else if (mpz_cmp_si (op1->value.integer, 0) == 0)
+ {
+ /* 0**op2 == 0, if op2 > 0
+ 0**op2 overflow, if op2 < 0 ; in that case, we
+ set the result to 0 and return ARITH_DIV0. */
+ mpz_set_si (result->value.integer, 0);
+ if (mpz_cmp_si (op2->value.integer, 0) < 0)
+ rc = ARITH_DIV0;
+ }
+ else if (mpz_cmp_si (op1->value.integer, -1) == 0)
+ {
+ /* (-1)**op2 == (-1)**(mod(op2,2)) */
+ unsigned int odd = mpz_fdiv_ui (op2->value.integer, 2);
+ if (odd)
+ mpz_set_si (result->value.integer, -1);
+ else
+ mpz_set_si (result->value.integer, 1);
+ }
+ /* Then, we take care of op2 < 0. */
+ else if (mpz_cmp_si (op2->value.integer, 0) < 0)
+ {
+ /* if op2 < 0, op1**op2 == 0 because abs(op1) > 1. */
+ mpz_set_si (result->value.integer, 0);
+ }
+ else if (gfc_extract_int (op2, &power) != NULL)
+ {
+ /* If op2 doesn't fit in an int, the exponentiation will
+ overflow, because op2 > 0 and abs(op1) > 1. */
+ mpz_t max;
+ int i;
+ i = gfc_validate_kind (BT_INTEGER, result->ts.kind, false);
+
+ if (gfc_option.flag_range_check)
+ rc = ARITH_OVERFLOW;
+
+ /* Still, we want to give the same value as the
+ processor. */
+ mpz_init (max);
+ mpz_add_ui (max, gfc_integer_kinds[i].huge, 1);
+ mpz_mul_ui (max, max, 2);
+ mpz_powm (result->value.integer, op1->value.integer,
+ op2->value.integer, max);
+ mpz_clear (max);
+ }
else
- mpz_set_si (result->value.integer, 1);
- }
- /* Then, we take care of op2 < 0. */
- else if (mpz_cmp_si (op2->value.integer, 0) < 0)
- {
- /* if op2 < 0, op1**op2 == 0 because abs(op1) > 1. */
- mpz_set_si (result->value.integer, 0);
+ mpz_pow_ui (result->value.integer, op1->value.integer,
+ power);
}
- else if (gfc_extract_int (op2, &power) != NULL)
+ break;
+
+ case BT_REAL:
+ mpfr_pow_z (result->value.real, op1->value.real,
+ op2->value.integer, GFC_RND_MODE);
+ break;
+
+ case BT_COMPLEX:
{
- /* If op2 doesn't fit in an int, the exponentiation will
- overflow, because op2 > 0 and abs(op1) > 1. */
- mpz_t max;
- int i = gfc_validate_kind (BT_INTEGER, result->ts.kind, false);
-
- if (gfc_option.flag_range_check)
- rc = ARITH_OVERFLOW;
-
- /* Still, we want to give the same value as the processor. */
- mpz_init (max);
- mpz_add_ui (max, gfc_integer_kinds[i].huge, 1);
- mpz_mul_ui (max, max, 2);
- mpz_powm (result->value.integer, op1->value.integer,
- op2->value.integer, max);
- mpz_clear (max);
+ mpz_t apower;
+
+ /* Compute op1**abs(op2) */
+ mpz_init (apower);
+ mpz_abs (apower, op2->value.integer);
+ complex_pow (result, op1, apower);
+ mpz_clear (apower);
+
+ /* If (op2 < 0), compute the inverse. */
+ if (power_sign < 0)
+ complex_reciprocal (result);
}
- else
- mpz_pow_ui (result->value.integer, op1->value.integer, power);
- }
- break;
+ break;
- case BT_REAL:
- mpfr_pow_z (result->value.real, op1->value.real, op2->value.integer,
- GFC_RND_MODE);
- break;
+ default:
+ break;
+ }
+ }
+ break;
+
+ case BT_REAL:
+
+ if (init_flag)
+ {
+ if (gfc_notify_std (GFC_STD_F2003,"Fortran 2003: Noninteger "
+ "exponent in an initialization "
+ "expression at %L", &op2->where) == FAILURE)
+ return ARITH_PROHIBIT;
+ }
- case BT_COMPLEX:
+ if (mpfr_cmp_si (op1->value.real, 0) < 0)
+ {
+ gfc_error ("Raising a negative REAL at %L to "
+ "a REAL power is prohibited", &op1->where);
+ gfc_free (result);
+ return ARITH_PROHIBIT;
+ }
+
+ mpfr_pow (result->value.real, op1->value.real, op2->value.real,
+ GFC_RND_MODE);
+ break;
+
+ case BT_COMPLEX:
+ {
+ mpfr_t x, y, r, t;
+
+ if (init_flag)
{
- mpz_t apower;
+ if (gfc_notify_std (GFC_STD_F2003,"Fortran 2003: Noninteger "
+ "exponent in an initialization "
+ "expression at %L", &op2->where) == FAILURE)
+ return ARITH_PROHIBIT;
+ }
- /* Compute op1**abs(op2) */
- mpz_init (apower);
- mpz_abs (apower, op2->value.integer);
- complex_pow (result, op1, apower);
- mpz_clear (apower);
+ gfc_set_model (op1->value.complex.r);
- /* If (op2 < 0), compute the inverse. */
- if (power_sign < 0)
- complex_reciprocal (result);
+ mpfr_init (r);
+ mpfr_hypot (r, op1->value.complex.r, op1->value.complex.i,
+ GFC_RND_MODE);
+ if (mpfr_cmp_si (r, 0) == 0)
+ {
+ mpfr_set_ui (result->value.complex.r, 0, GFC_RND_MODE);
+ mpfr_set_ui (result->value.complex.i, 0, GFC_RND_MODE);
+ mpfr_clear (r);
break;
}
-
- default:
- break;
- }
+ mpfr_log (r, r, GFC_RND_MODE);
+
+ mpfr_init (t);
+
+ mpfr_atan2 (t, op1->value.complex.i, op1->value.complex.r,
+ GFC_RND_MODE);
+
+ mpfr_init (x);
+ mpfr_init (y);
+
+ mpfr_mul (x, op2->value.complex.r, r, GFC_RND_MODE);
+ mpfr_mul (y, op2->value.complex.i, t, GFC_RND_MODE);
+ mpfr_sub (x, x, y, GFC_RND_MODE);
+ mpfr_exp (x, x, GFC_RND_MODE);
+
+ mpfr_mul (y, op2->value.complex.r, t, GFC_RND_MODE);
+ mpfr_mul (t, op2->value.complex.i, r, GFC_RND_MODE);
+ mpfr_add (y, y, t, GFC_RND_MODE);
+ mpfr_cos (t, y, GFC_RND_MODE);
+ mpfr_sin (y, y, GFC_RND_MODE);
+ mpfr_mul (result->value.complex.r, x, t, GFC_RND_MODE);
+ mpfr_mul (result->value.complex.i, x, y, GFC_RND_MODE);
+ mpfr_clears (r, t, x, y, NULL);
+ }
+ break;
+ default:
+ gfc_internal_error ("arith_power(): unknown type");
}
if (rc == ARITH_OK)
@@ -1695,10 +1777,6 @@ eval_intrinsic (gfc_intrinsic_op op,
gfc_internal_error ("eval_intrinsic(): Bad operator");
}
- /* Try to combine the operators. */
- if (op == INTRINSIC_POWER && op2->ts.type != BT_INTEGER)
- goto runtime;
-
if (op1->expr_type != EXPR_CONSTANT
&& (op1->expr_type != EXPR_ARRAY
|| !gfc_is_constant_expr (op1) || !gfc_expanded_ac (op1)))
@@ -1715,8 +1793,13 @@ eval_intrinsic (gfc_intrinsic_op op,
else
rc = reduce_binary (eval.f3, op1, op2, &result);
+
+ /* Something went wrong. */
+ if (op == INTRINSIC_POWER && rc == ARITH_PROHIBIT)
+ return NULL;
+
if (rc != ARITH_OK)
- { /* Something went wrong. */
+ {
gfc_error (gfc_arith_error (rc), &op1->where);
return NULL;
}
@@ -1908,7 +1991,7 @@ gfc_divide (gfc_expr *op1, gfc_expr *op2)
gfc_expr *
gfc_power (gfc_expr *op1, gfc_expr *op2)
{
- return eval_intrinsic_f3 (INTRINSIC_POWER, gfc_arith_power, op1, op2);
+ return eval_intrinsic_f3 (INTRINSIC_POWER, arith_power, op1, op2);
}
diff --git a/gcc/fortran/cpp.c b/gcc/fortran/cpp.c
index d45d0c15b78..fc78f9826a2 100644
--- a/gcc/fortran/cpp.c
+++ b/gcc/fortran/cpp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -137,6 +137,9 @@ static void cb_include (cpp_reader *, source_location, const unsigned char *,
static void cb_ident (cpp_reader *, source_location, const cpp_string *);
static void cb_used_define (cpp_reader *, source_location, cpp_hashnode *);
static void cb_used_undef (cpp_reader *, source_location, cpp_hashnode *);
+static bool cb_cpp_error (cpp_reader *, int, location_t, unsigned int,
+ const char *, va_list *)
+ ATTRIBUTE_GCC_DIAG(5,0);
void pp_dir_change (cpp_reader *, const char *);
static int dump_macro (cpp_reader *, cpp_hashnode *, void *);
@@ -452,7 +455,6 @@ gfc_cpp_post_options (void)
cpp_option->cplusplus_comments = 0;
cpp_option->pedantic = pedantic;
- cpp_option->inhibit_warnings = inhibit_warnings;
cpp_option->dollars_in_ident = gfc_option.flag_dollar_ok;
cpp_option->discard_comments = gfc_cpp_option.discard_comments;
@@ -465,9 +467,6 @@ gfc_cpp_post_options (void)
cpp_post_options (cpp_in);
- /* If an error has occurred in cpplib, note it so we fail immediately. */
- errorcount += cpp_errors (cpp_in);
-
gfc_cpp_register_include_paths ();
}
@@ -482,6 +481,7 @@ gfc_cpp_init_0 (void)
cb->line_change = cb_line_change;
cb->ident = cb_ident;
cb->def_pragma = cb_def_pragma;
+ cb->error = cb_cpp_error;
if (gfc_cpp_option.dump_includes)
cb->include = cb_include;
@@ -961,6 +961,54 @@ cb_used_define (cpp_reader *pfile, source_location line ATTRIBUTE_UNUSED,
cpp_define_queue = q;
}
+/* Callback from cpp_error for PFILE to print diagnostics from the
+ preprocessor. The diagnostic is of type LEVEL, at location
+ LOCATION, with column number possibly overridden by COLUMN_OVERRIDE
+ if not zero; MSG is the translated message and AP the arguments.
+ Returns true if a diagnostic was emitted, false otherwise. */
+
+static bool
+cb_cpp_error (cpp_reader *pfile ATTRIBUTE_UNUSED, int level,
+ location_t location, unsigned int column_override,
+ const char *msg, va_list *ap)
+{
+ diagnostic_info diagnostic;
+ diagnostic_t dlevel;
+ int save_warn_system_headers = warn_system_headers;
+ bool ret;
+
+ switch (level)
+ {
+ case CPP_DL_WARNING_SYSHDR:
+ warn_system_headers = 1;
+ /* Fall through. */
+ case CPP_DL_WARNING:
+ dlevel = DK_WARNING;
+ break;
+ case CPP_DL_PEDWARN:
+ dlevel = DK_PEDWARN;
+ break;
+ case CPP_DL_ERROR:
+ dlevel = DK_ERROR;
+ break;
+ case CPP_DL_ICE:
+ dlevel = DK_ICE;
+ break;
+ case CPP_DL_NOTE:
+ dlevel = DK_NOTE;
+ break;
+ default:
+ gcc_unreachable ();
+ }
+ diagnostic_set_info_translated (&diagnostic, msg, ap,
+ location, dlevel);
+ if (column_override)
+ diagnostic_override_column (&diagnostic, column_override);
+ ret = report_diagnostic (&diagnostic);
+ if (level == CPP_DL_WARNING_SYSHDR)
+ warn_system_headers = save_warn_system_headers;
+ return ret;
+}
/* Callback called when -fworking-director and -E to emit working
directory in cpp output file. */
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index f6677fe42e0..54a32f173af 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -6732,6 +6732,7 @@ match_binding_attributes (gfc_typebound_proc* ba, bool generic)
ba->pass_arg_num = 0;
ba->nopass = 0;
ba->non_overridable = 0;
+ ba->deferred = 0;
/* If we find a comma, we believe there are binding attributes. */
if (gfc_match_char (',') == MATCH_NO)
@@ -6813,14 +6814,19 @@ match_binding_attributes (gfc_typebound_proc* ba, bool generic)
}
/* DEFERRED flag. */
- /* TODO: Handle really once implemented. */
m = gfc_match (" deferred");
if (m == MATCH_ERROR)
goto error;
if (m == MATCH_YES)
{
- gfc_error ("DEFERRED not yet implemented at %C");
- goto error;
+ if (ba->deferred)
+ {
+ gfc_error ("Duplicate DEFERRED at %C");
+ goto error;
+ }
+
+ ba->deferred = 1;
+ continue;
}
/* PASS possibly including argument. */
@@ -6861,6 +6867,13 @@ match_binding_attributes (gfc_typebound_proc* ba, bool generic)
}
while (gfc_match_char (',') == MATCH_YES);
+ /* NON_OVERRIDABLE and DEFERRED exclude themselves. */
+ if (ba->non_overridable && ba->deferred)
+ {
+ gfc_error ("NON_OVERRIDABLE and DEFERRED can't both appear at %C");
+ goto error;
+ }
+
if (ba->access == ACCESS_UNKNOWN)
ba->access = gfc_typebound_default_access;
@@ -6879,7 +6892,7 @@ match_procedure_in_type (void)
{
char name[GFC_MAX_SYMBOL_LEN + 1];
char target_buf[GFC_MAX_SYMBOL_LEN + 1];
- char* target;
+ char* target = NULL;
gfc_typebound_proc* tb;
bool seen_colons;
bool seen_attrs;
@@ -6893,11 +6906,25 @@ match_procedure_in_type (void)
block = gfc_state_stack->previous->sym;
gcc_assert (block);
- /* TODO: Really implement PROCEDURE(interface). */
+ /* Try to match PROCEDURE(interface). */
if (gfc_match (" (") == MATCH_YES)
{
- gfc_error ("PROCEDURE(interface) at %C is not yet implemented");
- return MATCH_ERROR;
+ m = gfc_match_name (target_buf);
+ if (m == MATCH_ERROR)
+ return m;
+ if (m != MATCH_YES)
+ {
+ gfc_error ("Interface-name expected after '(' at %C");
+ return MATCH_ERROR;
+ }
+
+ if (gfc_match (" )") != MATCH_YES)
+ {
+ gfc_error ("')' expected at %C");
+ return MATCH_ERROR;
+ }
+
+ target = target_buf;
}
/* Construct the data structure. */
@@ -6911,6 +6938,19 @@ match_procedure_in_type (void)
return m;
seen_attrs = (m == MATCH_YES);
+ /* Check that attribute DEFERRED is given iff an interface is specified, which
+ means target != NULL. */
+ if (tb->deferred && !target)
+ {
+ gfc_error ("Interface must be specified for DEFERRED binding at %C");
+ return MATCH_ERROR;
+ }
+ if (target && !tb->deferred)
+ {
+ gfc_error ("PROCEDURE(interface) at %C should be declared DEFERRED");
+ return MATCH_ERROR;
+ }
+
/* Match the colons. */
m = gfc_match (" ::");
if (m == MATCH_ERROR)
@@ -6933,12 +6973,17 @@ match_procedure_in_type (void)
}
/* Try to match the '=> target', if it's there. */
- target = NULL;
m = gfc_match (" =>");
if (m == MATCH_ERROR)
return m;
if (m == MATCH_YES)
{
+ if (tb->deferred)
+ {
+ gfc_error ("'=> target' is invalid for DEFERRED binding at %C");
+ return MATCH_ERROR;
+ }
+
if (!seen_colons)
{
gfc_error ("'::' needed in PROCEDURE binding with explicit target"
@@ -6975,6 +7020,14 @@ match_procedure_in_type (void)
ns = block->f2k_derived;
gcc_assert (ns);
+ /* If the binding is DEFERRED, check that the containing type is ABSTRACT. */
+ if (tb->deferred && !block->attr.abstract)
+ {
+ gfc_error ("Type '%s' containing DEFERRED binding at %C is not ABSTRACT",
+ block->name);
+ return MATCH_ERROR;
+ }
+
/* See if we already have a binding with this name in the symtree which would
be an error. If a GENERIC already targetted this binding, it may be
already there but then typebound is still NULL. */
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 50444e4f655..8dec53f3244 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -1938,16 +1938,6 @@ check_intrinsic_op (gfc_expr *e, gfc_try (*check_function) (gfc_expr *))
if (!numeric_type (et0 (op1)) || !numeric_type (et0 (op2)))
goto not_numeric;
- if (e->value.op.op == INTRINSIC_POWER
- && check_function == check_init_expr && et0 (op2) != BT_INTEGER)
- {
- if (gfc_notify_std (GFC_STD_F2003,"Fortran 2003: Noninteger "
- "exponent in an initialization "
- "expression at %L", &op2->where)
- == FAILURE)
- return FAILURE;
- }
-
break;
case INTRINSIC_CONCAT:
@@ -2424,7 +2414,11 @@ gfc_reduce_init_expr (gfc_expr *expr)
/* Match an initialization expression. We work by first matching an
- expression, then reducing it to a constant. */
+ expression, then reducing it to a constant. The reducing it to
+ constant part requires a global variable to flag the prohibition
+ of a non-integer exponent in -std=f95 mode. */
+
+bool init_flag = false;
match
gfc_match_init_expr (gfc_expr **result)
@@ -2435,18 +2429,25 @@ gfc_match_init_expr (gfc_expr **result)
expr = NULL;
+ init_flag = true;
+
m = gfc_match_expr (&expr);
if (m != MATCH_YES)
- return m;
+ {
+ init_flag = false;
+ return m;
+ }
t = gfc_reduce_init_expr (expr);
if (t != SUCCESS)
{
gfc_free_expr (expr);
+ init_flag = false;
return MATCH_ERROR;
}
*result = expr;
+ init_flag = false;
return MATCH_YES;
}
diff --git a/gcc/fortran/gfc-internals.texi b/gcc/fortran/gfc-internals.texi
index 9cb5a54e4b4..97aec7ba89f 100644
--- a/gcc/fortran/gfc-internals.texi
+++ b/gcc/fortran/gfc-internals.texi
@@ -601,6 +601,11 @@ name, and later during resolution phase the corresponding argument is looked for
and its position remembered as @code{pass_arg_num} in @code{gfc_typebound_proc}.
The binding's target procedure is pointed-to by @code{u.specific}.
+@code{DEFERRED} bindings are just like ordinary specific bindings, except
+that their @code{deferred} flag is set of course and that @code{u.specific}
+points to their ``interface'' defining symbol (might be an abstract interface)
+instead of the target procedure.
+
At the moment, all type-bound procedure calls are statically dispatched and
transformed into ordinary procedure calls at resolution time; their actual
argument list is updated to include at the right position the passed-object
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index 8795bee3c91..3a7f98a8792 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -199,7 +199,7 @@ gfc_intrinsic_op;
/* Arithmetic results. */
typedef enum
{ ARITH_OK = 1, ARITH_OVERFLOW, ARITH_UNDERFLOW, ARITH_NAN,
- ARITH_DIV0, ARITH_INCOMMENSURATE, ARITH_ASYMMETRIC
+ ARITH_DIV0, ARITH_INCOMMENSURATE, ARITH_ASYMMETRIC, ARITH_PROHIBIT
}
arith;
@@ -527,6 +527,7 @@ typedef enum
GFC_INIT_REAL_OFF = 0,
GFC_INIT_REAL_ZERO,
GFC_INIT_REAL_NAN,
+ GFC_INIT_REAL_SNAN,
GFC_INIT_REAL_INF,
GFC_INIT_REAL_NEG_INF
}
@@ -953,10 +954,9 @@ gfc_omp_clauses;
#define gfc_get_omp_clauses() XCNEW (gfc_omp_clauses)
-/* The gfc_st_label structure is a doubly linked list attached to a
- namespace that records the usage of statement labels within that
- space. */
-/* TODO: Make format/statement specifics a union. */
+/* The gfc_st_label structure is a BBT attached to a namespace that
+ records the usage of statement labels within that space. */
+
typedef struct gfc_st_label
{
BBT_HEADER(gfc_st_label);
@@ -1019,7 +1019,7 @@ typedef struct gfc_typebound_proc
union
{
- struct gfc_symtree* specific;
+ struct gfc_symtree* specific; /* The interface if DEFERRED. */
gfc_tbp_generic* generic;
}
u;
@@ -1038,6 +1038,7 @@ typedef struct gfc_typebound_proc
unsigned nopass:1; /* Whether we have NOPASS (PASS otherwise). */
unsigned non_overridable:1;
+ unsigned deferred:1;
unsigned is_generic:1;
unsigned function:1, subroutine:1;
unsigned error:1; /* Ignore it, when an error occurred during resolution. */
@@ -1547,8 +1548,10 @@ typedef struct gfc_expr
locus where;
/* True if the expression is a call to a function that returns an array,
- and if we have decided not to allocate temporary data for that array. */
- unsigned int inline_noncopying_intrinsic : 1, is_boz : 1;
+ and if we have decided not to allocate temporary data for that array.
+ is_boz is true if the integer is regarded as BOZ bitpatten and is_snan
+ denotes a signalling not-a-number. */
+ unsigned int inline_noncopying_intrinsic : 1, is_boz : 1, is_snan : 1;
/* Sometimes, when an error has been emitted, it is necessary to prevent
it from recurring. */
@@ -1858,7 +1861,8 @@ gfc_forall_iterator;
/* Executable statements that fill gfc_code structures. */
typedef enum
{
- EXEC_NOP = 1, EXEC_ASSIGN, EXEC_LABEL_ASSIGN, EXEC_POINTER_ASSIGN,
+ EXEC_NOP = 1, EXEC_END_BLOCK, EXEC_ASSIGN, EXEC_LABEL_ASSIGN,
+ EXEC_POINTER_ASSIGN,
EXEC_GOTO, EXEC_CALL, EXEC_COMPCALL, EXEC_ASSIGN_CALL, EXEC_RETURN,
EXEC_ENTRY, EXEC_PAUSE, EXEC_STOP, EXEC_CONTINUE, EXEC_INIT_ASSIGN,
EXEC_IF, EXEC_ARITHMETIC_IF, EXEC_DO, EXEC_DO_WHILE, EXEC_SELECT,
@@ -2005,7 +2009,6 @@ typedef struct
int flag_automatic;
int flag_backslash;
int flag_backtrace;
- int flag_check_array_temporaries;
int flag_allow_leading_underscore;
int flag_dump_core;
int flag_external_blas;
@@ -2026,6 +2029,7 @@ typedef struct
int flag_align_commons;
int fpe;
+ int rtcheck;
int warn_std;
int allow_std;
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index 8e18dd2342c..a263a150c82 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -1,11 +1,11 @@
-@c Copyright (C) 2004, 2005, 2006, 2007, 2008
+@c Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
@c Free Software Foundation, Inc.
@c This is part of the GNU Fortran manual.
@c For copying conditions, see the file gfortran.texi.
@ignore
@c man begin COPYRIGHT
-Copyright @copyright{} 2004, 2005, 2006, 2007, 2008
+Copyright @copyright{} 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
@@ -166,10 +166,11 @@ and warnings}.
@gccoptlist{-fno-automatic -ff2c -fno-underscoring @gol
-fsecond-underscore @gol
-fbounds-check -fcheck-array-temporaries -fmax-array-constructor =@var{n} @gol
+-fcheck=@var{<all|bounds|array-temps>}
-fmax-stack-var-size=@var{n} @gol
-fpack-derived -frepack-arrays -fshort-enums -fexternal-blas @gol
-fblas-matmul-limit=@var{n} -frecursive -finit-local-zero @gol
--finit-integer=@var{n} -finit-real=@var{<zero|inf|-inf|nan>} @gol
+-finit-integer=@var{n} -finit-real=@var{<zero|inf|-inf|nan|snan>} @gol
-finit-logical=@var{<true|false>} -finit-character=@var{n} -fno-align-commons}
@end table
@@ -1182,13 +1183,31 @@ is implemented as a reference to the link-time external symbol
for compatibility with @command{g77} and @command{f2c}, and is implied
by use of the @option{-ff2c} option.
-@item -fbounds-check
-@opindex @code{fbounds-check}
+@item -fcheck=@var{<keyword>}
+@opindex @code{fcheck}
@cindex array, bounds checking
@cindex bounds checking
@cindex range checking
@cindex subscript checking
@cindex checking subscripts
+@cindex run-time checking
+@cindex checking array temporaries
+
+Enable the generation of run-time checks; the argument shall be
+a comma-delimited list of the following keywords.
+
+@table @asis
+@item @samp{all}
+Enable all run-time test of @option{-fcheck}.
+
+@item @samp{array-temps}
+Warns at run time when for passing an actual argument a temporary array
+had to be generated. The information generated by this warning is
+sometimes useful in optimization, in order to avoid such temporaries.
+
+Note: The warning is only printed once per location.
+
+@item @samp{bounds}
Enable generation of run-time checks for array subscripts
and against the declared minimum and maximum values. It also
checks array indices for assumed and deferred
@@ -1196,22 +1215,30 @@ shape arrays against the actual allocated bounds and ensures that all string
lengths are equal for character array constructors without an explicit
typespec.
-Some checks require that @option{-fbounds-check} is set for
+Some checks require that @option{-fcheck=bounds} is set for
the compilation of the main program.
Note: In the future this may also include other forms of checking, e.g.,
checking substring references.
+@item @samp{do}
+Enable generation of run-time checks for invalid modification of loop
+iteration variables.
-@item fcheck-array-temporaries
-@opindex @code{fcheck-array-temporaries}
-@cindex checking array temporaries
-Warns at run time when for passing an actual argument a temporary array
-had to be generated. The information generated by this warning is
-sometimes useful in optimization, in order to avoid such temporaries.
+@item @samp{recursion}
+Enable generation of run-time checks for recursively called subroutines and
+functions which are not marked as recursive. See also @option{-frecursive}.
+@end table
-Note: The warning is only printed once per location.
+@item -fbounds-check
+@opindex @code{fbounds-check}
+@c Note: This option is also referred in gcc's manpage
+Deprecated alias for @option{-fcheck=bounds}.
+
+@item -fcheck-array-temporaries
+@opindex @code{fcheck-array-temporaries}
+Deprecated alias for @option{-fcheck=array-temps}.
@item -fmax-array-constructor=@var{n}
@opindex @code{fmax-array-constructor}
@@ -1303,7 +1330,7 @@ on the stack. This flag cannot be used together with
@item -finit-local-zero
@item -finit-integer=@var{n}
-@item -finit-real=@var{<zero|inf|-inf|nan>}
+@item -finit-real=@var{<zero|inf|-inf|nan|snan>}
@item -finit-logical=@var{<true|false>}
@item -finit-character=@var{n}
@opindex @code{finit-local-zero}
@@ -1317,7 +1344,7 @@ variables to zero, @code{LOGICAL} variables to false, and
@code{CHARACTER} variables to a string of null bytes. Finer-grained
initialization options are provided by the
@option{-finit-integer=@var{n}},
-@option{-finit-real=@var{<zero|inf|-inf|nan>}} (which also initializes
+@option{-finit-real=@var{<zero|inf|-inf|nan|snan>}} (which also initializes
the real and imaginary parts of local @code{COMPLEX} variables),
@option{-finit-logical=@var{<true|false>}}, and
@option{-finit-character=@var{n}} (where @var{n} is an ASCII character
@@ -1327,7 +1354,10 @@ type variables, nor do they initialize variables that appear in an
future releases).
Note that the @option{-finit-real=nan} option initializes @code{REAL}
-and @code{COMPLEX} variables with a quiet NaN.
+and @code{COMPLEX} variables with a quiet NaN. For a signalling NaN
+use @option{-finit-real=snan}; note, however, that compile-time
+optimizations may convert them into quiet NaN and that trapping
+needs to be enabled (e.g. via @option{-ffpe-trap}).
@item -falign-commons
@opindex @code{falign-commons}
diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
index e49ff76ee49..193604a2fe3 100644
--- a/gcc/fortran/lang.opt
+++ b/gcc/fortran/lang.opt
@@ -1,5 +1,5 @@
; Options for the Fortran 95 front end.
-; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
; Free Software Foundation, Inc.
;
; This file is part of GCC.
@@ -50,7 +50,7 @@ Fortran
I
Fortran Joined Separate
--I<directory> Add a directory for INCLUDE and MODULE searching
+; Documented in C
J
Fortran Joined Separate
@@ -90,7 +90,7 @@ Warn about truncated character expressions
Wconversion
Fortran Warning
-Warn about implicit conversion
+; Documented in C
Wimplicit-interface
Fortran Warning
@@ -134,7 +134,7 @@ Disable preprocessing
d
Fortran Joined
--d[DIMNU] Dump details about macro names and definitions during preprocessing
+; Documented in common.opt
falign-commons
Fortran
@@ -246,7 +246,7 @@ Fortran RejectNegative Joined UInteger
ffpe-trap=
Fortran RejectNegative JoinedOrMissing
--ffpe-trap=[..] Stop on following floating point exceptions
+-ffpe-trap=[...] Stop on following floating point exceptions
ffree-form
Fortran RejectNegative
@@ -310,7 +310,7 @@ Set default accessibility of module entities to PRIVATE.
fopenmp
Fortran
-Enable OpenMP (also sets frecursive)
+; Documented in C
fpack-derived
Fortran
@@ -318,7 +318,7 @@ Try to lay out derived types as compactly as possible
fpreprocessed
Fortran
-Treat the input file as preprocessed
+; Documented in C
frange-check
Fortran
@@ -340,6 +340,10 @@ frepack-arrays
Fortran
Copy array sections into a contiguous block on procedure entry
+fcheck=
+Fortran RejectNegative JoinedOrMissing
+-fcheck=[...] Specify which runtime checks are to be performed
+
fsecond-underscore
Fortran
Append a second underscore if the name already contains an underscore
diff --git a/gcc/fortran/libgfortran.h b/gcc/fortran/libgfortran.h
index 74bb9a92fcf..d7e254f3635 100644
--- a/gcc/fortran/libgfortran.h
+++ b/gcc/fortran/libgfortran.h
@@ -1,5 +1,5 @@
/* Header file to the Fortran front-end and runtime library
- Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -40,6 +40,15 @@ along with GCC; see the file COPYING3. If not see
#define GFC_FPE_PRECISION (1<<5)
+/* Bitmasks for the various runtime checks that can be enabled. */
+#define GFC_RTCHECK_BOUNDS (1<<0)
+#define GFC_RTCHECK_ARRAY_TEMPS (1<<1)
+#define GFC_RTCHECK_RECURSION (1<<2)
+#define GFC_RTCHECK_DO (1<<3)
+#define GFC_RTCHECK_ALL (GFC_RTCHECK_BOUNDS | GFC_RTCHECK_ARRAY_TEMPS \
+ | GFC_RTCHECK_RECURSION | GFC_RTCHECK_DO)
+
+
/* Possible values for the CONVERT I/O specifier. */
typedef enum
{
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index d5a9f54a76a..b5b79d03992 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -1700,6 +1700,7 @@ static const mstring binding_overriding[] =
{
minit ("OVERRIDABLE", 0),
minit ("NON_OVERRIDABLE", 1),
+ minit ("DEFERRED", 2),
minit (NULL, -1)
};
static const mstring binding_generic[] =
@@ -3205,6 +3206,7 @@ static void
mio_typebound_proc (gfc_typebound_proc** proc)
{
int flag;
+ int overriding_flag;
if (iomode == IO_INPUT)
{
@@ -3217,9 +3219,15 @@ mio_typebound_proc (gfc_typebound_proc** proc)
(*proc)->access = MIO_NAME (gfc_access) ((*proc)->access, access_types);
+ /* IO the NON_OVERRIDABLE/DEFERRED combination. */
+ gcc_assert (!((*proc)->deferred && (*proc)->non_overridable));
+ overriding_flag = ((*proc)->deferred << 1) | (*proc)->non_overridable;
+ overriding_flag = mio_name (overriding_flag, binding_overriding);
+ (*proc)->deferred = ((overriding_flag & 2) != 0);
+ (*proc)->non_overridable = ((overriding_flag & 1) != 0);
+ gcc_assert (!((*proc)->deferred && (*proc)->non_overridable));
+
(*proc)->nopass = mio_name ((*proc)->nopass, binding_passing);
- (*proc)->non_overridable = mio_name ((*proc)->non_overridable,
- binding_overriding);
(*proc)->is_generic = mio_name ((*proc)->is_generic, binding_generic);
if (iomode == IO_INPUT)
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index fd0357fd27e..17c577d38be 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -1,5 +1,5 @@
/* Parse and display command line options.
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Andy Vaught
@@ -108,7 +108,6 @@ gfc_init_options (unsigned int argc, const char **argv)
gfc_option.flag_backslash = 0;
gfc_option.flag_module_private = 0;
gfc_option.flag_backtrace = 0;
- gfc_option.flag_check_array_temporaries = 0;
gfc_option.flag_allow_leading_underscore = 0;
gfc_option.flag_dump_core = 0;
gfc_option.flag_external_blas = 0;
@@ -127,6 +126,7 @@ gfc_init_options (unsigned int argc, const char **argv)
gfc_option.flag_align_commons = 1;
gfc_option.fpe = 0;
+ gfc_option.rtcheck = 0;
/* Argument pointers cannot point to anything but their argument. */
flag_argument_noalias = 3;
@@ -241,6 +241,10 @@ gfc_post_options (const char **pfilename)
if (flag_whole_program)
gfc_fatal_error ("Option -fwhole-program is not supported for Fortran");
+ /* -fbounds-check is equivalent to -fcheck=bounds */
+ if (flag_bounds_check)
+ gfc_option.rtcheck |= GFC_RTCHECK_BOUNDS;
+
/* Verify the input file name. */
if (!filename || strcmp (filename, "-") == 0)
{
@@ -458,6 +462,43 @@ gfc_handle_fpe_trap_option (const char *arg)
}
+static void
+gfc_handle_runtime_check_option (const char *arg)
+{
+ int result, pos = 0, n;
+ static const char * const optname[] = { "all", "bounds", "array-temps",
+ "recursion", "do", NULL };
+ static const int optmask[] = { GFC_RTCHECK_ALL, GFC_RTCHECK_BOUNDS,
+ GFC_RTCHECK_ARRAY_TEMPS,
+ GFC_RTCHECK_RECURSION, GFC_RTCHECK_DO,
+ 0 };
+
+ while (*arg)
+ {
+ while (*arg == ',')
+ arg++;
+
+ while (arg[pos] && arg[pos] != ',')
+ pos++;
+
+ result = 0;
+ for (n = 0; optname[n] != NULL; n++)
+ {
+ if (optname[n] && strncmp (optname[n], arg, pos) == 0)
+ {
+ gfc_option.rtcheck |= optmask[n];
+ arg += pos;
+ pos = 0;
+ result = 1;
+ break;
+ }
+ }
+ if (!result)
+ gfc_fatal_error ("Argument to -fcheck is not valid: %s", arg);
+ }
+}
+
+
/* Handle command-line options. Returns 0 if unrecognized, 1 if
recognized and handled. */
@@ -557,7 +598,7 @@ gfc_handle_option (size_t scode, const char *arg, int value)
break;
case OPT_fcheck_array_temporaries:
- gfc_option.flag_check_array_temporaries = value;
+ gfc_option.rtcheck |= GFC_RTCHECK_ARRAY_TEMPS;
break;
case OPT_fdump_core:
@@ -727,6 +768,8 @@ gfc_handle_option (size_t scode, const char *arg, int value)
gfc_option.flag_init_real = GFC_INIT_REAL_ZERO;
else if (!strcasecmp (arg, "nan"))
gfc_option.flag_init_real = GFC_INIT_REAL_NAN;
+ else if (!strcasecmp (arg, "snan"))
+ gfc_option.flag_init_real = GFC_INIT_REAL_SNAN;
else if (!strcasecmp (arg, "inf"))
gfc_option.flag_init_real = GFC_INIT_REAL_INF;
else if (!strcasecmp (arg, "-inf"))
@@ -852,6 +895,11 @@ gfc_handle_option (size_t scode, const char *arg, int value)
case OPT_falign_commons:
gfc_option.flag_align_commons = value;
break;
+
+ case OPT_fcheck_:
+ gfc_handle_runtime_check_option (arg);
+ break;
+
}
return result;
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index 3e86a43d0b1..0800fc1ec68 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -1,5 +1,6 @@
/* Main parser.
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009
Free Software Foundation, Inc.
Contributed by Andy Vaught
@@ -1464,16 +1465,23 @@ accept_statement (gfc_statement st)
/* If the statement is the end of a block, lay down a special code
that allows a branch to the end of the block from within the
- construct. */
+ construct. IF and SELECT are treated differently from DO
+ (where EXEC_NOP is added inside the loop) for two
+ reasons:
+ 1. END DO has a meaning in the sense that after a GOTO to
+ it, the loop counter must be increased.
+ 2. IF blocks and SELECT blocks can consist of multiple
+ parallel blocks (IF ... ELSE IF ... ELSE ... END IF).
+ Putting the label before the END IF would make the jump
+ from, say, the ELSE IF block to the END IF illegal. */
case ST_ENDIF:
case ST_END_SELECT:
if (gfc_statement_label != NULL)
{
- new_st.op = EXEC_NOP;
+ new_st.op = EXEC_END_BLOCK;
add_statement ();
}
-
break;
/* The end-of-program unit statements do not get the special
@@ -1978,27 +1986,18 @@ endType:
/* Look for allocatable components. */
if (c->attr.allocatable
|| (c->ts.type == BT_DERIVED && c->ts.derived->attr.alloc_comp))
- {
- sym->attr.alloc_comp = 1;
- break;
- }
+ sym->attr.alloc_comp = 1;
/* Look for pointer components. */
if (c->attr.pointer
|| (c->ts.type == BT_DERIVED && c->ts.derived->attr.pointer_comp))
- {
- sym->attr.pointer_comp = 1;
- break;
- }
+ sym->attr.pointer_comp = 1;
/* Look for private components. */
if (sym->component_access == ACCESS_PRIVATE
|| c->attr.access == ACCESS_PRIVATE
|| (c->ts.type == BT_DERIVED && c->ts.derived->attr.private_comp))
- {
- sym->attr.private_comp = 1;
- break;
- }
+ sym->attr.private_comp = 1;
}
if (!seen_component)
@@ -2825,7 +2824,6 @@ check_do_closure (void)
if (p->ext.end_do_label == gfc_statement_label)
{
-
if (p == gfc_state_stack)
return 1;
@@ -2903,7 +2901,7 @@ loop:
name, but in that case we must have seen ST_ENDDO first).
We only complain about this in pedantic mode. */
if (gfc_current_block () != NULL)
- gfc_error_now ("named block DO at %L requires matching ENDDO name",
+ gfc_error_now ("Named block DO at %L requires matching ENDDO name",
&gfc_current_block()->declared_at);
break;
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 433f380868b..b79e4851ea3 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -43,11 +43,12 @@ seq_type;
typedef struct code_stack
{
- struct gfc_code *head, *current, *tail;
+ struct gfc_code *head, *current;
struct code_stack *prev;
/* This bitmap keeps track of the targets valid for a branch from
- inside this block. */
+ inside this block except for END {IF|SELECT}s of enclosing
+ blocks. */
bitmap reachable_labels;
}
code_stack;
@@ -4550,6 +4551,30 @@ update_compcall_arglist (gfc_expr* e)
}
+/* Check that the object a TBP is called on is valid, i.e. it must not be
+ of ABSTRACT type (as in subobject%abstract_parent%tbp()). */
+
+static gfc_try
+check_typebound_baseobject (gfc_expr* e)
+{
+ gfc_expr* base;
+
+ base = extract_compcall_passed_object (e);
+ if (!base)
+ return FAILURE;
+
+ gcc_assert (base->ts.type == BT_DERIVED);
+ if (base->ts.derived->attr.abstract)
+ {
+ gfc_error ("Base object for type-bound procedure call at %L is of"
+ " ABSTRACT type '%s'", &e->where, base->ts.derived->name);
+ return FAILURE;
+ }
+
+ return SUCCESS;
+}
+
+
/* Resolve a call to a type-bound procedure, either function or subroutine,
statically from the data in an EXPR_COMPCALL expression. The adapted
arglist and the target-procedure symtree are returned. */
@@ -4667,6 +4692,9 @@ resolve_typebound_call (gfc_code* c)
return FAILURE;
}
+ if (check_typebound_baseobject (c->expr) == FAILURE)
+ return FAILURE;
+
if (resolve_typebound_generic_call (c->expr) == FAILURE)
return FAILURE;
@@ -4703,6 +4731,9 @@ resolve_compcall (gfc_expr* e)
return FAILURE;
}
+ if (check_typebound_baseobject (e) == FAILURE)
+ return FAILURE;
+
if (resolve_typebound_generic_call (e) == FAILURE)
return FAILURE;
gcc_assert (!e->value.compcall.tbp->is_generic);
@@ -4918,6 +4949,26 @@ gfc_resolve_iterator (gfc_iterator *iter, bool real_ok)
|| iter->step->ts.type != iter->var->ts.type)
gfc_convert_type (iter->step, &iter->var->ts, 2);
+ if (iter->start->expr_type == EXPR_CONSTANT
+ && iter->end->expr_type == EXPR_CONSTANT
+ && iter->step->expr_type == EXPR_CONSTANT)
+ {
+ int sgn, cmp;
+ if (iter->start->ts.type == BT_INTEGER)
+ {
+ sgn = mpz_cmp_ui (iter->step->value.integer, 0);
+ cmp = mpz_cmp (iter->end->value.integer, iter->start->value.integer);
+ }
+ else
+ {
+ sgn = mpfr_sgn (iter->step->value.real);
+ cmp = mpfr_cmp (iter->end->value.real, iter->start->value.real);
+ }
+ if ((sgn > 0 && cmp < 0) || (sgn < 0 && cmp > 0))
+ gfc_warning ("DO loop at %L will be executed zero times",
+ &iter->step->where);
+ }
+
return SUCCESS;
}
@@ -5958,11 +6009,10 @@ resolve_transfer (gfc_code *code)
/*********** Toplevel code resolution subroutines ***********/
/* Find the set of labels that are reachable from this block. We also
- record the last statement in each block so that we don't have to do
- a linear search to find the END DO statements of the blocks. */
+ record the last statement in each block. */
static void
-reachable_labels (gfc_code *block)
+find_reachable_labels (gfc_code *block)
{
gfc_code *c;
@@ -5971,14 +6021,13 @@ reachable_labels (gfc_code *block)
cs_base->reachable_labels = bitmap_obstack_alloc (&labels_obstack);
- /* Collect labels in this block. */
+ /* Collect labels in this block. We don't keep those corresponding
+ to END {IF|SELECT}, these are checked in resolve_branch by going
+ up through the code_stack. */
for (c = block; c; c = c->next)
{
- if (c->here)
+ if (c->here && c->op != EXEC_END_BLOCK)
bitmap_set_bit (cs_base->reachable_labels, c->here->value);
-
- if (!c->next && cs_base->prev)
- cs_base->prev->tail = c;
}
/* Merge with labels from parent block. */
@@ -5990,7 +6039,7 @@ reachable_labels (gfc_code *block)
}
}
-/* Given a branch to a label and a namespace, if the branch is conforming.
+/* Given a branch to a label, see if the branch is conforming.
The code node describes where the branch is located. */
static void
@@ -6029,46 +6078,30 @@ resolve_branch (gfc_st_label *label, gfc_code *code)
branching statement. The hard work has been done by setting up
the bitmap reachable_labels. */
- if (!bitmap_bit_p (cs_base->reachable_labels, label->value))
- {
- /* The label is not in an enclosing block, so illegal. This was
- allowed in Fortran 66, so we allow it as extension. No
- further checks are necessary in this case. */
- gfc_notify_std (GFC_STD_LEGACY, "Label at %L is not in the same block "
- "as the GOTO statement at %L", &label->where,
- &code->loc);
- return;
- }
+ if (bitmap_bit_p (cs_base->reachable_labels, label->value))
+ return;
- /* Step four: Make sure that the branching target is legal if
- the statement is an END {SELECT,IF}. */
+ /* Step four: If we haven't found the label in the bitmap, it may
+ still be the label of the END of the enclosing block, in which
+ case we find it by going up the code_stack. */
for (stack = cs_base; stack; stack = stack->prev)
if (stack->current->next && stack->current->next->here == label)
break;
- if (stack && stack->current->next->op == EXEC_NOP)
+ if (stack)
{
- gfc_notify_std (GFC_STD_F95_DEL, "Deleted feature: GOTO at %L jumps to "
- "END of construct at %L", &code->loc,
- &stack->current->next->loc);
- return; /* We know this is not an END DO. */
+ gcc_assert (stack->current->next->op == EXEC_END_BLOCK);
+ return;
}
- /* Step five: Make sure that we're not jumping to the end of a DO
- loop from within the loop. */
-
- for (stack = cs_base; stack; stack = stack->prev)
- if ((stack->current->op == EXEC_DO
- || stack->current->op == EXEC_DO_WHILE)
- && stack->tail->here == label && stack->tail->op == EXEC_NOP)
- {
- gfc_notify_std (GFC_STD_F95_DEL, "Deleted feature: GOTO at %L jumps "
- "to END of construct at %L", &code->loc,
- &stack->tail->loc);
- return;
-
- }
+ /* The label is not in an enclosing block, so illegal. This was
+ allowed in Fortran 66, so we allow it as extension. No
+ further checks are necessary in this case. */
+ gfc_notify_std (GFC_STD_LEGACY, "Label at %L is not in the same block "
+ "as the GOTO statement at %L", &label->where,
+ &code->loc);
+ return;
}
@@ -6649,7 +6682,7 @@ resolve_code (gfc_code *code, gfc_namespace *ns)
frame.head = code;
cs_base = &frame;
- reachable_labels (code);
+ find_reachable_labels (code);
for (; code; code = code->next)
{
@@ -6707,6 +6740,7 @@ resolve_code (gfc_code *code, gfc_namespace *ns)
switch (code->op)
{
case EXEC_NOP:
+ case EXEC_END_BLOCK:
case EXEC_CYCLE:
case EXEC_PAUSE:
case EXEC_STOP:
@@ -7357,6 +7391,9 @@ build_default_init_expr (gfc_symbol *sym)
mpfr_init (init_expr->value.real);
switch (gfc_option.flag_init_real)
{
+ case GFC_INIT_REAL_SNAN:
+ init_expr->is_snan = 1;
+ /* Fall through. */
case GFC_INIT_REAL_NAN:
mpfr_set_nan (init_expr->value.real);
break;
@@ -7385,6 +7422,9 @@ build_default_init_expr (gfc_symbol *sym)
mpfr_init (init_expr->value.complex.i);
switch (gfc_option.flag_init_real)
{
+ case GFC_INIT_REAL_SNAN:
+ init_expr->is_snan = 1;
+ /* Fall through. */
case GFC_INIT_REAL_NAN:
mpfr_set_nan (init_expr->value.complex.r);
mpfr_set_nan (init_expr->value.complex.i);
@@ -8153,6 +8193,14 @@ check_typebound_override (gfc_symtree* proc, gfc_symtree* old)
return FAILURE;
}
+ /* It's an error to override a non-DEFERRED procedure with a DEFERRED one. */
+ if (!old->typebound->deferred && proc->typebound->deferred)
+ {
+ gfc_error ("'%s' at %L must not be DEFERRED as it overrides a"
+ " non-DEFERRED binding", proc->name, &where);
+ return FAILURE;
+ }
+
/* If the overridden binding is PURE, the overriding must be, too. */
if (old_target->attr.pure && !proc_target->attr.pure)
{
@@ -8495,11 +8543,11 @@ resolve_typebound_procedure (gfc_symtree* stree)
gcc_assert (stree->typebound->access != ACCESS_UNKNOWN);
/* It should be a module procedure or an external procedure with explicit
- interface. */
+ interface. For DEFERRED bindings, abstract interfaces are ok as well. */
if ((!proc->attr.subroutine && !proc->attr.function)
|| (proc->attr.proc != PROC_MODULE
&& proc->attr.if_source != IFSRC_IFBODY)
- || proc->attr.abstract)
+ || (proc->attr.abstract && !stree->typebound->deferred))
{
gfc_error ("'%s' must be a module procedure or an external procedure with"
" an explicit interface at %L", proc->name, &where);
@@ -8654,6 +8702,67 @@ add_dt_to_dt_list (gfc_symbol *derived)
}
+/* Ensure that a derived-type is really not abstract, meaning that every
+ inherited DEFERRED binding is overridden by a non-DEFERRED one. */
+
+static gfc_try
+ensure_not_abstract_walker (gfc_symbol* sub, gfc_symtree* st)
+{
+ if (!st)
+ return SUCCESS;
+
+ if (ensure_not_abstract_walker (sub, st->left) == FAILURE)
+ return FAILURE;
+ if (ensure_not_abstract_walker (sub, st->right) == FAILURE)
+ return FAILURE;
+
+ if (st->typebound && st->typebound->deferred)
+ {
+ gfc_symtree* overriding;
+ overriding = gfc_find_typebound_proc (sub, NULL, st->name, true);
+ gcc_assert (overriding && overriding->typebound);
+ if (overriding->typebound->deferred)
+ {
+ gfc_error ("Derived-type '%s' declared at %L must be ABSTRACT because"
+ " '%s' is DEFERRED and not overridden",
+ sub->name, &sub->declared_at, st->name);
+ return FAILURE;
+ }
+ }
+
+ return SUCCESS;
+}
+
+static gfc_try
+ensure_not_abstract (gfc_symbol* sub, gfc_symbol* ancestor)
+{
+ /* The algorithm used here is to recursively travel up the ancestry of sub
+ and for each ancestor-type, check all bindings. If any of them is
+ DEFERRED, look it up starting from sub and see if the found (overriding)
+ binding is not DEFERRED.
+ This is not the most efficient way to do this, but it should be ok and is
+ clearer than something sophisticated. */
+
+ gcc_assert (ancestor && ancestor->attr.abstract && !sub->attr.abstract);
+
+ /* Walk bindings of this ancestor. */
+ if (ancestor->f2k_derived)
+ {
+ gfc_try t;
+ t = ensure_not_abstract_walker (sub, ancestor->f2k_derived->sym_root);
+ if (t == FAILURE)
+ return FAILURE;
+ }
+
+ /* Find next ancestor type and recurse on it. */
+ ancestor = gfc_get_derived_super_type (ancestor);
+ if (ancestor)
+ return ensure_not_abstract (sub, ancestor);
+
+ return SUCCESS;
+}
+
+
/* Resolve the components of a derived type. */
static gfc_try
@@ -8781,6 +8890,12 @@ resolve_fl_derived (gfc_symbol *sym)
if (gfc_resolve_finalizers (sym) == FAILURE)
return FAILURE;
+ /* If this is a non-ABSTRACT type extending an ABSTRACT one, ensure that
+ all DEFERRED bindings are overridden. */
+ if (super_type && super_type->attr.abstract && !sym->attr.abstract
+ && ensure_not_abstract (sym, super_type) == FAILURE)
+ return FAILURE;
+
/* Add derived type to the derived type list. */
add_dt_to_dt_list (sym);
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index 6893a88c433..7be4671acfb 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -4541,6 +4541,7 @@ gfc_simplify_transfer (gfc_expr *source, gfc_expr *mold, gfc_expr *size)
/* Allocate the buffer to store the binary version of the source. */
buffer_size = MAX (source_size, result_size);
buffer = (unsigned char*)alloca (buffer_size);
+ memset (buffer, 0, buffer_size);
/* Now write source to the buffer. */
gfc_target_encode_expr (source, buffer, buffer_size);
diff --git a/gcc/fortran/st.c b/gcc/fortran/st.c
index 18f1b6d91c4..4f82050bcc0 100644
--- a/gcc/fortran/st.c
+++ b/gcc/fortran/st.c
@@ -1,5 +1,5 @@
/* Build executable statement trees.
- Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Andy Vaught
@@ -88,6 +88,7 @@ gfc_free_statement (gfc_code *p)
switch (p->op)
{
case EXEC_NOP:
+ case EXEC_END_BLOCK:
case EXEC_ASSIGN:
case EXEC_INIT_ASSIGN:
case EXEC_GOTO:
diff --git a/gcc/fortran/target-memory.c b/gcc/fortran/target-memory.c
index dc10b53d926..07d5e194355 100644
--- a/gcc/fortran/target-memory.c
+++ b/gcc/fortran/target-memory.c
@@ -158,7 +158,7 @@ encode_integer (int kind, mpz_t integer, unsigned char *buffer,
static int
encode_float (int kind, mpfr_t real, unsigned char *buffer, size_t buffer_size)
{
- return native_encode_expr (gfc_conv_mpfr_to_tree (real, kind), buffer,
+ return native_encode_expr (gfc_conv_mpfr_to_tree (real, kind, 0), buffer,
buffer_size);
}
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 6c623504af8..e7b52325495 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -1,5 +1,5 @@
/* Array translation routines
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Paul Brook <paul@nowt.org>
and Steven Bosscher <s.bosscher@student.tudelft.nl>
@@ -194,7 +194,7 @@ gfc_conv_descriptor_data_addr (tree desc)
gcc_assert (DATA_FIELD == 0);
t = fold_build3 (COMPONENT_REF, TREE_TYPE (field), desc, field, NULL_TREE);
- return build_fold_addr_expr (t);
+ return gfc_build_addr_expr (NULL_TREE, t);
}
tree
@@ -533,7 +533,7 @@ gfc_trans_allocate_array_storage (stmtblock_t * pre, stmtblock_t * post,
tmp = build_array_type (gfc_get_element_type (TREE_TYPE (desc)),
tmp);
tmp = gfc_create_var (tmp, "A");
- tmp = build_fold_addr_expr (tmp);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
gfc_conv_descriptor_data_set (pre, desc, tmp);
}
else
@@ -1058,7 +1058,7 @@ gfc_trans_array_ctor_element (stmtblock_t * pblock, tree desc,
gfc_trans_string_copy (&se->pre, esize, tmp, expr->ts.kind,
se->string_length, se->expr, expr->ts.kind);
}
- if (flag_bounds_check && !typespec_chararray_ctor)
+ if ((gfc_option.rtcheck & GFC_RTCHECK_BOUNDS) && !typespec_chararray_ctor)
{
if (first_len)
{
@@ -1281,8 +1281,8 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type,
tmp = gfc_conv_descriptor_data_get (desc);
tmp = build_fold_indirect_ref (tmp);
tmp = gfc_build_array_ref (tmp, *poffset, NULL);
- tmp = build_fold_addr_expr (tmp);
- init = build_fold_addr_expr (init);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
+ init = gfc_build_addr_expr (NULL_TREE, init);
size = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (type));
bound = build_int_cst (NULL_TREE, n * size);
@@ -1683,7 +1683,7 @@ gfc_trans_constant_array_constructor (gfc_loopinfo * loop,
info = &ss->data.info;
info->descriptor = tmp;
- info->data = build_fold_addr_expr (tmp);
+ info->data = gfc_build_addr_expr (NULL_TREE, tmp);
info->offset = gfc_index_zero_node;
for (i = 0; i < info->dimen; i++)
@@ -1761,8 +1761,8 @@ gfc_trans_array_constructor (gfc_loopinfo * loop, gfc_ss * ss, locus * where)
typespec_chararray_ctor = (ss->expr->ts.cl
&& ss->expr->ts.cl->length_from_typespec);
- if (flag_bounds_check && ss->expr->ts.type == BT_CHARACTER
- && !typespec_chararray_ctor)
+ if ((gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)
+ && ss->expr->ts.type == BT_CHARACTER && !typespec_chararray_ctor)
{
first_len_val = gfc_create_var (gfc_charlen_type_node, "len");
first_len = true;
@@ -1880,7 +1880,7 @@ gfc_trans_array_constructor (gfc_loopinfo * loop, gfc_ss * ss, locus * where)
gcc_assert (INTEGER_CST_P (offset));
#if 0
/* Disable bound checking for now because it's probably broken. */
- if (flag_bounds_check)
+ if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)
{
gcc_unreachable ();
}
@@ -2136,7 +2136,7 @@ gfc_conv_array_data (tree descriptor)
else
{
/* Descriptorless arrays. */
- return build_fold_addr_expr (descriptor);
+ return gfc_build_addr_expr (NULL_TREE, descriptor);
}
}
else
@@ -2233,7 +2233,7 @@ gfc_trans_array_bound_check (gfc_se * se, tree descriptor, tree index, int n,
char *msg;
const char * name = NULL;
- if (!flag_bounds_check)
+ if (!(gfc_option.rtcheck & GFC_RTCHECK_BOUNDS))
return index;
index = gfc_evaluate_now (index, &se->pre);
@@ -2469,7 +2469,7 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar, gfc_symbol * sym,
gfc_conv_expr_type (&indexse, ar->start[n], gfc_array_index_type);
gfc_add_block_to_block (&se->pre, &indexse.pre);
- if (flag_bounds_check)
+ if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)
{
/* Check array bounds. */
tree cond;
@@ -3015,7 +3015,7 @@ gfc_conv_ss_startstride (gfc_loopinfo * loop)
}
/* The rest is just runtime bound checking. */
- if (flag_bounds_check)
+ if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)
{
stmtblock_t block;
tree lbound, ubound;
@@ -4332,7 +4332,8 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body)
&& TREE_CODE (sym->ts.cl->backend_decl) == VAR_DECL)
gfc_conv_string_length (sym->ts.cl, NULL, &block);
- checkparm = (sym->as->type == AS_EXPLICIT && flag_bounds_check);
+ checkparm = (sym->as->type == AS_EXPLICIT
+ && (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS));
no_repack = !(GFC_DECL_PACKED_ARRAY (tmpdesc)
|| GFC_DECL_PARTIAL_PACKED_ARRAY (tmpdesc));
@@ -4702,47 +4703,102 @@ gfc_get_dataptr_offset (stmtblock_t *block, tree parm, tree desc, tree offset,
}
-/* gfc_conv_expr_descriptor needs the character length of elemental
- functions before the function is called so that the size of the
- temporary can be obtained. The only way to do this is to convert
- the expression, mapping onto the actual arguments. */
+/* gfc_conv_expr_descriptor needs the string length an expression
+ so that the size of the temporary can be obtained. This is done
+ by adding up the string lengths of all the elements in the
+ expression. Function with non-constant expressions have their
+ string lengths mapped onto the actual arguments using the
+ interface mapping machinery in trans-expr.c. */
static void
-get_elemental_fcn_charlen (gfc_expr *expr, gfc_se *se)
+get_array_charlen (gfc_expr *expr, gfc_se *se)
{
gfc_interface_mapping mapping;
gfc_formal_arglist *formal;
gfc_actual_arglist *arg;
gfc_se tse;
- formal = expr->symtree->n.sym->formal;
- arg = expr->value.function.actual;
- gfc_init_interface_mapping (&mapping);
-
- /* Set se = NULL in the calls to the interface mapping, to suppress any
- backend stuff. */
- for (; arg != NULL; arg = arg->next, formal = formal ? formal->next : NULL)
+ if (expr->ts.cl->length
+ && gfc_is_constant_expr (expr->ts.cl->length))
{
- if (!arg->expr)
- continue;
- if (formal->sym)
- gfc_add_interface_mapping (&mapping, formal->sym, NULL, arg->expr);
+ if (!expr->ts.cl->backend_decl)
+ gfc_conv_string_length (expr->ts.cl, expr, &se->pre);
+ return;
}
- gfc_init_se (&tse, NULL);
+ switch (expr->expr_type)
+ {
+ case EXPR_OP:
+ get_array_charlen (expr->value.op.op1, se);
+
+ /* For parentheses the expression ts.cl is identical. */
+ if (expr->value.op.op == INTRINSIC_PARENTHESES)
+ return;
+
+ expr->ts.cl->backend_decl =
+ gfc_create_var (gfc_charlen_type_node, "sln");
+
+ if (expr->value.op.op2)
+ {
+ get_array_charlen (expr->value.op.op2, se);
+
+ /* Add the string lengths and assign them to the expression
+ string length backend declaration. */
+ gfc_add_modify (&se->pre, expr->ts.cl->backend_decl,
+ fold_build2 (PLUS_EXPR, gfc_charlen_type_node,
+ expr->value.op.op1->ts.cl->backend_decl,
+ expr->value.op.op2->ts.cl->backend_decl));
+ }
+ else
+ gfc_add_modify (&se->pre, expr->ts.cl->backend_decl,
+ expr->value.op.op1->ts.cl->backend_decl);
+ break;
+
+ case EXPR_FUNCTION:
+ if (expr->value.function.esym == NULL
+ || expr->ts.cl->length->expr_type == EXPR_CONSTANT)
+ {
+ gfc_conv_string_length (expr->ts.cl, expr, &se->pre);
+ break;
+ }
+
+ /* Map expressions involving the dummy arguments onto the actual
+ argument expressions. */
+ gfc_init_interface_mapping (&mapping);
+ formal = expr->symtree->n.sym->formal;
+ arg = expr->value.function.actual;
+
+ /* Set se = NULL in the calls to the interface mapping, to suppress any
+ backend stuff. */
+ for (; arg != NULL; arg = arg->next, formal = formal ? formal->next : NULL)
+ {
+ if (!arg->expr)
+ continue;
+ if (formal->sym)
+ gfc_add_interface_mapping (&mapping, formal->sym, NULL, arg->expr);
+ }
- /* Build the expression for the character length and convert it. */
- gfc_apply_interface_mapping (&mapping, &tse, expr->ts.cl->length);
+ gfc_init_se (&tse, NULL);
- gfc_add_block_to_block (&se->pre, &tse.pre);
- gfc_add_block_to_block (&se->post, &tse.post);
- tse.expr = fold_convert (gfc_charlen_type_node, tse.expr);
- tse.expr = fold_build2 (MAX_EXPR, gfc_charlen_type_node, tse.expr,
- build_int_cst (gfc_charlen_type_node, 0));
- expr->ts.cl->backend_decl = tse.expr;
- gfc_free_interface_mapping (&mapping);
+ /* Build the expression for the character length and convert it. */
+ gfc_apply_interface_mapping (&mapping, &tse, expr->ts.cl->length);
+
+ gfc_add_block_to_block (&se->pre, &tse.pre);
+ gfc_add_block_to_block (&se->post, &tse.post);
+ tse.expr = fold_convert (gfc_charlen_type_node, tse.expr);
+ tse.expr = fold_build2 (MAX_EXPR, gfc_charlen_type_node, tse.expr,
+ build_int_cst (gfc_charlen_type_node, 0));
+ expr->ts.cl->backend_decl = tse.expr;
+ gfc_free_interface_mapping (&mapping);
+ break;
+
+ default:
+ gfc_conv_string_length (expr->ts.cl, expr, &se->pre);
+ break;
+ }
}
+
/* Convert an array for passing as an actual argument. Expressions and
vector subscripts are evaluated and stored in a temporary, which is then
passed. For whole arrays the descriptor is passed. For array sections
@@ -4836,7 +4892,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
{
/* We pass full arrays directly. This means that pointers and
allocatable arrays should also work. */
- se->expr = build_fold_addr_expr (desc);
+ se->expr = gfc_build_addr_expr (NULL_TREE, desc);
}
else
{
@@ -4867,7 +4923,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
/* For pointer assignments pass the descriptor directly. */
se->ss = secss;
- se->expr = build_fold_addr_expr (se->expr);
+ se->expr = gfc_build_addr_expr (NULL_TREE, se->expr);
gfc_conv_expr (se, expr);
return;
}
@@ -4878,7 +4934,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
need_tmp = 1;
if (expr->ts.type == BT_CHARACTER
&& expr->ts.cl->length->expr_type != EXPR_CONSTANT)
- get_elemental_fcn_charlen (expr, se);
+ get_array_charlen (expr, se);
info = NULL;
}
@@ -4938,8 +4994,9 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
loop.temp_ss->type = GFC_SS_TEMP;
loop.temp_ss->next = gfc_ss_terminator;
- if (expr->ts.type == BT_CHARACTER && !expr->ts.cl->backend_decl)
- gfc_conv_string_length (expr->ts.cl, expr, &se->pre);
+ if (expr->ts.type == BT_CHARACTER
+ && !expr->ts.cl->backend_decl)
+ get_array_charlen (expr, se);
loop.temp_ss->data.temp.type = gfc_typenode_for_spec (&expr->ts);
@@ -5189,7 +5246,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
{
/* Get a pointer to the new descriptor. */
if (se->want_pointer)
- se->expr = build_fold_addr_expr (desc);
+ se->expr = gfc_build_addr_expr (NULL_TREE, desc);
else
se->expr = desc;
}
@@ -5255,7 +5312,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77,
if (sym->attr.dummy || POINTER_TYPE_P (TREE_TYPE (tmp)))
se->expr = tmp;
else
- se->expr = build_fold_addr_expr (tmp);
+ se->expr = gfc_build_addr_expr (NULL_TREE, tmp);
return;
}
if (sym->attr.allocatable)
@@ -5275,7 +5332,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77,
{
/* Result of the enclosing function. */
gfc_conv_expr_descriptor (se, expr, ss);
- se->expr = build_fold_addr_expr (se->expr);
+ se->expr = gfc_build_addr_expr (NULL_TREE, se->expr);
if (g77 && TREE_TYPE (TREE_TYPE (se->expr)) != NULL_TREE
&& GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (TREE_TYPE (se->expr))))
@@ -5329,7 +5386,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77,
se->expr = ptr;
- if (gfc_option.flag_check_array_temporaries)
+ if (gfc_option.rtcheck & GFC_RTCHECK_ARRAY_TEMPS)
{
char * msg;
diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c
index 4db3512bc0e..569aa7ec15e 100644
--- a/gcc/fortran/trans-const.c
+++ b/gcc/fortran/trans-const.c
@@ -218,7 +218,7 @@ gfc_conv_tree_to_mpz (mpz_t i, tree source)
/* Converts a real constant into backend form. */
tree
-gfc_conv_mpfr_to_tree (mpfr_t f, int kind)
+gfc_conv_mpfr_to_tree (mpfr_t f, int kind, int is_snan)
{
tree type;
int n;
@@ -228,7 +228,11 @@ gfc_conv_mpfr_to_tree (mpfr_t f, int kind)
gcc_assert (gfc_real_kinds[n].radix == 2);
type = gfc_get_real_type (kind);
- real_from_mpfr (&real, f, type, GFC_RND_MODE);
+ if (mpfr_nan_p (f) && is_snan)
+ real_from_string (&real, "SNaN");
+ else
+ real_from_mpfr (&real, f, type, GFC_RND_MODE);
+
return build_real (type, real);
}
@@ -277,7 +281,7 @@ gfc_conv_constant_to_tree (gfc_expr * expr)
gfc_build_string_const (expr->representation.length,
expr->representation.string));
else
- return gfc_conv_mpfr_to_tree (expr->value.real, expr->ts.kind);
+ return gfc_conv_mpfr_to_tree (expr->value.real, expr->ts.kind, expr->is_snan);
case BT_LOGICAL:
if (expr->representation.string)
@@ -304,9 +308,9 @@ gfc_conv_constant_to_tree (gfc_expr * expr)
else
{
tree real = gfc_conv_mpfr_to_tree (expr->value.complex.r,
- expr->ts.kind);
+ expr->ts.kind, expr->is_snan);
tree imag = gfc_conv_mpfr_to_tree (expr->value.complex.i,
- expr->ts.kind);
+ expr->ts.kind, expr->is_snan);
return build_complex (gfc_typenode_for_spec (&expr->ts),
real, imag);
diff --git a/gcc/fortran/trans-const.h b/gcc/fortran/trans-const.h
index 2cba791c9c9..6cc71c5faad 100644
--- a/gcc/fortran/trans-const.h
+++ b/gcc/fortran/trans-const.h
@@ -24,7 +24,7 @@ tree gfc_conv_mpz_to_tree (mpz_t, int);
void gfc_conv_tree_to_mpz (mpz_t, tree);
/* Converts between REAL_CST and MPFR floating-point representations. */
-tree gfc_conv_mpfr_to_tree (mpfr_t, int);
+tree gfc_conv_mpfr_to_tree (mpfr_t, int, int);
void gfc_conv_tree_to_mpfr (mpfr_ptr, tree);
/* Build a tree for a constant. Must be an EXPR_CONSTANT gfc_expr.
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 38381f0631b..6cfc86a4bb7 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -3679,6 +3679,7 @@ gfc_generate_function_code (gfc_namespace * ns)
stmtblock_t block;
stmtblock_t body;
tree result;
+ tree recurcheckvar = NULL;
gfc_symbol *sym;
int rank;
@@ -3777,7 +3778,8 @@ gfc_generate_function_code (gfc_namespace * ns)
array = tree_cons (NULL_TREE,
build_int_cst (integer_type_node,
- flag_bounds_check), array);
+ (gfc_option.rtcheck
+ & GFC_RTCHECK_BOUNDS)), array);
array = tree_cons (NULL_TREE,
build_int_cst (integer_type_node,
@@ -3845,6 +3847,22 @@ gfc_generate_function_code (gfc_namespace * ns)
gfc_add_expr_to_block (&body, tmp);
}
+ if ((gfc_option.rtcheck & GFC_RTCHECK_RECURSION) && !sym->attr.recursive)
+ {
+ char * msg;
+
+ asprintf (&msg, "Recursive call to nonrecursive procedure '%s'",
+ sym->name);
+ recurcheckvar = gfc_create_var (boolean_type_node, "is_recursive");
+ TREE_STATIC (recurcheckvar) = 1;
+ DECL_INITIAL (recurcheckvar) = boolean_false_node;
+ gfc_add_expr_to_block (&block, recurcheckvar);
+ gfc_trans_runtime_check (true, false, recurcheckvar, &block,
+ &sym->declared_at, msg);
+ gfc_add_modify (&block, recurcheckvar, boolean_true_node);
+ gfc_free (msg);
+ }
+
if (TREE_TYPE (DECL_RESULT (fndecl)) != void_type_node
&& sym->attr.subroutine)
{
@@ -3923,6 +3941,9 @@ gfc_generate_function_code (gfc_namespace * ns)
else
gfc_add_expr_to_block (&block, tmp);
+ /* Reset recursion-check variable. */
+ if ((gfc_option.rtcheck & GFC_RTCHECK_RECURSION) && !sym->attr.recursive)
+ gfc_add_modify (&block, recurcheckvar, boolean_false_node);
/* Add all the decls we created during processing. */
decl = saved_function_decls;
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 8c869f977ca..91485d1d09c 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -164,7 +164,7 @@ gfc_conv_missing_dummy (gfc_se * se, gfc_expr * arg, gfc_typespec ts, int kind)
tmp = build3 (COND_EXPR, TREE_TYPE (tmp), present, tmp,
fold_convert (TREE_TYPE (tmp), integer_one_node));
tmp = gfc_evaluate_now (tmp, &se->pre);
- se->expr = build_fold_addr_expr (tmp);
+ se->expr = gfc_build_addr_expr (NULL_TREE, tmp);
}
else
{
@@ -398,7 +398,7 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind,
if (!CONSTANT_CLASS_P (end.expr) && !DECL_P (end.expr))
end.expr = gfc_evaluate_now (end.expr, &se->pre);
- if (flag_bounds_check)
+ if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)
{
tree nonempty = fold_build2 (LE_EXPR, boolean_type_node,
start.expr, end.expr);
@@ -603,7 +603,7 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr)
if (!sym->attr.dummy && !sym->attr.proc_pointer)
{
gcc_assert (TREE_CODE (se->expr) == FUNCTION_DECL);
- se->expr = build_fold_addr_expr (se->expr);
+ se->expr = gfc_build_addr_expr (NULL_TREE, se->expr);
}
return;
}
@@ -705,7 +705,7 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr)
if (expr->ts.type == BT_CHARACTER)
gfc_conv_string_parameter (se);
else
- se->expr = build_fold_addr_expr (se->expr);
+ se->expr = gfc_build_addr_expr (NULL_TREE, se->expr);
}
}
@@ -1519,7 +1519,7 @@ gfc_conv_function_val (gfc_se * se, gfc_symbol * sym)
if (!POINTER_TYPE_P (TREE_TYPE (tmp)))
{
gcc_assert (TREE_CODE (tmp) == FUNCTION_DECL);
- tmp = build_fold_addr_expr (tmp);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
}
}
se->expr = tmp;
@@ -1547,8 +1547,8 @@ gfc_conv_operator_assign (gfc_se *lse, gfc_se *rse, gfc_symbol *sym)
gfc_add_block_to_block (&block, &rse->pre);
/* Build the argument list for the call, including hidden string lengths. */
- args = gfc_chainon_list (NULL_TREE, build_fold_addr_expr (lse->expr));
- args = gfc_chainon_list (args, build_fold_addr_expr (rse->expr));
+ args = gfc_chainon_list (NULL_TREE, gfc_build_addr_expr (NULL_TREE, lse->expr));
+ args = gfc_chainon_list (args, gfc_build_addr_expr (NULL_TREE, rse->expr));
if (lse->string_length != NULL_TREE)
args = gfc_chainon_list (args, lse->string_length);
if (rse->string_length != NULL_TREE)
@@ -2371,7 +2371,7 @@ gfc_conv_subref_array_arg (gfc_se * parmse, gfc_expr * expr,
if (g77)
parmse->expr = gfc_conv_descriptor_data_get (parmse->expr);
else
- parmse->expr = build_fold_addr_expr (parmse->expr);
+ parmse->expr = gfc_build_addr_expr (NULL_TREE, parmse->expr);
return;
}
@@ -2666,7 +2666,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
&& fsym && fsym->attr.target)
{
gfc_conv_expr (&parmse, e);
- parmse.expr = build_fold_addr_expr (parmse.expr);
+ parmse.expr = gfc_build_addr_expr (NULL_TREE, parmse.expr);
}
else
{
@@ -2680,7 +2680,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
indirection. The null pointer already contains
this level of indirection. */
parm_kind = SCALAR_POINTER;
- parmse.expr = build_fold_addr_expr (parmse.expr);
+ parmse.expr = gfc_build_addr_expr (NULL_TREE, parmse.expr);
}
}
}
@@ -2881,7 +2881,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
/* Pass the temporary as the first argument. */
tmp = info->descriptor;
- tmp = build_fold_addr_expr (tmp);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
retargs = gfc_chainon_list (retargs, tmp);
}
else if (ts.type == BT_CHARACTER)
@@ -2897,7 +2897,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
var = gfc_create_var (type, "pstr");
/* Provide an address expression for the function arguments. */
- var = build_fold_addr_expr (var);
+ var = gfc_build_addr_expr (NULL_TREE, var);
}
else
var = gfc_conv_string_tmp (se, type, len);
@@ -2909,7 +2909,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
gcc_assert (gfc_option.flag_f2c && ts.type == BT_COMPLEX);
type = gfc_get_complex_type (ts.kind);
- var = build_fold_addr_expr (gfc_create_var (type, "cmplx"));
+ var = gfc_build_addr_expr (NULL_TREE, gfc_create_var (type, "cmplx"));
retargs = gfc_chainon_list (retargs, var);
}
@@ -2945,7 +2945,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
TREE_TYPE (sym->backend_decl)
= build_function_type (integer_type_node,
TYPE_ARG_TYPES (TREE_TYPE (sym->backend_decl)));
- se->expr = build_fold_addr_expr (sym->backend_decl);
+ se->expr = gfc_build_addr_expr (NULL_TREE, sym->backend_decl);
}
else
TREE_TYPE (TREE_TYPE (TREE_TYPE (se->expr))) = integer_type_node;
@@ -2988,7 +2988,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
{
if (sym->attr.dimension)
{
- if (flag_bounds_check)
+ if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)
{
/* Check the data pointer hasn't been modified. This would
happen in a function returning a pointer. */
@@ -4010,7 +4010,7 @@ gfc_conv_expr_reference (gfc_se * se, gfc_expr * expr)
gfc_add_block_to_block (&se->pre, &se->post);
/* Take the address of that value. */
- se->expr = build_fold_addr_expr (var);
+ se->expr = gfc_build_addr_expr (NULL_TREE, var);
}
@@ -4226,8 +4226,8 @@ gfc_trans_scalar_assign (gfc_se * lse, gfc_se * rse, gfc_typespec ts,
if (r_is_var)
{
cond = fold_build2 (EQ_EXPR, boolean_type_node,
- build_fold_addr_expr (lse->expr),
- build_fold_addr_expr (rse->expr));
+ gfc_build_addr_expr (NULL_TREE, lse->expr),
+ gfc_build_addr_expr (NULL_TREE, rse->expr));
cond = gfc_evaluate_now (cond, &lse->pre);
}
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index c0ffc14b720..c2525bfa68d 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -488,11 +488,11 @@ gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum rounding_mode op)
mpfr_init (huge);
n = gfc_validate_kind (BT_INTEGER, kind, false);
mpfr_set_z (huge, gfc_integer_kinds[n].huge, GFC_RND_MODE);
- tmp = gfc_conv_mpfr_to_tree (huge, kind);
+ tmp = gfc_conv_mpfr_to_tree (huge, kind, 0);
cond = fold_build2 (LT_EXPR, boolean_type_node, arg[0], tmp);
mpfr_neg (huge, huge, GFC_RND_MODE);
- tmp = gfc_conv_mpfr_to_tree (huge, kind);
+ tmp = gfc_conv_mpfr_to_tree (huge, kind, 0);
tmp = fold_build2 (GT_EXPR, boolean_type_node, arg[0], tmp);
cond = fold_build2 (TRUTH_AND_EXPR, boolean_type_node, cond, tmp);
itype = gfc_get_int_type (kind);
@@ -759,7 +759,7 @@ gfc_trans_same_strlen_check (const char* intr_name, locus* where,
tree name;
/* If bounds-checking is disabled, do nothing. */
- if (!flag_bounds_check)
+ if (!(gfc_option.rtcheck & GFC_RTCHECK_BOUNDS))
return;
/* Compare the two string lengths. */
@@ -807,7 +807,7 @@ gfc_conv_intrinsic_exponent (gfc_se *se, gfc_expr *expr)
res = gfc_create_var (integer_type_node, NULL);
tmp = build_call_expr (built_in_decls[frexp], 2, arg,
- build_fold_addr_expr (res));
+ gfc_build_addr_expr (NULL_TREE, res));
gfc_add_expr_to_block (&se->pre, tmp);
type = gfc_typenode_for_spec (&expr->ts);
@@ -885,7 +885,7 @@ gfc_conv_intrinsic_bound (gfc_se * se, gfc_expr * expr, int upper)
}
else
{
- if (flag_bounds_check)
+ if (gfc_option.rtcheck & GFC_RTCHECK_BOUNDS)
{
bound = gfc_evaluate_now (bound, &se->pre);
cond = fold_build2 (LT_EXPR, boolean_type_node,
@@ -1197,11 +1197,11 @@ gfc_conv_intrinsic_mod (gfc_se * se, gfc_expr * expr, int modulo)
ikind = gfc_max_integer_kind;
}
mpfr_set_z (huge, gfc_integer_kinds[n].huge, GFC_RND_MODE);
- test = gfc_conv_mpfr_to_tree (huge, expr->ts.kind);
+ test = gfc_conv_mpfr_to_tree (huge, expr->ts.kind, 0);
test2 = fold_build2 (LT_EXPR, boolean_type_node, tmp, test);
mpfr_neg (huge, huge, GFC_RND_MODE);
- test = gfc_conv_mpfr_to_tree (huge, expr->ts.kind);
+ test = gfc_conv_mpfr_to_tree (huge, expr->ts.kind, 0);
test = fold_build2 (GT_EXPR, boolean_type_node, tmp, test);
test2 = fold_build2 (TRUTH_AND_EXPR, boolean_type_node, test, test2);
@@ -1375,8 +1375,8 @@ gfc_conv_intrinsic_ctime (gfc_se * se, gfc_expr * expr)
len = gfc_create_var (gfc_get_int_type (8), "len");
gfc_conv_intrinsic_function_args (se, expr, &args[2], num_args - 2);
- args[0] = build_fold_addr_expr (var);
- args[1] = build_fold_addr_expr (len);
+ args[0] = gfc_build_addr_expr (NULL_TREE, var);
+ args[1] = gfc_build_addr_expr (NULL_TREE, len);
fndecl = build_addr (gfor_fndecl_ctime, current_function_decl);
tmp = build_call_array (TREE_TYPE (TREE_TYPE (gfor_fndecl_ctime)),
@@ -1413,8 +1413,8 @@ gfc_conv_intrinsic_fdate (gfc_se * se, gfc_expr * expr)
len = gfc_create_var (gfc_get_int_type (4), "len");
gfc_conv_intrinsic_function_args (se, expr, &args[2], num_args - 2);
- args[0] = build_fold_addr_expr (var);
- args[1] = build_fold_addr_expr (len);
+ args[0] = gfc_build_addr_expr (NULL_TREE, var);
+ args[1] = gfc_build_addr_expr (NULL_TREE, len);
fndecl = build_addr (gfor_fndecl_fdate, current_function_decl);
tmp = build_call_array (TREE_TYPE (TREE_TYPE (gfor_fndecl_fdate)),
@@ -1453,8 +1453,8 @@ gfc_conv_intrinsic_ttynam (gfc_se * se, gfc_expr * expr)
len = gfc_create_var (gfc_get_int_type (4), "len");
gfc_conv_intrinsic_function_args (se, expr, &args[2], num_args - 2);
- args[0] = build_fold_addr_expr (var);
- args[1] = build_fold_addr_expr (len);
+ args[0] = gfc_build_addr_expr (NULL_TREE, var);
+ args[1] = gfc_build_addr_expr (NULL_TREE, len);
fndecl = build_addr (gfor_fndecl_ttynam, current_function_decl);
tmp = build_call_array (TREE_TYPE (TREE_TYPE (gfor_fndecl_ttynam)),
@@ -1577,7 +1577,7 @@ gfc_conv_intrinsic_minmax_char (gfc_se * se, gfc_expr * expr, int op)
/* Create the result variables. */
len = gfc_create_var (gfc_charlen_type_node, "len");
- args[0] = build_fold_addr_expr (len);
+ args[0] = gfc_build_addr_expr (NULL_TREE, len);
var = gfc_create_var (gfc_get_pchar_type (expr->ts.kind), "pstr");
args[1] = gfc_build_addr_expr (ppvoid_type_node, var);
args[2] = build_int_cst (NULL_TREE, op);
@@ -2163,7 +2163,8 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, int op)
switch (arrayexpr->ts.type)
{
case BT_REAL:
- tmp = gfc_conv_mpfr_to_tree (gfc_real_kinds[n].huge, arrayexpr->ts.kind);
+ tmp = gfc_conv_mpfr_to_tree (gfc_real_kinds[n].huge,
+ arrayexpr->ts.kind, 0);
break;
case BT_INTEGER:
@@ -2342,7 +2343,7 @@ gfc_conv_intrinsic_minmaxval (gfc_se * se, gfc_expr * expr, int op)
switch (expr->ts.type)
{
case BT_REAL:
- tmp = gfc_conv_mpfr_to_tree (gfc_real_kinds[n].huge, expr->ts.kind);
+ tmp = gfc_conv_mpfr_to_tree (gfc_real_kinds[n].huge, expr->ts.kind, 0);
break;
case BT_INTEGER:
@@ -3123,7 +3124,7 @@ gfc_conv_intrinsic_fraction (gfc_se * se, gfc_expr * expr)
tmp = gfc_create_var (integer_type_node, NULL);
se->expr = build_call_expr (built_in_decls[frexp], 2,
fold_convert (type, arg),
- build_fold_addr_expr (tmp));
+ gfc_build_addr_expr (NULL_TREE, tmp));
se->expr = fold_convert (type, se->expr);
}
@@ -3199,7 +3200,7 @@ gfc_conv_intrinsic_spacing (gfc_se * se, gfc_expr * expr)
k = gfc_validate_kind (BT_REAL, expr->ts.kind, false);
prec = build_int_cst (NULL_TREE, gfc_real_kinds[k].digits);
emin = build_int_cst (NULL_TREE, gfc_real_kinds[k].min_exponent - 1);
- tiny = gfc_conv_mpfr_to_tree (gfc_real_kinds[k].tiny, expr->ts.kind);
+ tiny = gfc_conv_mpfr_to_tree (gfc_real_kinds[k].tiny, expr->ts.kind, 0);
switch (expr->ts.kind)
{
@@ -3231,7 +3232,7 @@ gfc_conv_intrinsic_spacing (gfc_se * se, gfc_expr * expr)
/* Build the block for s /= 0. */
gfc_start_block (&block);
tmp = build_call_expr (built_in_decls[frexp], 2, arg,
- build_fold_addr_expr (e));
+ gfc_build_addr_expr (NULL_TREE, e));
gfc_add_expr_to_block (&block, tmp);
tmp = fold_build2 (MINUS_EXPR, integer_type_node, e, prec);
@@ -3309,7 +3310,7 @@ gfc_conv_intrinsic_rrspacing (gfc_se * se, gfc_expr * expr)
gfc_start_block (&block);
tmp = build_call_expr (built_in_decls[frexp], 2, arg,
- build_fold_addr_expr (e));
+ gfc_build_addr_expr (NULL_TREE, e));
gfc_add_expr_to_block (&block, tmp);
tmp = fold_build2 (MINUS_EXPR, integer_type_node,
@@ -3392,7 +3393,7 @@ gfc_conv_intrinsic_set_exponent (gfc_se * se, gfc_expr * expr)
tmp = gfc_create_var (integer_type_node, NULL);
tmp = build_call_expr (built_in_decls[frexp], 2,
fold_convert (type, args[0]),
- build_fold_addr_expr (tmp));
+ gfc_build_addr_expr (NULL_TREE, tmp));
se->expr = build_call_expr (built_in_decls[scalbn], 2, tmp,
fold_convert (integer_type_node, args[1]));
se->expr = fold_convert (type, se->expr);
@@ -3712,7 +3713,7 @@ gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr)
if (arg->expr->expr_type == EXPR_VARIABLE
&& arg->expr->ref->u.ar.type != AR_FULL)
{
- tmp = build_fold_addr_expr (argse.expr);
+ tmp = gfc_build_addr_expr (NULL_TREE, argse.expr);
if (gfc_option.warn_array_temp)
gfc_warning ("Creating array temporary at %L", &expr->where);
@@ -3953,7 +3954,7 @@ scalar_transfer:
ptr = convert (build_pointer_type (mold_type), source);
/* Use memcpy to do the transfer. */
- tmp = build_fold_addr_expr (tmpdecl);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmpdecl);
tmp = build_call_expr (built_in_decls[BUILT_IN_MEMCPY], 3,
fold_convert (pvoid_type_node, tmp),
fold_convert (pvoid_type_node, ptr),
@@ -4126,7 +4127,7 @@ gfc_conv_intrinsic_si_kind (gfc_se *se, gfc_expr *expr)
/* The argument to SELECTED_INT_KIND is INTEGER(4). */
type = gfc_get_int_type (4);
- arg = build_fold_addr_expr (fold_convert (type, arg));
+ arg = gfc_build_addr_expr (NULL_TREE, fold_convert (type, arg));
/* Convert it to the required type. */
type = gfc_typenode_for_spec (&expr->ts);
@@ -4202,7 +4203,7 @@ gfc_conv_intrinsic_trim (gfc_se * se, gfc_expr * expr)
len = gfc_create_var (gfc_get_int_type (4), "len");
gfc_conv_intrinsic_function_args (se, expr, &args[2], num_args - 2);
- args[0] = build_fold_addr_expr (len);
+ args[0] = gfc_build_addr_expr (NULL_TREE, len);
args[1] = addr;
if (expr->ts.kind == 1)
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index b5749ec89ac..40cb1f28d43 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -239,7 +239,7 @@ gfc_trans_io_runtime_check (tree cond, tree var, int error_code,
/* The code to generate the error. */
gfc_start_block (&block);
- arg1 = build_fold_addr_expr (var);
+ arg1 = gfc_build_addr_expr (NULL_TREE, var);
arg2 = build_int_cst (integer_type_node, error_code),
@@ -530,7 +530,7 @@ set_parameter_ref (stmtblock_t *block, stmtblock_t *postblock,
if (TYPE_MODE (TREE_TYPE (se.expr))
== TYPE_MODE (TREE_TYPE (TREE_TYPE (p->field))))
{
- addr = convert (TREE_TYPE (p->field), build_fold_addr_expr (se.expr));
+ addr = convert (TREE_TYPE (p->field), gfc_build_addr_expr (NULL_TREE, se.expr));
/* If this is for the iostat variable initialize the
user variable to LIBERROR_OK which is zero. */
@@ -552,7 +552,7 @@ set_parameter_ref (stmtblock_t *block, stmtblock_t *postblock,
gfc_add_modify (block, tmpvar,
build_int_cst (TREE_TYPE (tmpvar), LIBERROR_OK));
- addr = build_fold_addr_expr (tmpvar);
+ addr = gfc_build_addr_expr (NULL_TREE, tmpvar);
/* After the I/O operation, we set the variable from the temporary. */
tmp = convert (TREE_TYPE (se.expr), tmpvar);
gfc_add_modify (postblock, se.expr, tmp);
@@ -621,7 +621,7 @@ gfc_convert_array_to_string (gfc_se * se, gfc_expr * e)
{
size = fold_build2 (MINUS_EXPR, gfc_array_index_type, size,
TREE_OPERAND (se->expr, 1));
- se->expr = build_fold_addr_expr (se->expr);
+ se->expr = gfc_build_addr_expr (NULL_TREE, se->expr);
}
tmp = TYPE_SIZE_UNIT (gfc_get_element_type (type));
@@ -966,7 +966,7 @@ gfc_trans_open (gfc_code * code)
else
set_parameter_const (&block, var, IOPARM_common_unit, 0);
- tmp = build_fold_addr_expr (var);
+ tmp = gfc_build_addr_expr (NULL_TREE, var);
tmp = build_call_expr (iocall[IOCALL_OPEN], 1, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -1018,7 +1018,7 @@ gfc_trans_close (gfc_code * code)
else
set_parameter_const (&block, var, IOPARM_common_unit, 0);
- tmp = build_fold_addr_expr (var);
+ tmp = gfc_build_addr_expr (NULL_TREE, var);
tmp = build_call_expr (iocall[IOCALL_CLOSE], 1, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -1068,7 +1068,7 @@ build_filepos (tree function, gfc_code * code)
else
set_parameter_const (&block, var, IOPARM_common_unit, 0);
- tmp = build_fold_addr_expr (var);
+ tmp = gfc_build_addr_expr (NULL_TREE, var);
tmp = build_call_expr (function, 1, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -1325,7 +1325,7 @@ gfc_trans_inquire (gfc_code * code)
else
set_parameter_const (&block, var, IOPARM_common_unit, 0);
- tmp = build_fold_addr_expr (var);
+ tmp = gfc_build_addr_expr (NULL_TREE, var);
tmp = build_call_expr (iocall[IOCALL_INQUIRE], 1, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -1374,7 +1374,7 @@ gfc_trans_wait (gfc_code * code)
if (p->unit)
set_parameter_value (&block, var, IOPARM_common_unit, p->unit);
- tmp = build_fold_addr_expr (var);
+ tmp = gfc_build_addr_expr (NULL_TREE, var);
tmp = build_call_expr (iocall[IOCALL_WAIT], 1, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -1488,7 +1488,7 @@ nml_get_addr_expr (gfc_symbol * sym, gfc_component * c,
/* Now build the address expression. */
- tmp = build_fold_addr_expr (tmp);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
/* If scalar dummy, resolve indirect reference now. */
@@ -1581,7 +1581,7 @@ transfer_namelist_element (stmtblock_t * block, const char * var_name,
The call for the scalar part transfers:
(address, name, type, kind or string_length, dtype) */
- dt_parm_addr = build_fold_addr_expr (dt_parm);
+ dt_parm_addr = gfc_build_addr_expr (NULL_TREE, dt_parm);
if (ts->type == BT_CHARACTER)
tmp = ts->cl->backend_decl;
@@ -1791,7 +1791,7 @@ build_dt (tree function, gfc_code * code)
else
set_parameter_const (&block, var, IOPARM_common_flags, mask);
- tmp = build_fold_addr_expr (var);
+ tmp = gfc_build_addr_expr (NULL_TREE, var);
tmp = build_call_expr (function, 1, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -1871,7 +1871,7 @@ gfc_trans_dt_end (gfc_code * code)
gcc_unreachable ();
}
- tmp = build_fold_addr_expr (dt_parm);
+ tmp = gfc_build_addr_expr (NULL_TREE, dt_parm);
tmp = build_call_expr (function, 1, tmp);
gfc_add_expr_to_block (&block, tmp);
gfc_add_block_to_block (&block, dt_post_end_block);
@@ -1955,7 +1955,7 @@ transfer_array_component (tree expr, gfc_component * cm, locus * where)
/* Now se.expr contains an element of the array. Take the address and pass
it to the IO routines. */
- tmp = build_fold_addr_expr (se.expr);
+ tmp = gfc_build_addr_expr (NULL_TREE, se.expr);
transfer_expr (&se, &cm->ts, tmp, NULL);
/* We are done now with the loop body. Wrap up the scalarizer and
@@ -2053,7 +2053,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr, gfc_code * code)
}
arg3 = build_int_cst (NULL_TREE, kind);
function = iocall[IOCALL_X_CHARACTER_WIDE];
- tmp = build_fold_addr_expr (dt_parm);
+ tmp = gfc_build_addr_expr (NULL_TREE, dt_parm);
tmp = build_call_expr (function, 4, tmp, addr_expr, arg2, arg3);
gfc_add_expr_to_block (&se->pre, tmp);
gfc_add_block_to_block (&se->pre, &se->post);
@@ -2093,7 +2093,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr, gfc_code * code)
else
{
if (!c->attr.pointer)
- tmp = build_fold_addr_expr (tmp);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
transfer_expr (se, &c->ts, tmp, code);
}
}
@@ -2103,7 +2103,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr, gfc_code * code)
internal_error ("Bad IO basetype (%d)", ts->type);
}
- tmp = build_fold_addr_expr (dt_parm);
+ tmp = gfc_build_addr_expr (NULL_TREE, dt_parm);
tmp = build_call_expr (function, 3, tmp, addr_expr, arg2);
gfc_add_expr_to_block (&se->pre, tmp);
gfc_add_block_to_block (&se->pre, &se->post);
@@ -2126,7 +2126,7 @@ transfer_array_desc (gfc_se * se, gfc_typespec * ts, tree addr_expr)
kind_arg = build_int_cst (NULL_TREE, ts->kind);
- tmp = build_fold_addr_expr (dt_parm);
+ tmp = gfc_build_addr_expr (NULL_TREE, dt_parm);
tmp = build_call_expr (iocall[IOCALL_X_ARRAY], 4,
tmp, addr_expr, kind_arg, charlen_arg);
gfc_add_expr_to_block (&se->pre, tmp);
@@ -2198,7 +2198,7 @@ gfc_trans_transfer (gfc_code * code)
{
/* Get the descriptor. */
gfc_conv_expr_descriptor (&se, expr, ss);
- tmp = build_fold_addr_expr (se.expr);
+ tmp = gfc_build_addr_expr (NULL_TREE, se.expr);
}
transfer_array_desc (&se, &expr->ts, tmp);
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 42f0ac438ab..0e51bdacc43 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -761,6 +761,7 @@ gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar,
tree type;
tree cond;
tree tmp;
+ tree saved_dovar = NULL;
tree cycle_label;
tree exit_label;
@@ -768,6 +769,13 @@ gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar,
/* Initialize the DO variable: dovar = from. */
gfc_add_modify (pblock, dovar, from);
+
+ /* Save value for do-tinkering checking. */
+ if (gfc_option.rtcheck & GFC_RTCHECK_DO)
+ {
+ saved_dovar = gfc_create_var (type, ".saved_dovar");
+ gfc_add_modify (pblock, saved_dovar, dovar);
+ }
/* Cycle and exit statements are implemented with gotos. */
cycle_label = gfc_build_label_decl (NULL_TREE);
@@ -790,6 +798,14 @@ gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar,
gfc_add_expr_to_block (&body, tmp);
}
+ /* Check whether someone has modified the loop variable. */
+ if (gfc_option.rtcheck & GFC_RTCHECK_DO)
+ {
+ tmp = fold_build2 (NE_EXPR, boolean_type_node, dovar, saved_dovar);
+ gfc_trans_runtime_check (true, false, tmp, &body, &code->loc,
+ "Loop variable has been modified");
+ }
+
/* Evaluate the loop condition. */
cond = fold_build2 (EQ_EXPR, boolean_type_node, dovar, to);
cond = gfc_evaluate_now (cond, &body);
@@ -798,6 +814,9 @@ gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar,
tmp = fold_build2 (PLUS_EXPR, type, dovar, step);
gfc_add_modify (&body, dovar, tmp);
+ if (gfc_option.rtcheck & GFC_RTCHECK_DO)
+ gfc_add_modify (&body, saved_dovar, dovar);
+
/* The loop exit. */
tmp = build1_v (GOTO_EXPR, exit_label);
TREE_USED (exit_label) = 1;
@@ -864,6 +883,7 @@ gfc_trans_do (gfc_code * code)
{
gfc_se se;
tree dovar;
+ tree saved_dovar = NULL;
tree from;
tree to;
tree step;
@@ -902,6 +922,14 @@ gfc_trans_do (gfc_code * code)
gfc_add_block_to_block (&block, &se.pre);
step = gfc_evaluate_now (se.expr, &block);
+ if (gfc_option.rtcheck & GFC_RTCHECK_DO)
+ {
+ tmp = fold_build2 (EQ_EXPR, boolean_type_node, step,
+ fold_convert (type, integer_zero_node));
+ gfc_trans_runtime_check (true, false, tmp, &block, &code->loc,
+ "DO step value is zero");
+ }
+
/* Special case simple loops. */
if (TREE_CODE (type) == INTEGER_TYPE
&& (integer_onep (step)
@@ -925,6 +953,13 @@ gfc_trans_do (gfc_code * code)
/* Initialize the DO variable: dovar = from. */
gfc_add_modify (&block, dovar, from);
+ /* Save value for do-tinkering checking. */
+ if (gfc_option.rtcheck & GFC_RTCHECK_DO)
+ {
+ saved_dovar = gfc_create_var (type, ".saved_dovar");
+ gfc_add_modify (&block, saved_dovar, dovar);
+ }
+
/* Initialize loop count and jump to exit label if the loop is empty.
This code is executed before we enter the loop body. We generate:
if (step > 0)
@@ -1011,10 +1046,21 @@ gfc_trans_do (gfc_code * code)
gfc_add_expr_to_block (&body, tmp);
}
+ /* Check whether someone has modified the loop variable. */
+ if (gfc_option.rtcheck & GFC_RTCHECK_DO)
+ {
+ tmp = fold_build2 (NE_EXPR, boolean_type_node, dovar, saved_dovar);
+ gfc_trans_runtime_check (true, false, tmp, &body, &code->loc,
+ "Loop variable has been modified");
+ }
+
/* Increment the loop variable. */
tmp = fold_build2 (PLUS_EXPR, type, dovar, step);
gfc_add_modify (&body, dovar, tmp);
+ if (gfc_option.rtcheck & GFC_RTCHECK_DO)
+ gfc_add_modify (&body, saved_dovar, dovar);
+
/* End with the loop condition. Loop until countm1 == 0. */
cond = fold_build2 (EQ_EXPR, boolean_type_node, countm1,
build_int_cst (utype, 0));
@@ -2258,10 +2304,10 @@ compute_inner_temp_size (gfc_expr *expr1, gfc_expr *expr2,
loop.array_parameter = 1;
/* Calculate the bounds of the scalarization. */
- save_flag = flag_bounds_check;
- flag_bounds_check = 0;
+ save_flag = gfc_option.rtcheck;
+ gfc_option.rtcheck &= !GFC_RTCHECK_BOUNDS;
gfc_conv_ss_startstride (&loop);
- flag_bounds_check = save_flag;
+ gfc_option.rtcheck = save_flag;
gfc_conv_loop_setup (&loop, &expr2->where);
/* Figure out how many elements we need. */
@@ -3893,7 +3939,7 @@ gfc_trans_allocate (gfc_code * code)
tree gfc_int4_type_node = gfc_get_int_type (4);
stat = gfc_create_var (gfc_int4_type_node, "stat");
- pstat = build_fold_addr_expr (stat);
+ pstat = gfc_build_addr_expr (NULL_TREE, stat);
error_label = gfc_build_label_decl (NULL_TREE);
TREE_USED (error_label) = 1;
@@ -3999,11 +4045,11 @@ gfc_trans_deallocate (gfc_code * code)
/* Variable used with the library call. */
stat = gfc_create_var (gfc_int4_type_node, "stat");
- pstat = build_fold_addr_expr (stat);
+ pstat = gfc_build_addr_expr (NULL_TREE, stat);
/* Running total of possible deallocation failures. */
astat = gfc_create_var (gfc_int4_type_node, "astat");
- apstat = build_fold_addr_expr (astat);
+ apstat = gfc_build_addr_expr (NULL_TREE, astat);
/* Initialize astat to 0. */
gfc_add_modify (&block, astat, build_int_cst (TREE_TYPE (astat), 0));
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 628c2a08346..827f54eaa20 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -1,6 +1,6 @@
/* Code translation -- generate GCC trees from gfc_code.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
- Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
+ Software Foundation, Inc.
Contributed by Paul Brook
This file is part of GCC.
@@ -293,8 +293,9 @@ gfc_build_addr_expr (tree type, tree t)
}
else
{
- if (DECL_P (t))
- TREE_ADDRESSABLE (t) = 1;
+ tree base = get_base_address (t);
+ if (base && DECL_P (base))
+ TREE_ADDRESSABLE (base) = 1;
t = fold_build1 (ADDR_EXPR, natural_type, t);
}
@@ -1054,6 +1055,7 @@ gfc_trans_code (gfc_code * code)
switch (code->op)
{
case EXEC_NOP:
+ case EXEC_END_BLOCK:
res = NULL_TREE;
break;
diff --git a/gcc/function.c b/gcc/function.c
index 471b91f8eb5..e8d99015e4d 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -458,8 +458,6 @@ struct temp_slot GTY(())
struct temp_slot *prev;
/* The rtx to used to reference the slot. */
rtx slot;
- /* The alignment (in bits) of the slot. */
- unsigned int align;
/* The size, in units, of the slot. */
HOST_WIDE_INT size;
/* The type of the object in the slot, or zero if it doesn't correspond
@@ -467,6 +465,8 @@ struct temp_slot GTY(())
It can be reused if objects of the type of the new slot will always
conflict with objects of the type of the old slot. */
tree type;
+ /* The alignment (in bits) of the slot. */
+ unsigned int align;
/* Nonzero if this temporary is currently in use. */
char in_use;
/* Nonzero if this temporary has its address taken. */
@@ -1942,7 +1942,28 @@ use_register_for_decl (const_tree decl)
if (DECL_IGNORED_P (decl))
return true;
- return (optimize || DECL_REGISTER (decl));
+ if (optimize)
+ return true;
+
+ if (!DECL_REGISTER (decl))
+ return false;
+
+ switch (TREE_CODE (TREE_TYPE (decl)))
+ {
+ case RECORD_TYPE:
+ case UNION_TYPE:
+ case QUAL_UNION_TYPE:
+ /* When not optimizing, disregard register keyword for variables with
+ types containing methods, otherwise the methods won't be callable
+ from the debugger. */
+ if (TYPE_METHODS (TREE_TYPE (decl)))
+ return false;
+ break;
+ default:
+ break;
+ }
+
+ return true;
}
/* Return true if TYPE should be passed by invisible reference. */
@@ -2967,10 +2988,13 @@ assign_parm_setup_stack (struct assign_parm_data_all *all, tree parm,
if (data->stack_parm == 0)
{
+ int align = STACK_SLOT_ALIGNMENT (data->passed_type,
+ GET_MODE (data->entry_parm),
+ TYPE_ALIGN (data->passed_type));
data->stack_parm
= assign_stack_local (GET_MODE (data->entry_parm),
GET_MODE_SIZE (GET_MODE (data->entry_parm)),
- TYPE_ALIGN (data->passed_type));
+ align);
set_mem_attributes (data->stack_parm, parm, 1);
}
@@ -3032,11 +3056,13 @@ assign_parms_unsplit_complex (struct assign_parm_data_all *all, tree fnargs)
{
rtx rmem, imem;
HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (parm));
+ int align = STACK_SLOT_ALIGNMENT (TREE_TYPE (parm),
+ DECL_MODE (parm),
+ TYPE_ALIGN (TREE_TYPE (parm)));
/* split_complex_arg put the real and imag parts in
pseudos. Move them to memory. */
- tmp = assign_stack_local (DECL_MODE (parm), size,
- TYPE_ALIGN (TREE_TYPE (parm)));
+ tmp = assign_stack_local (DECL_MODE (parm), size, align);
set_mem_attributes (tmp, parm, 1);
rmem = adjust_address_nv (tmp, inner, 0);
imem = adjust_address_nv (tmp, inner, GET_MODE_SIZE (inner));
diff --git a/gcc/function.h b/gcc/function.h
index 3f03727dfdc..70797974bf0 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -378,12 +378,6 @@ struct rtl_data GTY(())
/* Nonzero if function being compiled has an asm statement. */
bool has_asm_statement;
- /* Nonzero if the current function is a thunk, i.e., a lightweight
- function implemented by the output_mi_thunk hook) that just
- adjusts one of its arguments and forwards to another
- function. */
- bool is_thunk;
-
/* This bit is used by the exception handling logic. It is set if all
calls (if any) are sibling calls. Such functions do not have to
have EH tables generated, as they cannot throw. A call to such a
@@ -447,6 +441,11 @@ struct rtl_data GTY(())
/* True if dbr_schedule has already been called for this function. */
bool dbr_scheduled_p;
+
+ /* True if current function can not throw. Unlike
+ TREE_NOTHROW (current_function_decl) it is set even for overwritable
+ function where currently compiled version of it is nothrow. */
+ bool nothrow;
};
#define return_label (crtl->x_return_label)
@@ -507,9 +506,6 @@ struct function GTY(())
pointer. */
tree nonlocal_goto_save_area;
- /* Function sequence number for profiling, debugging, etc. */
- int funcdef_no;
-
/* List of function local variables, functions, types and constants. */
tree local_decls;
@@ -527,6 +523,9 @@ struct function GTY(())
/* Last statement uid. */
int last_stmt_uid;
+ /* Function sequence number for profiling, debugging, etc. */
+ int funcdef_no;
+
/* Line number of the start of the function for debugging purposes. */
location_t function_start_locus;
@@ -600,6 +599,12 @@ struct function GTY(())
/* Nonzero if this function has local DECL_HARD_REGISTER variables.
In this case code motion has to be done more carefully. */
unsigned int has_local_explicit_reg_vars : 1;
+
+ /* Nonzero if the current function is a thunk, i.e., a lightweight
+ function implemented by the output_mi_thunk hook) that just
+ adjusts one of its arguments and forwards to another
+ function. */
+ unsigned int is_thunk : 1;
};
/* If va_list_[gf]pr_size is set to this, it means we don't know how
diff --git a/gcc/gcc.c b/gcc/gcc.c
index b8691f93320..ee953660e5c 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3228,10 +3228,11 @@ display_help (void)
fputs (_(" -pass-exit-codes Exit with highest error code from a phase\n"), stdout);
fputs (_(" --help Display this information\n"), stdout);
fputs (_(" --target-help Display target specific command line options\n"), stdout);
- fputs (_(" --help={target|optimizers|warnings|undocumented|params}[,{[^]joined|[^]separate}]\n"), stdout);
+ fputs (_(" --help={target|optimizers|warnings|params|[^]{joined|separate|undocumented}}[,...]\n"), stdout);
fputs (_(" Display specific types of command line options\n"), stdout);
if (! verbose_flag)
fputs (_(" (Use '-v --help' to display command line options of sub-processes)\n"), stdout);
+ fputs (_(" --version Display compiler version information\n"), stdout);
fputs (_(" -dumpspecs Display all of the built in spec strings\n"), stdout);
fputs (_(" -dumpversion Display the version of the compiler\n"), stdout);
fputs (_(" -dumpmachine Display the compiler's target processor\n"), stdout);
@@ -6601,7 +6602,10 @@ main (int argc, char **argv)
/* We do not exit here. Instead we have created a fake input file
called 'help-dummy' which needs to be compiled, and we pass this
- on the various sub-processes, along with the --help switch. */
+ on the various sub-processes, along with the --help switch.
+ Ensure their output appears after ours. */
+ fputc ('\n', stdout);
+ fflush (stdout);
}
if (verbose_flag)
diff --git a/gcc/gcse.c b/gcc/gcse.c
index ee2d31e0a42..cbb8916603e 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -6621,7 +6621,7 @@ struct rtl_opt_pass pass_jump_bypass =
NULL, /* next */
0, /* static_pass_number */
TV_BYPASS, /* tv_id */
- 0, /* properties_required */
+ PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
@@ -6692,7 +6692,7 @@ struct rtl_opt_pass pass_gcse =
NULL, /* next */
0, /* static_pass_number */
TV_GCSE, /* tv_id */
- 0, /* properties_required */
+ PROP_cfglayout, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
diff --git a/gcc/gen-protos.c b/gcc/gen-protos.c
deleted file mode 100644
index 0408d4f164f..00000000000
--- a/gcc/gen-protos.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/* gen-protos.c - massages a list of prototypes, for use by fixproto.
- Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2003, 2004, 2005, 2007
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 3, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
-
-#include "bconfig.h"
-#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-#include "scan.h"
-#include "errors.h"
-
-int verbose = 0;
-
-static void add_hash (const char *);
-static int parse_fn_proto (char *, char *, struct fn_decl *);
-
-#define HASH_SIZE 2503 /* a prime */
-int hash_tab[HASH_SIZE];
-int next_index;
-int collisions;
-
-static void
-add_hash (const char *fname)
-{
- int i, i0;
-
- /* NOTE: If you edit this, also edit lookup_std_proto in fix-header.c !! */
- i = hashstr (fname, strlen (fname)) % HASH_SIZE;
- i0 = i;
- if (hash_tab[i] != 0)
- {
- collisions++;
- for (;;)
- {
- i = (i+1) % HASH_SIZE;
- gcc_assert (i != i0);
- if (hash_tab[i] == 0)
- break;
- }
- }
- hash_tab[i] = next_index;
-
- next_index++;
-}
-
-/* Given a function prototype, fill in the fields of FN.
- The result is a boolean indicating if a function prototype was found.
-
- The input string is modified (trailing NULs are inserted).
- The fields of FN point to the input string. */
-
-static int
-parse_fn_proto (char *start, char *end, struct fn_decl *fn)
-{
- char *ptr;
- int param_nesting = 1;
- char *param_start, *param_end, *decl_start, *name_start, *name_end;
-
- ptr = end - 1;
- while (*ptr == ' ' || *ptr == '\t') ptr--;
- if (*ptr-- != ';')
- {
- fprintf (stderr, "Funny input line: %s\n", start);
- return 0;
- }
- while (*ptr == ' ' || *ptr == '\t') ptr--;
- if (*ptr != ')')
- {
- fprintf (stderr, "Funny input line: %s\n", start);
- return 0;
- }
- param_end = ptr;
- for (;;)
- {
- int c = *--ptr;
- if (c == '(' && --param_nesting == 0)
- break;
- else if (c == ')')
- param_nesting++;
- }
- param_start = ptr+1;
-
- ptr--;
- while (*ptr == ' ' || *ptr == '\t') ptr--;
-
- if (!ISALNUM ((unsigned char)*ptr))
- {
- if (verbose)
- fprintf (stderr, "%s: Can't handle this complex prototype: %s\n",
- progname, start);
- return 0;
- }
- name_end = ptr+1;
-
- while (ISIDNUM (*ptr))
- --ptr;
- name_start = ptr+1;
- while (*ptr == ' ' || *ptr == '\t') ptr--;
- ptr[1] = 0;
- *param_end = 0;
- *name_end = 0;
-
- decl_start = start;
- if (strncmp (decl_start, "typedef ", 8) == 0)
- return 0;
- if (strncmp (decl_start, "extern ", 7) == 0)
- decl_start += 7;
-
- fn->fname = name_start;
- fn->rtype = decl_start;
- fn->params = param_start;
- return 1;
-}
-
-int
-main (int argc ATTRIBUTE_UNUSED, char **argv)
-{
- FILE *inf = stdin;
- FILE *outf = stdout;
- int i;
- sstring linebuf;
- struct fn_decl fn_decl;
-
- i = strlen (argv[0]);
- while (i > 0 && argv[0][i-1] != '/') --i;
- progname = &argv[0][i];
-
- /* Unlock the stdio streams. */
- unlock_std_streams ();
-
- INIT_SSTRING (&linebuf);
-
- fprintf (outf, "struct fn_decl std_protos[] = {\n");
-
- /* A hash table entry of 0 means "unused" so reserve it. */
- fprintf (outf, " {\"\", \"\", \"\", 0},\n");
- next_index = 1;
-
- for (;;)
- {
- int c = skip_spaces (inf, ' ');
-
- if (c == EOF)
- break;
- linebuf.ptr = linebuf.base;
- ungetc (c, inf);
- c = read_upto (inf, &linebuf, '\n');
- if (linebuf.base[0] == '#') /* skip cpp command */
- continue;
- if (linebuf.base[0] == '\0') /* skip empty line */
- continue;
-
- if (! parse_fn_proto (linebuf.base, linebuf.ptr, &fn_decl))
- continue;
-
- add_hash (fn_decl.fname);
-
- fprintf (outf, " {\"%s\", \"%s\", \"%s\", 0},\n",
- fn_decl.fname, fn_decl.rtype, fn_decl.params);
-
- if (c == EOF)
- break;
- }
- fprintf (outf, " {0, 0, 0, 0}\n};\n");
-
-
- fprintf (outf, "#define HASH_SIZE %d\n", HASH_SIZE);
- fprintf (outf, "short hash_tab[HASH_SIZE] = {\n");
- for (i = 0; i < HASH_SIZE; i++)
- fprintf (outf, " %d,\n", hash_tab[i]);
- fprintf (outf, "};\n");
-
- fprintf (stderr, "gen-protos: %d entries %d collisions\n",
- next_index, collisions);
-
- return 0;
-}
diff --git a/gcc/genautomata.c b/gcc/genautomata.c
index d314b8f221c..1d742f4dcb6 100644
--- a/gcc/genautomata.c
+++ b/gcc/genautomata.c
@@ -1,5 +1,5 @@
/* Pipeline hazard description translator.
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
Written by Vladimir Makarov <vmakarov@redhat.com>
@@ -22,21 +22,25 @@ along with GCC; see the file COPYING3. If not see
/* References:
- 1. Detecting pipeline structural hazards quickly. T. Proebsting,
+ 1. The finite state automaton based pipeline hazard recognizer and
+ instruction scheduler in GCC. V. Makarov. Proceedings of GCC
+ summit, 2003.
+
+ 2. Detecting pipeline structural hazards quickly. T. Proebsting,
C. Fraser. Proceedings of ACM SIGPLAN-SIGACT Symposium on
Principles of Programming Languages, pages 280--286, 1994.
This article is a good start point to understand usage of finite
state automata for pipeline hazard recognizers. But I'd
- recommend the 2nd article for more deep understanding.
+ recommend the 1st and 3rd article for more deep understanding.
- 2. Efficient Instruction Scheduling Using Finite State Automata:
+ 3. Efficient Instruction Scheduling Using Finite State Automata:
V. Bala and N. Rubin, Proceedings of MICRO-28. This is the best
article about usage of finite state automata for pipeline hazard
recognizers.
- The current implementation is different from the 2nd article in the
- following:
+ The current implementation is described in the 1st article and it
+ is different from the 3rd article in the following:
1. New operator `|' (alternative) is permitted in functional unit
reservation which can be treated deterministically and
@@ -463,7 +467,10 @@ struct insn_reserv_decl
insn. */
int insn_num;
/* The following field value is list of bypasses in which given insn
- is output insn. */
+ is output insn. Bypasses with the same input insn stay one after
+ another in the list in the same order as their occurrences in the
+ description but the bypass without a guard stays always the last
+ in a row of bypasses with the same input insn. */
struct bypass_decl *bypass_list;
/* The following fields are defined by automaton generator. */
@@ -2367,18 +2374,67 @@ add_presence_absence (unit_set_el_t dest_list,
}
-/* The function searches for bypass with given IN_INSN_RESERV in given
- BYPASS_LIST. */
-static struct bypass_decl *
-find_bypass (struct bypass_decl *bypass_list,
- struct insn_reserv_decl *in_insn_reserv)
+/* 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
+ there is already the same bypass in the list the function reports
+ this and does nothing. */
+static void
+insert_bypass (struct bypass_decl *bypass)
{
- struct bypass_decl *bypass;
-
- for (bypass = bypass_list; bypass != NULL; bypass = bypass->next)
- if (bypass->in_insn_reserv == in_insn_reserv)
- break;
- return bypass;
+ struct bypass_decl *curr, *last;
+ struct insn_reserv_decl *out_insn_reserv = bypass->out_insn_reserv;
+ struct insn_reserv_decl *in_insn_reserv = bypass->in_insn_reserv;
+
+ for (curr = out_insn_reserv->bypass_list, last = NULL;
+ curr != NULL;
+ last = curr, curr = curr->next)
+ if (curr->in_insn_reserv == in_insn_reserv)
+ {
+ if ((bypass->bypass_guard_name != NULL
+ && curr->bypass_guard_name != NULL
+ && ! strcmp (bypass->bypass_guard_name, curr->bypass_guard_name))
+ || bypass->bypass_guard_name == curr->bypass_guard_name)
+ {
+ if (bypass->bypass_guard_name == NULL)
+ {
+ if (!w_flag)
+ error ("the same bypass `%s - %s' is already defined",
+ bypass->out_insn_name, bypass->in_insn_name);
+ else
+ warning (0, "the same bypass `%s - %s' is already defined",
+ bypass->out_insn_name, bypass->in_insn_name);
+ }
+ else if (!w_flag)
+ error ("the same bypass `%s - %s' (guard %s) is already defined",
+ bypass->out_insn_name, bypass->in_insn_name,
+ bypass->bypass_guard_name);
+ else
+ warning
+ (0, "the same bypass `%s - %s' (guard %s) is already defined",
+ bypass->out_insn_name, bypass->in_insn_name,
+ bypass->bypass_guard_name);
+ return;
+ }
+ if (curr->bypass_guard_name == NULL)
+ break;
+ if (curr->next == NULL || curr->next->in_insn_reserv != in_insn_reserv)
+ {
+ last = curr;
+ break;
+ }
+
+ }
+ if (last == NULL)
+ {
+ bypass->next = out_insn_reserv->bypass_list;
+ out_insn_reserv->bypass_list = bypass;
+ }
+ else
+ {
+ bypass->next = last->next;
+ last->next = bypass;
+ }
}
/* The function processes pipeline description declarations, checks
@@ -2391,7 +2447,6 @@ process_decls (void)
decl_t decl_in_table;
decl_t out_insn_reserv;
decl_t in_insn_reserv;
- struct bypass_decl *bypass;
int automaton_presence;
int i;
@@ -2514,36 +2569,7 @@ process_decls (void)
= DECL_INSN_RESERV (out_insn_reserv);
DECL_BYPASS (decl)->in_insn_reserv
= DECL_INSN_RESERV (in_insn_reserv);
- bypass
- = find_bypass (DECL_INSN_RESERV (out_insn_reserv)->bypass_list,
- DECL_BYPASS (decl)->in_insn_reserv);
- if (bypass != NULL)
- {
- if (DECL_BYPASS (decl)->latency == bypass->latency)
- {
- if (!w_flag)
- error
- ("the same bypass `%s - %s' is already defined",
- DECL_BYPASS (decl)->out_insn_name,
- DECL_BYPASS (decl)->in_insn_name);
- else
- warning
- (0, "the same bypass `%s - %s' is already defined",
- DECL_BYPASS (decl)->out_insn_name,
- DECL_BYPASS (decl)->in_insn_name);
- }
- else
- error ("bypass `%s - %s' is already defined",
- DECL_BYPASS (decl)->out_insn_name,
- DECL_BYPASS (decl)->in_insn_name);
- }
- else
- {
- DECL_BYPASS (decl)->next
- = DECL_INSN_RESERV (out_insn_reserv)->bypass_list;
- DECL_INSN_RESERV (out_insn_reserv)->bypass_list
- = DECL_BYPASS (decl);
- }
+ insert_bypass (DECL_BYPASS (decl));
}
}
}
@@ -8159,19 +8185,32 @@ output_internal_insn_latency_func (void)
(advance_cycle_insn_decl)->insn_num));
fprintf (output_file, " case %d:\n",
bypass->in_insn_reserv->insn_num);
- if (bypass->bypass_guard_name == NULL)
- fprintf (output_file, " return %d;\n",
- bypass->latency);
- else
+ for (;;)
{
- fprintf (output_file,
- " if (%s (%s, %s))\n",
- bypass->bypass_guard_name, INSN_PARAMETER_NAME,
- INSN2_PARAMETER_NAME);
- fprintf (output_file,
- " return %d;\n break;\n",
- bypass->latency);
+ if (bypass->bypass_guard_name == NULL)
+ {
+ gcc_assert (bypass->next == NULL
+ || (bypass->in_insn_reserv
+ != bypass->next->in_insn_reserv));
+ fprintf (output_file, " return %d;\n",
+ bypass->latency);
+ }
+ else
+ {
+ fprintf (output_file,
+ " if (%s (%s, %s))\n",
+ bypass->bypass_guard_name, INSN_PARAMETER_NAME,
+ INSN2_PARAMETER_NAME);
+ fprintf (output_file, " return %d;\n",
+ bypass->latency);
+ }
+ if (bypass->next == NULL
+ || bypass->in_insn_reserv != bypass->next->in_insn_reserv)
+ break;
+ bypass = bypass->next;
}
+ if (bypass->bypass_guard_name != NULL)
+ fprintf (output_file, " break;\n");
}
fputs (" }\n break;\n", output_file);
}
diff --git a/gcc/genpreds.c b/gcc/genpreds.c
index e0fb3f42e52..a1232e9573f 100644
--- a/gcc/genpreds.c
+++ b/gcc/genpreds.c
@@ -2,7 +2,7 @@
- prototype declarations for operand predicates (tm-preds.h)
- function definitions of operand predicates, if defined new-style
(insn-preds.c)
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -234,7 +234,7 @@ needs_variable (rtx exp, const char *var)
if (q != p && (ISALNUM (q[-1]) || q[-1] == '_'))
return false;
q += strlen (var);
- if (ISALNUM (q[0] || q[0] == '_'))
+ if (ISALNUM (q[0]) || q[0] == '_')
return false;
}
return true;
@@ -1103,7 +1103,7 @@ write_tm_constrs_h (void)
"{\n", c->c_name,
needs_op ? "op" : "ARG_UNUSED (op)");
if (needs_mode)
- puts ("enum machine_mode mode = GET_MODE (op);");
+ puts (" enum machine_mode mode = GET_MODE (op);");
if (needs_ival)
puts (" HOST_WIDE_INT ival = 0;");
if (needs_hval)
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index ae12424589b..bd82051d158 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -107,12 +107,14 @@ static enum gimplify_status gimplify_compound_expr (tree *, gimple_seq *, bool);
/* Mark X addressable. Unlike the langhook we expect X to be in gimple
form and we don't do any syntax checking. */
-static void
+void
mark_addressable (tree x)
{
while (handled_component_p (x))
x = TREE_OPERAND (x, 0);
- if (TREE_CODE (x) != VAR_DECL && TREE_CODE (x) != PARM_DECL)
+ if (TREE_CODE (x) != VAR_DECL
+ && TREE_CODE (x) != PARM_DECL
+ && TREE_CODE (x) != RESULT_DECL)
return ;
TREE_ADDRESSABLE (x) = 1;
}
@@ -2355,11 +2357,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
else if (parms)
p = parms;
else
- {
- if (nargs != 0)
- CALL_CANNOT_INLINE_P (*expr_p) = 1;
- p = NULL_TREE;
- }
+ p = NULL_TREE;
for (i = 0; i < nargs && p; i++, p = TREE_CHAIN (p))
;
@@ -3060,9 +3058,11 @@ gimplify_modify_expr_to_memcpy (tree *expr_p, tree size, bool want_value,
to = TREE_OPERAND (*expr_p, 0);
from = TREE_OPERAND (*expr_p, 1);
+ mark_addressable (from);
from_ptr = build_fold_addr_expr (from);
gimplify_arg (&from_ptr, seq_p, EXPR_LOCATION (*expr_p));
+ mark_addressable (to);
to_ptr = build_fold_addr_expr (to);
gimplify_arg (&to_ptr, seq_p, EXPR_LOCATION (*expr_p));
@@ -3456,6 +3456,83 @@ rhs_predicate_for (tree lhs)
return is_gimple_mem_or_call_rhs;
}
+/* Gimplify a C99 compound literal expression. This just means adding
+ the DECL_EXPR before the current statement and using its anonymous
+ decl instead. */
+
+static enum gimplify_status
+gimplify_compound_literal_expr (tree *expr_p, gimple_seq *pre_p)
+{
+ tree decl_s = COMPOUND_LITERAL_EXPR_DECL_EXPR (*expr_p);
+ tree decl = DECL_EXPR_DECL (decl_s);
+ /* Mark the decl as addressable if the compound literal
+ expression is addressable now, otherwise it is marked too late
+ after we gimplify the initialization expression. */
+ if (TREE_ADDRESSABLE (*expr_p))
+ TREE_ADDRESSABLE (decl) = 1;
+
+ /* Preliminarily mark non-addressed complex variables as eligible
+ for promotion to gimple registers. We'll transform their uses
+ as we find them. */
+ if ((TREE_CODE (TREE_TYPE (decl)) == COMPLEX_TYPE
+ || TREE_CODE (TREE_TYPE (decl)) == VECTOR_TYPE)
+ && !TREE_THIS_VOLATILE (decl)
+ && !needs_to_live_in_memory (decl))
+ DECL_GIMPLE_REG_P (decl) = 1;
+
+ /* This decl isn't mentioned in the enclosing block, so add it to the
+ list of temps. FIXME it seems a bit of a kludge to say that
+ anonymous artificial vars aren't pushed, but everything else is. */
+ if (DECL_NAME (decl) == NULL_TREE && !DECL_SEEN_IN_BIND_EXPR_P (decl))
+ gimple_add_tmp_var (decl);
+
+ gimplify_and_add (decl_s, pre_p);
+ *expr_p = decl;
+ return GS_OK;
+}
+
+/* Optimize embedded COMPOUND_LITERAL_EXPRs within a CONSTRUCTOR,
+ return a new CONSTRUCTOR if something changed. */
+
+static tree
+optimize_compound_literals_in_ctor (tree orig_ctor)
+{
+ tree ctor = orig_ctor;
+ VEC(constructor_elt,gc) *elts = CONSTRUCTOR_ELTS (ctor);
+ unsigned int idx, num = VEC_length (constructor_elt, elts);
+
+ for (idx = 0; idx < num; idx++)
+ {
+ tree value = VEC_index (constructor_elt, elts, idx)->value;
+ tree newval = value;
+ if (TREE_CODE (value) == CONSTRUCTOR)
+ newval = optimize_compound_literals_in_ctor (value);
+ else if (TREE_CODE (value) == COMPOUND_LITERAL_EXPR)
+ {
+ tree decl_s = COMPOUND_LITERAL_EXPR_DECL_EXPR (value);
+ tree decl = DECL_EXPR_DECL (decl_s);
+ tree init = DECL_INITIAL (decl);
+
+ if (!TREE_ADDRESSABLE (value)
+ && !TREE_ADDRESSABLE (decl)
+ && init)
+ newval = optimize_compound_literals_in_ctor (init);
+ }
+ if (newval == value)
+ continue;
+
+ if (ctor == orig_ctor)
+ {
+ ctor = copy_node (orig_ctor);
+ CONSTRUCTOR_ELTS (ctor) = VEC_copy (constructor_elt, gc, elts);
+ elts = CONSTRUCTOR_ELTS (ctor);
+ }
+ VEC_index (constructor_elt, elts, idx)->value = newval;
+ }
+ return ctor;
+}
+
+
/* A subroutine of gimplify_modify_expr. Break out elements of a
CONSTRUCTOR used as an initializer into separate MODIFY_EXPRs.
@@ -3474,7 +3551,7 @@ static enum gimplify_status
gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
bool want_value, bool notify_temp_creation)
{
- tree object;
+ tree object, new_ctor;
tree ctor = TREE_OPERAND (*expr_p, 1);
tree type = TREE_TYPE (ctor);
enum gimplify_status ret;
@@ -3492,7 +3569,8 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
}
object = TREE_OPERAND (*expr_p, 0);
- elts = CONSTRUCTOR_ELTS (ctor);
+ new_ctor = optimize_compound_literals_in_ctor (ctor);
+ elts = CONSTRUCTOR_ELTS (new_ctor);
ret = GS_ALL_DONE;
switch (TREE_CODE (type))
@@ -4099,6 +4177,26 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p,
return GS_OK;
}
+ case COMPOUND_LITERAL_EXPR:
+ {
+ tree complit = TREE_OPERAND (*expr_p, 1);
+ tree decl_s = COMPOUND_LITERAL_EXPR_DECL_EXPR (complit);
+ tree decl = DECL_EXPR_DECL (decl_s);
+ tree init = DECL_INITIAL (decl);
+
+ /* struct T x = (struct T) { 0, 1, 2 } can be optimized
+ into struct T x = { 0, 1, 2 } if the address of the
+ compound literal has never been taken. */
+ if (!TREE_ADDRESSABLE (complit)
+ && !TREE_ADDRESSABLE (decl)
+ && init)
+ {
+ *expr_p = copy_node (*expr_p);
+ TREE_OPERAND (*expr_p, 1) = init;
+ return GS_OK;
+ }
+ }
+
default:
ret = GS_UNHANDLED;
break;
@@ -6047,12 +6145,27 @@ goa_stabilize_expr (tree *expr_p, gimple_seq *pre_p, tree lhs_addr,
switch (TREE_CODE_CLASS (TREE_CODE (expr)))
{
case tcc_binary:
+ case tcc_comparison:
saw_lhs |= goa_stabilize_expr (&TREE_OPERAND (expr, 1), pre_p, lhs_addr,
lhs_var);
case tcc_unary:
saw_lhs |= goa_stabilize_expr (&TREE_OPERAND (expr, 0), pre_p, lhs_addr,
lhs_var);
break;
+ case tcc_expression:
+ switch (TREE_CODE (expr))
+ {
+ case TRUTH_ANDIF_EXPR:
+ case TRUTH_ORIF_EXPR:
+ saw_lhs |= goa_stabilize_expr (&TREE_OPERAND (expr, 1), pre_p,
+ lhs_addr, lhs_var);
+ saw_lhs |= goa_stabilize_expr (&TREE_OPERAND (expr, 0), pre_p,
+ lhs_addr, lhs_var);
+ break;
+ default:
+ break;
+ }
+ break;
default:
break;
}
@@ -6346,6 +6459,10 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
ret = gimplify_compound_expr (expr_p, pre_p, fallback != fb_none);
break;
+ case COMPOUND_LITERAL_EXPR:
+ ret = gimplify_compound_literal_expr (expr_p, pre_p);
+ break;
+
case MODIFY_EXPR:
case INIT_EXPR:
ret = gimplify_modify_expr (expr_p, pre_p, post_p,
@@ -7126,6 +7243,8 @@ gimplify_type_sizes (tree type, gimple_seq *list_p)
if (TREE_CODE (field) == FIELD_DECL)
{
gimplify_one_sizepos (&DECL_FIELD_OFFSET (field), list_p);
+ gimplify_one_sizepos (&DECL_SIZE (field), list_p);
+ gimplify_one_sizepos (&DECL_SIZE_UNIT (field), list_p);
gimplify_type_sizes (TREE_TYPE (field), list_p);
}
break;
diff --git a/gcc/ginclude/stdarg.h b/gcc/ginclude/stdarg.h
index c9ddd6b7fc1..5061f34e119 100644
--- a/gcc/ginclude/stdarg.h
+++ b/gcc/ginclude/stdarg.h
@@ -50,7 +50,7 @@ typedef __builtin_va_list __gnuc_va_list;
#define va_start(v,l) __builtin_va_start(v,l)
#define va_end(v) __builtin_va_end(v)
#define va_arg(v,l) __builtin_va_arg(v,l)
-#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
+#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L || defined(__GXX_EXPERIMENTAL_CXX0X__)
#define va_copy(d,s) __builtin_va_copy(d,s)
#endif
#define __va_copy(d,s) __builtin_va_copy(d,s)
diff --git a/gcc/graphite.c b/gcc/graphite.c
index 69a72fc3c3d..b732b40d214 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -1058,31 +1058,24 @@ loop_affine_expr (basic_block scop_entry, struct loop *loop, tree expr)
|| evolution_function_is_affine_multivariate_p (scev, n));
}
-/* Return false if the tree_code of the operand OP or any of its operands
- is component_ref. */
+/* Return true if REF or any of its subtrees contains a
+ component_ref. */
static bool
-exclude_component_ref (tree op)
+contains_component_ref_p (tree ref)
{
- int i;
- int len;
+ if (!ref)
+ return false;
- if (op)
+ while (handled_component_p (ref))
{
- if (TREE_CODE (op) == COMPONENT_REF)
- return false;
- else
- {
- len = TREE_OPERAND_LENGTH (op);
- for (i = 0; i < len; ++i)
- {
- if (!exclude_component_ref (TREE_OPERAND (op, i)))
- return false;
- }
- }
+ if (TREE_CODE (ref) == COMPONENT_REF)
+ return true;
+
+ ref = TREE_OPERAND (ref, 0);
}
- return true;
+ return false;
}
/* Return true if the operand OP is simple. */
@@ -1094,13 +1087,15 @@ is_simple_operand (loop_p loop, gimple stmt, tree op)
if (DECL_P (op)
/* or a structure, */
|| AGGREGATE_TYPE_P (TREE_TYPE (op))
+ /* or a COMPONENT_REF, */
+ || contains_component_ref_p (op)
/* or a memory access that cannot be analyzed by the data
reference analysis. */
|| ((handled_component_p (op) || INDIRECT_REF_P (op))
&& !stmt_simple_memref_p (loop, stmt, op)))
return false;
- return exclude_component_ref (op);
+ return true;
}
/* Return true only when STMT is simple enough for being handled by
@@ -2364,7 +2359,7 @@ nb_reductions_in_loop (loop_p loop)
scev = analyze_scalar_evolution (loop, PHI_RESULT (phi));
scev = instantiate_parameters (loop, scev);
- if (!simple_iv (loop, phi, PHI_RESULT (phi), &iv, true))
+ if (!simple_iv (loop, loop, PHI_RESULT (phi), &iv, true))
res++;
}
@@ -2395,7 +2390,7 @@ graphite_loop_normal_form (loop_p loop)
if (nb_reductions_in_loop (loop) > 0)
return NULL_TREE;
- return canonicalize_loop_ivs (loop, NULL, nit);
+ return canonicalize_loop_ivs (loop, NULL, &nit);
}
/* Record LOOP as occuring in SCOP. Returns true when the operation
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index d725f219a5c..5da4b4c700e 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -261,7 +261,7 @@ cgraph_mark_inline_edge (struct cgraph_edge *e, bool update_original,
cgraph_redirect_edge_callee (e, cgraph_node (e->callee->inline_decl));
gcc_assert (e->inline_failed);
- e->inline_failed = NULL;
+ e->inline_failed = CIF_OK;
if (!e->callee->global.inlined)
DECL_POSSIBLY_INLINED (e->callee->decl) = true;
@@ -361,7 +361,7 @@ cgraph_estimate_growth (struct cgraph_node *node)
static bool
cgraph_check_inline_limits (struct cgraph_node *to, struct cgraph_node *what,
- const char **reason, bool one_only)
+ cgraph_inline_failed_t *reason, bool one_only)
{
int times = 0;
struct cgraph_edge *e;
@@ -396,7 +396,7 @@ cgraph_check_inline_limits (struct cgraph_node *to, struct cgraph_node *what,
&& newsize > limit)
{
if (reason)
- *reason = N_("--param large-function-growth limit reached");
+ *reason = CIF_LARGE_FUNCTION_GROWTH_LIMIT;
return false;
}
@@ -411,7 +411,7 @@ cgraph_check_inline_limits (struct cgraph_node *to, struct cgraph_node *what,
&& inlined_stack > PARAM_VALUE (PARAM_LARGE_STACK_FRAME))
{
if (reason)
- *reason = N_("--param large-stack-frame-growth limit reached");
+ *reason = CIF_LARGE_STACK_FRAME_GROWTH_LIMIT;
return false;
}
return true;
@@ -419,8 +419,8 @@ cgraph_check_inline_limits (struct cgraph_node *to, struct cgraph_node *what,
/* Return true when function N is small enough to be inlined. */
-bool
-cgraph_default_inline_p (struct cgraph_node *n, const char **reason)
+static bool
+cgraph_default_inline_p (struct cgraph_node *n, cgraph_inline_failed_t *reason)
{
tree decl = n->decl;
@@ -429,14 +429,14 @@ cgraph_default_inline_p (struct cgraph_node *n, const char **reason)
if (!flag_inline_small_functions && !DECL_DECLARED_INLINE_P (decl))
{
if (reason)
- *reason = N_("function not inline candidate");
+ *reason = CIF_FUNCTION_NOT_INLINE_CANDIDATE;
return false;
}
if (!DECL_STRUCT_FUNCTION (decl)->cfg)
{
if (reason)
- *reason = N_("function body not available");
+ *reason = CIF_BODY_NOT_AVAILABLE;
return false;
}
@@ -445,7 +445,7 @@ cgraph_default_inline_p (struct cgraph_node *n, const char **reason)
if (n->global.insns >= MAX_INLINE_INSNS_SINGLE)
{
if (reason)
- *reason = N_("--param max-inline-insns-single limit reached");
+ *reason = CIF_MAX_INLINE_INSNS_SINGLE_LIMIT;
return false;
}
}
@@ -454,7 +454,7 @@ cgraph_default_inline_p (struct cgraph_node *n, const char **reason)
if (n->global.insns >= MAX_INLINE_INSNS_AUTO)
{
if (reason)
- *reason = N_("--param max-inline-insns-auto limit reached");
+ *reason = CIF_MAX_INLINE_INSNS_AUTO_LIMIT;
return false;
}
}
@@ -469,7 +469,7 @@ cgraph_default_inline_p (struct cgraph_node *n, const char **reason)
static bool
cgraph_recursive_inlining_p (struct cgraph_node *to,
struct cgraph_node *what,
- const char **reason)
+ cgraph_inline_failed_t *reason)
{
bool recursive;
if (to->global.inlined_to)
@@ -480,7 +480,7 @@ cgraph_recursive_inlining_p (struct cgraph_node *to,
not warn on it. */
if (recursive && reason)
*reason = (what->local.disregard_inline_limits
- ? N_("recursive inlining") : "");
+ ? CIF_RECURSIVE_INLINING : CIF_UNSPECIFIED);
return recursive;
}
@@ -566,7 +566,7 @@ update_caller_keys (fibheap_t heap, struct cgraph_node *node,
bitmap updated_nodes)
{
struct cgraph_edge *edge;
- const char *failed_reason;
+ cgraph_inline_failed_t failed_reason;
if (!node->local.inlinable || node->local.disregard_inline_limits
|| node->global.inlined_to)
@@ -790,12 +790,14 @@ cgraph_decide_recursive_inlining (struct cgraph_node *node,
/* Set inline_failed for all callers of given function to REASON. */
static void
-cgraph_set_inline_failed (struct cgraph_node *node, const char *reason)
+cgraph_set_inline_failed (struct cgraph_node *node,
+ cgraph_inline_failed_t reason)
{
struct cgraph_edge *e;
if (dump_file)
- fprintf (dump_file, "Inlining failed: %s\n", reason);
+ fprintf (dump_file, "Inlining failed: %s\n",
+ cgraph_inline_failed_string (reason));
for (e = node->callers; e; e = e->next_caller)
if (e->inline_failed)
e->inline_failed = reason;
@@ -840,7 +842,7 @@ cgraph_decide_inlining_of_small_functions (void)
{
struct cgraph_node *node;
struct cgraph_edge *edge;
- const char *failed_reason;
+ cgraph_inline_failed_t failed_reason;
fibheap_t heap = fibheap_new ();
bitmap updated_nodes = BITMAP_ALLOC (NULL);
int min_insns, max_insns;
@@ -887,7 +889,7 @@ cgraph_decide_inlining_of_small_functions (void)
struct cgraph_node *where;
int growth =
cgraph_estimate_size_after_inlining (1, edge->caller, edge->callee);
- const char *not_good = NULL;
+ cgraph_inline_failed_t not_good = CIF_OK;
growth -= edge->caller->global.insns;
@@ -939,7 +941,8 @@ cgraph_decide_inlining_of_small_functions (void)
if (where->global.inlined_to)
{
edge->inline_failed
- = (edge->callee->local.disregard_inline_limits ? N_("recursive inlining") : "");
+ = (edge->callee->local.disregard_inline_limits
+ ? CIF_RECURSIVE_INLINING : CIF_UNSPECIFIED);
if (dump_file)
fprintf (dump_file, " inline_failed:Recursive inlining performed only for function itself.\n");
continue;
@@ -947,12 +950,12 @@ cgraph_decide_inlining_of_small_functions (void)
}
if (!cgraph_maybe_hot_edge_p (edge))
- not_good = N_("call is unlikely and code size would grow");
+ not_good = CIF_UNLIKELY_CALL;
if (!flag_inline_functions
&& !DECL_DECLARED_INLINE_P (edge->callee->decl))
- not_good = N_("function not declared inline and code size would grow");
+ not_good = CIF_NOT_DECLARED_INLINED;
if (optimize_function_for_size_p (DECL_STRUCT_FUNCTION(edge->caller->decl)))
- not_good = N_("optimizing for size and code size would grow");
+ not_good = CIF_OPTIMIZING_FOR_SIZE;
if (not_good && growth > 0 && cgraph_estimate_growth (edge->callee) > 0)
{
if (!cgraph_recursive_inlining_p (edge->caller, edge->callee,
@@ -960,7 +963,8 @@ cgraph_decide_inlining_of_small_functions (void)
{
edge->inline_failed = not_good;
if (dump_file)
- fprintf (dump_file, " inline_failed:%s.\n", edge->inline_failed);
+ fprintf (dump_file, " inline_failed:%s.\n",
+ cgraph_inline_failed_string (edge->inline_failed));
}
continue;
}
@@ -970,16 +974,18 @@ cgraph_decide_inlining_of_small_functions (void)
&edge->inline_failed))
{
if (dump_file)
- fprintf (dump_file, " inline_failed:%s.\n", edge->inline_failed);
+ fprintf (dump_file, " inline_failed:%s.\n",
+ cgraph_inline_failed_string (edge->inline_failed));
}
continue;
}
if (!tree_can_inline_p (edge->caller->decl, edge->callee->decl))
{
gimple_call_set_cannot_inline (edge->call_stmt, true);
- edge->inline_failed = N_("target specific option mismatch");
+ edge->inline_failed = CIF_TARGET_OPTION_MISMATCH;
if (dump_file)
- fprintf (dump_file, " inline_failed:%s.\n", edge->inline_failed);
+ fprintf (dump_file, " inline_failed:%s.\n",
+ cgraph_inline_failed_string (edge->inline_failed));
continue;
}
if (cgraph_recursive_inlining_p (edge->caller, edge->callee,
@@ -1005,7 +1011,8 @@ cgraph_decide_inlining_of_small_functions (void)
{
if (dump_file)
fprintf (dump_file, " Not inlining into %s:%s.\n",
- cgraph_node_name (edge->caller), edge->inline_failed);
+ cgraph_node_name (edge->caller),
+ cgraph_inline_failed_string (edge->inline_failed));
continue;
}
callee = edge->callee;
@@ -1053,7 +1060,7 @@ cgraph_decide_inlining_of_small_functions (void)
if (!edge->callee->local.disregard_inline_limits && edge->inline_failed
&& !cgraph_recursive_inlining_p (edge->caller, edge->callee,
&edge->inline_failed))
- edge->inline_failed = N_("--param inline-unit-growth limit reached");
+ edge->inline_failed = CIF_INLINE_UNIT_GROWTH_LIMIT;
}
if (new_indirect_edges)
@@ -1163,7 +1170,7 @@ cgraph_decide_inlining (void)
reason why inline failed. */
for (e = node->callers; e; e = e->next_caller)
if (e->inline_failed)
- e->inline_failed = N_("recursive inlining");
+ e->inline_failed = CIF_RECURSIVE_INLINING;
if (dump_file)
fprintf (dump_file,
" Inlined for a net change of %+i insns.\n",
@@ -1289,7 +1296,7 @@ try_inline (struct cgraph_edge *e, enum inlining_mode mode, int depth)
cgraph_node_name (e->caller));
}
e->inline_failed = (e->callee->local.disregard_inline_limits
- ? N_("recursive inlining") : "");
+ ? CIF_RECURSIVE_INLINING : CIF_UNSPECIFIED);
return false;
}
}
@@ -1330,7 +1337,7 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node,
{
struct cgraph_edge *e;
bool inlined = false;
- const char *failed_reason;
+ cgraph_inline_failed_t failed_reason;
enum inlining_mode old_mode;
#ifdef ENABLE_CHECKING
@@ -1475,7 +1482,8 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node,
if (dump_file)
{
indent_to (dump_file, depth);
- fprintf (dump_file, "Not inlining: %s.\n", e->inline_failed);
+ fprintf (dump_file, "Not inlining: %s.\n",
+ cgraph_inline_failed_string (e->inline_failed));
}
continue;
}
@@ -1747,6 +1755,8 @@ inline_transform (struct cgraph_node *node)
todo = optimize_inline_calls (current_function_decl);
timevar_pop (TV_INTEGRATION);
}
+ cfun->always_inline_functions_inlined = true;
+ cfun->after_inlining = true;
return todo | execute_fixup_cfg ();
}
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index f21638f383e..21ecfd52b74 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -71,6 +71,8 @@ struct funct_state_d
{
/* See above. */
enum pure_const_state_e pure_const_state;
+ /* What user set here; we can be always sure about this. */
+ enum pure_const_state_e state_set_in_source;
/* True if the function could possibly infinite loop. There are a
lot of ways that this could be determined. We are pretty
@@ -80,10 +82,7 @@ struct funct_state_d
a behavioral change. */
bool looping;
- /* If the state of the function was set in the source, then assume
- that it was done properly even if the analysis we do would be
- more pessimestic. */
- bool state_set_in_source;
+ bool can_throw;
};
typedef struct funct_state_d * funct_state;
@@ -141,21 +140,15 @@ static inline void
check_decl (funct_state local,
tree t, bool checking_write)
{
- /* If the variable has the "used" attribute, treat it as if it had a
- been touched by the devil. */
- if (lookup_attribute ("used", DECL_ATTRIBUTES (t)))
- {
- local->pure_const_state = IPA_NEITHER;
- local->looping = false;
- return;
- }
-
+ if (MTAG_P (t))
+ return;
/* Do not want to do anything with volatile except mark any
function that uses one to be not const or pure. */
if (TREE_THIS_VOLATILE (t))
{
local->pure_const_state = IPA_NEITHER;
- local->looping = false;
+ if (dump_file)
+ fprintf (dump_file, " Volatile operand is not const/pure");
return;
}
@@ -163,212 +156,94 @@ check_decl (funct_state local,
if (!TREE_STATIC (t) && !DECL_EXTERNAL (t))
return;
+ /* If the variable has the "used" attribute, treat it as if it had a
+ been touched by the devil. */
+ if (lookup_attribute ("used", DECL_ATTRIBUTES (t)))
+ {
+ local->pure_const_state = IPA_NEITHER;
+ if (dump_file)
+ fprintf (dump_file, " Used static/global variable is not const/pure\n");
+ return;
+ }
+
/* Since we have dealt with the locals and params cases above, if we
are CHECKING_WRITE, this cannot be a pure or constant
function. */
if (checking_write)
{
local->pure_const_state = IPA_NEITHER;
- local->looping = false;
+ if (dump_file)
+ fprintf (dump_file, " static/global memory write is not const/pure\n");
return;
}
if (DECL_EXTERNAL (t) || TREE_PUBLIC (t))
{
- /* If the front end set the variable to be READONLY and
- constant, we can allow this variable in pure or const
- functions but the scope is too large for our analysis to set
- these bits ourselves. */
-
- if (TREE_READONLY (t)
- && DECL_INITIAL (t)
- && is_gimple_min_invariant (DECL_INITIAL (t)))
- ; /* Read of a constant, do not change the function state. */
+ /* Readonly reads are safe. */
+ if (TREE_READONLY (t) && !TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (t)))
+ return; /* Read of a constant, do not change the function state. */
else
{
+ if (dump_file)
+ fprintf (dump_file, " global memory read is not const\n");
/* Just a regular read. */
if (local->pure_const_state == IPA_CONST)
local->pure_const_state = IPA_PURE;
}
}
-
- /* Compilation level statics can be read if they are readonly
- variables. */
- if (TREE_READONLY (t))
- return;
-
- /* Just a regular read. */
- if (local->pure_const_state == IPA_CONST)
- local->pure_const_state = IPA_PURE;
+ else
+ {
+ /* Compilation level statics can be read if they are readonly
+ variables. */
+ if (TREE_READONLY (t))
+ return;
+
+ if (dump_file)
+ fprintf (dump_file, " static memory read is not const\n");
+ /* Just a regular read. */
+ if (local->pure_const_state == IPA_CONST)
+ local->pure_const_state = IPA_PURE;
+ }
}
-/* If T is a VAR_DECL check to see if it is an allowed reference. */
-
-static void
-check_operand (funct_state local,
- tree t, bool checking_write)
-{
- if (!t) return;
-
- if (TREE_CODE (t) == VAR_DECL)
- check_decl (local, t, checking_write);
-}
-/* Examine tree T for references. */
+/* Check to see if the use (or definition when CHECKING_WRITE is true)
+ variable T is legal in a function that is either pure or const. */
-static void
-check_tree (funct_state local, tree t, bool checking_write)
+static inline void
+check_op (funct_state local,
+ tree t, bool checking_write)
{
- if ((TREE_CODE (t) == EXC_PTR_EXPR) || (TREE_CODE (t) == FILTER_EXPR)
- || TREE_CODE (t) == SSA_NAME)
+ while (t && handled_component_p (t))
+ t = TREE_OPERAND (t, 0);
+ if (!t)
return;
-
- /* Any tree which is volatile disqualifies this function from being
- const or pure. */
- if (TREE_THIS_VOLATILE (t))
- {
- local->pure_const_state = IPA_NEITHER;
- local->looping = false;
- return;
- }
-
- while (TREE_CODE (t) == REALPART_EXPR
- || TREE_CODE (t) == IMAGPART_EXPR
- || handled_component_p (t))
- {
- if (TREE_CODE (t) == ARRAY_REF)
- check_operand (local, TREE_OPERAND (t, 1), false);
- t = TREE_OPERAND (t, 0);
- }
-
- /* The bottom of an indirect reference can only be read, not
- written. */
- if (INDIRECT_REF_P (t))
+ if (INDIRECT_REF_P (t) || TREE_CODE (t) == TARGET_MEM_REF)
{
- check_tree (local, TREE_OPERAND (t, 0), false);
-
- /* Any indirect reference that occurs on the lhs
- disqualifies the function from being pure or const. Any
- indirect reference that occurs on the rhs disqualifies the
- function from being const. */
- if (checking_write)
- {
+ if (TREE_THIS_VOLATILE (t))
+ {
local->pure_const_state = IPA_NEITHER;
- local->looping = false;
+ if (dump_file)
+ fprintf (dump_file, " Volatile indirect ref is not const/pure\n");
return;
}
- else if (local->pure_const_state == IPA_CONST)
- local->pure_const_state = IPA_PURE;
- }
-
- if (SSA_VAR_P (t))
- check_operand (local, t, checking_write);
-}
-
-/* Scan tree T to see if there are any addresses taken in within T. */
-
-static void
-look_for_address_of (funct_state local, tree t)
-{
- if (TREE_CODE (t) == ADDR_EXPR)
- {
- tree x = get_base_var (t);
- if (TREE_CODE (x) == VAR_DECL)
- {
- check_decl (local, x, false);
-
- /* Taking the address of something appears to be reasonable
- in PURE code. Not allowed in const. */
- if (local->pure_const_state == IPA_CONST)
+ else if (checking_write)
+ {
+ local->pure_const_state = IPA_NEITHER;
+ if (dump_file)
+ fprintf (dump_file, " Indirect ref write is not const/pure\n");
+ return;
+ }
+ else
+ {
+ if (dump_file)
+ fprintf (dump_file, " Indirect ref read is not const\n");
+ if (local->pure_const_state == IPA_CONST)
local->pure_const_state = IPA_PURE;
}
}
}
-/* Check to see if T is a read or address of operation on a var we are
- interested in analyzing. LOCAL is passed in to get access to its
- bit vectors. */
-
-static void
-check_rhs_var (funct_state local, tree t)
-{
- look_for_address_of (local, t);
-
- /* Memcmp and strlen can both trap and they are declared pure. */
- if (tree_could_trap_p (t)
- && local->pure_const_state == IPA_CONST)
- local->pure_const_state = IPA_PURE;
-
- check_tree(local, t, false);
-}
-
-/* Check to see if T is an assignment to a var we are interested in
- analyzing. LOCAL is passed in to get access to its bit vectors. */
-
-static void
-check_lhs_var (funct_state local, tree t)
-{
- /* Memcmp and strlen can both trap and they are declared pure.
- Which seems to imply that we can apply the same rule here. */
- if (tree_could_trap_p (t)
- && local->pure_const_state == IPA_CONST)
- local->pure_const_state = IPA_PURE;
-
- check_tree(local, t, true);
-}
-
-/* This is a scaled down version of get_asm_expr_operands from
- tree_ssa_operands.c. The version there runs much later and assumes
- that aliasing information is already available. Here we are just
- trying to find if the set of inputs and outputs contain references
- or address of operations to local static variables. STMT is the
- actual asm statement. */
-
-static void
-get_asm_expr_operands (funct_state local, gimple stmt)
-{
- size_t noutputs = gimple_asm_noutputs (stmt);
- const char **oconstraints
- = (const char **) alloca ((noutputs) * sizeof (const char *));
- size_t i;
- tree op;
- const char *constraint;
- bool allows_mem, allows_reg, is_inout;
-
- for (i = 0; i < noutputs; i++)
- {
- op = gimple_asm_output_op (stmt, i);
- oconstraints[i] = constraint
- = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (op)));
- parse_output_constraint (&constraint, i, 0, 0,
- &allows_mem, &allows_reg, &is_inout);
-
- check_lhs_var (local, TREE_VALUE (op));
- }
-
- for (i = 0; i < gimple_asm_ninputs (stmt); i++)
- {
- op = gimple_asm_input_op (stmt, i);
- constraint
- = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (op)));
- parse_input_constraint (&constraint, 0, 0, noutputs, 0,
- oconstraints, &allows_mem, &allows_reg);
-
- check_rhs_var (local, TREE_VALUE (op));
- }
-
- for (i = 0; i < gimple_asm_nclobbers (stmt); i++)
- {
- op = gimple_asm_clobber_op (stmt, i);
- if (simple_cst_equal(TREE_VALUE (op), memory_identifier_string) == 1)
- /* Abandon all hope, ye who enter here. */
- local->pure_const_state = IPA_NEITHER;
- }
-
- if (gimple_asm_volatile_p (stmt))
- local->pure_const_state = IPA_NEITHER;
-}
-
/* Check the parameters of a function call to CALL_EXPR to see if
there are any references in the parameters that are not allowed for
pure or const functions. Also check to see if this is either an
@@ -377,20 +252,37 @@ get_asm_expr_operands (funct_state local, gimple stmt)
the entire call expression. */
static void
-check_call (funct_state local, gimple call)
+check_call (funct_state local, gimple call, bool ipa)
{
int flags = gimple_call_flags (call);
- tree lhs, callee_t = gimple_call_fndecl (call);
+ tree callee_t = gimple_call_fndecl (call);
struct cgraph_node* callee;
enum availability avail = AVAIL_NOT_AVAILABLE;
- size_t i;
-
- lhs = gimple_call_lhs (call);
- if (lhs)
- check_lhs_var (local, lhs);
+ bool possibly_throws = stmt_could_throw_p (call);
+ bool possibly_throws_externally = (possibly_throws
+ && stmt_can_throw_external (call));
- for (i = 0; i < gimple_call_num_args (call); i++)
- check_rhs_var (local, gimple_call_arg (call, i));
+ if (possibly_throws)
+ {
+ unsigned int i;
+ for (i = 0; i < gimple_num_ops (call); i++)
+ if (gimple_op (call, i)
+ && tree_could_throw_p (gimple_op (call, i)))
+ {
+ if (possibly_throws && flag_non_call_exceptions)
+ {
+ if (dump_file)
+ fprintf (dump_file, " operand can throw; looping\n");
+ local->looping = true;
+ }
+ if (possibly_throws_externally)
+ {
+ if (dump_file)
+ fprintf (dump_file, " operand can throw externally\n");
+ local->can_throw = true;
+ }
+ }
+ }
/* The const and pure flags are set by a variety of places in the
compiler (including here). If someone has already set the flags
@@ -411,8 +303,10 @@ check_call (funct_state local, gimple call)
or pure. */
if (setjmp_call_p (callee_t))
{
+ if (dump_file)
+ fprintf (dump_file, " setjmp is not const/pure\n");
+ local->looping = true;
local->pure_const_state = IPA_NEITHER;
- local->looping = false;
}
if (DECL_BUILT_IN_CLASS (callee_t) == BUILT_IN_NORMAL)
@@ -420,267 +314,252 @@ check_call (funct_state local, gimple call)
{
case BUILT_IN_LONGJMP:
case BUILT_IN_NONLOCAL_GOTO:
+ if (dump_file)
+ fprintf (dump_file, " longjmp and nonlocal goto is not const/pure\n");
local->pure_const_state = IPA_NEITHER;
- local->looping = false;
+ local->looping = true;
break;
default:
break;
}
}
+ /* When not in IPA mode, we can still handle self recursion. */
+ if (!ipa && callee_t == current_function_decl)
+ local->looping = true;
/* The callee is either unknown (indirect call) or there is just no
scannable code for it (external call) . We look to see if there
are any bits available for the callee (such as by declaration or
because it is builtin) and process solely on the basis of those
bits. */
- if (avail == AVAIL_NOT_AVAILABLE || avail == AVAIL_OVERWRITABLE)
+ else if (avail <= AVAIL_OVERWRITABLE || !ipa)
{
- if (flags & ECF_PURE)
+ if (possibly_throws && flag_non_call_exceptions)
+ {
+ if (dump_file)
+ fprintf (dump_file, " can throw; looping\n");
+ local->looping = true;
+ }
+ if (possibly_throws_externally)
+ {
+ if (dump_file)
+ {
+ fprintf (dump_file, " can throw externally in region %i\n",
+ lookup_stmt_eh_region (call));
+ if (callee_t)
+ fprintf (dump_file, " callee:%s\n",
+ IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (callee_t)));
+ }
+ local->can_throw = true;
+ }
+ if (flags & ECF_CONST)
{
+ if (callee_t && DECL_LOOPING_CONST_OR_PURE_P (callee_t))
+ local->looping = true;
+ }
+ else if (flags & ECF_PURE)
+ {
+ if (callee_t && DECL_LOOPING_CONST_OR_PURE_P (callee_t))
+ local->looping = true;
+ if (dump_file)
+ fprintf (dump_file, " pure function call in not const\n");
if (local->pure_const_state == IPA_CONST)
local->pure_const_state = IPA_PURE;
}
else
- local->pure_const_state = IPA_NEITHER;
- }
- else
- {
- /* We have the code and we will scan it for the effects. */
- if (flags & ECF_PURE)
{
- if (local->pure_const_state == IPA_CONST)
- local->pure_const_state = IPA_PURE;
+ if (dump_file)
+ fprintf (dump_file, " uknown function call is not const/pure\n");
+ local->pure_const_state = IPA_NEITHER;
+ local->looping = true;
}
}
+ /* Direct functions calls are handled by IPA propagation. */
}
-/* TP is the part of the tree currently under the microscope.
- WALK_SUBTREES is part of the walk_tree api but is unused here.
- DATA is cgraph_node of the function being walked. */
-
-/* FIXME: When this is converted to run over SSA form, this code
- should be converted to use the operand scanner. */
-
-static tree
-scan_function_op (tree *tp, int *walk_subtrees, void *data)
+/* Look into pointer pointed to by GSIP and figure out what interesting side effects
+ it have. */
+static void
+check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa)
{
- struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
- struct cgraph_node *fn = (struct cgraph_node *) wi->info;
- tree t = *tp;
- funct_state local = get_function_state (fn);
+ gimple stmt = gsi_stmt (*gsip);
+ unsigned int i = 0;
+ bitmap_iterator bi;
- switch (TREE_CODE (t))
+ if (dump_file)
{
- case VAR_DECL:
- if (DECL_INITIAL (t))
- walk_tree (&DECL_INITIAL (t), scan_function_op, data, visited_nodes);
- *walk_subtrees = 0;
- break;
-
- case ADDR_EXPR:
- /* This case is here to find addresses on rhs of constructors in
- decl_initial of static variables. */
- check_rhs_var (local, t);
- *walk_subtrees = 0;
- break;
-
- default:
- break;
+ fprintf (dump_file, " scanning: ");
+ print_gimple_stmt (dump_file, stmt, 0, 0);
+ }
+ if (gimple_loaded_syms (stmt))
+ EXECUTE_IF_SET_IN_BITMAP (gimple_loaded_syms (stmt), 0, i, bi)
+ check_decl (local, referenced_var_lookup (i), false);
+ if (gimple_stored_syms (stmt))
+ EXECUTE_IF_SET_IN_BITMAP (gimple_stored_syms (stmt), 0, i, bi)
+ check_decl (local, referenced_var_lookup (i), true);
+
+ if (gimple_code (stmt) != GIMPLE_CALL
+ && stmt_could_throw_p (stmt))
+ {
+ if (flag_non_call_exceptions)
+ {
+ if (dump_file)
+ fprintf (dump_file, " can throw; looping");
+ local->looping = true;
+ }
+ if (stmt_can_throw_external (stmt))
+ {
+ if (dump_file)
+ fprintf (dump_file, " can throw externally");
+ local->can_throw = true;
+ }
}
- return NULL;
-}
-
-static tree
-scan_function_stmt (gimple_stmt_iterator *gsi_p,
- bool *handled_ops_p,
- struct walk_stmt_info *wi)
-{
- struct cgraph_node *fn = (struct cgraph_node *) wi->info;
- gimple stmt = gsi_stmt (*gsi_p);
- funct_state local = get_function_state (fn);
-
switch (gimple_code (stmt))
{
case GIMPLE_ASSIGN:
- {
- /* First look on the lhs and see what variable is stored to */
- tree lhs = gimple_assign_lhs (stmt);
- tree rhs1 = gimple_assign_rhs1 (stmt);
- tree rhs2 = gimple_assign_rhs2 (stmt);
- enum tree_code code = gimple_assign_rhs_code (stmt);
-
- check_lhs_var (local, lhs);
-
- /* For the purposes of figuring out what the cast affects */
-
- /* Next check the operands on the rhs to see if they are ok. */
- switch (TREE_CODE_CLASS (code))
- {
- case tcc_binary:
- {
- check_rhs_var (local, rhs1);
- check_rhs_var (local, rhs2);
- }
- break;
- case tcc_unary:
- {
- check_rhs_var (local, rhs1);
- }
-
- break;
- case tcc_reference:
- check_rhs_var (local, rhs1);
- break;
- case tcc_declaration:
- check_rhs_var (local, rhs1);
- break;
- case tcc_expression:
- switch (code)
- {
- case ADDR_EXPR:
- check_rhs_var (local, rhs1);
- break;
- default:
- break;
- }
- break;
- default:
- break;
- }
- *handled_ops_p = true;
- }
+ check_op (local, gimple_assign_lhs (stmt), true);
+ i = 1;
+ break;
+ case GIMPLE_CALL:
+ check_op (local, gimple_call_lhs (stmt), true);
+ i = 1;
+ check_call (local, stmt, ipa);
break;
-
case GIMPLE_LABEL:
if (DECL_NONLOCAL (gimple_label_label (stmt)))
/* Target of long jump. */
{
+ if (dump_file)
+ fprintf (dump_file, " nonlocal label is not const/pure");
local->pure_const_state = IPA_NEITHER;
- local->looping = false;
}
break;
-
- case GIMPLE_CALL:
- check_call (local, stmt);
- *handled_ops_p = true;
- break;
-
case GIMPLE_ASM:
- get_asm_expr_operands (local, stmt);
- *handled_ops_p = true;
- break;
-
+ for (i = 0; i < gimple_asm_noutputs (stmt); i++)
+ check_op (local, TREE_VALUE (gimple_asm_output_op (stmt, i)), true);
+ for (i = 0; i < gimple_asm_ninputs (stmt); i++)
+ check_op (local, TREE_VALUE (gimple_asm_input_op (stmt, i)), false);
+ for (i = 0; i < gimple_asm_nclobbers (stmt); i++)
+ {
+ tree op = gimple_asm_clobber_op (stmt, i);
+ if (simple_cst_equal(TREE_VALUE (op), memory_identifier_string) == 1)
+ {
+ if (dump_file)
+ fprintf (dump_file, " memory asm clobber is not const/pure");
+ /* Abandon all hope, ye who enter here. */
+ local->pure_const_state = IPA_NEITHER;
+ }
+ }
+ if (gimple_asm_volatile_p (stmt))
+ {
+ if (dump_file)
+ fprintf (dump_file, " volatile is not const/pure");
+ /* Abandon all hope, ye who enter here. */
+ local->pure_const_state = IPA_NEITHER;
+ local->looping = true;
+ }
+ return;
default:
break;
}
- return NULL;
+
+ for (; i < gimple_num_ops (stmt); i++)
+ check_op (local, gimple_op (stmt, i), false);
}
/* This is the main routine for finding the reference patterns for
global variables within a function FN. */
-static void
-analyze_function (struct cgraph_node *fn)
+static funct_state
+analyze_function (struct cgraph_node *fn, bool ipa)
{
tree decl = fn->decl;
- funct_state l = XCNEW (struct funct_state_d);
-
- if (cgraph_function_body_availability (fn) <= AVAIL_OVERWRITABLE)
- return;
-
- set_function_state (fn, l);
-
- l->pure_const_state = IPA_CONST;
- l->state_set_in_source = false;
- if (DECL_LOOPING_CONST_OR_PURE_P (decl))
- l->looping = true;
- else
- l->looping = false;
+ tree old_decl = current_function_decl;
+ funct_state l;
+ basic_block this_block;
- /* If this function does not return normally or does not bind local,
- do not touch this unless it has been marked as const or pure by the
- front end. */
- if (TREE_THIS_VOLATILE (decl)
- || !targetm.binds_local_p (decl))
+ if (cgraph_function_body_availability (fn) <= AVAIL_OVERWRITABLE)
{
- l->pure_const_state = IPA_NEITHER;
- return;
+ if (dump_file)
+ fprintf (dump_file, "Function is not available or overwrittable; not analyzing.\n");
+ return NULL;
}
- if (TREE_READONLY (decl))
- {
- l->pure_const_state = IPA_CONST;
- l->state_set_in_source = true;
- }
- if (DECL_PURE_P (decl))
- {
- l->pure_const_state = IPA_PURE;
- l->state_set_in_source = true;
- }
+ l = XCNEW (struct funct_state_d);
+ l->pure_const_state = IPA_CONST;
+ l->state_set_in_source = IPA_NEITHER;
+ l->looping = false;
+ l->can_throw = false;
if (dump_file)
{
- fprintf (dump_file, "\n local analysis of %s with initial value = %d\n ",
- cgraph_node_name (fn),
- l->pure_const_state);
+ fprintf (dump_file, "\n\n local analysis of %s\n ",
+ cgraph_node_name (fn));
}
- if (!l->state_set_in_source)
+ push_cfun (DECL_STRUCT_FUNCTION (decl));
+ current_function_decl = decl;
+
+ FOR_EACH_BB (this_block)
{
- struct function *this_cfun = DECL_STRUCT_FUNCTION (decl);
- basic_block this_block;
-
- FOR_EACH_BB_FN (this_block, this_cfun)
- {
- gimple_stmt_iterator gsi;
- struct walk_stmt_info wi;
-
- memset (&wi, 0, sizeof(wi));
- for (gsi = gsi_start_bb (this_block);
- !gsi_end_p (gsi);
- gsi_next (&gsi))
- {
- wi.info = fn;
- wi.pset = visited_nodes;
- walk_gimple_stmt (&gsi, scan_function_stmt, scan_function_op,
- &wi);
- if (l->pure_const_state == IPA_NEITHER)
- goto end;
- }
- }
+ gimple_stmt_iterator gsi;
+ struct walk_stmt_info wi;
- if (l->pure_const_state != IPA_NEITHER)
+ memset (&wi, 0, sizeof(wi));
+ for (gsi = gsi_start_bb (this_block);
+ !gsi_end_p (gsi);
+ gsi_next (&gsi))
{
- tree old_decl = current_function_decl;
- /* Const functions cannot have back edges (an
- indication of possible infinite loop side
- effect. */
-
- current_function_decl = fn->decl;
-
- /* The C++ front end, has a tendency to some times jerk away
- a function after it has created it. This should have
- been fixed. */
- gcc_assert (DECL_STRUCT_FUNCTION (fn->decl));
-
- push_cfun (DECL_STRUCT_FUNCTION (fn->decl));
-
- if (mark_dfs_back_edges ())
- l->pure_const_state = IPA_NEITHER;
-
- current_function_decl = old_decl;
- pop_cfun ();
+ check_stmt (&gsi, l, ipa);
+ if (l->pure_const_state == IPA_NEITHER && l->looping && l->can_throw)
+ goto end;
}
}
end:
+ if (l->pure_const_state != IPA_NEITHER)
+ {
+ /* Const functions cannot have back edges (an
+ indication of possible infinite loop side
+ effect. */
+ if (mark_dfs_back_edges ())
+ l->looping = true;
+
+ }
+
+ if (TREE_READONLY (decl))
+ {
+ l->pure_const_state = IPA_CONST;
+ l->state_set_in_source = IPA_CONST;
+ if (!DECL_LOOPING_CONST_OR_PURE_P (decl))
+ l->looping = false;
+ }
+ if (DECL_PURE_P (decl))
+ {
+ if (l->pure_const_state != IPA_CONST)
+ l->pure_const_state = IPA_PURE;
+ l->state_set_in_source = IPA_PURE;
+ if (!DECL_LOOPING_CONST_OR_PURE_P (decl))
+ l->looping = false;
+ }
+ if (TREE_NOTHROW (decl))
+ l->can_throw = false;
+
+ pop_cfun ();
+ current_function_decl = old_decl;
if (dump_file)
{
- fprintf (dump_file, "after local analysis of %s with initial value = %d\n ",
- cgraph_node_name (fn),
- l->pure_const_state);
+ if (l->looping)
+ fprintf (dump_file, "Function is locally looping.\n");
+ if (l->can_throw)
+ fprintf (dump_file, "Function is locally throwing.\n");
+ if (l->pure_const_state == IPA_CONST)
+ fprintf (dump_file, "Function is locally const.\n");
+ if (l->pure_const_state == IPA_PURE)
+ fprintf (dump_file, "Function is locally pure.\n");
}
+ return l;
}
/* Called when new function is inserted to callgraph late. */
@@ -694,7 +573,7 @@ add_new_function (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED)
since all we would be interested in are the addressof
operations. */
visited_nodes = pointer_set_create ();
- analyze_function (node);
+ set_function_state (node, analyze_function (node, true));
pointer_set_destroy (visited_nodes);
visited_nodes = NULL;
}
@@ -755,7 +634,7 @@ generate_summary (void)
*/
for (node = cgraph_nodes; node; node = node->next)
if (cgraph_function_body_availability (node) > AVAIL_OVERWRITABLE)
- analyze_function (node);
+ set_function_state (node, analyze_function (node, true));
pointer_set_destroy (visited_nodes);
visited_nodes = NULL;
@@ -795,6 +674,7 @@ propagate (void)
{
enum pure_const_state_e pure_const_state = IPA_CONST;
bool looping = false;
+ bool can_throw = false;
int count = 0;
node = order[i];
@@ -802,38 +682,44 @@ propagate (void)
w = node;
while (w)
{
+ struct cgraph_edge *e;
funct_state w_l = get_function_state (w);
if (pure_const_state < w_l->pure_const_state)
pure_const_state = w_l->pure_const_state;
+ if (w_l->can_throw)
+ can_throw = true;
if (w_l->looping)
looping = true;
- if (pure_const_state == IPA_NEITHER)
+ if (pure_const_state == IPA_NEITHER
+ && can_throw)
break;
- if (!w_l->state_set_in_source)
+ count++;
+
+ if (count > 1)
+ looping = true;
+
+ for (e = w->callees; e; e = e->next_callee)
{
- struct cgraph_edge *e;
- count++;
+ struct cgraph_node *y = e->callee;
- if (count > 1)
- looping = true;
-
- for (e = w->callees; e; e = e->next_callee)
+ if (cgraph_function_body_availability (y) > AVAIL_OVERWRITABLE)
{
- struct cgraph_node *y = e->callee;
-
- if (cgraph_function_body_availability (y) > AVAIL_OVERWRITABLE)
- {
- funct_state y_l = get_function_state (y);
- if (pure_const_state < y_l->pure_const_state)
- pure_const_state = y_l->pure_const_state;
- if (pure_const_state == IPA_NEITHER)
- break;
- if (y_l->looping)
- looping = true;
- }
+ funct_state y_l = get_function_state (y);
+ if (pure_const_state < y_l->pure_const_state)
+ pure_const_state = y_l->pure_const_state;
+ if (pure_const_state == IPA_NEITHER
+ && can_throw)
+ break;
+ if (y_l->looping)
+ looping = true;
+ if (y_l->can_throw && !TREE_NOTHROW (w->decl)
+ /* FIXME: We should check that the throw can get external.
+ We also should handle only loops formed by can throw external
+ edges. */)
+ can_throw = true;
}
}
w_info = (struct ipa_dfs_info *) w->aux;
@@ -846,36 +732,52 @@ propagate (void)
while (w)
{
funct_state w_l = get_function_state (w);
+ enum pure_const_state_e this_state = pure_const_state;
+ bool this_looping = looping;
- /* All nodes within a cycle share the same info. */
- if (!w_l->state_set_in_source)
+ if (w_l->state_set_in_source != IPA_NEITHER)
{
- w_l->pure_const_state = pure_const_state;
- w_l->looping = looping;
+ if (this_state > w_l->state_set_in_source)
+ this_state = w_l->state_set_in_source;
+ this_looping = false;
+ }
- switch (pure_const_state)
- {
- case IPA_CONST:
- TREE_READONLY (w->decl) = 1;
- DECL_LOOPING_CONST_OR_PURE_P (w->decl) = looping;
- if (dump_file)
- fprintf (dump_file, "Function found to be %sconst: %s\n",
- looping ? "looping " : "",
- lang_hooks.decl_printable_name(w->decl, 2));
- break;
-
- case IPA_PURE:
- DECL_PURE_P (w->decl) = 1;
- DECL_LOOPING_CONST_OR_PURE_P (w->decl) = looping;
- if (dump_file)
- fprintf (dump_file, "Function found to be %spure: %s\n",
- looping ? "looping " : "",
- lang_hooks.decl_printable_name(w->decl, 2));
- break;
-
- default:
- break;
- }
+ /* All nodes within a cycle share the same info. */
+ w_l->pure_const_state = this_state;
+ w_l->looping = this_looping;
+
+ switch (this_state)
+ {
+ case IPA_CONST:
+ if (!TREE_READONLY (w->decl) && dump_file)
+ fprintf (dump_file, "Function found to be %sconst: %s\n",
+ this_looping ? "looping " : "",
+ cgraph_node_name (w));
+ TREE_READONLY (w->decl) = 1;
+ DECL_LOOPING_CONST_OR_PURE_P (w->decl) = this_looping;
+ break;
+
+ case IPA_PURE:
+ if (!DECL_PURE_P (w->decl) && dump_file)
+ fprintf (dump_file, "Function found to be %spure: %s\n",
+ this_looping ? "looping " : "",
+ cgraph_node_name (w));
+ DECL_PURE_P (w->decl) = 1;
+ DECL_LOOPING_CONST_OR_PURE_P (w->decl) = this_looping;
+ break;
+
+ default:
+ break;
+ }
+ if (!can_throw && !TREE_NOTHROW (w->decl))
+ {
+ /* FIXME: TREE_NOTHROW is not set because passmanager will execute
+ verify_ssa and verify_cfg on every function. Before fixup_cfg is done,
+ those functions are going to have NOTHROW calls in EH regions reulting
+ in ICE. */
+ if (dump_file)
+ fprintf (dump_file, "Function found to be nothrow: %s\n",
+ cgraph_node_name (w));
}
w_info = (struct ipa_dfs_info *) w->aux;
w = w_info->next_cycle;
@@ -935,3 +837,120 @@ struct ipa_opt_pass pass_ipa_pure_const =
NULL, /* function_transform */
NULL /* variable_transform */
};
+
+/* Simple local pass for pure const discovery reusing the analysis from
+ ipa_pure_const. This pass is effective when executed together with
+ other optimization passes in early optimization pass queue. */
+
+static unsigned int
+local_pure_const (void)
+{
+ bool changed = false;
+ funct_state l;
+
+ /* Because we do not schedule pass_fixup_cfg over whole program after early optimizations
+ we must not promote functions that are called by already processed functions. */
+
+ if (function_called_by_processed_nodes_p ())
+ {
+ if (dump_file)
+ fprintf (dump_file, "Function called in recursive cycle; ignoring\n");
+ return 0;
+ }
+
+ l = analyze_function (cgraph_node (current_function_decl), false);
+ if (!l)
+ {
+ if (dump_file)
+ fprintf (dump_file, "Function has wrong visibility; ignoring\n");
+ return 0;
+ }
+
+ switch (l->pure_const_state)
+ {
+ case IPA_CONST:
+ if (!TREE_READONLY (current_function_decl))
+ {
+ TREE_READONLY (current_function_decl) = 1;
+ DECL_LOOPING_CONST_OR_PURE_P (current_function_decl) = l->looping;
+ changed = true;
+ if (dump_file)
+ fprintf (dump_file, "Function found to be %sconst: %s\n",
+ l->looping ? "looping " : "",
+ lang_hooks.decl_printable_name (current_function_decl,
+ 2));
+ }
+ else if (DECL_LOOPING_CONST_OR_PURE_P (current_function_decl)
+ && !l->looping)
+ {
+ DECL_LOOPING_CONST_OR_PURE_P (current_function_decl) = false;
+ changed = true;
+ if (dump_file)
+ fprintf (dump_file, "Function found to be non-looping: %s\n",
+ lang_hooks.decl_printable_name (current_function_decl,
+ 2));
+ }
+ break;
+
+ case IPA_PURE:
+ if (!TREE_READONLY (current_function_decl))
+ {
+ DECL_PURE_P (current_function_decl) = 1;
+ DECL_LOOPING_CONST_OR_PURE_P (current_function_decl) = l->looping;
+ changed = true;
+ if (dump_file)
+ fprintf (dump_file, "Function found to be %spure: %s\n",
+ l->looping ? "looping " : "",
+ lang_hooks.decl_printable_name (current_function_decl,
+ 2));
+ }
+ else if (DECL_LOOPING_CONST_OR_PURE_P (current_function_decl)
+ && !l->looping)
+ {
+ DECL_LOOPING_CONST_OR_PURE_P (current_function_decl) = false;
+ changed = true;
+ if (dump_file)
+ fprintf (dump_file, "Function found to be non-looping: %s\n",
+ lang_hooks.decl_printable_name (current_function_decl,
+ 2));
+ }
+ break;
+
+ default:
+ break;
+ }
+ if (!l->can_throw && !TREE_NOTHROW (current_function_decl))
+ {
+ TREE_NOTHROW (current_function_decl) = 1;
+ changed = true;
+ if (dump_file)
+ fprintf (dump_file, "Function found to be nothrow: %s\n",
+ lang_hooks.decl_printable_name (current_function_decl,
+ 2));
+ }
+ if (l)
+ free (l);
+ if (changed)
+ return execute_fixup_cfg ();
+ else
+ return 0;
+}
+
+struct gimple_opt_pass pass_local_pure_const =
+{
+ {
+ GIMPLE_PASS,
+ "local-pure-const", /* name */
+ gate_pure_const, /* gate */
+ local_pure_const, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_IPA_PURE_CONST, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0 /* todo_flags_finish */
+ }
+};
diff --git a/gcc/ipa-struct-reorg.c b/gcc/ipa-struct-reorg.c
index df34f92beab..ab70c98e9b9 100644
--- a/gcc/ipa-struct-reorg.c
+++ b/gcc/ipa-struct-reorg.c
@@ -1253,7 +1253,7 @@ create_general_new_stmt (struct access_site *acc, tree new_type)
{
tree *pos;
tree new_var = find_new_var_of_type (var, new_type);
- tree lhs, rhs;
+ tree lhs, rhs = NULL_TREE;
gcc_assert (new_var);
finalize_var_creation (new_var);
diff --git a/gcc/ipa-type-escape.c b/gcc/ipa-type-escape.c
index 48d95049b4f..7349f6b8478 100644
--- a/gcc/ipa-type-escape.c
+++ b/gcc/ipa-type-escape.c
@@ -1987,9 +1987,7 @@ type_escape_execute (void)
they may cause a type variable to escape.
*/
for (node = cgraph_nodes; node; node = node->next)
- if (node->analyzed
- && (cgraph_is_master_clone (node)
- || (cgraph_function_body_availability (node) == AVAIL_OVERWRITABLE)))
+ if (node->analyzed)
analyze_function (node);
diff --git a/gcc/ira-conflicts.c b/gcc/ira-conflicts.c
index b5537bfe8df..05870ab4b16 100644
--- a/gcc/ira-conflicts.c
+++ b/gcc/ira-conflicts.c
@@ -800,29 +800,33 @@ ira_build_conflicts (void)
}
FOR_EACH_ALLOCNO (a, ai)
{
- if (ALLOCNO_CALLS_CROSSED_NUM (a) == 0)
- continue;
- if (! flag_caller_saves)
+ reg_attrs *attrs;
+ tree decl;
+
+ if ((! flag_caller_saves && ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
+ /* For debugging purposes don't put user defined variables in
+ callee-clobbered registers. */
+ || (optimize <= 1
+ && (attrs = REG_ATTRS (regno_reg_rtx [ALLOCNO_REGNO (a)])) != NULL
+ && (decl = attrs->decl) != NULL
+ && VAR_OR_FUNCTION_DECL_P (decl)
+ && ! DECL_ARTIFICIAL (decl)))
{
IOR_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a),
call_used_reg_set);
- if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
- IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a),
- call_used_reg_set);
+ IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a),
+ call_used_reg_set);
}
- else
+ else if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
{
IOR_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a),
no_caller_save_reg_set);
IOR_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a),
temp_hard_reg_set);
- if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
- {
- IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a),
- no_caller_save_reg_set);
- IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a),
- temp_hard_reg_set);
- }
+ IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a),
+ no_caller_save_reg_set);
+ IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a),
+ temp_hard_reg_set);
}
}
if (optimize && ira_conflicts_p
diff --git a/gcc/ira-int.h b/gcc/ira-int.h
index dfa5734ab9e..4cb3928564c 100644
--- a/gcc/ira-int.h
+++ b/gcc/ira-int.h
@@ -240,8 +240,6 @@ struct ira_allocno
/* Mode of the allocno which is the mode of the corresponding
pseudo-register. */
enum machine_mode mode;
- /* Final rtx representation of the allocno. */
- rtx reg;
/* Hard register assigned to given allocno. Negative value means
that memory was allocated to the allocno. During the reload,
spilled allocno has value equal to the corresponding stack slot
@@ -249,6 +247,8 @@ struct ira_allocno
reload (at this point pseudo-register has only one allocno) which
did not get stack slot yet. */
int hard_regno;
+ /* Final rtx representation of the allocno. */
+ rtx reg;
/* Allocnos with the same regno are linked by the following member.
Allocnos corresponding to inner loops are first in the list (it
corresponds to depth-first traverse of the loops). */
@@ -312,33 +312,29 @@ struct ira_allocno
correspondingly minimal and maximal conflict ids of allocnos with
which given allocno can conflict. */
int min, max;
- /* The unique member value represents given allocno in conflict bit
- vectors. */
- int conflict_id;
/* Vector of accumulated conflicting allocnos with NULL end marker
(if CONFLICT_VEC_P is true) or conflict bit vector otherwise.
Only allocnos with the same cover class are in the vector or in
the bit vector. */
void *conflict_allocno_array;
+ /* The unique member value represents given allocno in conflict bit
+ vectors. */
+ int conflict_id;
/* Allocated size of the previous array. */
unsigned int conflict_allocno_array_size;
- /* Number of accumulated conflicts in the vector of conflicting
- allocnos. */
- int conflict_allocnos_num;
/* Initial and accumulated hard registers conflicting with this
allocno and as a consequences can not be assigned to the allocno.
All non-allocatable hard regs and hard regs of cover classes
different from given allocno one are included in the sets. */
HARD_REG_SET conflict_hard_regs, total_conflict_hard_regs;
+ /* Number of accumulated conflicts in the vector of conflicting
+ allocnos. */
+ int conflict_allocnos_num;
/* Accumulated frequency of calls which given allocno
intersects. */
int call_freq;
- /* Length of the previous array (number of the intersected calls). */
+ /* Accumulated number of the intersected calls. */
int calls_crossed_num;
- /* Non NULL if we remove restoring value from given allocno to
- MEM_OPTIMIZED_DEST at loop exit (see ira-emit.c) because the
- allocno value is not changed inside the loop. */
- ira_allocno_t mem_optimized_dest;
/* TRUE if the allocno assigned to memory was a destination of
removed move (see ira-emit.c) at loop exit because the value of
the corresponding pseudo-register is not changed inside the
@@ -383,6 +379,10 @@ struct ira_allocno
vector where a bit with given index represents allocno with the
same number. */
unsigned int conflict_vec_p : 1;
+ /* Non NULL if we remove restoring value from given allocno to
+ MEM_OPTIMIZED_DEST at loop exit (see ira-emit.c) because the
+ allocno value is not changed inside the loop. */
+ ira_allocno_t mem_optimized_dest;
/* Array of usage costs (accumulated and the one updated during
coloring) for each hard register of the allocno cover class. The
member value can be NULL if all costs are the same and equal to
diff --git a/gcc/ira.c b/gcc/ira.c
index 8eb11254720..3742f0f35c1 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -1864,21 +1864,21 @@ mark_elimination (int from, int to)
struct equivalence
{
- /* Set when an attempt should be made to replace a register
- with the associated src_p entry. */
- char replace;
/* Set when a REG_EQUIV note is found or created. Use to
keep track of what memory accesses might be created later,
e.g. by reload. */
rtx replacement;
rtx *src_p;
+ /* The list of each instruction which initializes this register. */
+ rtx init_insns;
/* Loop depth is used to recognize equivalences which appear
to be present within the same loop (or in an inner loop). */
int loop_depth;
- /* The list of each instruction which initializes this register. */
- rtx init_insns;
/* Nonzero if this had a preexisting REG_EQUIV note. */
int is_arg_equivalence;
+ /* Set when an attempt should be made to replace a register
+ with the associated src_p entry. */
+ char replace;
};
/* reg_equiv[N] (where N is a pseudo reg number) is the equivalence
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 7726ca483d1..a72a2f94701 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,14 @@
+2009-03-30 Joseph Myers <joseph@codesourcery.com>
+
+ PR rtl-optimization/323
+ * lang.c (java_post_options): Set flag_excess_precision_cmdline.
+ Give an error for -fexcess-precision=standard for processors where
+ the option is significant.
+
+2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * lang.opt: Unify help text for -Wdeprecated.
+
2009-02-03 Jakub Jelinek <jakub@redhat.com>
* jcf-dump.c (version): Update copyright notice dates.
diff --git a/gcc/java/lang.opt b/gcc/java/lang.opt
index 7947a1ac045..8af1bd59e46 100644
--- a/gcc/java/lang.opt
+++ b/gcc/java/lang.opt
@@ -1,5 +1,5 @@
; Options for the Java front end.
-; Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc.
+; Copyright (C) 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
@@ -62,7 +62,7 @@ Java
Wdeprecated
Java Var(warn_deprecated) VarExists
-Warn if a deprecated compiler feature, class, method, or field is used
+; Documented for C
Wextraneous-semicolon
Java Var(flag_extraneous_semicolon)
diff --git a/gcc/jump.c b/gcc/jump.c
index 2b9a9545223..1189f812fef 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -1536,6 +1536,7 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
{
int reg_x = -1, reg_y = -1;
int byte_x = 0, byte_y = 0;
+ struct subreg_info info;
if (GET_MODE (x) != GET_MODE (y))
return 0;
@@ -1552,15 +1553,12 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
if (reg_renumber[reg_x] >= 0)
{
- if (!subreg_offset_representable_p (reg_renumber[reg_x],
- GET_MODE (SUBREG_REG (x)),
- byte_x,
- GET_MODE (x)))
+ subreg_get_info (reg_renumber[reg_x],
+ GET_MODE (SUBREG_REG (x)), byte_x,
+ GET_MODE (x), &info);
+ if (!info.representable_p)
return 0;
- reg_x = subreg_regno_offset (reg_renumber[reg_x],
- GET_MODE (SUBREG_REG (x)),
- byte_x,
- GET_MODE (x));
+ reg_x = info.offset;
byte_x = 0;
}
}
@@ -1578,15 +1576,12 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
if (reg_renumber[reg_y] >= 0)
{
- if (!subreg_offset_representable_p (reg_renumber[reg_y],
- GET_MODE (SUBREG_REG (y)),
- byte_y,
- GET_MODE (y)))
+ subreg_get_info (reg_renumber[reg_y],
+ GET_MODE (SUBREG_REG (y)), byte_y,
+ GET_MODE (y), &info);
+ if (!info.representable_p)
return 0;
- reg_y = subreg_regno_offset (reg_renumber[reg_y],
- GET_MODE (SUBREG_REG (y)),
- byte_y,
- GET_MODE (y));
+ reg_y = info.offset;
byte_y = 0;
}
}
@@ -1728,13 +1723,17 @@ true_regnum (const_rtx x)
{
int base = true_regnum (SUBREG_REG (x));
if (base >= 0
- && base < FIRST_PSEUDO_REGISTER
- && subreg_offset_representable_p (REGNO (SUBREG_REG (x)),
- GET_MODE (SUBREG_REG (x)),
- SUBREG_BYTE (x), GET_MODE (x)))
- return base + subreg_regno_offset (REGNO (SUBREG_REG (x)),
- GET_MODE (SUBREG_REG (x)),
- SUBREG_BYTE (x), GET_MODE (x));
+ && base < FIRST_PSEUDO_REGISTER)
+ {
+ struct subreg_info info;
+
+ subreg_get_info (REGNO (SUBREG_REG (x)),
+ GET_MODE (SUBREG_REG (x)),
+ SUBREG_BYTE (x), GET_MODE (x), &info);
+
+ if (info.representable_p)
+ return base + info.offset;
+ }
}
return -1;
}
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c
index 794d4e8b256..07b9469e35e 100644
--- a/gcc/lambda-code.c
+++ b/gcc/lambda-code.c
@@ -2472,7 +2472,8 @@ perfect_nestify (struct loop *loop,
it to one just in case. */
exit_condition = get_loop_exit_condition (newloop);
- uboundvar = create_tmp_var (integer_type_node, "uboundvar");
+ uboundvar = create_tmp_var (TREE_TYPE (VEC_index (tree, ubounds, 0)),
+ "uboundvar");
add_referenced_var (uboundvar);
stmt = gimple_build_assign (uboundvar, VEC_index (tree, ubounds, 0));
uboundvar = make_ssa_name (uboundvar, stmt);
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index f9f8cde4d2a..4b6ce274c00 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -46,12 +46,10 @@ extern tree lhd_return_null_tree_v (void);
extern tree lhd_return_null_tree (tree);
extern tree lhd_return_null_const_tree (const_tree);
extern tree lhd_do_nothing_iii_return_null_tree (int, int, int);
-extern tree lhd_staticp (tree);
extern void lhd_print_tree_nothing (FILE *, tree, int);
extern const char *lhd_decl_printable_name (tree, int);
extern const char *lhd_dwarf_name (tree, int);
extern int lhd_types_compatible_p (tree, tree);
-extern rtx lhd_expand_expr (tree, rtx, enum machine_mode, int, rtx *);
extern void lhd_print_error_function (struct diagnostic_context *,
const char *, struct diagnostic_info *);
extern void lhd_set_decl_assembler_name (tree);
@@ -92,9 +90,7 @@ extern void lhd_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *,
#define LANG_HOOKS_POST_OPTIONS lhd_post_options
#define LANG_HOOKS_MISSING_NORETURN_OK_P hook_bool_tree_true
#define LANG_HOOKS_GET_ALIAS_SET lhd_get_alias_set
-#define LANG_HOOKS_EXPAND_EXPR lhd_expand_expr
#define LANG_HOOKS_FINISH_INCOMPLETE_DECL lhd_do_nothing_t
-#define LANG_HOOKS_STATICP lhd_staticp
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL lhd_do_nothing_t
#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME lhd_set_decl_assembler_name
#define LANG_HOOKS_PRINT_STATISTICS lhd_do_nothing
@@ -189,6 +185,7 @@ extern tree lhd_make_node (enum tree_code);
#define LANG_HOOKS_GLOBAL_BINDINGS_P global_bindings_p
#define LANG_HOOKS_PUSHDECL pushdecl
#define LANG_HOOKS_GETDECLS getdecls
+#define LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P hook_bool_tree_false
#define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL lhd_warn_unused_global_decl
#define LANG_HOOKS_WRITE_GLOBALS write_global_declarations
#define LANG_HOOKS_DECL_OK_FOR_SIBCALL lhd_decl_ok_for_sibcall
@@ -208,6 +205,7 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_GLOBAL_BINDINGS_P, \
LANG_HOOKS_PUSHDECL, \
LANG_HOOKS_GETDECLS, \
+ LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P, \
LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, \
LANG_HOOKS_WRITE_GLOBALS, \
LANG_HOOKS_DECL_OK_FOR_SIBCALL, \
@@ -239,10 +237,8 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_PARSE_FILE, \
LANG_HOOKS_MISSING_NORETURN_OK_P, \
LANG_HOOKS_GET_ALIAS_SET, \
- LANG_HOOKS_EXPAND_EXPR, \
LANG_HOOKS_FINISH_INCOMPLETE_DECL, \
LANG_HOOKS_MARK_ADDRESSABLE, \
- LANG_HOOKS_STATICP, \
LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, \
LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, \
LANG_HOOKS_PRINT_STATISTICS, \
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index d0c5bef8837..196413792da 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -120,14 +120,6 @@ lhd_print_tree_nothing (FILE * ARG_UNUSED (file),
{
}
-/* Called from staticp. */
-
-tree
-lhd_staticp (tree ARG_UNUSED (exp))
-{
- return NULL;
-}
-
/* Called from check_global_declarations. */
bool
@@ -219,17 +211,6 @@ lhd_get_alias_set (tree ARG_UNUSED (t))
return -1;
}
-/* This is the default expand_expr function. */
-
-rtx
-lhd_expand_expr (tree ARG_UNUSED (t), rtx ARG_UNUSED (r),
- enum machine_mode ARG_UNUSED (mm),
- int ARG_UNUSED (em),
- rtx * ARG_UNUSED (a))
-{
- gcc_unreachable ();
-}
-
/* This is the default decl_printable_name function. */
const char *
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index 52d1f24448c..6c57ca2599e 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -159,6 +159,9 @@ struct lang_hooks_for_decls
/* Returns the chain of decls so far in the current scope level. */
tree (*getdecls) (void);
+ /* Returns true if DECL is explicit member function. */
+ bool (*function_decl_explicit_p) (tree);
+
/* Returns true when we should warn for an unused global DECL.
We will already have checked that it has static binding. */
bool (*warn_unused_global) (const_tree);
@@ -290,10 +293,6 @@ struct lang_hooks
Returns -1 if the language does nothing special for it. */
alias_set_type (*get_alias_set) (tree);
- /* Called by expand_expr for language-specific tree codes.
- Fourth argument is actually an enum expand_modifier. */
- rtx (*expand_expr) (tree, rtx, enum machine_mode, int, rtx *);
-
/* Function to finish handling an incomplete decl at the end of
compilation. Default hook is does nothing. */
void (*finish_incomplete_decl) (tree);
@@ -303,9 +302,6 @@ struct lang_hooks
successful. */
bool (*mark_addressable) (tree);
- /* Hook called by staticp for language-specific tree codes. */
- tree (*staticp) (tree);
-
/* Replace the DECL_LANG_SPECIFIC data, which may be NULL, of the
DECL_NODE with a newly GC-allocated copy. */
void (*dup_lang_specific_decl) (tree);
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 08f1ee69732..369c29f6abf 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -1831,6 +1831,7 @@ CTYPE
CONCAT3(__mul,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
{
MTYPE ac, bd, ad, bc, x, y;
+ CTYPE res;
ac = a * c;
bd = b * d;
@@ -1887,7 +1888,9 @@ CONCAT3(__mul,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
}
}
- return x + I * y;
+ __real__ res = x;
+ __imag__ res = y;
+ return res;
}
#endif /* complex multiply */
@@ -1898,6 +1901,7 @@ CTYPE
CONCAT3(__div,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
{
MTYPE denom, ratio, x, y;
+ CTYPE res;
/* ??? We can get better behavior from logarithmic scaling instead of
the division. But that would mean starting to link libgcc against
@@ -1943,7 +1947,9 @@ CONCAT3(__div,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
}
}
- return x + I * y;
+ __real__ res = x;
+ __imag__ res = y;
+ return res;
}
#endif /* complex divide */
@@ -2062,7 +2068,7 @@ getpagesize (void)
int
mprotect (char *addr, int len, int prot)
{
- int np, op;
+ DWORD np, op;
if (prot == 7)
np = 0x40;
@@ -2076,6 +2082,8 @@ mprotect (char *addr, int len, int prot)
np = 0x02;
else if (prot == 0)
np = 0x01;
+ else
+ return -1;
if (VirtualProtect (addr, len, np, &op))
return 0;
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index 9d844d8d90c..e02f1649c64 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -2801,7 +2801,9 @@ get_simple_loop_desc (struct loop *loop)
if (desc)
return desc;
- desc = XNEW (struct niter_desc);
+ /* At least desc->infinite is not always initialized by
+ find_simple_loop_exit. */
+ desc = XCNEW (struct niter_desc);
iv_analysis_loop_init (loop);
find_simple_exit (loop, desc);
loop->aux = desc;
diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c
index c1d5ca0caa3..d916f70266c 100644
--- a/gcc/matrix-reorg.c
+++ b/gcc/matrix-reorg.c
@@ -1,5 +1,5 @@
/* Matrix layout transformations.
- Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Razya Ladelsky <razya@il.ibm.com>
Originally written by Revital Eres and Mustafa Hagog.
@@ -261,9 +261,6 @@ struct matrix_info
gimple min_indirect_level_escape_stmt;
- /* Is the matrix transposed. */
- bool is_transposed_p;
-
/* Hold the allocation site for each level (dimension).
We can use NUM_DIMS as the upper bound and allocate the array
once with this number of elements and no need to use realloc and
@@ -272,6 +269,9 @@ struct matrix_info
int max_malloced_level;
+ /* Is the matrix transposed. */
+ bool is_transposed_p;
+
/* The location of the allocation sites (they must be in one
function). */
tree allocation_function_decl;
@@ -303,7 +303,7 @@ struct matrix_info
/* An array of the accesses to be flattened.
elements are of type "struct access_site_info *". */
- VEC (access_site_info_p, heap) * access_l;
+ VEC (access_site_info_p, heap) * access_l;
/* A map of how the dimensions will be organized at the end of
the analyses. */
@@ -930,7 +930,7 @@ analyze_transpose (void **slot, void *data ATTRIBUTE_UNUSED)
free (acc_info);
continue;
}
- if (simple_iv (loop, acc_info->stmt, acc_info->offset, &iv, true))
+ if (simple_iv (loop, loop, acc_info->offset, &iv, true))
{
if (iv.step != NULL)
{
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 66ac679f278..4a9668fef77 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,13 @@
+2009-03-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/456
+ PR c/5675
+ PR c/19976
+ PR c/29116
+ PR c/31871
+ PR c/35198
+ * objc-act.c (objc_finish_try_stmt): Set in_late_binary_op.
+
2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
PR bootstrap/38262
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 50975e41f08..df3a719ba93 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -1,6 +1,6 @@
/* Implement classes and message passing for Objective C.
- Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Steve Naroff.
This file is part of GCC.
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index b7885e6cf3c..c56915f6546 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -1595,6 +1595,7 @@ create_omp_child_function (omp_context *ctx, bool task_copy)
DECL_ARG_TYPE (t) = ptr_type_node;
DECL_CONTEXT (t) = current_function_decl;
TREE_USED (t) = 1;
+ TREE_ADDRESSABLE (t) = 1;
TREE_CHAIN (t) = DECL_ARGUMENTS (decl);
DECL_ARGUMENTS (decl) = t;
}
@@ -2316,6 +2317,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
x = create_tmp_var_raw (TREE_TYPE (TREE_TYPE (new_var)),
name);
gimple_add_tmp_var (x);
+ TREE_ADDRESSABLE (x) = 1;
x = build_fold_addr_expr_with_type (x, TREE_TYPE (new_var));
}
else
@@ -2821,7 +2823,14 @@ lower_send_shared_vars (gimple_seq *ilist, gimple_seq *olist, omp_context *ctx)
x = build_sender_ref (ovar, ctx);
gimplify_assign (x, var, ilist);
- if (!TREE_READONLY (var))
+ if (!TREE_READONLY (var)
+ /* We don't need to receive a new reference to a result
+ or parm decl. In fact we may not store to it as we will
+ invalidate any pending RSO and generate wrong gimple
+ during inlining. */
+ && !((TREE_CODE (var) == RESULT_DECL
+ || TREE_CODE (var) == PARM_DECL)
+ && DECL_BY_REFERENCE (var)))
{
x = build_sender_ref (ovar, ctx);
gimplify_assign (var, x, olist);
@@ -6337,6 +6346,7 @@ lower_omp_taskreg (gimple_stmt_iterator *gsi_p, omp_context *ctx)
ctx->sender_decl
= create_tmp_var (ctx->srecord_type ? ctx->srecord_type
: ctx->record_type, ".omp_data_o");
+ TREE_ADDRESSABLE (ctx->sender_decl) = 1;
gimple_omp_taskreg_set_data_arg (stmt, ctx->sender_decl);
}
diff --git a/gcc/optabs.c b/gcc/optabs.c
index ed59f5e1e7f..f7e44db48c2 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -6072,6 +6072,24 @@ init_one_libfunc (const char *name)
return XEXP (DECL_RTL (decl), 0);
}
+/* Adjust the assembler name of libfunc NAME to ASMSPEC. */
+
+rtx
+set_user_assembler_libfunc (const char *name, const char *asmspec)
+{
+ tree id, decl;
+ void **slot;
+ hashval_t hash;
+
+ id = get_identifier (name);
+ hash = htab_hash_string (name);
+ slot = htab_find_slot_with_hash (libfunc_decls, id, hash, NO_INSERT);
+ gcc_assert (slot);
+ decl = (tree) *slot;
+ set_user_assembler_name (decl, asmspec);
+ return XEXP (DECL_RTL (decl), 0);
+}
+
/* Call this to reset the function entry for one optab (OPTABLE) in mode
MODE to NAME, which should be either 0 or a string constant. */
void
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk
index 2e220164cfc..2117150f4d1 100644
--- a/gcc/optc-gen.awk
+++ b/gcc/optc-gen.awk
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
# Contributed by Kelley Cook, June 2004.
# Original code from Neil Booth, May 2003.
#
@@ -53,6 +53,8 @@ BEGIN {
opts[n_opts] = $1
flags[n_opts] = $2
help[n_opts] = $3
+ for (i = 4; i <= NF; i++)
+ help[n_opts] = help[n_opts] " " $i
n_opts++;
}
}
@@ -145,6 +147,12 @@ for (i = 0; i < n_opts; i++) {
# ends, for example.
while( i + 1 != n_opts && opts[i] == opts[i + 1] ) {
flags[i + 1] = flags[i] " " flags[i + 1];
+ if (help[i + 1] == "")
+ help[i + 1] = help[i]
+ else if (help[i] != "" && help[i + 1] != help[i])
+ print "warning: multiple different help strings for " \
+ opts[i] ":\n\t" help[i] "\n\t" help[i + 1] \
+ | "cat 1>&2"
i++;
back_chain[i] = "N_OPTS";
indices[opts[i]] = j;
@@ -153,11 +161,10 @@ for (i = 0; i < n_opts; i++) {
}
for (i = 0; i < n_opts; i++) {
- # Combine the flags of identical switches. Switches
- # appear many times if they are handled by many front
- # ends, for example.
+ # With identical flags, pick only the last one. The
+ # earlier loop ensured that it has all flags merged,
+ # and a nonempty help text if one of the texts was nonempty.
while( i + 1 != n_opts && opts[i] == opts[i + 1] ) {
- flags[i + 1] = flags[i] " " flags[i + 1];
i++;
}
diff --git a/gcc/opts.c b/gcc/opts.c
index 8bff1f1fb1c..e3187901634 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -368,12 +368,6 @@ DEF_VEC_ALLOC_P(const_char_p,heap);
static VEC(const_char_p,heap) *ignored_options;
-/* Function calls disallowed under -Wdisallowed-function-list=... */
-static VEC(char_p,heap) *warning_disallowed_functions;
-
-/* If -Wdisallowed-function-list=... */
-bool warn_disallowed_functions = false;
-
/* Input file names. */
const char **in_fnames;
unsigned num_in_fnames;
@@ -741,30 +735,6 @@ flag_instrument_functions_exclude_p (tree fndecl)
}
-/* Return whether this function call is disallowed. */
-void
-warn_if_disallowed_function_p (const_tree exp)
-{
- if (TREE_CODE(exp) == CALL_EXPR
- && VEC_length (char_p, warning_disallowed_functions) > 0)
- {
- int i;
- char *s;
- const char *fnname =
- IDENTIFIER_POINTER (DECL_NAME (get_callee_fndecl (exp)));
- for (i = 0; VEC_iterate (char_p, warning_disallowed_functions, i, s);
- ++i)
- {
- if (strcmp (fnname, s) == 0)
- {
- warning (OPT_Wdisallowed_function_list_,
- "disallowed call to %qs", fnname);
- break;
- }
- }
- }
-}
-
/* Decode and handle the vector of command line options. LANG_MASK
contains has a single bit set representing the current
language. */
@@ -1396,7 +1366,7 @@ print_specific_help (unsigned int include_flags,
default:
if (i >= cl_lang_count)
break;
- if ((exclude_flags & ((1U << cl_lang_count) - 1)) != 0)
+ if (exclude_flags & all_langs_mask)
description = _("The following options are specific to just the language ");
else
description = _("The following options are supported by the language ");
@@ -1409,8 +1379,12 @@ print_specific_help (unsigned int include_flags,
{
if (any_flags == 0)
{
- if (include_flags == CL_UNDOCUMENTED)
+ if (include_flags & CL_UNDOCUMENTED)
description = _("The following options are not documented");
+ else if (include_flags & CL_SEPARATE)
+ description = _("The following options take separate arguments");
+ else if (include_flags & CL_JOINED)
+ description = _("The following options take joined arguments");
else
{
internal_error ("unrecognized include_flags 0x%x passed to print_specific_help",
@@ -1515,6 +1489,8 @@ common_handle_option (size_t scode, const char *arg, int value,
{ "warnings", CL_WARNING },
{ "undocumented", CL_UNDOCUMENTED },
{ "params", CL_PARAMS },
+ { "joined", CL_JOINED },
+ { "separate", CL_SEPARATE },
{ "common", CL_COMMON },
{ NULL, 0 }
};
@@ -1537,6 +1513,11 @@ common_handle_option (size_t scode, const char *arg, int value,
len = strlen (a);
else
len = comma - a;
+ if (len == 0)
+ {
+ a = comma + 1;
+ continue;
+ }
/* Check to see if the string matches an option class name. */
for (i = 0, specific_flag = 0; specifics[i].string != NULL; i++)
@@ -1545,7 +1526,7 @@ common_handle_option (size_t scode, const char *arg, int value,
specific_flag = specifics[i].flag;
break;
}
-
+
/* Check to see if the string matches a language name.
Note - we rely upon the alpha-sorted nature of the entries in
the lang_names array, specifically that shorter names appear
@@ -1616,12 +1597,6 @@ common_handle_option (size_t scode, const char *arg, int value,
set_Wextra (value);
break;
- case OPT_Wdisallowed_function_list_:
- warn_disallowed_functions = true;
- add_comma_separated_to_vector
- (&warning_disallowed_functions, arg);
- break;
-
case OPT_Werror_:
enable_warning_as_error (arg, value, lang_mask);
break;
diff --git a/gcc/passes.c b/gcc/passes.c
index 4358b8202e6..bf312f9171a 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -536,6 +536,7 @@ init_optimization_passes (void)
NEXT_PASS (pass_early_local_passes);
{
struct opt_pass **p = &pass_early_local_passes.pass.sub;
+ NEXT_PASS (pass_fixup_cfg);
NEXT_PASS (pass_tree_profile);
NEXT_PASS (pass_cleanup_cfg);
NEXT_PASS (pass_init_datastructures);
@@ -561,7 +562,9 @@ init_optimization_passes (void)
NEXT_PASS (pass_simple_dse);
NEXT_PASS (pass_tail_recursion);
NEXT_PASS (pass_convert_switch);
+ NEXT_PASS (pass_cleanup_eh);
NEXT_PASS (pass_profile);
+ NEXT_PASS (pass_local_pure_const);
}
NEXT_PASS (pass_release_ssa_names);
NEXT_PASS (pass_rebuild_cgraph_edges);
@@ -587,6 +590,7 @@ init_optimization_passes (void)
/* Initial scalar cleanups before alias computation.
They ensure memory accesses are not indirect wherever possible. */
NEXT_PASS (pass_strip_predict_hints);
+ NEXT_PASS (pass_cleanup_eh);
NEXT_PASS (pass_update_address_taken);
NEXT_PASS (pass_rename_ssa_copies);
NEXT_PASS (pass_complete_unrolli);
@@ -684,6 +688,7 @@ init_optimization_passes (void)
NEXT_PASS (pass_phi_only_cprop);
NEXT_PASS (pass_cd_dce);
NEXT_PASS (pass_tracer);
+ NEXT_PASS (pass_cleanup_eh);
/* FIXME: If DCE is not run before checking for uninitialized uses,
we may get false warnings (e.g., testsuite/gcc.dg/uninit-5.c).
@@ -701,6 +706,7 @@ init_optimization_passes (void)
NEXT_PASS (pass_tail_calls);
NEXT_PASS (pass_rename_ssa_copies);
NEXT_PASS (pass_uncprop);
+ NEXT_PASS (pass_local_pure_const);
}
NEXT_PASS (pass_del_ssa);
NEXT_PASS (pass_nrv);
@@ -752,12 +758,12 @@ init_optimization_passes (void)
NEXT_PASS (pass_reginfo_init);
NEXT_PASS (pass_inc_dec);
NEXT_PASS (pass_initialize_regs);
- NEXT_PASS (pass_outof_cfg_layout_mode);
NEXT_PASS (pass_ud_rtl_dce);
NEXT_PASS (pass_combine);
NEXT_PASS (pass_if_after_combine);
NEXT_PASS (pass_partition_blocks);
NEXT_PASS (pass_regmove);
+ NEXT_PASS (pass_outof_cfg_layout_mode);
NEXT_PASS (pass_split_all_insns);
NEXT_PASS (pass_lower_subreg2);
NEXT_PASS (pass_df_initialize_no_opt);
@@ -878,11 +884,14 @@ do_per_function_toporder (void (*callback) (void *data), void *data)
order = GGC_NEWVEC (struct cgraph_node *, cgraph_n_nodes);
nnodes = cgraph_postorder (order);
for (i = nnodes - 1; i >= 0; i--)
+ order[i]->process = 1;
+ for (i = nnodes - 1; i >= 0; i--)
{
struct cgraph_node *node = order[i];
/* Allow possibly removed nodes to be garbage collected. */
order[i] = NULL;
+ node->process = 0;
if (node->analyzed && (node->needed || node->reachable))
{
push_cfun (DECL_STRUCT_FUNCTION (node->decl));
@@ -1369,4 +1378,30 @@ execute_ipa_pass_list (struct opt_pass *pass)
while (pass);
}
+/* Called by local passes to see if function is called by already processed nodes.
+ Because we process nodes in topological order, this means that function is
+ in recursive cycle or we introduced new direct calls. */
+bool
+function_called_by_processed_nodes_p (void)
+{
+ struct cgraph_edge *e;
+ for (e = cgraph_node (current_function_decl)->callers; e; e = e->next_caller)
+ {
+ if (e->caller->decl == current_function_decl)
+ continue;
+ if (!e->caller->analyzed || (!e->caller->needed && !e->caller->reachable))
+ continue;
+ if (TREE_ASM_WRITTEN (e->caller->decl))
+ continue;
+ if (!e->caller->process && !e->caller->global.inlined_to)
+ break;
+ }
+ if (dump_file && e)
+ {
+ fprintf (dump_file, "Already processed call to:\n");
+ dump_cgraph_node (dump_file, e->caller);
+ }
+ return e != NULL;
+}
+
#include "gt-passes.h"
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index 4d502c3da66..01921888d93 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,16 @@
+2009-03-28 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.pot: Regenerate.
+
+2009-03-28 Joseph Myers <joseph@codesourcery.com>
+
+ * EXCLUDES (fix-header.c, gen-protos.c, scan-decls.c, scan.c,
+ scan.h): Remove.
+
+2009-03-03 Joseph Myers <joseph@codesourcery.com>
+
+ * es.po: Update.
+
2009-02-22 Joseph Myers <joseph@codesourcery.com>
* zh_CN.po: Update.
diff --git a/gcc/po/EXCLUDES b/gcc/po/EXCLUDES
index e9c5db11015..a0776bd879b 100644
--- a/gcc/po/EXCLUDES
+++ b/gcc/po/EXCLUDES
@@ -43,8 +43,6 @@ unwind.h
# These programs are meant to be executed only by GCC maintainers or
# installers. Such files do not need to be translated, as these
# people typically need to be able to read English anyway.
-fix-header.c
-gen-protos.c
genattr.c
genattrtab.c
genautomata.c
@@ -66,9 +64,6 @@ genpreds.c
genrecog.c
gensupport.c
gensupport.h
-scan-decls.c
-scan.c
-scan.h
# These files are not yet internationalized, because they contain
# many strings that require a lot of analysis, and are little-used.
diff --git a/gcc/po/es.po b/gcc/po/es.po
index 23e9f1ac96e..433b8056a02 100644
--- a/gcc/po/es.po
+++ b/gcc/po/es.po
@@ -1,16 +1,16 @@
-# Mensajes en español para gcc-4.3.0
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Mensajes en español para gcc-4.4-b20081121
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file is distributed under the same license as the gcc package.
-# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
#
# Agradezco a Juan Cuquejo Mira por sus comentarios sobre esta traducción
#
msgid ""
msgstr ""
-"Project-Id-Version: gcc 4.3.0\n"
+"Project-Id-Version: gcc 4.4-b20081121\n"
"Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
"POT-Creation-Date: 2008-11-18 20:02+0000\n"
-"PO-Revision-Date: 2008-03-18 11:52-0600\n"
+"PO-Revision-Date: 2009-03-03 14:52-0600\n"
"Last-Translator: Cristian Othón Martínez Vera <cfuga@itam.mx>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
@@ -302,14 +302,12 @@ msgid "char-array initialized from wide string"
msgstr "matriz de tipo char inicializada con una cadena ancha"
#: c-typeck.c:4803
-#, fuzzy
msgid "wide character array initialized from non-wide string"
-msgstr "matriz de tipo wchar_t inicializada con una cadena que no es ancha"
+msgstr "matriz de caracteres anchos inicializada con una cadena que no es ancha"
#: c-typeck.c:4809
-#, fuzzy
msgid "wide character array initialized from incompatible wide string"
-msgstr "matriz de tipo wchar_t inicializada con una cadena que no es ancha"
+msgstr "matriz de caracteres anchos inicializada con una cadena ancha incompatible"
#: c-typeck.c:4827 cp/typeck2.c:785
#, gcc-internal-format
@@ -467,7 +465,7 @@ msgstr "el cuerpo de la función no está disponible"
#: cgraph.c:688 cgraphbuild.c:95
msgid "redefined extern inline functions are not considered for inlining"
-msgstr "las funciones extern inline redefinidas no se consideran para la inclusión en línea'"
+msgstr "las funciones extern inline redefinidas no se consideran para la inclusión en línea"
#: cgraph.c:691 cgraphbuild.c:102
msgid "function not considered for inlining"
@@ -931,9 +929,8 @@ msgid " -print-multi-os-directory Display the relative path to OS libraries\n"
msgstr " -print-multi-os-directory Muestra la ruta relativa para las bibliotecas del SO\n"
#: gcc.c:3247
-#, fuzzy
msgid " -print-sysroot Display the target libraries directory\n"
-msgstr " -dumpmachine Muestra el procesador objetivo del compilador\n"
+msgstr " -print-sysroot Muestra el directorio de las bibliotecas objetivo\n"
#: gcc.c:3248
msgid " -print-sysroot-headers-suffix Display the sysroot suffix used to find headers\n"
@@ -1119,9 +1116,9 @@ msgid "argument to '-specs=' is missing"
msgstr "falta el argumento para '-specs='"
#: gcc.c:3822
-#, fuzzy, c-format
+#, c-format
msgid "argument to '-wrapper' is missing"
-msgstr "falta el argumento para '-specs'"
+msgstr "falta el argumento para '-wrapper'"
#: gcc.c:3850
#, c-format
@@ -1770,11 +1767,8 @@ msgid "optimizing for size and code size would grow"
msgstr "se optimiza para tamaño y el tamaño del código podría crecer"
#: ipa-inline.c:980
-#, fuzzy
msgid "target specific option mismatch"
-msgstr ""
-"\n"
-"Opciones específicas del objetivo:\n"
+msgstr "no coincide la opción específica del objetivo"
#: ipa-inline.c:1056
msgid "--param inline-unit-growth limit reached"
@@ -1845,7 +1839,7 @@ msgstr " No se encontraron opciones con las características deseadas\n"
#: opts.c:1312
#, c-format
msgid " None found. Use --help=%s to show *all* the options supported by the %s front-end\n"
-msgstr ""
+msgstr " No se encontró ninguna. Use --help=%s para mostrar *todas* las opciones admitidas por el frente %s\n"
#: opts.c:1318
#, c-format
@@ -1873,9 +1867,8 @@ msgid "The --param option recognizes the following as parameters"
msgstr "La opción --param reconoce los parámetros a continuación"
#: opts.c:1390
-#, fuzzy
msgid "The following options are specific to just the language "
-msgstr "Las siguientes opciones son específicas del lenguaje "
+msgstr "Las siguientes opciones son específicas sólo para el lenguaje "
#: opts.c:1392
msgid "The following options are supported by the language "
@@ -1892,10 +1885,10 @@ msgstr "Las siguientes opciones son relacionadas al lenguaje"
#: opts.c:1567
#, c-format
msgid "warning: --help argument %.*s is ambiguous, please be more specific\n"
-msgstr ""
+msgstr "aviso: el argumento %.*s de --help es ambiguo, por favor sea más específico\n"
#: opts.c:1575
-#, fuzzy, c-format
+#, c-format
msgid "warning: unrecognized argument to --help= option: %.*s\n"
msgstr "aviso: no se reconoce el argumento para la opción --help=: %.*s\n"
@@ -2155,7 +2148,7 @@ msgstr "%s: se podría convertir el fichero '%s'\n"
#: protoize.c:3952
#, c-format
msgid "%s: converting file '%s'\n"
-msgstr "%s: convirtiendo el fichero '%s'\n"
+msgstr "%s: se convierte el fichero '%s'\n"
#: protoize.c:3962
#, c-format
@@ -2353,14 +2346,12 @@ msgid "originally indirect function call not considered for inlining"
msgstr "originalmente la llamada indirecta a función no se considera para la inclusión en línea"
#: tree-vrp.c:6383
-#, fuzzy
msgid "assuming signed overflow does not occur when simplifying && or || to & or |"
-msgstr "se asume que el desbordamiento con signo no ocurre al simplificar la prueba de rango"
+msgstr "se asume que el desbordamiento con signo no ocurre al simplificar && o || a & o |"
#: tree-vrp.c:6387
-#, fuzzy
msgid "assuming signed overflow does not occur when simplifying ==, != or ! to identity or ^"
-msgstr "se asume que el desbordamiento con signo no ocurre al simplificar la prueba de rango"
+msgstr "se asume que el desbordamiento con signo no ocurre al simplificar ==, != o ! a identidad o ^"
#. The remainder are real diagnostic types.
#: diagnostic.def:15
@@ -2398,14 +2389,12 @@ msgstr "depuración: "
#. These two would be re-classified as DK_WARNING or DK_ERROR, so the
#. prefix does not matter.
#: diagnostic.def:25
-#, fuzzy
msgid "pedwarn: "
-msgstr "aviso: "
+msgstr "avisoped: "
#: diagnostic.def:26
-#, fuzzy
msgid "permerror: "
-msgstr "error: "
+msgstr "errorperm: "
#: params.def:47
msgid "The maximum structure size (in bytes) for which GCC will use by-element copies"
@@ -2425,7 +2414,7 @@ msgstr "La tasa de intervalo entre las cuentas de estructura actual y más calien
#: params.def:85
msgid "Maximal esitmated outcome of branch considered predictable"
-msgstr ""
+msgstr "Salida estimada maximal de la ramificación considerada predecible"
#: params.def:102
msgid "The maximum number of instructions in a single function eligible for inlining"
@@ -2492,9 +2481,8 @@ msgid "how much can given compilation unit grow because of the inlining (in perc
msgstr "cuánto puede crecer la unidad de compilación dada a causa de la inclusión en línea (en porcentajes)"
#: params.def:205
-#, fuzzy
msgid "how much can given compilation unit grow because of the interprocedural constant propagation (in percent)"
-msgstr "cuánto puede crecer la unidad de compilación dada a causa de la inclusión en línea (en porcentajes)"
+msgstr "cuánto puede crecer la unidad de compilación dada a causa de la propagación constante interprocedural (en porcentajes)"
#: params.def:209
msgid "expense of call operation relative to ordinary arithmetic operations"
@@ -2599,7 +2587,7 @@ msgstr "La selección de fracción de la frecuencia maximal de ejecuciones de bloq
#: params.def:350
msgid "Loops iterating at least selected number of iterations will get loop alignement."
-msgstr "Iterar ciclos por lo menos el número seleccionado de iteraciones que logrará alienación de ciclos."
+msgstr "Iterar ciclos por lo menos el número seleccionado de iteraciones que logrará alineación de ciclos."
#: params.def:366
msgid "The maximum number of loop iterations we predict statically"
@@ -2760,21 +2748,19 @@ msgstr "La probabilidad mínima de éxito de especulación (en porcentaje), para qu
#: params.def:592
msgid "The maximum size of the lookahead window of selective scheduling"
-msgstr ""
+msgstr "El tamaño máximo de la ventana de búsqueda hacia adelante de la calendarización selectiva"
#: params.def:597
-#, fuzzy
msgid "Maximum number of times that an insn could be scheduled"
-msgstr "Establece el número de insns encoladas que se pueden calendarizar prematuramente"
+msgstr "El número máximo de veces que se puede calendarizar una insns"
#: params.def:602
-#, fuzzy
msgid "Maximum number of instructions in the ready list that are considered eligible for renaming"
-msgstr "El número máximo de instrucciones en una sola función elegible para inclusión en línea"
+msgstr "El número máximo de instrucciones en la lista ready que se consideran elegibles para renombrado"
#: params.def:607
msgid "Minimal distance between possibly conflicting store and load"
-msgstr ""
+msgstr "La distancia mínima entre store y load en posible conflicto"
#: params.def:612
msgid "The maximum number of RTL nodes that can be recorded as combiner's last value"
@@ -2846,11 +2832,11 @@ msgstr "Se usó un multiplicador para determinar la tasa de doble encolamiento"
#: params.def:756
msgid "max loops number for regional RA"
-msgstr ""
+msgstr "número de ciclos máximo para el RA regional"
#: params.def:764
msgid "The maximum ratio between array size and switch branches for a switch conversion to take place"
-msgstr ""
+msgstr "La tasa máxima entre el tamaño de la matriz y las ramificaciones switch para que tome lugar una conversión switch"
#: config/alpha/alpha.c:5025
#, c-format
@@ -3506,21 +3492,19 @@ msgstr "MMIX Interno: Esto no es una constante:"
#: config/picochip/picochip.c:2398
msgid "picochip_print_memory_address - Operand isn't memory based"
-msgstr ""
+msgstr "picochip_print_memory_address - El operando no está basado en memoria"
#: config/picochip/picochip.c:2657
msgid "Unknown mode in print_operand (CONST_DOUBLE) :"
-msgstr ""
+msgstr "Modo desconocido en print_operand (CONST_DOUBLE) :"
#: config/picochip/picochip.c:2703 config/picochip/picochip.c:2735
-#, fuzzy
msgid "Bad address, not (reg+disp):"
-msgstr "dirección errónea, no (reg+disp):"
+msgstr "Dirección errónea, no (reg+disp):"
#: config/picochip/picochip.c:2749
-#, fuzzy
msgid "Bad address, not register:"
-msgstr "dirección errónea, no (reg+disp):"
+msgstr "Dirección errónea, no register:"
#: config/rs6000/host-darwin.c:97
#, c-format
@@ -3598,9 +3582,9 @@ msgid "invalid %%v value"
msgstr "valor %%v inválido"
#: config/rs6000/rs6000.c:12513
-#, fuzzy, c-format
+#, c-format
msgid "invalid %%y value, try using the 'Z' constraint"
-msgstr "puntuación %qc inválida en la restricción"
+msgstr "valor %%y inválido, pruebe usando la restricción 'Z'"
#: config/rs6000/rs6000.c:22816
msgid "AltiVec argument passed to unprototyped function"
@@ -3785,7 +3769,7 @@ msgstr "falta el argumento para '%s'\n"
#: fortran/arith.c:44
#, no-c-format
msgid "Conversion of an Infinity or Not-a-Number at %L to INTEGER"
-msgstr ""
+msgstr "Conversión de un Infinity o No-un-Numero en %L a INTEGER"
#: fortran/arith.c:94
msgid "Arithmetic OK at %L"
@@ -3822,42 +3806,42 @@ msgstr "operación binaria elemental"
#: fortran/arith.c:2059
#, no-c-format
msgid "Arithmetic OK converting %s to %s at %L"
-msgstr "Se convierte el OK aritmético %s a %s en %L"
+msgstr "OK aritmético al convertir %s a %s en %L"
#: fortran/arith.c:2063
#, no-c-format
msgid "Arithmetic overflow converting %s to %s at %L. This check can be disabled with the option -fno-range-check"
-msgstr "El desborde aritmético convierte %s a %s en %L. Esta revisión se puede desactivar con la opción -fno-range-check"
+msgstr "Desborde aritmético al convertir %s a %s en %L. Esta revisión se puede desactivar con la opción -fno-range-check"
#: fortran/arith.c:2068
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Arithmetic underflow converting %s to %s at %L. This check can be disabled with the option -fno-range-check"
-msgstr "El desborde aritmético convierte %s a %s en %L. Esta revisión se puede desactivar con la opción -fno-range-check"
+msgstr "Desborde aritmético por debajo al convertir %s a %s en %L. Esta revisión se puede desactivar con la opción -fno-range-check"
#: fortran/arith.c:2073
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Arithmetic NaN converting %s to %s at %L. This check can be disabled with the option -fno-range-check"
-msgstr "El desborde aritmético convierte %s a %s en %L. Esta revisión se puede desactivar con la opción -fno-range-check"
+msgstr "NaN aritmético al convertir %s a %s en %L. Esta revisión se puede desactivar con la opción -fno-range-check"
#: fortran/arith.c:2078
#, no-c-format
msgid "Division by zero converting %s to %s at %L"
-msgstr "Se convierte la división por cero %s a %s en %L"
+msgstr "División por cero al convertir %s a %s en %L"
#: fortran/arith.c:2082
#, no-c-format
msgid "Array operands are incommensurate converting %s to %s at %L"
-msgstr "Se convierten los operandos de matriz que son inconmesurables %s a %s en %L"
+msgstr "Los operandos de matriz son inconmesurables al convertir %s a %s en %L"
#: fortran/arith.c:2086
#, no-c-format
msgid "Integer outside symmetric range implied by Standard Fortran converting %s to %s at %L"
-msgstr "Se convierte el rango simétrico fuera de entero implicado por Standard Fortran %s a %s en %L"
+msgstr "Entero fuera del rango simétrico implicado por Standard Fortran al convertir %s a %s en %L"
#: fortran/arith.c:2419
#, no-c-format
msgid "The Hollerith constant at %L is too long to convert to %s"
-msgstr "La constante Holletith en %L es demasiado grande para convertirse a %s"
+msgstr "La constante Hollerith en %L es demasiado grande para convertirse a %s"
#: fortran/arith.c:2578
#, no-c-format
@@ -3912,7 +3896,7 @@ msgstr "Especificación de matriz errónea para una matriz de forma diferida en %C
#: fortran/array.c:417
#, no-c-format
msgid "Bad specification for assumed size array at %C"
-msgstr "Especificación errónea para el tamaño de matriz asumido en %C"
+msgstr "Especificación errónea para la matriz de tamaño asumido en %C"
#: fortran/array.c:426
#, no-c-format
@@ -3925,9 +3909,9 @@ msgid "Array specification at %C has more than %d dimensions"
msgstr "La especificación de matriz en %C tiene más de %d dimensiones"
#: fortran/array.c:438
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2008: Array specification at %C with more than 7 dimensions"
-msgstr "La especificación de matriz en %C tiene más de %d dimensiones"
+msgstr "Fortran 2008: La especificación de matriz en %C tiene más de 7 dimensiones"
#: fortran/array.c:644
#, no-c-format
@@ -3947,12 +3931,12 @@ msgstr "Error sintáctico en el constructor de matriz en %C"
#: fortran/array.c:895
#, no-c-format
msgid "Fortran 2003: [...] style array constructors at %C"
-msgstr "Fortran 2003: constructores de matriz de estilo [...] en %C"
+msgstr "Fortran 2003: Constructores de matriz de estilo [...] en %C"
#: fortran/array.c:915
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: Array constructor including type specification at %C"
-msgstr "Fortran 2003: constructores de matriz de estilo [...] en %C"
+msgstr "Fortran 2003: Los constructores de matriz incluyen especificación de tipo en %C"
#: fortran/array.c:930
#, no-c-format
@@ -3970,9 +3954,9 @@ msgid "Iterator step at %L cannot be zero"
msgstr "El paso de iterador en %L no puede ser cero"
#: fortran/array.c:1650
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Different CHARACTER lengths (%d/%d) in array constructor at %L"
-msgstr "El elemento en el constructor de matriz %s en %L es %s"
+msgstr "Longitudes de CHARACTER diferentes (%d/%d) en el constructor de matriz en %L"
#: fortran/check.c:44
#, no-c-format
@@ -4122,7 +4106,7 @@ msgstr "Fortran 2003: Intrínseco '%s' con argumento KIND en %L"
#: fortran/check.c:881
#, no-c-format
msgid "SHIFT argument at %L of CSHIFT must have rank %d or be a scalar"
-msgstr ""
+msgstr "El argumento SHIFT en %L de CSHIFT debe tener rango %d o ser un escalar"
#: fortran/check.c:979 fortran/check.c:1799 fortran/check.c:1807
#, no-c-format
@@ -4142,17 +4126,17 @@ msgstr "El argumento '%s' del intrínseco '%s' en %L debe ser real por defecto"
#: fortran/check.c:1047
#, no-c-format
msgid "SHIFT argument at %L of EOSHIFT must have rank %d or be a scalar"
-msgstr ""
+msgstr "El argumento SHIFT en %L de EOSHIFT debe tener rango %d o ser un escalar"
#: fortran/check.c:1067
-#, fuzzy, no-c-format
+#, no-c-format
msgid "BOUNDARY argument at %L of EOSHIFT must have rank %d or be a scalar"
-msgstr "el argumento de UPPER debe tener un modo, o ser un modo"
+msgstr "El argumento BOUNDARY en %L de EOSHIFT debe tener rango %d o ser un escalar"
#: fortran/check.c:1078
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Different shape in dimension %d for SHIFT and BOUNDARY arguments of EOSHIFT at %L"
-msgstr "Formas diferentes en la dimensión 1 para los argumentos '%s' y '%s' en %L para el intrínseco matmul"
+msgstr "Formas diferentes en la dimensión %d para los argumentos SHIFT y BOUNDARY de EOSHIFT en %L"
#: fortran/check.c:1310
#, no-c-format
@@ -4257,7 +4241,7 @@ msgstr "Faltan argumentos para el intrínseco %s en %L"
#: fortran/check.c:2516
#, no-c-format
msgid "'source' argument of 'shape' intrinsic at %L must not be an assumed size array"
-msgstr "El argumento 'source' del intrínseco 'shape' en %L no debe ser un tamaño de matriz asumido"
+msgstr "El argumento 'source' del intrínseco 'shape' en %L no debe ser una matriz de tamaño asumido"
#: fortran/check.c:2590
#, no-c-format
@@ -4272,17 +4256,17 @@ msgstr "El argumento 'MOLD' del intrínseco 'TRANSFER' en %L no debe ser %s"
#: fortran/check.c:2924
#, no-c-format
msgid "FIELD argument at %L of UNPACK must have the same rank as MASK or be a scalar"
-msgstr ""
+msgstr "El argumento FIELD en %L de UNPACK debe tener el mismo rango que MASK o ser un escalar"
#: fortran/check.c:2935
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Different shape in dimension %d for MASK and FIELD arguments of UNPACK at %L"
-msgstr "Formas diferentes en la dimensión 1 para los argumentos '%s' y '%s' en %L para el intrínseco matmul"
+msgstr "Formas diferentes en la dimensión %d para los argumentos MASK y FIELD de UNPACK en %L"
#: fortran/check.c:3175
#, no-c-format
msgid "Array PUT of intrinsic %s is too small (%i/%i) at %L"
-msgstr ""
+msgstr "La matriz PUT del intrínseco %s es demasiado pequeña (%i/%i) en %L"
#: fortran/check.c:3207
#, no-c-format
@@ -4312,12 +4296,12 @@ msgstr "se especificó dos veces el nombre del fichero de salida"
#: fortran/cpp.c:432
#, no-c-format
msgid "To enable preprocessing, use -cpp"
-msgstr ""
+msgstr "Para activar el preprocesamiento, utilice -cpp"
#: fortran/cpp.c:521 fortran/cpp.c:531
-#, fuzzy, no-c-format
+#, no-c-format
msgid "opening output file %s: %s"
-msgstr "abriendo el fichero de salida %s: %m"
+msgstr "se abre el fichero de salida %s: %s"
#: fortran/data.c:64
#, no-c-format
@@ -4856,9 +4840,9 @@ msgid "Unexpected junk after function declaration at %C"
msgstr "Basura inesperada después de la declaración de la función en %C"
#: fortran/decl.c:4069 fortran/decl.c:4869
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2008: BIND(C) attribute at %L may not be specified for an internal procedure"
-msgstr "Extensión: El atributo BIND(C) en %L no se puede especificar para un procedimiento internal"
+msgstr "Fortran 2008: El atributo BIND(C) en %L no se puede especificar para un procedimiento internal"
#: fortran/decl.c:4137
#, no-c-format
@@ -5214,29 +5198,29 @@ msgid "MODULE PROCEDURE at %C must be in a generic module interface"
msgstr "MODULE PROCEDURE en %C debe estar en una interfaz genérica de módulo"
#: fortran/decl.c:6295
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Ambiguous symbol in TYPE definition at %C"
-msgstr "Se esperaba :: en la definición TYPE en %C"
+msgstr "Símbolo ambiguo en la definición TYPE en %C"
#: fortran/decl.c:6301
-#, fuzzy, no-c-format
+#, no-c-format
msgid "No such symbol in TYPE definition at %C"
-msgstr "Se esperaba :: en la definición TYPE en %C"
+msgstr "No existe ese símbolo en la definición TYPE en %C"
#: fortran/decl.c:6307
#, no-c-format
msgid "'%s' in EXTENDS expression at %C is not a derived type"
-msgstr ""
+msgstr "'%s' en la expresión EXTENDS en %C no es un tipo derivado"
#: fortran/decl.c:6314
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'%s' cannot be extended at %C because it is BIND(C)"
-msgstr "El tipo derivado '%s' en %L no puede tener el atributo SEQUENCE porque es BIND(C)"
+msgstr "'%s' no se puede extender en %C porque es BIND(C)"
#: fortran/decl.c:6321
#, no-c-format
msgid "'%s' cannot be extended at %C because it is a SEQUENCE type"
-msgstr ""
+msgstr "'%s' no se puede extender en %C porque es un tipo SEQUENCE"
#: fortran/decl.c:6344
#, no-c-format
@@ -5249,9 +5233,9 @@ msgid "Derived type at %C can only be PUBLIC in the specification part of a modu
msgstr "El tipo derivado en %C sólo puede ser PUBLIC en la parte de especificación de un módulo"
#: fortran/decl.c:6377
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: ABSTRACT type at %C"
-msgstr "Fortran 2003: ABSTRACT INTERFACE en %C"
+msgstr "Fortran 2003: Tipo ABSTRACT en %C"
#: fortran/decl.c:6441
#, no-c-format
@@ -5276,7 +5260,7 @@ msgstr "La definición del tipo derivado de '%s' en %C ya se había definido"
#: fortran/decl.c:6545
#, no-c-format
msgid "Cray Pointee at %C cannot be assumed shape array"
-msgstr "El Apuntado Cray en %C no se puede asumir como matriz de forma"
+msgstr "El Apuntado Cray en %C no puede ser una matriz de forma asumida"
#: fortran/decl.c:6565
#, no-c-format
@@ -5299,149 +5283,149 @@ msgid "Syntax error in ENUMERATOR definition at %C"
msgstr "Error sintáctico en la definición ENUMERATOR en %C"
#: fortran/decl.c:6765 fortran/decl.c:6780
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Duplicate access-specifier at %C"
-msgstr "Especificación %s duplicada en %C"
+msgstr "Especificador de acceso duplicado en %C"
#: fortran/decl.c:6800
#, no-c-format
msgid "Binding attributes already specify passing, illegal NOPASS at %C"
-msgstr ""
+msgstr "Los atributos de enlace ya especifican paso, NOPASS ilegal en %C"
#: fortran/decl.c:6818
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Duplicate NON_OVERRIDABLE at %C"
-msgstr "Se esperaba una VARIABLE en %C"
+msgstr "NON_OVERRIDABLE duplicado en %C"
#: fortran/decl.c:6833
-#, fuzzy, no-c-format
+#, no-c-format
msgid "DEFERRED not yet implemented at %C"
-msgstr "FORBID no se ha implementado aún"
+msgstr "DEFERRED aún no se admite en %C"
#: fortran/decl.c:6847
#, no-c-format
msgid "Binding attributes already specify passing, illegal PASS at %C"
-msgstr ""
+msgstr "Los atributos de enlace ya especifican paso, PASS ilegal en %C"
#: fortran/decl.c:6868
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected access-specifier at %C"
-msgstr "Se esperaba una interfaz sin nombre en %C"
+msgstr "Se esperaba un especificador de acceso en %C"
#: fortran/decl.c:6870
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected binding attribute at %C"
-msgstr "Se esperaba un nombre terminal en %C"
+msgstr "Se esperaba un atributo de enlace en %C"
#: fortran/decl.c:6910
-#, fuzzy, no-c-format
+#, no-c-format
msgid "PROCEDURE(interface) at %C is not yet implemented"
-msgstr "FORBID no se ha implementado aún"
+msgstr "PROCEDURE(interface) en %C aún no se admite"
#: fortran/decl.c:6932
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected '::' after binding-attributes at %C"
-msgstr "Se esperaba un nombre terminal en %C"
+msgstr "Se esperaba '::' después de los atributos de enlace en %C"
#: fortran/decl.c:6942
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected binding name at %C"
-msgstr "Se esperaba un nombre terminal en %C"
+msgstr "Se esperaba un nombre de enlace en %C"
#: fortran/decl.c:6955
#, no-c-format
msgid "'::' needed in PROCEDURE binding with explicit target at %C"
-msgstr ""
+msgstr "Se necesita '::' en el enlace PROCEDURE con objetivo explícito en %C"
#: fortran/decl.c:6965
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected binding target after '=>' at %C"
-msgstr "Se esperaba un nombre terminal en %C"
+msgstr "Se esperaba un objetivo de enlace después de '=>' en %C"
#: fortran/decl.c:6977
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Junk after PROCEDURE declaration at %C"
-msgstr "Error sintáctico en la declaración CHARACTER en %C"
+msgstr "Basura después de la declaración PROCEDURE en %C"
#: fortran/decl.c:6995
#, no-c-format
msgid "There's already a procedure with binding name '%s' for the derived type '%s' at %C"
-msgstr ""
+msgstr "Ya existe un procedimiento con nombre de enlace '%s' para el tipo derivado '%s' en %C"
#: fortran/decl.c:7028
#, no-c-format
msgid "GENERIC at %C must be inside a derived-type CONTAINS"
-msgstr ""
+msgstr "GENERIC en %C debe estar dentro de un tipo derivado CONTAINS"
#: fortran/decl.c:7045
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected '::' at %C"
-msgstr "Se esperaba '(' en %C"
+msgstr "Se esperaba '::' en %C"
#: fortran/decl.c:7055
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected generic name at %C"
-msgstr "se esperaba un nombre variable en %C"
+msgstr "Se esperaba un nombre genérico en %C"
#: fortran/decl.c:7066
#, no-c-format
msgid "There's already a non-generic procedure with binding name '%s' for the derived type '%s' at %C"
-msgstr ""
+msgstr "Ya existe un procedimiento que no es genérico con el nombre de enlace '%s' para el tipo derivado '%s' en %C"
#: fortran/decl.c:7075
#, no-c-format
msgid "Binding at %C must have the same access as already defined binding '%s'"
-msgstr ""
+msgstr "El enlace en %C debe tener el mismo acceso que el enlace '%s' que ya está definido"
#: fortran/decl.c:7103
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected specific binding name at %C"
-msgstr "Se esperaba un nombre terminal en %C"
+msgstr "Se esperaba un nombre de enlace específico en %C"
#: fortran/decl.c:7114
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'%s' already defined as specific binding for the generic '%s' at %C"
-msgstr "No hay una función específica para el genérico '%s' en %L"
+msgstr "Ya se definió '%s' como un enlace específico para el genérico '%s' en %L"
#: fortran/decl.c:7132
#, no-c-format
msgid "Junk after GENERIC binding at %C"
-msgstr ""
+msgstr "Basura después del enlace GENERIC en %C"
#: fortran/decl.c:7157
#, no-c-format
msgid "FINAL declaration at %C must be inside a derived type CONTAINS section"
-msgstr ""
+msgstr "La declaración FINAL en %C debe estar dentro de una sección de tipo derivado CONTAINS"
#: fortran/decl.c:7168
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Derived type declaration with FINAL at %C must be in the specification part of a MODULE"
-msgstr "El tipo derivado en %C sólo puede ser PUBLIC en la parte de especificación de un módulo"
+msgstr "La declaración de tipo derivado con FINAL en %C debe estar en la parte de especificación de un MODULE"
#: fortran/decl.c:7190
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Empty FINAL at %C"
-msgstr "Se esperaba una VARIABLE en %C"
+msgstr "FINAL vacío en %C"
#: fortran/decl.c:7197
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected module procedure name at %C"
-msgstr "Falta un procedimiento para el argumento '%s' en %L"
+msgstr "Se esperaba un nombre de procedimiento de módulo en %C"
#: fortran/decl.c:7207
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected ',' at %C"
-msgstr "Se esperaba '(' en %C"
+msgstr "Se esperaba ',' en %C"
#: fortran/decl.c:7213
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Unknown procedure name \"%s\" at %C"
-msgstr "Operador '%s' desconocido en %%L"
+msgstr "Nombre de procedimiento \"%s\" desconocido en %C"
#: fortran/decl.c:7227
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'%s' at %C is already defined as FINAL procedure!"
-msgstr "El prcedimiento %s en %L ya sa había declarado como un procedimiento %s"
+msgstr "¡'%s' en %C ya se había definido como un procedimiento FINAL!"
#. We are told not to check dependencies.
#. We do it, however, and issue a warning in case we find one.
@@ -5451,7 +5435,7 @@ msgstr "El prcedimiento %s en %L ya sa había declarado como un procedimiento %s"
#: fortran/dependency.c:461
#, no-c-format
msgid "INTENT(%s) actual argument at %L might interfere with actual argument at %L."
-msgstr ""
+msgstr "El argumento actual INTENT(%s) en %L puede interferir con el argumento actual en %L."
#: fortran/error.c:298
#, no-c-format
@@ -5656,9 +5640,9 @@ msgid "Variable '%s' cannot appear in the expression at %L"
msgstr "La variable '%s' no puede aparecer en la expresión en %L"
#: fortran/expr.c:2727
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expression at %L must be of INTEGER type, found %s"
-msgstr "La expresión en %L debe ser de tipo INTEGER"
+msgstr "La expresión en %L debe ser de tipo INTEGER, se encontró %s"
#: fortran/expr.c:2737
#, no-c-format
@@ -5737,12 +5721,12 @@ msgstr "La literal BOZ en %L se transfiere por bits al símbolo '%s' que no es en
#: fortran/expr.c:2965 fortran/resolve.c:6475
#, no-c-format
msgid "Arithmetic underflow of bit-wise transferred BOZ at %L. This check can be disabled with the option -fno-range-check"
-msgstr "El desborde aritmético por debajo del BOZ transferido por bits en %L. Esta revisión se puede desactivar con la opción -fno-range-check"
+msgstr "Desborde aritmético por debajo del BOZ transferido por bits en %L. Esta revisión se puede desactivar con la opción -fno-range-check"
#: fortran/expr.c:2969 fortran/resolve.c:6479
#, no-c-format
msgid "Arithmetic overflow of bit-wise transferred BOZ at %L. This check can be disabled with the option -fno-range-check"
-msgstr "El desborde aritmético del BOZ transferido por bits en %L. Esta revisión se puede desactivar con la opción -fno-range-check"
+msgstr "Desborde aritmético del BOZ transferido por bits en %L. Esta revisión se puede desactivar con la opción -fno-range-check"
#: fortran/expr.c:2973 fortran/resolve.c:6483
#, no-c-format
@@ -5750,9 +5734,9 @@ msgid "Arithmetic NaN of bit-wise transferred BOZ at %L. This check can be disab
msgstr "NaN aritmético del BOZ transferido por bits en %L. Esta revisión se puede desactivar con la opción -fno-range-check"
#: fortran/expr.c:2995
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Incompatible types in DATA statement at %L; attempted conversion of %s to %s"
-msgstr "Tipos incompatible en la asignación en %L, %s a %s"
+msgstr "Tipos incompatible en la declaración DATA en %L; se intentó la conversión de %s a %s"
#: fortran/expr.c:3031
#, no-c-format
@@ -5765,19 +5749,19 @@ msgid "'%s' in the pointer assignment at %L cannot be an l-value since it is a p
msgstr "'%s' en la asignación de puntero en %L no puede ser un l-valor ya que es un procedimiento"
#: fortran/expr.c:3067
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected bounds specification for '%s' at %L"
-msgstr "Especificación %s duplicada en %C"
+msgstr "Se esperaba una especificación de límites para '%s' en %L"
#: fortran/expr.c:3072
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: Bounds specification for '%s' in pointer assignment at %L"
-msgstr "Fortran 2003: La función '%s' como una expresión de inicialización en %L"
+msgstr "Fortran 2003: Especificación de límites para '%s' en una asignación de puntero en %L"
#: fortran/expr.c:3078
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Pointer bounds remapping at %L is not yet implemented in gfortran"
-msgstr "Fortran 2003: Aún no se admiten los punteros a procedimiento en %L en gfortran"
+msgstr "El remapeo de límites de puntero en %L aún no se admiten en gfortran"
#: fortran/expr.c:3096
#, no-c-format
@@ -5790,9 +5774,9 @@ msgid "Bad pointer object in PURE procedure at %L"
msgstr "Objeto puntero erróneo en el procedimiento PURE en %L"
#: fortran/expr.c:3121
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Different types in pointer assignment at %L; attempted assignment of %s to %s"
-msgstr "Tipos diferentes en la asignación de puntero en %L"
+msgstr "Tipos diferentes en la asignación de puntero en %L; se intentó la asignación de %s a %s"
#: fortran/expr.c:3129
#, no-c-format
@@ -5825,7 +5809,7 @@ msgid "Pointer assignment with vector subscript on rhs at %L"
msgstr "Asignación de puntero con subíndice vectorial del lado derecho en %L"
#: fortran/expr.c:3183
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Pointer assignment target has PROTECTED attribute at %L"
msgstr "El objetivo de asignación de puntero tiene atributo PROTECTED en %L"
@@ -5860,9 +5844,9 @@ msgid "no input files; unwilling to write output files"
msgstr "no hay ficheros de entrada; incapaz de escribir ficheros de salida"
#: fortran/gfortranspec.c:432
-#, fuzzy, c-format
+#, c-format
msgid "Warning: Using -M <directory> is deprecated, use -J instead\n"
-msgstr "Esta opción es obsoleta; utilice en su lugar -Wextra"
+msgstr "Aviso: Usar -M <directorio> es obsoleto; utilice en su lugar -J\n"
#: fortran/gfortranspec.c:578
#, c-format
@@ -5955,9 +5939,9 @@ msgid "Intrinsic operator interface at %L must be a FUNCTION"
msgstr "La interfaz de operador intrínseco en %L debe ser FUNCTION"
#: fortran/interface.c:643
-#, fuzzy, no-c-format
+#, no-c-format
msgid "First argument of defined assignment at %L must be INTENT(OUT) or INTENT(INOUT)"
-msgstr "El primer argumento de la asignación definida en %L debe ser INTENT(IN) o INTENT(INOUT)"
+msgstr "El primer argumento de la asignación definida en %L debe ser INTENT(OUT) o INTENT(INOUT)"
#: fortran/interface.c:647
#, no-c-format
@@ -6070,9 +6054,9 @@ msgid "Actual argument contains too few elements for dummy argument '%s' (%lu/%l
msgstr "El argumento actual contiene muy pocos elementos para el argumento dummy '%s' (%lu/%lu) en %L"
#: fortran/interface.c:1967
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected a procedure pointer for argument '%s' at %L"
-msgstr "Falta un procedimiento para el argumento '%s' en %L"
+msgstr "Se esperaba un puntero procedimiento para el argumento '%s' en %L"
#: fortran/interface.c:1979
#, no-c-format
@@ -6160,9 +6144,9 @@ msgid "Procedure '%s' called with an implicit interface at %L"
msgstr "Se llamó al procedimiento '%s' con una interfaz implícita en %L"
#: fortran/interface.c:2442
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Keyword argument requires explicit interface for procedure '%s' at %L"
-msgstr "El argumento de palabra clave '%s' en %L no está en el procedimiento"
+msgstr "El argumento de palabra clave requiere una interfaz explícita para el procedimiento '%s' en %L"
#: fortran/interface.c:2676
#, no-c-format
@@ -6177,7 +6161,7 @@ msgstr "La entidad '%s' en %C ya está presente en la interfaz"
#: fortran/intrinsic.c:840
#, no-c-format
msgid "The intrinsic '%s' at %L is not included in the selected standard but %s and '%s' will be treated as if declared EXTERNAL. Use an appropriate -std=* option or define -fall-intrinsics to allow this intrinsic."
-msgstr ""
+msgstr "El intrínseco '%s' en %L no se incluye en el estándar seleccionado, pero %s y '%s' se tratarán como si se declararan EXTERNAL. Use una opción -std=* apropiada o defina -fall-intrinsics para permitir este intrínseco."
#: fortran/intrinsic.c:3079
#, no-c-format
@@ -6215,9 +6199,9 @@ msgid "Type of argument '%s' in call to '%s' at %L should be %s, not %s"
msgstr "El tipo del argumento '%s' en la llamada a '%s' en %L debe ser %s, no %s"
#: fortran/intrinsic.c:3559
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Intrinsic '%s' (is %s) is used at %L"
-msgstr "El apuntado Cray '%s' en la cláusula %s en %L"
+msgstr "El intrínseco '%s' (es %s) se usa en %L"
#: fortran/intrinsic.c:3623
#, no-c-format
@@ -6252,12 +6236,12 @@ msgstr "No se puede convertir %s a %s en %L"
#: fortran/intrinsic.c:3978
#, no-c-format
msgid "'%s' declared at %L may shadow the intrinsic of the same name. In order to call the intrinsic, explicit INTRINSIC declarations may be required."
-msgstr ""
+msgstr "'%s' declarado en %L puede oscurecer al intrínseco del mismo nombre. Para llamar al intrínsico, tal vez se requieran declaraciones INTRINSIC explícitas."
#: fortran/intrinsic.c:3983
#, no-c-format
msgid "'%s' declared at %L is also the name of an intrinsic. It can only be called via an explicit interface or if declared EXTERNAL."
-msgstr ""
+msgstr "'%s' declarado en %L es también el nombre de un intrínseco. Sólo se puede llamar a través de una interfaz explícita o si se declara EXTERNAL."
#: fortran/io.c:164 fortran/primary.c:768
#, no-c-format
@@ -6270,14 +6254,14 @@ msgid "Extension: Tab character in format at %C"
msgstr "Extensión: Carácter tabulador en el formato en %C"
#: fortran/io.c:445
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: DP format specifier not allowed at %C"
-msgstr "Fortran 2003: Declaración IMPORT en %C"
+msgstr "Fortran 2003: no se permite el especificador de formato DP en %C"
#: fortran/io.c:452
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: DC format specifier not allowed at %C"
-msgstr "Fortran 2003: Declaración VALUE en %C"
+msgstr "Fortran 2003: no se permite el especificador de formato DC en %C"
#: fortran/io.c:488
msgid "Positive width required"
@@ -6288,18 +6272,16 @@ msgid "Nonnegative width required"
msgstr "Se requiere una anchura que no sea negativa"
#: fortran/io.c:490
-#, fuzzy
msgid "Unexpected element '%c' in format string at %L"
-msgstr "Cadena de fin de formato inesperada"
+msgstr "Elemento '%c' inesperado en la cadena de formato en %L"
#: fortran/io.c:492
msgid "Unexpected end of format string"
msgstr "Cadena de fin de formato inesperada"
#: fortran/io.c:493
-#, fuzzy
msgid "Zero width in format descriptor"
-msgstr "anchura cero en el formato %s"
+msgstr "Anchura cero en el descriptor de formato"
#: fortran/io.c:512
msgid "Missing leading left parenthesis"
@@ -6335,9 +6317,8 @@ msgid "Repeat count cannot follow P descriptor"
msgstr "La cuenta de repetición no puede estar después del descriptor P"
#: fortran/io.c:665
-#, fuzzy
msgid "Positive width required with T descriptor"
-msgstr "Se requieren una anchura positiva"
+msgstr "Se requieren una anchura positiva con el descriptor T"
#: fortran/io.c:680
#, no-c-format
@@ -6345,9 +6326,9 @@ msgid "Extension: Missing positive width after L descriptor at %C"
msgstr "Extensión: Falta una anchura positiva después del descriptor L en %C"
#: fortran/io.c:723
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2008: 'G0' in format at %C"
-msgstr "Fortran 2003: Etiqueta IOMSG en %L"
+msgstr "Fortran 2008: 'G0' en un formato en %C"
#: fortran/io.c:751 fortran/io.c:753 fortran/io.c:814 fortran/io.c:816
#, no-c-format
@@ -6369,9 +6350,9 @@ msgid "Extension: Missing comma at %C"
msgstr "Extensión: Falta una coma en %C"
#: fortran/io.c:989
-#, fuzzy, no-c-format
+#, no-c-format
msgid "%s in format string at %L"
-msgstr "%s en la cadena de formato en %C"
+msgstr "%s en la cadena de formato en %L"
#: fortran/io.c:1034
#, no-c-format
@@ -6384,9 +6365,9 @@ msgid "Missing format label at %C"
msgstr "Falta la etiqueta de formato en %C"
#: fortran/io.c:1100 fortran/io.c:1131 fortran/io.c:1193
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Invalid value for %s specification at %C"
-msgstr "Especificación %s duplicada en %C"
+msgstr "Valor inválido para la especificación %s en %C"
#: fortran/io.c:1106 fortran/io.c:1137
#, no-c-format
@@ -6394,14 +6375,14 @@ msgid "Duplicate %s specification at %C"
msgstr "Especificación %s duplicada en %C"
#: fortran/io.c:1144
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Variable %s cannot be INTENT(IN) at %C"
-msgstr "La etiqueta de variable no puede ser INTENT(IN) en %C"
+msgstr "La variable %s no puede ser INTENT(IN) en %C"
#: fortran/io.c:1151
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Variable %s cannot be assigned in PURE procedure at %C"
-msgstr "La etiqueta de variable no se puede asignar en el procedimiento PURE en %C"
+msgstr "La variable %s no se puede asignar en el procedimiento PURE en %C"
#: fortran/io.c:1199
#, no-c-format
@@ -6491,38 +6472,38 @@ msgstr "No se permite una declaración OPEN en el procedimiento PURE en %C"
#: fortran/io.c:1649
#, no-c-format
msgid "Fortran 2003: ASYNCHRONOUS= at %C not allowed in Fortran 95"
-msgstr ""
+msgstr "Fortran 2003: no se permite ASYNCHRONOUS= en %C en Fortran 95"
#: fortran/io.c:1667 fortran/io.c:3045
#, no-c-format
msgid "Fortran 2003: BLANK= at %C not allowed in Fortran 95"
-msgstr ""
+msgstr "Fortran 2003: no se permite BLANK= en %C en Fortran 95"
#: fortran/io.c:1685 fortran/io.c:3024
#, no-c-format
msgid "Fortran 2003: DECIMAL= at %C not allowed in Fortran 95"
-msgstr ""
+msgstr "Fortran 2003: no se permite DECIMAL= en %C en Fortran 95"
#: fortran/io.c:1703 fortran/io.c:3135
#, no-c-format
msgid "Fortran 2003: DELIM= at %C not allowed in Fortran 95"
-msgstr ""
+msgstr "Fortran 2003: no se permite DELIM= en %C en Fortran 95"
#: fortran/io.c:1721
#, no-c-format
msgid "Fortran 2003: ENCODING= at %C not allowed in Fortran 95"
-msgstr ""
+msgstr "Fortran 2003: no se permite ENCODING= en %C en Fortran 95"
#. When implemented, change the following to use gfc_notify_std F2003.
#: fortran/io.c:1773
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran F2003: ROUND= specifier at %C not implemented"
-msgstr "Fortran 2003: Aún no se admiten los punteros a procedimiento en %L en gfortran"
+msgstr "Fortran 2003: Aún no se admiten el especificador ROUND= en %C"
#: fortran/io.c:1792
#, no-c-format
msgid "Fortran 2003: SIGN= at %C not allowed in Fortran 95"
-msgstr ""
+msgstr "Fortran 2003: no se permite SIGN= en %C en Fortran 95"
#: fortran/io.c:2005
#, no-c-format
@@ -6575,9 +6556,9 @@ msgid "UNIT specification at %L must be an INTEGER expression or a CHARACTER var
msgstr "La especificación UNIT en %L debe ser una expresión INTEGER o una variable CHARACTER"
#: fortran/io.c:2542
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Invalid form of WRITE statement at %L, UNIT required"
-msgstr "Forma inválida de la declaración PROGRAM en %C"
+msgstr "Forma inválida de la declaración WRITE en %L, se requiere UNIT"
#: fortran/io.c:2553
#, no-c-format
@@ -6590,9 +6571,9 @@ msgid "External IO UNIT cannot be an array at %L"
msgstr "Un IO UNIT externo no puede ser una matriz en %L"
#: fortran/io.c:2565
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Extension: Comma before i/o item list at %L"
-msgstr "Extensión: Una coma antes de una lista de elementos de e/s en %C"
+msgstr "Extensión: Una coma antes de una lista de elementos de e/s en %L"
#: fortran/io.c:2575
#, no-c-format
@@ -6656,14 +6637,14 @@ msgid "Fortran 2003: Internal file at %L with namelist"
msgstr "Fortran 2003: Fichero interno en %L con lista de nombres"
#: fortran/io.c:2998
-#, fuzzy, no-c-format
+#, no-c-format
msgid "ASYNCHRONOUS= specifier at %L must be an initialization expression"
-msgstr "El parámetro KIND de %s en %L debe ser una expresión de inicialización"
+msgstr "El especificador ASYNCHRONOUS= en %L debe ser una expresión de inicialización"
#: fortran/io.c:3066
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: PAD= at %C not allowed in Fortran 95"
-msgstr "Fortran 2003: Los componentes del procedimiento en %C aún no se admiten en gfortran"
+msgstr "Fortran 2003: No se permite PAD= en %C en Fortran 95"
#. When implemented, change the following to use gfc_notify_std F2003.
#. if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: ROUND= at %C "
@@ -6672,7 +6653,7 @@ msgstr "Fortran 2003: Los componentes del procedimiento en %C aún no se admiten
#: fortran/io.c:3091
#, no-c-format
msgid "F2003 Feature: ROUND= specifier at %C not implemented"
-msgstr ""
+msgstr "Característica F2003: aún no se admite el especificador ROUND= en %C"
#: fortran/io.c:3280
#, no-c-format
@@ -6710,29 +6691,29 @@ msgid "INQUIRE statement at %L requires either FILE or UNIT specifier"
msgstr "La declaración INQUIRE en %L requiere un especificador FILE o UNIT"
#: fortran/io.c:3707
-#, fuzzy, no-c-format
+#, no-c-format
msgid "INQUIRE statement at %L requires a PENDING= specifier with the ID= specifier"
-msgstr "La declaración INQUIRE en %L requiere un especificador FILE o UNIT"
+msgstr "La declaración INQUIRE en %L requiere un especificador PENDING= con el especificador ID="
#: fortran/io.c:3866
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: WAIT at %C not allowed in Fortran 95"
-msgstr "Fortran 2003: Los componentes del procedimiento en %C aún no se admiten en gfortran"
+msgstr "Fortran 2003: No se permite WAIT en %C en Fortran 95"
#: fortran/io.c:3872
-#, fuzzy, no-c-format
+#, no-c-format
msgid "WAIT statement not allowed in PURE procedure at %C"
-msgstr "No se permite una declaración %s en el procedimiento PURE en %C"
+msgstr "No se permite una declaración WAIT en un procedimiento PURE en %C"
#: fortran/match.c:158
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Missing ')' in statement at or before %L"
-msgstr "Falta un ')' en la declaración antes de %L"
+msgstr "Falta un ')' en la declaración en o antes de %L"
#: fortran/match.c:163
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Missing '(' in statement at or before %L"
-msgstr "Falta un '(' en la declaración antes de %L"
+msgstr "Falta un '(' en la declaración en o antes de %L"
#: fortran/match.c:360
#, no-c-format
@@ -6772,7 +6753,7 @@ msgstr "El nombre en %C es demasiado largo"
#: fortran/match.c:553
#, no-c-format
msgid "Invalid character '$' at %C. Use -fdollar-ok to allow it as an extension"
-msgstr ""
+msgstr "Carácter '$' inválido en %C. Use -fdollar-ok para permitirlo como una extensión"
#: fortran/match.c:604 fortran/match.c:652
#, no-c-format
@@ -6935,19 +6916,19 @@ msgid "Extension: RETURN statement in main program at %C"
msgstr "Extensión: declaración RETURN en el programa principal en %C"
#: fortran/match.c:2515
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected component reference at %C"
-msgstr "Se esperaba un nombre de componente de estructura en %C"
+msgstr "Se esperaba una referencia de componente en %C"
#: fortran/match.c:2521
#, no-c-format
msgid "Junk after CALL at %C"
-msgstr ""
+msgstr "Basura después de CALL en %C"
#: fortran/match.c:2527
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected type-bound procedure reference at %C"
-msgstr "Falta un procedimiento para el argumento '%s' en %L"
+msgstr "Se esperaba una referencia a procedimiento enlazado a tipo en %C"
#: fortran/match.c:2745
#, no-c-format
@@ -7374,7 +7355,7 @@ msgstr "%s no es un nombre de procedimiento INTRINSIC en %C"
#: fortran/openmp.c:404
#, no-c-format
msgid "COLLAPSE clause argument not constant positive integer at %C"
-msgstr ""
+msgstr "El argumento de la cláusula COLLAPSE no es un entero positivo constante en %C"
#: fortran/openmp.c:541
#, no-c-format
@@ -7402,9 +7383,9 @@ msgid "SCHEDULE clause's chunk_size at %L requires a scalar INTEGER expression"
msgstr "El chunk_size de la cláusula SCHEDULE en %L requiere una expresión INTEGER escalar"
#: fortran/openmp.c:815
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Object '%s' is not a variable at %L"
-msgstr "'%s' en %C no es una variable"
+msgstr "El objeto '%s' no es una variable en %L"
#: fortran/openmp.c:823 fortran/openmp.c:833 fortran/openmp.c:840
#: fortran/openmp.c:850
@@ -7425,7 +7406,7 @@ msgstr "El objeto de la cláusula COPYIN '%s' en %L tiene componente ALLOCATABLE"
#: fortran/openmp.c:884
#, no-c-format
msgid "Assumed size array '%s' in COPYPRIVATE clause at %L"
-msgstr "La matriz de tamaño asumido '%s' en la cláusula COPYPRIVATE en %L"
+msgstr "Matriz de tamaño asumido '%s' en la cláusula COPYPRIVATE en %L"
#: fortran/openmp.c:887
#, no-c-format
@@ -7470,7 +7451,7 @@ msgstr "El puntero Cray '%s' en la cláusula %s en %L"
#: fortran/openmp.c:926
#, no-c-format
msgid "Assumed size array '%s' in %s clause at %L"
-msgstr "La matriz de tamaño asumido '%s' en la cláusula %s en %L"
+msgstr "Matriz de tamaño asumido '%s' en la cláusula %s en %L"
#: fortran/openmp.c:931
#, no-c-format
@@ -7575,17 +7556,17 @@ msgstr "La variable de iteración !$OMP DO está presente en una cláusula diferent
#: fortran/openmp.c:1462
#, no-c-format
msgid "!$OMP DO collapsed loops don't form rectangular iteration space at %L"
-msgstr ""
+msgstr "Los ciclos !$OMP DO colapsados no forman un espacio de iteración rectangular en %L"
#: fortran/openmp.c:1476
#, no-c-format
msgid "collapsed !$OMP DO loops not perfectly nested at %L"
-msgstr ""
+msgstr "Los ciclos !$OMP DO no están perfectamente anidados en %L"
#: fortran/openmp.c:1485 fortran/openmp.c:1492
#, no-c-format
msgid "not enough DO loops for collapsed !$OMP DO at %L"
-msgstr ""
+msgstr "no hay suficientes ciclos DO para los !$OMP DO colapsados en %L"
#: fortran/options.c:233
#, no-c-format
@@ -7633,9 +7614,9 @@ msgid "Flag -fmax-stack-var-size=%d overwrites -frecursive implied by -fopenmp"
msgstr "La opción -fmax-stack-var-size=%d sobreescribe -frecursive implicada por -fopenmp"
#: fortran/options.c:404
-#, fuzzy, no-c-format
+#, no-c-format
msgid "gfortran: Only one -J option allowed"
-msgstr "gfortran: Sólo se permite una opción -M\n"
+msgstr "gfortran: Sólo se permite una opción -J"
#: fortran/options.c:447
#, no-c-format
@@ -7784,39 +7765,39 @@ msgid "Unexpected end of file in '%s'"
msgstr "Fin de fichero inesperado en '%s'"
#: fortran/parse.c:1722
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Derived-type '%s' with SEQUENCE must not have a CONTAINS section at %C"
-msgstr "Declaración %s inesperada en la sección CONTAINS en %C"
+msgstr "El tipo derivado '%s' con SEQUENCE no debe tener una sección CONTAINS en %C"
#: fortran/parse.c:1725
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Derived-type '%s' with BIND(C) must not have a CONTAINS section at %C"
-msgstr "Declaración %s inesperada en la sección CONTAINS en %C"
+msgstr "El tipo derivado '%s' con BIND(C) no debe tener una sección CONTAINS en %C"
#: fortran/parse.c:1745
#, no-c-format
msgid "Components in TYPE at %C must precede CONTAINS"
-msgstr ""
+msgstr "Los componentes en TYPE en %C deben preceder a CONTAINS"
#: fortran/parse.c:1750
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: Type-bound procedure at %C"
-msgstr "Fortran 2003: \"USE :: module\" en %C"
+msgstr "Fortran 2003: Procedimiento enlazado a tipo en %C"
#: fortran/parse.c:1759
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: GENERIC binding at %C"
-msgstr "Fortran 2003: Etiqueta IOMSG en %L"
+msgstr "Fortran 2003: Enlace GENERIC en %L"
#: fortran/parse.c:1769
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: FINAL procedure declaration at %C"
-msgstr "Fortran 2003: Atributo VALUE en %C"
+msgstr "Fortran 2003: Declaración de procedimiento FINAL en %C"
#: fortran/parse.c:1781
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2008: Derived type definition at %C with empty CONTAINS section"
-msgstr "Fortran 2003: La definición de tipo derivado en %C no tiene componentes"
+msgstr "Fortran 2003: La definición de tipo derivado en %C tiene una sección CONTAINS vacía"
#: fortran/parse.c:1792 fortran/parse.c:1903
#, no-c-format
@@ -7824,9 +7805,9 @@ msgid "PRIVATE statement in TYPE at %C must be inside a MODULE"
msgstr "La declaración PRIVATE en TYPE en %C debe estar dentro de un MODULE"
#: fortran/parse.c:1800
-#, fuzzy, no-c-format
+#, no-c-format
msgid "PRIVATE statement at %C must precede procedure bindings"
-msgstr "La declaración PRIVATE en %C debe preceder a los componentes de la estructura"
+msgstr "La declaración PRIVATE en %C debe preceder a los enlaces de procedimiento"
#: fortran/parse.c:1808 fortran/parse.c:1919
#, no-c-format
@@ -7834,24 +7815,24 @@ msgid "Duplicate PRIVATE statement at %C"
msgstr "Declaración PRIVATE duplicada en %C"
#: fortran/parse.c:1818
-#, fuzzy, no-c-format
+#, no-c-format
msgid "SEQUENCE statement at %C must precede CONTAINS"
-msgstr "La declaración SEQUENCE en %C debe preceder a los componentes de la estructura"
+msgstr "La declaración SEQUENCE en %C debe preceder a CONTAINS"
#: fortran/parse.c:1823
#, no-c-format
msgid "Already inside a CONTAINS block at %C"
-msgstr ""
+msgstr "Ya está dentro de un bloque CONTAINS en %C"
#: fortran/parse.c:1878
-#, fuzzy, no-c-format
+#, no-c-format
msgid "PROCEDURE binding at %C must be inside CONTAINS"
-msgstr "PROCEDURE en %C debe estar en una interfaz genérica"
+msgstr "El enlace PROCEDURE en %C debe estar dentro de CONTAINS"
#: fortran/parse.c:1883
-#, fuzzy, no-c-format
+#, no-c-format
msgid "FINAL declaration at %C must be inside CONTAINS"
-msgstr "La declaración ENUM en %C no tiene ENUMERATORS"
+msgstr "La declaración FINAL en %C debe estar dentro de CONTAINS"
#: fortran/parse.c:1892
#, no-c-format
@@ -7879,9 +7860,9 @@ msgid "Duplicate SEQUENCE statement at %C"
msgstr "Declaración SEQUENCE duplicada en %C"
#: fortran/parse.c:1955
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: CONTAINS block in derived type definition at %C"
-msgstr "Fortran 2003: La definición de tipo derivado en %C no tiene componentes"
+msgstr "Fortran 2003: Bloque CONTAINS en una definición de tipo derivado en %C"
#: fortran/parse.c:2046
#, no-c-format
@@ -8014,9 +7995,9 @@ msgid "Unexpected %s statement in CONTAINS section at %C"
msgstr "Declaración %s inesperada en la sección CONTAINS en %C"
#: fortran/parse.c:3481
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2008: CONTAINS statement without FUNCTION or SUBROUTINE statement at %C"
-msgstr "Extensión: Declaración CONTAINS sin una declaración FUNCTION o SUBROUTINE en %C"
+msgstr "Fortran 2008: Declaración CONTAINS sin una declaración FUNCTION o SUBROUTINE en %C"
#: fortran/parse.c:3552
#, no-c-format
@@ -8082,9 +8063,9 @@ msgid "Invalid Hollerith constant: Integer kind at %L should be default"
msgstr "Constante Hollerith inválida: El género entero en %L debe ser por defecto"
#: fortran/primary.c:286
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Invalid Hollerith constant at %L contains a wide character"
-msgstr "Constante Hollerith inválida: %L debe contener por lo menos un carácter"
+msgstr "Una constante Hollerith inválida en %L contiene un carácter ancho"
#: fortran/primary.c:367
#, no-c-format
@@ -8159,7 +8140,7 @@ msgstr "Constante de carácter sin terminar que comienza en %C"
#: fortran/primary.c:997
#, no-c-format
msgid "Character '%s' in string at %C is not representable in character kind %d"
-msgstr ""
+msgstr "El carácter '%s' en la cadena en %C no es representable en el género de carácter %d"
#: fortran/primary.c:1080
#, no-c-format
@@ -8227,49 +8208,49 @@ msgid "Expected structure component name at %C"
msgstr "Se esperaba un nombre de componente de estructura en %C"
#: fortran/primary.c:1801
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expected argument list at %C"
-msgstr "Basura inesperada en la lista de argumentos formales en %C"
+msgstr "Se esperaba una lista de argumentos en %C"
#: fortran/primary.c:2095
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: Structure constructor with missing optional arguments at %C"
-msgstr "Fortran 2003: Intrínseco '%s' con argumento KIND en %L"
+msgstr "Fortran 2003: Constructor de estructura con argumentos opcionales faltantes en %C"
#: fortran/primary.c:2103
-#, fuzzy, no-c-format
+#, no-c-format
msgid "No initializer for component '%s' given in the structure constructor at %C!"
-msgstr "Faltan componentes en el constructor de estructura en %C"
+msgstr "¡No existe un inicializador dado para el componente '%s' en el constructor de estructura en %C!"
#: fortran/primary.c:2159
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Can't construct ABSTRACT type '%s' at %C"
-msgstr "Etiqueta construct '%s' duplicada en %C"
+msgstr "No se puede construir el tipo ABSTRACT '%s' en %C"
#: fortran/primary.c:2187
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: Structure constructor with named arguments at %C"
-msgstr "Fortran 2003: Intrínseco '%s' con argumento KIND en %L"
+msgstr "Fortran 2003: Constructor de estructura con argumentos nombrados en %C"
#: fortran/primary.c:2202
#, no-c-format
msgid "Component initializer without name after component named %s at %C!"
-msgstr ""
+msgstr "¡Inicializador de componente sin nombre después del componente nombrado %s en %C!"
#: fortran/primary.c:2205
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Too many components in structure constructor at %C!"
-msgstr "Demasiados componentes en el constructor de estructura en %C"
+msgstr "¡Demasiados componentes en el constructor de estructura en %C!"
#: fortran/primary.c:2238
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Component '%s' is initialized twice in the structure constructor at %C!"
-msgstr "Faltan componentes en el constructor de estructura en %C"
+msgstr "¡El componente '%s' se inicializa dos veces en el constructor de estructura en %C!"
#: fortran/primary.c:2294
#, no-c-format
msgid "component '%s' at %L has already been set by a parent derived type constructor"
-msgstr ""
+msgstr "El componente '%s' en %L ya se había definido por un constructor padre de tipo derivado"
#: fortran/primary.c:2317
#, no-c-format
@@ -8327,24 +8308,24 @@ msgid "'%s' at %C is not a variable"
msgstr "'%s' en %C no es una variable"
#: fortran/resolve.c:98
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'%s' at %L is of the ABSTRACT type '%s'"
-msgstr "La etiqueta %s en %L debe ser de tipo %s"
+msgstr "'%s' en %L es del tipo ABSTRACT '%s'"
#: fortran/resolve.c:101
-#, fuzzy, no-c-format
+#, no-c-format
msgid "ABSTRACT type '%s' used at %L"
-msgstr "La ABSTRACT INTERFACE '%s' no se debe referenciar en %L"
+msgstr "El tipo ABSTRACT '%s' se usa en %L"
#: fortran/resolve.c:151
#, no-c-format
msgid "Alternate return specifier in elemental subroutine '%s' at %L is not allowed"
-msgstr "No se permite el especificador de devolución alternativo en la subrutina elemental '%s' en %L"
+msgstr "No se permite el especificador de devolución alternativa en la subrutina elemental '%s' en %L"
#: fortran/resolve.c:155
#, no-c-format
msgid "Alternate return specifier in function '%s' at %L is not allowed"
-msgstr "No se permite el especificador de devolución alternativo en la función '%s' en %L"
+msgstr "No se permite el especificador de devolución alternativa en la función '%s' en %L"
#: fortran/resolve.c:168
#, no-c-format
@@ -8512,9 +8493,9 @@ msgid "The element in the derived type constructor at %L, for pointer component
msgstr "El elemento en el constructor de tipo derivado en %L, para el componente puntero '%s', es %s pero debería ser %s"
#: fortran/resolve.c:868
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The NULL in the derived type constructor at %L is being applied to component '%s', which is neither a POINTER nor ALLOCATABLE"
-msgstr "El elemento en el constructor de tipo derivado en %L, para el componente puntero '%s', debe ser un POINTER o un TARGET"
+msgstr "El NULL en el constructor de tipo derivado en %L se aplica para el componente '%s', el cual no es ni POINTER ni ALLOCATABLE"
#: fortran/resolve.c:882
#, no-c-format
@@ -8539,7 +8520,7 @@ msgstr "El procedimiento GENERIC '%s' no se permite como un argumento actual en
#: fortran/resolve.c:1100 fortran/resolve.c:5928 fortran/resolve.c:6683
#, no-c-format
msgid "Label %d referenced at %L is never defined"
-msgstr "La etiqueta %d referenciada en %L nunca se definió"
+msgstr "La etiqueta %d referenciada en %L nunca se define"
#: fortran/resolve.c:1145
#, no-c-format
@@ -8562,9 +8543,9 @@ msgid "ELEMENTAL non-INTRINSIC procedure '%s' is not allowed as an actual argume
msgstr "El procedimiento ELEMENTAL que no es INTRINSIC '%s' no se permite como un argumento actual en %L"
#: fortran/resolve.c:1183
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Reference to ENTRY '%s' at %L is recursive, but procedure '%s' is not declared as RECURSIVE"
-msgstr "La llamada a ENTRY '%s' en %L es recursiva, pero la subrutina '%s' no se declaró como RECURSIVE"
+msgstr "La referencia a ENTRY '%s' en %L es recursiva, pero el procedimiento '%s' no se declaró como RECURSIVE"
#: fortran/resolve.c:1224
#, no-c-format
@@ -8690,9 +8671,9 @@ msgid "Parameter '%s' to '%s' at %L must be BIND(C)"
msgstr "El parámetro '%s' para '%s' en %L debe ser BIND(C)"
#: fortran/resolve.c:2251
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Intrinsic subroutine '%s' used as a function at %L"
-msgstr "Referencia a la subrutina intrínseca `%A' como si fuera una función en %0"
+msgstr "La subrutina intrínseca '%s' se usa como una función en %L"
#: fortran/resolve.c:2258
#, no-c-format
@@ -8897,7 +8878,7 @@ msgstr "La referencia de matriz superior en %L está fuera de los límites (%ld >
#: fortran/resolve.c:3574
#, no-c-format
msgid "Rightmost upper bound of assumed size array section not specified at %L"
-msgstr "Límite superior a la derecha de la sección de matriz de tamaño asumido sin especificar en %L"
+msgstr "No se especificó el límite superior a la derecha de la sección de matriz de tamaño asumido en %L"
#: fortran/resolve.c:3584
#, no-c-format
@@ -8910,9 +8891,9 @@ msgid "Array index at %L must be scalar"
msgstr "El índice de matriz en %L debe ser escalar"
#: fortran/resolve.c:3618
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Array index at %L must be of INTEGER type, found %s"
-msgstr "El índice de matriz en %L debe ser de tipo INTEGER"
+msgstr "El índice de matriz en %L debe ser de tipo INTEGER, se encontró %s"
#: fortran/resolve.c:3624
#, no-c-format
@@ -8990,25 +8971,25 @@ msgid "Variable '%s' is used at %L before the ENTRY statement in which it is a p
msgstr "La variable '%s' se usa en %L antes de la declaración ENTRY en la cual es un parámetro"
#: fortran/resolve.c:4455
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Passed-object at %L must be scalar"
-msgstr "La etiqueta %s en %L debe ser escalar"
+msgstr "El objeto pasado en %L debe ser escalar"
#. Nothing matching found!
#: fortran/resolve.c:4565
#, no-c-format
msgid "Found no matching specific binding for the call to the GENERIC '%s' at %L"
-msgstr ""
+msgstr "No se encontró un enlace específico coincidente para la llamada al GENERIC '%s' en %L"
#: fortran/resolve.c:4585
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'%s' at %L should be a SUBROUTINE"
-msgstr "'%s' en %L no es un VALUE"
+msgstr "'%s' en %L debe ser una SUBROUTINE"
#: fortran/resolve.c:4621
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'%s' at %L should be a FUNCTION"
-msgstr "El procedimiento de operador de usuario '%s' en %L debe ser FUNCTION"
+msgstr "'%s' en %L debe ser una FUNCTION"
#: fortran/resolve.c:4757
#, no-c-format
@@ -9101,9 +9082,9 @@ msgid "Bad array specification in ALLOCATE statement at %L"
msgstr "Especificación de matriz errónea en la declaración ALLOCATE en %L"
#: fortran/resolve.c:5248
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'%s' must not appear in the array specification at %L in the same ALLOCATE statement where it is itself allocated"
-msgstr "'%s' no debe aparecer en la especificación de matriz en %L en la misma declaración ALLOCATE donde se debe alojar a sí misma"
+msgstr "'%s' no debe aparecer en la especificación de matriz en %L en la misma declaración ALLOCATE donde se aloja a sí misma"
#: fortran/resolve.c:5271
#, no-c-format
@@ -9135,7 +9116,7 @@ msgid "Expression in CASE statement at %L must be of type %s"
msgstr "La expresión en la declaración CASE en %L debe ser de tipo %s"
#: fortran/resolve.c:5505
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Expression in CASE statement at %L must be of kind %d"
msgstr "La expresión en la declaración CASE en %L debe ser de género %d"
@@ -9210,9 +9191,9 @@ msgid "Statement at %L is not a valid branch target statement for the branch sta
msgstr "La declaración en %L no es una declaración de objetivo de ramificación válida para la declaración de ramificación en %L"
#: fortran/resolve.c:5944
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Branch at %L may result in an infinite loop"
-msgstr "La ramificación en %L causa un ciclo infinito"
+msgstr "La ramificación en %L puede resultar en un ciclo infinito"
#. The label is not in an enclosing block, so illegal. This was
#. allowed in Fortran 66, so we allow it as extension. No
@@ -9253,9 +9234,9 @@ msgid "Assignment to a FORALL index variable at %L"
msgstr "Asignación a una variable de índice FORALL en %L"
#: fortran/resolve.c:6137
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The FORALL with index '%s' is not used on the left side of the assignment at %L and so might cause multiple assignment to this object"
-msgstr "El FORALL con índice '%s' causa más de una asignación a este objeto en %L"
+msgstr "No se usa el FORALL con índice '%s' en el lado izquierdo de la asignación en %L y podría causar múltiples asignaciones a este objeto"
#: fortran/resolve.c:6306
#, no-c-format
@@ -9503,215 +9484,215 @@ msgid "CHARACTER(*) function '%s' at %L is obsolescent in fortran 95"
msgstr "La función CHARACTER(*) '%s' en %L es obsoleta en fortran 95"
#: fortran/resolve.c:7872
-#, fuzzy, no-c-format
+#, no-c-format
msgid "PROCEDURE attribute conflicts with SAVE attribute in '%s' at %L"
-msgstr "El atributo PROCEDURE genera un conflicto con el atributo NAMELIST en '%s' en %L"
+msgstr "El atributo PROCEDURE genera un conflicto con el atributo SAVE en '%s' en %L"
#: fortran/resolve.c:7879
-#, fuzzy, no-c-format
+#, no-c-format
msgid "PROCEDURE attribute conflicts with INTENT attribute in '%s' at %L"
-msgstr "El atributo PROCEDURE genera un conflicto con el atributo NAMELIST en '%s' en %L"
+msgstr "El atributo PROCEDURE genera un conflicto con el atributo INTENT en '%s' en %L"
#: fortran/resolve.c:7923
-#, fuzzy, no-c-format
+#, no-c-format
msgid "FINAL procedure '%s' at %L is not a SUBROUTINE"
-msgstr "El procedimiento de operador de usuario '%s' en %L debe ser FUNCTION"
+msgstr "El procedimiento FINAL '%s' en %L no debe ser una SUBROUTINE"
#: fortran/resolve.c:7931
-#, fuzzy, no-c-format
+#, no-c-format
msgid "FINAL procedure at %L must have exactly one argument"
-msgstr "El procedimiento de operador de usuario '%s' en %L debe tener al menos un argumento"
+msgstr "El procedimiento FINAL en %L debe tener exactamente un argumento"
#: fortran/resolve.c:7940
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Argument of FINAL procedure at %L must be of type '%s'"
-msgstr "El argumento de ICHAR en %L debe ser de longitud uno"
+msgstr "El argumento del procedimiento FINAL en %L debe ser de tipo '%s'"
#: fortran/resolve.c:7948
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Argument of FINAL procedure at %L must not be a POINTER"
-msgstr "El argumento '%s' del intrínseco '%s' en %L debe ser un POINTER"
+msgstr "El argumento del procedimiento FINAL en %L no debe ser un POINTER"
#: fortran/resolve.c:7954
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Argument of FINAL procedure at %L must not be ALLOCATABLE"
-msgstr "El argumento '%s' del intrínseco '%s' en %L debe ser ALLOCATABLE"
+msgstr "El argumento del procedimiento final en %L no debe ser ALLOCATABLE"
#: fortran/resolve.c:7960
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Argument of FINAL procedure at %L must not be OPTIONAL"
-msgstr "El argumento '%s' del intrínseco '%s' en %L no debe ser OPTIONAL"
+msgstr "El argumento del procedimiento FINAL en %L no debe ser OPTIONAL"
#: fortran/resolve.c:7968
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Argument of FINAL procedure at %L must not be INTENT(OUT)"
-msgstr "El primer argumento de la interfaz de operador en %L debe ser INTENT(IN)"
+msgstr "El argumento del procedimiento FINAL en %L no debe ser INTENT(OUT)"
#: fortran/resolve.c:7976
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Non-scalar FINAL procedure at %L should have assumed shape argument"
-msgstr "El procedimiento de operador de usuario '%s' en %L debe tener al menos un argumento"
+msgstr "El procedimiento FINAL que no es escalar en %L debe tener un argumento sharp asumido"
#: fortran/resolve.c:7995
-#, fuzzy, no-c-format
+#, no-c-format
msgid "FINAL procedure '%s' declared at %L has the same rank (%d) as '%s'"
-msgstr "El procedimiento INTERFACE '%s' en %L tiene el mismo nombre que el procedimiento que lo incluye"
+msgstr "El procedimiento FINAL '%s' declarado en %L tiene el mismo rango (%d) que '%s'"
#: fortran/resolve.c:8028
#, no-c-format
msgid "Only array FINAL procedures declared for derived type '%s' defined at %L, suggest also scalar one"
-msgstr ""
+msgstr "Sólo se declaran procedimientos FINAL de matriz para el tipo derivado '%s' definido en %L, se sugiere también uno escalar"
#. TODO: Remove this error when finalization is finished.
#: fortran/resolve.c:8033
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Finalization at %L is not yet implemented"
-msgstr "aún no se han implementado trampolines"
+msgstr "Aún no se admite la finalización en %L"
#: fortran/resolve.c:8059
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Can't overwrite GENERIC '%s' at %L"
-msgstr "No se puede convertir %s a %s en %L"
+msgstr "No se puede sobreescribir el GENERIC '%s' en %L"
#: fortran/resolve.c:8071
#, no-c-format
msgid "'%s' at %L overrides a procedure binding declared NON_OVERRIDABLE"
-msgstr ""
+msgstr "'%s' en %L sobreescribe un enlace de procedimiento declarad como NON_OVERRIDABLE"
#: fortran/resolve.c:8079
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'%s' at %L overrides a PURE procedure and must also be PURE"
-msgstr "El procedimiento contenido '%s' en %L de un procedimiento PURE tambíén debe ser PURE"
+msgstr "'%s' en %L sobreescribe un procedimiento PURE y también debe ser PURE"
#: fortran/resolve.c:8088
#, no-c-format
msgid "'%s' at %L overrides an ELEMENTAL procedure and must also be ELEMENTAL"
-msgstr ""
+msgstr "'%s' en %L sobreescribe un procedimiento ELEMENTAL y también debe ser ELEMENTAL"
#: fortran/resolve.c:8094
#, no-c-format
msgid "'%s' at %L overrides a non-ELEMENTAL procedure and must not be ELEMENTAL, either"
-msgstr ""
+msgstr "'%s' en %L sobreeescribe un procedimiento que no es ELEMENTAL y tampoco debe ser ELEMENTAL"
#: fortran/resolve.c:8103
#, no-c-format
msgid "'%s' at %L overrides a SUBROUTINE and must also be a SUBROUTINE"
-msgstr ""
+msgstr "'%s' en %L sobreescribe una SUBROUTINE y también debe ser una SUBROUTINE"
#: fortran/resolve.c:8114
#, no-c-format
msgid "'%s' at %L overrides a FUNCTION and must also be a FUNCTION"
-msgstr ""
+msgstr "'%s' en %L sobreescribe una FUNCTION y también debe ser una FUNCTION"
#: fortran/resolve.c:8125
#, no-c-format
msgid "'%s' at %L and the overridden FUNCTION should have matching result types"
-msgstr ""
+msgstr "'%s' en %L y la FUNCION sobreescrita deben tener tipos de resultado coincidentes"
#: fortran/resolve.c:8136
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'%s' at %L overrides a PUBLIC procedure and must not be PRIVATE"
-msgstr "El procedimiento contenido '%s' en %L de un procedimiento PURE tambíén debe ser PURE"
+msgstr "'%s' en %L sobreescribe un procedimiento PUBLIC y no debe ser PRIVATE"
#: fortran/resolve.c:8165
#, no-c-format
msgid "Dummy argument '%s' of '%s' at %L should be named '%s' as to match the corresponding argument of the overridden procedure"
-msgstr ""
+msgstr "El argumento dummy '%s' de '%s' en %L se debe llamar '%s' para que coincida con el argumento correspondiente al procedimiento sobreescrito"
#: fortran/resolve.c:8178
#, no-c-format
msgid "Types mismatch for dummy argument '%s' of '%s' %L in in respect to the overridden procedure"
-msgstr ""
+msgstr "Los tipos no coinciden para el argumento dummy '%s' de '%s' en %L con respecto al procedimiento sobreescrito"
#: fortran/resolve.c:8188
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'%s' at %L must have the same number of formal arguments as the overridden procedure"
-msgstr "El procedimiento INTERFACE '%s' en %L tiene el mismo nombre que el procedimiento que lo incluye"
+msgstr "'%s' en %L debe tener el mismo nombre de argumentos formales que el procedimiento sobreeescrito"
#: fortran/resolve.c:8197
#, no-c-format
msgid "'%s' at %L overrides a NOPASS binding and must also be NOPASS"
-msgstr ""
+msgstr "'%s' en %L sobreescribe un enlace NOPASS y también debe ser NOPASS"
#: fortran/resolve.c:8208
#, no-c-format
msgid "'%s' at %L overrides a binding with PASS and must also be PASS"
-msgstr ""
+msgstr "'%s' en %L sobreescribe un enlace con PASS y también debe ser PASS"
#: fortran/resolve.c:8215
#, no-c-format
msgid "Passed-object dummy argument of '%s' at %L must be at the same position as the passed-object dummy argument of the overridden procedure"
-msgstr ""
+msgstr "El argumento dummy del objeto pasado de '%s' en %L debe estar en la misma posición que el argumento dummy del objeto pasado del procedimiento sobreescrito"
#: fortran/resolve.c:8246
#, no-c-format
msgid "'%s' and '%s' can't be mixed FUNCTION/SUBROUTINE for GENERIC '%s' at %L"
-msgstr ""
+msgstr "'%s' y '%s' no pueden ser FUNCTION/SUBROUTINE mezcladas para el GENERIC '%s' en %L"
#: fortran/resolve.c:8255
#, no-c-format
msgid "'%s' and '%s' for GENERIC '%s' at %L are ambiguous"
-msgstr ""
+msgstr "'%s' y '%s' para el GENERIC '%s' en %L son ambiguos"
#: fortran/resolve.c:8324
#, no-c-format
msgid "Undefined specific binding '%s' as target of GENERIC '%s' at %L"
-msgstr ""
+msgstr "El enlace específico '%s' no está definido como objetivo del GENERIC '%s' en %L"
#: fortran/resolve.c:8336
#, no-c-format
msgid "GENERIC '%s' at %L must target a specific binding, '%s' is GENERIC, too"
-msgstr ""
+msgstr "El GENERIC '%s' en %L debe apuntar a un enlace específico, '%s' es GENERIC también"
#: fortran/resolve.c:8366
#, no-c-format
msgid "GENERIC '%s' at %L can't overwrite specific binding with the same name"
-msgstr ""
+msgstr "El GENERIC '%s' en %L no puede sobreescribir el enlace específico con el mismo nombre"
#: fortran/resolve.c:8424
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'%s' must be a module procedure or an external procedure with an explicit interface at %L"
-msgstr "Se llamó al procedimiento '%s' con una interfaz implícita en %L"
+msgstr "'%s' debe ser un procedimiento de módulo o un procedimiento externo con una interfaz explícita en %L"
#: fortran/resolve.c:8461
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Procedure '%s' with PASS(%s) at %L has no argument '%s'"
-msgstr "El procedimiento '%s' en %L no tiene una interfaz explícita"
+msgstr "El procedimiento '%s' con PASS(%s) en %L no tiene un argumento '%s'"
#: fortran/resolve.c:8475
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Procedure '%s' with PASS at %L must have at least one argument"
-msgstr "El procedimiento de operador de usuario '%s' en %L debe tener al menos un argumento"
+msgstr "El procedimiento '%s' con PASS en %L debe tener al menos un argumento"
#: fortran/resolve.c:8487
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Argument '%s' of '%s' with PASS(%s) at %L must be of the derived-type '%s'"
-msgstr "El argumento '%s' del intrínseco '%s' en %L debe ser de un tipo no derivado"
+msgstr "El argumento '%s' de '%s' con PASS(%s) en %L debe ser del tipo derivado '%s'"
#: fortran/resolve.c:8493
#, no-c-format
msgid "Polymorphic entities are not yet implemented, non-polymorphic passed-object dummy argument of '%s' at %L accepted"
-msgstr ""
+msgstr "Aún no se admiten las entidades polimórficas, se aceptó el argumento dummy de '%s' del objeto pasado que no es polimórfico en %L"
#: fortran/resolve.c:8518
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Procedure '%s' at %L has the same name as a component of '%s'"
-msgstr "El procedimiento INTERFACE '%s' en %L tiene el mismo nombre que el procedimiento que lo incluye"
+msgstr "El procedimiento '%s' en %L tiene el mismo nombre que un componente de '%s'"
#: fortran/resolve.c:8527
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Procedure '%s' at %L has the same name as an inherited component of '%s'"
-msgstr "El procedimiento INTERFACE '%s' en %L tiene el mismo nombre que el procedimiento que lo incluye"
+msgstr "El procedimiento '%s' en %L tiene el mismo nombre que un componente heredado de '%s'"
#: fortran/resolve.c:8595
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Non-extensible derived-type '%s' at %L must not be ABSTRACT"
-msgstr "El componente '%s' en el tipo derivado '%s' en %L tal vez no es interoperable con C"
+msgstr "El tipo derivado '%s' que no es extensible en %L no debe ser ABSTRACT"
#: fortran/resolve.c:8612
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Component '%s' of '%s' at %L has the same name as an inherited type-bound procedure"
-msgstr "El procedimiento INTERFACE '%s' en %L tiene el mismo nombre que el procedimiento que lo incluye"
+msgstr "El componente '%s' de '%s' en %L tiene el mismo nombre que un procedimiento enlazado a tipo heredado"
#: fortran/resolve.c:8624
#, no-c-format
@@ -9814,24 +9795,24 @@ msgid "Intrinsic subroutine '%s' at %L shall not have a type specifier"
msgstr "La subrutina intrínseca '%s' en %L no debe tener un especificador de tipo"
#: fortran/resolve.c:9014
-#, fuzzy, no-c-format
+#, no-c-format
msgid "'%s' declared INTRINSIC at %L does not exist"
-msgstr "El COMMON '%s' en %L no existe"
+msgstr "No existe '%s' declarado como INTRINSIC en %L"
#: fortran/resolve.c:9023
#, no-c-format
msgid "The intrinsic '%s' declared INTRINSIC at %L is not available in the current standard settings but %s. Use an appropriate -std=* option or enable -fall-intrinsics in order to use it."
-msgstr ""
+msgstr "El intrínseco '%s' declarado como INTRINSIC en %L no está disponible en la configuración actual de estándares pero %s. Use una opción -std=* apropiada o active -fall-intrinsics para poder usarlo."
#: fortran/resolve.c:9067
#, no-c-format
msgid "Assumed size array at %L must be a dummy argument"
-msgstr "El tamaño asumido de matriz en %L debe ser un argumento de prueba"
+msgstr "La matriz de tamaño asumido en %L debe ser un argumento de prueba"
#: fortran/resolve.c:9070
#, no-c-format
msgid "Assumed shape array at %L must be a dummy argument"
-msgstr "La forma asumida de matriz en %L debe ser un argumento de prueba"
+msgstr "La matriz de forma asumida en %L debe ser un argumento de prueba"
#: fortran/resolve.c:9082
#, no-c-format
@@ -9984,9 +9965,9 @@ msgid "Substring at %L has length zero"
msgstr "La subcadena en %L tiene longitud cero"
#: fortran/resolve.c:10188
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: PUBLIC function '%s' at %L of PRIVATE type '%s'"
-msgstr "Fortran 2003: La función PUBLIC %s '%s' en %L es de tipo derivado PRIVATE '%s'"
+msgstr "Fortran 2003: La función PUBLIC '%s' en %L es de tipo derivado PRIVATE '%s'"
#: fortran/resolve.c:10201
#, no-c-format
@@ -10026,7 +10007,7 @@ msgstr "La interfaz de operador en %L debe tener, cuando mucho, dos argumentos"
#: fortran/resolve.c:10320
#, no-c-format
msgid "Contained procedure '%s' at %L of a PURE procedure must also be PURE"
-msgstr "El procedimiento contenido '%s' en %L de un procedimiento PURE tambíén debe ser PURE"
+msgstr "El procedimiento contenido '%s' en %L de un procedimiento PURE también debe ser PURE"
#: fortran/scanner.c:727
#, no-c-format
@@ -10104,19 +10085,19 @@ msgid "Invalid KIND parameter of %s at %L"
msgstr "El parámetro KIND de %s es inválido en %L"
#: fortran/simplify.c:276
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Argument of %s function at %L is negative"
-msgstr "La función de declaración en %L es recursiva"
+msgstr "El argumento de la función %s en %L es negativo"
#: fortran/simplify.c:283
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Argument of %s function at %L outside of range [0,127]"
-msgstr "El argumento de la función ACHAR en %L está fuera de rango [0,127]"
+msgstr "El argumento de la función %s en %L está fuera de rango [0,127]"
#: fortran/simplify.c:301
#, no-c-format
msgid "Argument of %s function at %L is too large for the collating sequence of kind %d"
-msgstr ""
+msgstr "El argumento de la función %s en %L es demasiado grande para la secuencia de ordenado de género %d"
#: fortran/simplify.c:337
#, no-c-format
@@ -10366,7 +10347,7 @@ msgstr "El TRANSFER intrínseco en %L tiene un resultado parcialmente indefinido:
#: fortran/simplify.c:4871
#, no-c-format
msgid "Character '%s' in string at %L cannot be converted into character kind %d"
-msgstr ""
+msgstr "El carácter '%s' en la cadena en %L no se puede convertir al género de carácter %d"
#: fortran/symbol.c:121
#, no-c-format
@@ -10402,7 +10383,7 @@ msgstr "La variable BIND(C) '%s' declarada implícitamente en %L tal vez no es in
#. Dummy args to a BIND(C) routine may not be interoperable if
#. they are implicitly typed.
#: fortran/symbol.c:283
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Implicitly declared variable '%s' at %L may not be C interoperable but it is a dummy argument to the BIND(C) procedure '%s' at %L"
msgstr "La variable declarada implícitamente '%s' en %L tal vez no es interoperable con C pero es un argumento dummy para el procedimiento BIND(C) '%s' en %L"
@@ -10417,14 +10398,14 @@ msgid "%s attribute not allowed in BLOCK DATA program unit at %L"
msgstr "No se permite el atributo %s en la unidad de programa BLOCK DATA en %L"
#: fortran/symbol.c:607
-#, fuzzy, no-c-format
+#, no-c-format
msgid "%s attribute applied to %s %s at %L"
-msgstr "El atributo %s genera un conflicto con el atributo %s en %L"
+msgstr "El atributo %s se aplica a %s %s en %L"
#: fortran/symbol.c:614
#, no-c-format
msgid "BIND(C) applied to %s %s at %L"
-msgstr ""
+msgstr "Se aplicó BIND(C) a %s %s en %L"
#: fortran/symbol.c:711 fortran/symbol.c:1364
#, no-c-format
@@ -10459,17 +10440,17 @@ msgstr "No se pueden cambiar los atributos del símbolo asociado con USE %s en %L
#: fortran/symbol.c:791
#, no-c-format
msgid "Duplicate %s attribute specified at %L"
-msgstr "Atributo %s duplicado especificado en %L"
+msgstr "Se especificó un atributo %s duplicado en %L"
#: fortran/symbol.c:824
#, no-c-format
msgid "ALLOCATABLE specified outside of INTERFACE body at %L"
-msgstr ""
+msgstr "Se especificó ALLOCATABLE fuera de un cuerpo INTERFACE en %L"
#: fortran/symbol.c:850
#, no-c-format
msgid "DIMENSION specified for '%s' outside its INTERFACE body at %L"
-msgstr ""
+msgstr "Se especificó DIMENSION para '%s' fuera de su cuerpo INTERFACE en %L"
#: fortran/symbol.c:968
#, no-c-format
@@ -10479,7 +10460,7 @@ msgstr "El Apuntado Cray en %L aparece en varias declaraciones pointer()"
#: fortran/symbol.c:987
#, no-c-format
msgid "Duplicate PROTECTED attribute specified at %L"
-msgstr "Atributo PROTECTED duplicado especificado en %L"
+msgstr "Se especificó un atributo PROTECTED duplicado en %L"
#: fortran/symbol.c:1020
#, no-c-format
@@ -10489,17 +10470,17 @@ msgstr "El atributo SAVE en %L no se puede especificar en un procedimiento PURE"
#: fortran/symbol.c:1028
#, no-c-format
msgid "Duplicate SAVE attribute specified at %L"
-msgstr "Atributo SAVE duplicado especificado en %L"
+msgstr "Se especificó un atributo SAVE duplicado en %L"
#: fortran/symbol.c:1049
#, no-c-format
msgid "Duplicate VALUE attribute specified at %L"
-msgstr "Atributo VALUE duplicado especificado en %L"
+msgstr "Se especificó un atributo VALUE duplicado en %L"
#: fortran/symbol.c:1069
#, no-c-format
msgid "Duplicate VOLATILE attribute specified at %L"
-msgstr "Atributo VOLATILE duplicado especificado en %L"
+msgstr "Se especificó un atributo VOLATILE duplicado en %L"
#: fortran/symbol.c:1360
#, no-c-format
@@ -10509,7 +10490,7 @@ msgstr "El atributo %s de '%s' genera un conflicto con el atributo %s en %L"
#: fortran/symbol.c:1394
#, no-c-format
msgid "%s procedure at %L is already declared as %s procedure"
-msgstr "El prcedimiento %s en %L ya sa había declarado como un procedimiento %s"
+msgstr "El procedimiento %s en %L ya se había declarado como un procedimiento %s"
#: fortran/symbol.c:1429
#, no-c-format
@@ -10524,7 +10505,7 @@ msgstr "La especificación ACCESS en %L ya se había especificado"
#: fortran/symbol.c:1470
#, no-c-format
msgid "Duplicate BIND attribute specified at %L"
-msgstr "Atributo BIND duplicado especificado en %L"
+msgstr "Se especificó un atributo BIND duplicado en %L"
#: fortran/symbol.c:1477
#, no-c-format
@@ -10532,14 +10513,14 @@ msgid "Fortran 2003: BIND(C) at %L"
msgstr "Fortran 2003: BIND(C) en %L"
#: fortran/symbol.c:1494
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Duplicate EXTENDS attribute specified at %L"
-msgstr "Atributo BIND duplicado especificado en %L"
+msgstr "Se especificó un atributo EXTENDS duplicado en %L"
#: fortran/symbol.c:1498
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Fortran 2003: EXTENDS at %L"
-msgstr "Fortran 2003: BIND(C) en %L"
+msgstr "Fortran 2003: EXTENDS en %L"
#: fortran/symbol.c:1520
#, no-c-format
@@ -10549,7 +10530,7 @@ msgstr "El símbolo '%s' en %L ya tenía una interfaz explícita"
#: fortran/symbol.c:1527
#, no-c-format
msgid "'%s' at %L has attributes specified outside its INTERFACE body"
-msgstr ""
+msgstr "'%s' en %L tiene atributos especificados fuera de su cuerpo INTERFACE"
#: fortran/symbol.c:1574
#, no-c-format
@@ -10562,9 +10543,9 @@ msgid "Component '%s' at %C already declared at %L"
msgstr "El componente '%s' en %C ya se había declarado en %L"
#: fortran/symbol.c:1744
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Component '%s' at %C already in the parent type at %L"
-msgstr "El componente '%s' en %C ya se había declarado en %L"
+msgstr "El componente '%s' en %C ya estaba en el tipo padre en %L"
#: fortran/symbol.c:1819
#, no-c-format
@@ -10587,9 +10568,9 @@ msgid "Component '%s' at %C is a PRIVATE component of '%s'"
msgstr "El componente '%s' en %C es un componente PRIVATE de '%s'"
#: fortran/symbol.c:1910
-#, fuzzy, no-c-format
+#, no-c-format
msgid "All components of '%s' are PRIVATE in structure constructor at %C"
-msgstr "Faltan componentes en el constructor de estructura en %C"
+msgstr "Todos los componentes de '%s' son PRIVATE en el constructor de estructura en %C"
#: fortran/symbol.c:2039
#, no-c-format
@@ -10678,19 +10659,19 @@ msgid "Derived type '%s' at %L cannot have the SEQUENCE attribute because it is
msgstr "El tipo derivado '%s' en %L no puede tener el atributo SEQUENCE porque es BIND(C)"
#: fortran/symbol.c:4261
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Symbol '%s' is used before it is typed at %L"
-msgstr "El símbolo '%s' está presente en múltiples cláusulas en %L"
+msgstr "El símbolo '%s' se usa antes de escribirse en %L"
#: fortran/symbol.c:4267
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Extension: Symbol '%s' is used before it is typed at %L"
-msgstr "Extensión: Una coma antes de una lista de elementos de e/s en %C"
+msgstr "Extensión: Se usa el símbolo '%s' antes de escribirse en %L"
#: fortran/symbol.c:4318
#, no-c-format
msgid "'%s' of '%s' is PRIVATE at %C"
-msgstr ""
+msgstr "'%s' de '%s' es PRIVATE en %C"
#: fortran/target-memory.c:610
#, no-c-format
@@ -10704,21 +10685,21 @@ msgstr "La constante BOZ en %L es demasiado grande (%ld vs %ld bits)"
#: fortran/trans-array.c:641 fortran/trans-array.c:4368
#: fortran/trans-array.c:5299 fortran/trans-intrinsic.c:3635
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Creating array temporary at %L"
-msgstr "se crea la matriz de %qT"
+msgstr "Se crea una matriz temporal en %L"
#. Problems occur when we get something like
#. integer :: a(lots) = (/(i, i=1, lots)/)
#: fortran/trans-array.c:3951
#, no-c-format
msgid "The number of elements in the array constructor at %L requires an increase of the allowed %d upper limit. See -fmax-array-constructor option"
-msgstr ""
+msgstr "El número de elementos en el constructor de matriz en %L requiere un incremento del límite superior %d permitido. Vea la opción -fmax-array-constructor"
#: fortran/trans-array.c:5296
#, no-c-format
msgid "Creating array temporary at %L for argument '%s'"
-msgstr ""
+msgstr "Se crea una matriz temporal en %L para el argumento '%s'"
#: fortran/trans-common.c:399
#, no-c-format
@@ -10757,14 +10738,14 @@ msgid "The equivalence set for '%s' cause an invalid extension to COMMON '%s' at
msgstr "El conjunto de equivalencia para '%s' causa una extensión inválida al COMMON '%s' en %L"
#: fortran/trans-common.c:1116
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Padding of %d bytes required before '%s' in COMMON '%s' at %L; reorder elements or use -fno-align-commons"
-msgstr "Se requiere el relleno de %d bytes antes de '%s' en el COMMON '%s' en %L"
+msgstr "Se requiere el relleno de %d bytes antes de '%s' en el COMMON '%s' en %L; reordene los elementos o use -fno-align-commons"
#: fortran/trans-common.c:1121
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Padding of %d bytes required before '%s' in COMMON at %L; reorder elements or use -fno-align-commons"
-msgstr "Se requiere el relleno de %d bytes antes de '%s' en el COMMON '%s' en %L"
+msgstr "Se requiere el relleno de %d bytes antes de '%s' en COMMON en %L; reordene los elementos o use -fno-align-commons"
#: fortran/trans-common.c:1149
#, no-c-format
@@ -10772,24 +10753,24 @@ msgid "COMMON '%s' at %L does not exist"
msgstr "El COMMON '%s' en %L no existe"
#: fortran/trans-common.c:1157
-#, fuzzy, no-c-format
+#, no-c-format
msgid "COMMON '%s' at %L requires %d bytes of padding at start; reorder elements or use -fno-align-commons"
-msgstr "El COMMON '%s' en %L requiere %d bytes de relleno al inicio"
+msgstr "El COMMON '%s' en %L requiere %d bytes de relleno al inicio; reordene los elementos o use -fno-align-commons"
#: fortran/trans-common.c:1161
-#, fuzzy, no-c-format
+#, no-c-format
msgid "COMMON at %L requires %d bytes of padding at start; reorder elements or use -fno-align-commons"
-msgstr "El COMMON '%s' en %L requiere %d bytes de relleno al inicio"
+msgstr "El COMMON en %L requiere %d bytes de relleno al inicio; reordene los elementos o use -fno-align-commons"
#: fortran/trans-const.c:290
#, no-c-format
msgid "Assigning value other than 0 or 1 to LOGICAL has undefined result at %L"
-msgstr ""
+msgstr "Asignar un valor diferente de 0 o 1 a LOGICAL tiene un resultado sin definir en %L"
#: fortran/trans-decl.c:2835 fortran/trans-decl.c:3858
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Return value of function '%s' at %L not set"
-msgstr "El tipo de devolución de la función BIND(C) '%s' en %L no puede ser una matriz"
+msgstr "No se define el valor de devolución de la función '%s' en %L"
#: fortran/trans-decl.c:3493
#, no-c-format
@@ -10812,9 +10793,9 @@ msgid "Unused parameter '%s' declared at %L"
msgstr "Se declaró el parámetro '%s' sin uso en %L"
#: fortran/trans-decl.c:3549
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Return value '%s' of function '%s' declared at %L not set"
-msgstr "El tipo de devolución de la función BIND(C) '%s' en %L no puede ser una matriz"
+msgstr "No se define el valor de devolución '%s' de la función '%s' declarada en %L"
#: fortran/trans-expr.c:2391
#, no-c-format
@@ -10865,19 +10846,18 @@ msgid "Out of memory"
msgstr "Memoria agotada"
#: fortran/trans.c:737
-#, fuzzy, c-format
+#, c-format
msgid "Attempting to allocate already allocated array '%s'"
-msgstr "Se intentó alojar una matriz ya alojada"
+msgstr "Se intentó alojar la matriz ya alojada '%s'"
#: fortran/trans.c:743
-#, fuzzy
msgid "Attempting to allocate already allocatedarray"
msgstr "Se intentó alojar una matriz ya alojada"
#: fortran/trans.c:852
-#, fuzzy, c-format
+#, c-format
msgid "Attempt to DEALLOCATE unallocated '%s'"
-msgstr "Se intentó DEALLOCATE en memoria sin alojar."
+msgstr "Se intentó DEALLOCATE en '%s' sin alojar."
#: java/jcf-dump.c:1068
#, c-format
@@ -11116,14 +11096,12 @@ msgid "-E or -x required when input is from standard input"
msgstr "se requiere -E ó -x cuando la entrada es de entrada estándar"
#: fortran/lang-specs.h:45 fortran/lang-specs.h:58
-#, fuzzy
msgid "gfortran does not support -E without -cpp"
-msgstr "GCC no da soporte a -C sin usar -E"
+msgstr "gfortran no admite -E sin usar -cpp"
#: config/bfin/elf.h:31
-#, fuzzy
msgid "no processor type specified for linking"
-msgstr "el fichero de especificación no tiene especificaciones para enlazar"
+msgstr "no existe el tipo de procesador especificado para enlazar"
#: config/vxworks.h:71
msgid "-Xbind-now and -Xbind-lazy are incompatible"
@@ -11207,7 +11185,7 @@ msgstr "no se pueden especificar -march=... y -mcpu=... al mismo tiempo"
#: config/vax/vax.h:49 config/vax/vax.h:50
msgid "profiling not supported with -mg\n"
-msgstr "la creación de perfil no se admite con -mg\n"
+msgstr "el análisis de perfil no se admite con -mg\n"
#: config/s390/tpf.h:119
msgid "static is not supported on TPF-OS"
@@ -11343,16 +11321,15 @@ msgstr "Avisa sobre posibles aliases de argumentos de relleno"
#: fortran/lang.opt:77
msgid "Warn about alignment of COMMON blocks"
-msgstr ""
+msgstr "Avisa sobre la alineación de bloques COMMON"
#: fortran/lang.opt:81
msgid "Warn about missing ampersand in continued character constants"
msgstr "Avisa sobre '&' faltantes en las literales de carácter continuadas"
#: fortran/lang.opt:85
-#, fuzzy
msgid "Warn about creation of array temporaries"
-msgstr "Avisa sobre la aritmética de punteros de funciones"
+msgstr "Avisa sobre la creación de matrices temporales"
#: fortran/lang.opt:89
msgid "Warn about truncated character expressions"
@@ -11371,9 +11348,8 @@ msgid "Warn about truncated source lines"
msgstr "Avisa sobre líneas de código truncadas"
#: fortran/lang.opt:105
-#, fuzzy
msgid "Warn on intrinsics not part of the selected standard"
-msgstr "El intrínseco '%s' en %L no se incluye en el estándar seleccionado"
+msgstr "Avisa sobre intrínsecos que no son parte del estándar seleccionado"
#: fortran/lang.opt:113
msgid "Warn about \"suspicious\" constructs"
@@ -11389,26 +11365,23 @@ msgstr "Avisa sobre desbordamiento por debajo de expresiones numéricas constante
#: fortran/lang.opt:125
msgid "Warn if a user-procedure has the same name as an intrinsic"
-msgstr ""
+msgstr "Avisa si un procedimiento de usuario tiene el mismo nombre que un intrínseco"
#: fortran/lang.opt:129
-#, fuzzy
msgid "Enable preprocessing"
-msgstr "Habilita el preprocesamiento tradicional"
+msgstr "Habilita el preprocesamiento"
#: fortran/lang.opt:133
-#, fuzzy
msgid "Disable preprocessing"
-msgstr "Desactiva el direccionamiento indizado"
+msgstr "Desactiva el preprocesamiento"
#: fortran/lang.opt:137
msgid "Dump details about macro names and definitions during preprocessing"
-msgstr ""
+msgstr "Vuelca detalles sobre los nombres de macro y definiciones durante el preprocesado"
#: fortran/lang.opt:141
-#, fuzzy
msgid "Enable alignment of COMMON blocks"
-msgstr "La variable threadprivate en %C es un elemento de un bloque COMMON"
+msgstr "Activa la alineación de bloques COMMON"
#: fortran/lang.opt:145
msgid "All intrinsics procedures are available regardless of selected standard"
@@ -11432,7 +11405,7 @@ msgstr "-fblas-matmul-limit=<n> Tamaño de la matriz más pequeña para la c
#: fortran/lang.opt:169
msgid "Produce a warning at runtime if a array temporary has been created for a procedure argument"
-msgstr ""
+msgstr "Produce un aviso en tiempo de ejecución si se ha creado una matriz temporal para un argumento de procedimiento"
#: fortran/lang.opt:173
msgid "Use big-endian format for unformatted files"
@@ -11552,7 +11525,7 @@ msgstr "-finit-real=<zero|nan|inf|-inf> Inicializa las variables reales locales"
#: fortran/lang.opt:289
msgid "-fmax-array-constructor=<n> Maximum number of objects in an array constructor"
-msgstr ""
+msgstr "-fmax-array-constructor=<n> Número máximo de objetos en un constructor de matriz"
#: fortran/lang.opt:293
msgid "Maximum number of errors to report"
@@ -11631,9 +11604,8 @@ msgid "Conform to the ISO Fortran 2003 standard"
msgstr "Conforma al estándar ISO Fortran 2003"
#: fortran/lang.opt:401
-#, fuzzy
msgid "Conform to the ISO Fortran 2008 standard"
-msgstr "Conforma al estándar ISO Fortran 2003"
+msgstr "Conforma al estándar ISO Fortran 2008"
#: fortran/lang.opt:405
msgid "Conform to the ISO Fortran 95 standard"
@@ -11772,7 +11744,7 @@ msgstr "Usa 8 acumuladores de medios"
#: config/frv/frv.opt:31
msgid "Enable label alignment optimizations"
-msgstr "Activa las optimizaciones de alienación de etiquetas"
+msgstr "Activa las optimizaciones de alineación de etiquetas"
#: config/frv/frv.opt:35
msgid "Dynamically allocate cc registers"
@@ -11784,7 +11756,7 @@ msgstr "Establece el costo de las ramificaciones"
#: config/frv/frv.opt:46
msgid "Enable conditional execution other than moves/scc"
-msgstr "Establece la ejecución condicional en lugar de moves/scc"
+msgstr "Activa la ejecución condicional en lugar de moves/scc"
#: config/frv/frv.opt:50
msgid "Change the maximum length of conditionally-executed sequences"
@@ -12162,25 +12134,24 @@ msgid "Count speculative dependencies while calculating priority of instructions
msgstr "Cuenta las dependencias especulativas mientras se calcula la prioridad de las instrucciones"
#: config/ia64/ia64.opt:145
-#, fuzzy
msgid "Place a stop bit after every cycle when scheduling"
-msgstr "Activa la ubicación temprana de bits de paro para mejor calendarización"
+msgstr "Coloca un bit de parada después de cada ciclo durante la calendarización"
#: config/ia64/ia64.opt:149
msgid "Assume that floating-point stores and loads are not likely to cause conflict when placed into one instruction group"
-msgstr ""
+msgstr "Asume que los stores y loads de coma flotante no pueden causar conflictos al colocarse en un grupo de instrucción"
#: config/ia64/ia64.opt:153
msgid "Soft limit on number of memory insns per instruction group, giving lower priority to subsequent memory insns attempting to schedule in the same insn group. Frequently useful to prevent cache bank conflicts. Default value is 1"
-msgstr ""
+msgstr "Límite suave en el número de insns de memoria por grupo de instrucción, dando una prioridad más baja a insns de memoria subsecuentes que intenten calendarizar en el mismo grupo insn. Frecuentemente útil para prevenir conflictos en el banco de caché. El valor por defecto es 1"
#: config/ia64/ia64.opt:157
msgid "Disallow more than `msched-max-memory-insns' in instruction group. Otherwise, limit is `soft' (prefer non-memory operations when limit is reached)"
-msgstr ""
+msgstr "Desactiva más de `msched-max-memory-insns' en el grupo de instrucción. De otra forma, el límite es `soft' (se prefieren operaciones que no sean de memoria cuando se alcanza el límite)"
#: config/ia64/ia64.opt:161
msgid "Don't generate checks for control speculation in selective scheduling"
-msgstr ""
+msgstr "No genera revisiones para el control de especulación en la calendarización selectiva"
#: config/m32c/m32c.opt:24 config/bfin/bfin.opt:23
msgid "Use simulator runtime"
@@ -12505,7 +12476,7 @@ msgstr "Optimiza para el CPU o la arquitectura destino"
#: config/m68k/m68k.opt:184
msgid "Support more than 8192 GOT entries on ColdFire"
-msgstr ""
+msgstr "Admite más de 8192 entradas GOT en ColdFire"
#: config/m68k/ieee.opt:24 config/i386/i386.opt:137
msgid "Use IEEE math for fp comparisons"
@@ -12517,7 +12488,7 @@ msgstr "Se descarta (obsoleto)"
#: config/i386/mingw.opt:23
msgid "Warn about none ISO msvcrt scanf/printf width extensions"
-msgstr ""
+msgstr "Avisa sobre extensiones de anchura scanf/printf msvcrt que no son ISO"
#: config/i386/i386.opt:61
msgid "sizeof(long double) is 16"
@@ -12577,7 +12548,7 @@ msgstr "Genera sin, cos, sqrt para FPU"
#: config/i386/i386.opt:121
msgid "Always use Dynamic Realigned Argument Pointer (DRAP) to realign stack"
-msgstr ""
+msgstr "Usar siempre el Puntero de Argumento Realineado Dinámicamente (DRAP) para realinear la pila"
#: config/i386/i386.opt:125
msgid "Return values of functions in FPU registers"
@@ -12612,9 +12583,8 @@ msgid "Attempt to keep stack aligned to this power of 2"
msgstr "Trata de mantenter la pila alineada a esta potencia de 2"
#: config/i386/i386.opt:181
-#, fuzzy
msgid "Assume incoming stack aligned to this power of 2"
-msgstr "Trata de mantenter la pila alineada a esta potencia de 2"
+msgstr "Asume que la pila de entrada está alineada a esta potencia de 2"
#: config/i386/i386.opt:185
msgid "Use push instructions to save outgoing arguments"
@@ -12666,13 +12636,12 @@ msgid "Generate reciprocals instead of divss and sqrtss."
msgstr "Genera recíprocos en lugar de divss y sqrtss."
#: config/i386/i386.opt:241
-#, fuzzy
msgid "Generate cld instruction in the function prologue."
-msgstr "No mueve las instrucciones al prólogo de una función"
+msgstr "Genera la instrucción cld en el prólogo de función."
#: config/i386/i386.opt:248
msgid "Enable automatic generation of fused floating point multiply-add instructions"
-msgstr "Permte la generación automática de instrucciones multiply-add de coma flotante de corto circuito"
+msgstr "Permite la generación automática de instrucciones multiply-add de coma flotante de corto circuito"
#: config/i386/i386.opt:256
msgid "Generate 32bit i386 code"
@@ -12684,69 +12653,67 @@ msgstr "Genera código x86-64 de 64bit"
#: config/i386/i386.opt:264
msgid "Support MMX built-in functions"
-msgstr "Da soporte para funciones internas MMX"
+msgstr "Admite funciones internas MMX"
#: config/i386/i386.opt:268
msgid "Support 3DNow! built-in functions"
-msgstr "Da soporte para funciones internas 3DNow!"
+msgstr "Admite funciones internas 3DNow!"
#: config/i386/i386.opt:272
msgid "Support Athlon 3Dnow! built-in functions"
-msgstr "Da soporte para funciones internas Athlon 3DNow!"
+msgstr "Admite funciones internas Athlon 3DNow!"
#: config/i386/i386.opt:276
msgid "Support MMX and SSE built-in functions and code generation"
-msgstr "Da soporte para funciones internas y generación de código MMX y SSE"
+msgstr "Admite funciones internas y generación de código MMX y SSE"
#: config/i386/i386.opt:280
msgid "Support MMX, SSE and SSE2 built-in functions and code generation"
-msgstr "Da soporte para funciones internas y generación de código MMX, SSE y SSE2"
+msgstr "Admite funciones internas y generación de código MMX, SSE y SSE2"
#: config/i386/i386.opt:284
msgid "Support MMX, SSE, SSE2 and SSE3 built-in functions and code generation"
-msgstr "Da soporte para funciones internas y generación de código MMX, SSE, SSE2 y SSE3"
+msgstr "Admite funciones internas y generación de código MMX, SSE, SSE2 y SSE3"
#: config/i386/i386.opt:288
msgid "Support MMX, SSE, SSE2, SSE3 and SSSE3 built-in functions and code generation"
-msgstr "Da soporte para funciones internas y generación de código MMX, SSE, SSE2, SSE3 y SSSE3"
+msgstr "Admite funciones internas y generación de código MMX, SSE, SSE2, SSE3 y SSSE3"
#: config/i386/i386.opt:292
msgid "Support MMX, SSE, SSE2, SSE3, SSSE3 and SSE4.1 built-in functions and code generation"
-msgstr "Da soporte para funciones internas y generación de código MMX, SSE, SSE2, SSE3, SSSE3 y SSE4.1"
+msgstr "Admite funciones internas y generación de código MMX, SSE, SSE2, SSE3, SSSE3 y SSE4.1"
#: config/i386/i386.opt:296 config/i386/i386.opt:300
msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 and SSE4.2 built-in functions and code generation"
-msgstr "Da soporte para funciones internas y generación de código MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 y SSE4.2"
+msgstr "Admite funciones internas y generación de código MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 y SSE4.2"
#: config/i386/i386.opt:304
msgid "Do not support SSE4.1 and SSE4.2 built-in functions and code generation"
-msgstr "No da soporte para funciones internas y generación de código SSE4.1 y SSE4.2"
+msgstr "No admite funciones internas y generación de código SSE4.1 y SSE4.2"
#: config/i386/i386.opt:308
-#, fuzzy
msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in functions and code generation"
-msgstr "Da soporte para funciones internas y generación de código MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 y SSE4.2"
+msgstr "Admite funciones internas y generación de código MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 y AVX"
#: config/i386/i386.opt:312
-#, fuzzy
msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and FMA built-in functions and code generation"
-msgstr "Da soporte para funciones internas y generación de código MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 y SSE4.2"
+msgstr "Admite funciones internas y generación de código MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX y FMA"
#: config/i386/i386.opt:316
msgid "Support MMX, SSE, SSE2, SSE3 and SSE4A built-in functions and code generation"
-msgstr "Da soporte para funciones internas y generación de código MMX, SSE, SSE2, SSE3 y SSE4A"
+msgstr "Admite funciones internas y generación de código MMX, SSE, SSE2, SSE3 y SSE4A"
#: config/i386/i386.opt:320
msgid "Support SSE5 built-in functions and code generation"
-msgstr "Da soporte para funciones internas y generación de código SSE5"
+msgstr "Admite funciones internas y generación de código SSE5"
#: config/i386/i386.opt:324
msgid "Support code generation of Advanced Bit Manipulation (ABM) instructions."
-msgstr "Da soporte para la generación de código de instrucciones Advanced Bit Manipulation (ABM)."
+msgstr "Admite la generación de código de instrucciones Advanced Bit Manipulation (ABM)."
#: config/i386/i386.opt:328
msgid "Support code generation of popcnt instruction."
-msgstr "Da soporte para la generación de código de la instrucción popcnt"
+msgstr "Admite la generación de código de la instrucción popcnt."
#: config/i386/i386.opt:332
msgid "Support code generation of cmpxchg16b instruction."
@@ -12754,21 +12721,19 @@ msgstr "Da soporte para la generación de código de la instrucción cmpxchg16b."
#: config/i386/i386.opt:336
msgid "Support code generation of sahf instruction in 64bit x86-64 code."
-msgstr "Da soporte para la generación de código de la instrucción sahf en código x86-64 de 64bit."
+msgstr "Admite la generación de código de la instrucción sahf en código x86-64 de 64bit."
#: config/i386/i386.opt:340
-#, fuzzy
msgid "Support AES built-in functions and code generation"
-msgstr "Da soporte para funciones internas y generación de código SSE5"
+msgstr "Admite funciones internas y generación de código AES"
#: config/i386/i386.opt:344
-#, fuzzy
msgid "Support PCLMUL built-in functions and code generation"
-msgstr "Da soporte para funciones internas y generación de código SSE5"
+msgstr "Admite funciones internas y generación de código PCLMUL"
#: config/i386/i386.opt:348
msgid "Encode SSE instructions with VEX prefix"
-msgstr ""
+msgstr "Codifica las instrucciones SSE con el prefijo VEX"
#: config/i386/cygming.opt:23
msgid "Create console application"
@@ -13007,14 +12972,12 @@ msgid "Avoid all range limits on call instructions"
msgstr "Evita todos los límites de rango en las instrucciones de llamadas"
#: config/rs6000/rs6000.opt:238
-#, fuzzy
msgid "Generate Cell microcode"
-msgstr "Generar código MC"
+msgstr "Genera microcódigo Cell"
#: config/rs6000/rs6000.opt:242
-#, fuzzy
msgid "Warn when a Cell microcoded instruction is emitted"
-msgstr "Avisa cuando todos los constructores y destructores son privados"
+msgstr "Avisa cuando se emite una instrucción microcodificada Cell"
#: config/rs6000/rs6000.opt:246
msgid "Warn about deprecated 'vector long ...' AltiVec type usage"
@@ -13045,28 +13008,24 @@ msgid "Specify scheduling priority for dispatch slot restricted insns"
msgstr "Especifica la prioridad de calendarización para despachar insns restringidos por ranuras"
#: config/rs6000/rs6000.opt:274
-#, fuzzy
msgid "Single-precision floating point unit"
-msgstr "Coma flotante de precisión cuádruple sin soporte"
+msgstr "Unidad de coma flotante de precisión simple"
#: config/rs6000/rs6000.opt:278
-#, fuzzy
msgid "Double-precision floating point unit"
-msgstr "Coma flotante de precisión cuádruple sin soporte"
+msgstr "Unidad de coma flotante de precisión doble"
#: config/rs6000/rs6000.opt:282
-#, fuzzy
msgid "Floating point unit does not support divide & sqrt"
-msgstr "no se admite la coma flotante decimal para este objetivo"
+msgstr "La unidad de coma flotante no admite divide & sqrt"
#: config/rs6000/rs6000.opt:286
msgid "Specify FP (sp, dp, sp-lite, dp-lite) (implies -mxilinx-fpu)"
-msgstr ""
+msgstr "Especifica FP (sp, dp, sp-lite, dp-lite) (implica -mxilinx-fpu)"
#: config/rs6000/rs6000.opt:290
-#, fuzzy
msgid "Specify Xilinx FPU."
-msgstr "Especifica una ABI"
+msgstr "Especifica la FPU de Xilinx."
#: config/rs6000/aix64.opt:24
msgid "Compile for 64-bit pointers"
@@ -13176,7 +13135,7 @@ msgstr "Se debe especificar volatile en cualquier memoria que sea afectada por D
#: config/spu/spu.opt:40 config/spu/spu.opt:44
msgid "Insert nops when it might improve performance by allowing dual issue (default)"
-msgstr ""
+msgstr "Inserta nops cuando se puede mejorar el rendimiento permitiendo el asunto dual (por defecto)"
#: config/spu/spu.opt:48
msgid "Use standard main function as entry for startup"
@@ -13187,14 +13146,12 @@ msgid "Generate branch hints for branches"
msgstr "Genera pistas de ramificación para las ramificaciones"
#: config/spu/spu.opt:56
-#, fuzzy
msgid "Maximum number of nops to insert for a hint (Default 2)"
-msgstr "Número máximo de errores a reportar"
+msgstr "Número máximo de nops a insertar para una pista (Por defecto 2)"
#: config/spu/spu.opt:60
-#, fuzzy
msgid "Approximate maximum number of instructions to allow between a hint and its branch [125]"
-msgstr "El número máximo de instrucciones para considerar el desenrollo en un ciclo"
+msgstr "El número máximo aproximado de instrucciones a permitir entre una pista y su ramificación [125]"
#: config/spu/spu.opt:64
msgid "Generate code for 18 bit addressing"
@@ -13206,7 +13163,7 @@ msgstr "Genera código para direccionamiento de 32 bit"
#: config/spu/spu.opt:76
msgid "Insert hbrp instructions after hinted branch targets to avoid the SPU hang issue"
-msgstr ""
+msgstr "Inserta instrucciones hbrp después de los objetivos ramificados con pista para evitar el problema del colgado de SPU"
#: config/mcore/mcore.opt:23
msgid "Generate code for the M*Core M210"
@@ -13453,9 +13410,8 @@ msgid "Generate 32-bit offsets in switch tables"
msgstr "Genera desplazamientos de 32-bit en las tablas de switch"
#: config/sh/sh.opt:217
-#, fuzzy
msgid "Generate bit instructions"
-msgstr "Genera instrucciones isel"
+msgstr "Genera instrucciones bit"
#: config/sh/sh.opt:221
msgid "Cost to assume for a branch insn"
@@ -13570,9 +13526,8 @@ msgid "Runtime name."
msgstr "Nombre del ambiente de ejecución."
#: config/arm/eabi.opt:23
-#, fuzzy
msgid "Generate code for the Android operating system."
-msgstr "Genera código para el ISA dado"
+msgstr "Genera código para el sistema operativo Android."
#: config/arm/arm.opt:23
msgid "Specify an ABI"
@@ -13692,11 +13647,11 @@ msgstr "Usa los registros quad-word Neon (en lugar de double-word) para la vecto
#: config/arm/arm.opt:162
msgid "Only generate absolute relocations on word sized values."
-msgstr ""
+msgstr "Sólo genera reubicaciones absolutas en los valores de tamaño word."
#: config/arm/arm.opt:166
msgid "Avoid overlapping destination and address registers on LDRD instructions"
-msgstr ""
+msgstr "Evita el traslape en registros de destino y dirección en las instrucciones LDRD"
#: config/arm/pe.opt:23
msgid "Ignore dllimport attribute for functions"
@@ -14021,9 +13976,8 @@ msgid "Work around certain R4400 errata"
msgstr "Evita errores de ciertos R4400"
#: config/mips/mips.opt:117
-#, fuzzy
msgid "Work around certain R10000 errata"
-msgstr "Evita errores de ciertos R4000"
+msgstr "Evita errores de ciertos R10000"
#: config/mips/mips.opt:121
msgid "Work around errata for early SB-1 revision 2 cores"
@@ -14074,9 +14028,8 @@ msgid "Use GP-relative addressing to access small data"
msgstr "Usa el direccionamiento relativo al GP para acceder a datos small"
#: config/mips/mips.opt:169
-#, fuzzy
msgid "When generating -mabicalls code, allow executables to use PLTs and copy relocations"
-msgstr "Al generar código -mabicalls, hace que el código sea adecuado para su uso en bibliotecas compartidas"
+msgstr "Al generar código -mabicalls, permite que los ejecutables usen PLTs y copien reubicaciones"
#: config/mips/mips.opt:173
msgid "Allow the use of hardware floating-point ABI and instructions"
@@ -14151,9 +14104,8 @@ msgid "Use paired-single floating-point instructions"
msgstr "Usa instrucciones apareadas-sencillas de coma flotante"
#: config/mips/mips.opt:245
-#, fuzzy
msgid "Specify when r10k cache barriers should be inserted"
-msgstr "Especifica sí/no si se deben generar las instrucciones isel"
+msgstr "Especifica cuando se deben insertar las barreras de caché de r10k"
#: config/mips/mips.opt:249
msgid "When generating -mabicalls code, make the code suitable for use in shared libraries"
@@ -14590,48 +14542,44 @@ msgid "Do stack checking using bounds in L1 scratch memory"
msgstr "Revisa la pila usando límites en la memoria de scratch L1"
#: config/bfin/bfin.opt:85
-#, fuzzy
msgid "Enable multicore support"
-msgstr "Admite la coma flotante decimal de hardware"
+msgstr "Activa el soporte multinúcleo"
#: config/bfin/bfin.opt:89
msgid "Build for Core A"
-msgstr ""
+msgstr "Construye par el Core A"
#: config/bfin/bfin.opt:93
msgid "Build for Core B"
-msgstr ""
+msgstr "Construye para el Core B"
#: config/bfin/bfin.opt:97
msgid "Build for SDRAM"
-msgstr ""
+msgstr "Construye para SDRAM"
#: config/picochip/picochip.opt:23
msgid "Specify which type of AE to target. This option sets the mul-type"
-msgstr ""
+msgstr "Especifica a qué tipo de AE se apunta. Esta opción establece el tipo mul"
#: config/picochip/picochip.opt:28
msgid "Specify which type of multiplication to use. Can be mem, mac or none."
-msgstr ""
+msgstr "Especifica cuál tipo de multiplicación se usa. Puede ser mem, mac o none."
#: config/picochip/picochip.opt:32
-#, fuzzy
msgid "Specify whether the byte access instructions should be used. Enabled by default."
-msgstr "Especifica sí/no si se deben generar las instrucciones isel"
+msgstr "Especifica si se deben usar las instrucciones de acceso a byte. Activado por defecto."
#: config/picochip/picochip.opt:36
-#, fuzzy
msgid "Enable debug output to be generated."
-msgstr "Activa la salida de depuración"
+msgstr "Activa que la salida de depuración se genere."
#: config/picochip/picochip.opt:40
msgid "Allow a symbol value to be used as an immediate value in an"
-msgstr ""
+msgstr "Permite que un valor de símbolo se use como un valor inmediato en an"
#: config/picochip/picochip.opt:45
-#, fuzzy
msgid "Generate warnings when inefficient code is known to be generated."
-msgstr "Emite avisos cuando se generan las reubicaciones de tiempo de ejecución"
+msgstr "Emite avisos cuando se sabe que se genera código ineficiente."
#: config/vxworks.opt:24
msgid "Assume the VxWorks RTP environment"
@@ -14811,7 +14759,7 @@ msgstr "Avisa por funciones de conversión a tipos incompatibles"
#: c.opt:136
msgid "Warn when a built-in preprocessor macro is undefined or redefined"
-msgstr ""
+msgstr "Avisa cuando una macro de preprocesador interna está sin definir o redefinida"
#: c.opt:140
msgid "Warn about C constructs that are not in the common subset of C and C++"
@@ -14878,9 +14826,8 @@ msgid "Warn about stray tokens after #elif and #endif"
msgstr "Avisa sobre elementos sobrantes después de #elif y #endif"
#: c.opt:204
-#, fuzzy
msgid "Warn about comparison of different enum types"
-msgstr "Avisar sobre tipos inconsistentes de devolución"
+msgstr "Avisar sobre comparación de tipos enum diferentes"
#: c.opt:212
msgid "This switch is deprecated; use -Werror=implicit-function-declaration instead"
@@ -15096,7 +15043,7 @@ msgstr "Avisa si los firmas de tipo de los métodos candidatos no coinciden exact
#: c.opt:433
msgid "Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used"
-msgstr ""
+msgstr "Avisa cuando se usan las funciones internas __sync_fetch_and_nand y __sync_nand_and_fetch"
#: c.opt:437
msgid "Deprecated. This switch has no effect"
@@ -15204,7 +15151,7 @@ msgstr "Permite '$' como un identificador de carácter"
#: c.opt:554
msgid "Generate code to check exception specifications"
-msgstr "Genera código para revisar excepciones de especificaciones"
+msgstr "Genera código para revisar especificaciones de excepciones"
#: c.opt:561
msgid "Convert all strings and character constants to character set <cset>"
@@ -15303,7 +15250,6 @@ msgid "Enable OpenMP"
msgstr "Activa OpenMP"
#: c.opt:690
-#, fuzzy
msgid "Recognize C++ keywords like \"compl\" and \"xor\""
msgstr "Reconoce palabras clave de C++ como \"compl\" y \"xor\""
@@ -15608,9 +15554,8 @@ msgid "Warn when an optimization pass is disabled"
msgstr "Avisa cuando se desactiva un paso de optimización"
#: common.opt:99
-#, fuzzy
msgid "Warn on calls to these functions"
-msgstr "error en los argumentos para la función de especificación '%s'"
+msgstr "Avisa en las llamadas a estas funciones"
#: common.opt:103
msgid "Treat all warnings as errors"
@@ -15630,7 +15575,7 @@ msgstr "Termina cuando sucede el primer error"
#: common.opt:119
msgid "-Wframe-larger-than=<number> Warn if a function's stack frame requires more than <number> bytes"
-msgstr ""
+msgstr "-Wframe-larger-than=<número> Avisa si el marco de la pila de una función requiere más de <número> bytes"
#: common.opt:123
msgid "Warn when an inlined function cannot be inlined"
@@ -15653,9 +15598,8 @@ msgid "Warn about functions which might be candidates for __attribute__((noretur
msgstr "Avisa sobre funciones que pueden ser candidatas para __attribute((noreturn))"
#: common.opt:146
-#, fuzzy
msgid "Warn about constructs not instrumented by -fmudflap"
-msgstr "Avisar acerca de constructores con significados sorprendentes"
+msgstr "Avisa sobre constructores que no se instrumentaron por -fmudflap"
#: common.opt:150
msgid "Warn about overflow in arithmetic expressions"
@@ -15835,7 +15779,7 @@ msgstr "No pone globales sin inicializar en la sección común"
#: common.opt:390
msgid "Do not perform optimizations increasing noticeably stack usage"
-msgstr ""
+msgstr "No realizar optimizaciones que incrementan notablemente el uso de la pila"
#: common.opt:394
msgid "Perform a register copy-propagation optimization pass"
@@ -15859,7 +15803,7 @@ msgstr "Omite el paso de reducción de rango al realizar divisiones complejas"
#: common.opt:414
msgid "Complex multiplication and division follow Fortran rules"
-msgstr ""
+msgstr "La multiplicación y la división complejas siguen las reglas Fortran"
#: common.opt:418
msgid "Place data items into their own section"
@@ -15911,7 +15855,7 @@ msgstr "Suprime la salida de números de instrucción, notas de números de linea y
#: common.opt:468
msgid "Enable CFI tables via GAS assembler directives."
-msgstr ""
+msgstr "Activa las tablas CFI a través de directivas del ensamblador GAS."
#: common.opt:472
msgid "Perform early inlining"
@@ -15987,27 +15931,24 @@ msgid "Perform global common subexpression elimination after register allocation
msgstr "Realiza la eliminación de subexpresiones comunes globales despúes del alojamiento de registros"
#: common.opt:556
-#, fuzzy
msgid "Enable in and out of Graphite representation"
-msgstr "Activa la eliminación de almacenamiento muerto"
+msgstr "Activa in y out de la representación Graphite"
#: common.opt:560
msgid "Enable Loop Strip Mining transformation"
-msgstr ""
+msgstr "Activa la transformación Loop Strip Mining"
#: common.opt:564
msgid "Enable Loop Interchange transformation"
-msgstr ""
+msgstr "Activa la transformación Loop Interchange"
#: common.opt:568
-#, fuzzy
msgid "Enable Loop Blocking transformation"
-msgstr "Permite la revisión de rango durante la compilación"
+msgstr "Activa la transformación Loop Blocking"
#: common.opt:572
-#, fuzzy
msgid "Enable Graphite Identity transformation"
-msgstr "Emite información de grafo de llamadas"
+msgstr "Activa la transformación Graphite Identity"
#: common.opt:576
msgid "Enable guessing of branch probabilities"
@@ -16030,9 +15971,8 @@ msgid "Do not generate .size directives"
msgstr "No genera directivas .size"
#: common.opt:604
-#, fuzzy
msgid "Perform indirect inlining"
-msgstr "Realiza la inclusión en línea temprana"
+msgstr "Realiza la inclusión en línea indirecta"
#: common.opt:613
msgid "Pay attention to the \"inline\" keyword"
@@ -16071,9 +16011,8 @@ msgid "Perform Interprocedural constant propagation"
msgstr "Realiza la propagación interprocedural de las constantes"
#: common.opt:652
-#, fuzzy
msgid "Perform cloning to make Interprocedural constant propagation stronger"
-msgstr "Realiza la propagación interprocedural de las constantes"
+msgstr "Realiza la clonación para hacer la propagación constante Interprocedural más fuerte"
#: common.opt:656
msgid "Discover pure and const functions"
@@ -16100,30 +16039,28 @@ msgid "Perform structure layout optimizations based"
msgstr "Realiza la ubicación de estructuras basada en optimizaciones"
#: common.opt:682
-#, fuzzy
msgid "Use integrated register allocator."
-msgstr "Utilizar coloración de grafos para el alojamiento de registros."
+msgstr "Utiliza el alojador de registros integrado."
#: common.opt:686
msgid "-fira-algorithm=[regional|CB|mixed] Set the used IRA algorithm"
-msgstr ""
+msgstr "-fira-algorithm=[regional|CB|mixed] Establece el algoritmo IRA a usar"
#: common.opt:690
msgid "Do optimistic coalescing."
-msgstr ""
+msgstr "Hace coalescencia optimista."
#: common.opt:694
-#, fuzzy
msgid "Share slots for saving different hard registers."
-msgstr "Almacenar los locales en los registros de argumento"
+msgstr "Comparte ranuras para ahorrar registros hard diferentes."
#: common.opt:698
msgid "Share stack slots for spilled pseudo-registers."
-msgstr ""
+msgstr "Comparte ranuras de pila para pseudo-registros derramados."
#: common.opt:702
msgid "-fira-verbose=<number> Control IRA's level of diagnostic messages."
-msgstr ""
+msgstr "-fira-verbose=<número> Controla el nivel de mensajes de diagnóstico de IRA"
#: common.opt:706
msgid "Optimize induction variables on trees"
@@ -16283,29 +16220,27 @@ msgstr "Inserta el código de análisis de perfil de programa basado en arc"
#: common.opt:873
msgid "Set the top-level directory for storing the profile data."
-msgstr ""
+msgstr "Establece el directorio de nivel principal para almacenar los datos de perfilado."
#: common.opt:878
msgid "Enable correction of flow inconsistent profile data input"
-msgstr ""
+msgstr "Activa la corrección de datos de entrada de perfilado inconsistente de flujo"
#: common.opt:882
msgid "Enable common options for generating profile info for profile feedback directed optimizations"
msgstr "Activa las opciones comunes para generar información de análisis de perfil para optimizaciones dirigidas por retroalimentación de perfil"
#: common.opt:886
-#, fuzzy
msgid "Enable common options for generating profile info for profile feedback directed optimizations, and set -fprofile-dir="
-msgstr "Activa las opciones comunes para generar información de análisis de perfil para optimizaciones dirigidas por retroalimentación de perfil"
+msgstr "Activa las opciones comunes para generar información de análisis de perfil para optimizaciones dirigidas por retroalimentación de perfili, y establece -fprofile-dir="
#: common.opt:890
msgid "Enable common options for performing profile feedback directed optimizations"
msgstr "Activa las opciones comunes para realizar optimizaciones dirigidas por retroalimentación de perfil"
#: common.opt:894
-#, fuzzy
msgid "Enable common options for performing profile feedback directed optimizations, and set -fprofile-dir="
-msgstr "Activa las opciones comunes para realizar optimizaciones dirigidas por retroalimentación de perfil"
+msgstr "Activa las opciones comunes para realizar optimizaciones dirigidas por retroalimentación de perfil, y establece -fprofile-dir="
#: common.opt:898
msgid "Insert code to profile values of expressions"
@@ -16389,24 +16324,23 @@ msgstr "Recalendariza las instrucciones después del alojamiento de registros"
#: common.opt:994
msgid "Schedule instructions using selective scheduling algorithm"
-msgstr ""
+msgstr "Calendariza instrucciones usando el algoritmo de calendarización selectivo"
#: common.opt:998
-#, fuzzy
msgid "Run selective scheduling after reload"
-msgstr "Usa la especulación de datos después de recargar"
+msgstr "Ejecuta la calendarización selectiva después de recargar"
#: common.opt:1002
msgid "Perform software pipelining of inner loops during selective scheduling"
-msgstr ""
+msgstr "Realiza el `pipelining' de software de los ciclos internos durante la calendarización selectiva"
#: common.opt:1006
msgid "Perform software pipelining of outer loops during selective scheduling"
-msgstr ""
+msgstr "Realiza el `pipelining' de software de los ciclos externos durante la calendarización selectiva"
#: common.opt:1010
msgid "Reschedule pipelined regions without pipelining"
-msgstr ""
+msgstr "Recalendariza las regiones `pipelined' sin `pipelining'"
#: common.opt:1016
msgid "Allow premature scheduling of queued insns"
@@ -16465,9 +16399,8 @@ msgid "Insert stack checking code into the program"
msgstr "Inserta código de revisión de la pila en el programa"
#: common.opt:1080
-#, fuzzy
msgid "Insert stack checking code into the program. Same as -fstack-check=specific"
-msgstr "Inserta código de revisión de la pila en el programa"
+msgstr "Inserta código de revisión de la pila en el programai. Igual que -fstach-check=specific"
#: common.opt:1087
msgid "Trap if the stack goes past <register>"
@@ -16550,9 +16483,8 @@ msgid "Transform condition stores into unconditional ones"
msgstr "Transforma los almacenamientos condicionales a incondicionales"
#: common.opt:1186
-#, fuzzy
msgid "Perform conversions of switch initializations."
-msgstr "Realiza la conversión de saltos condicionales a ejecución condicional"
+msgstr "Realiza la conversión de las inicializaciones de switch."
#: common.opt:1190
msgid "Enable SSA dead code elimination optimization on trees"
@@ -16571,9 +16503,8 @@ msgid "Enable Full Redundancy Elimination (FRE) on trees"
msgstr "Activa la Eliminación de Redundancia Completa en árboles"
#: common.opt:1206
-#, fuzzy
msgid "Enable loop distribution on trees"
-msgstr "Activa la vectorización de ciclos en árboles"
+msgstr "Activa la distribución de ciclos en árboles"
#: common.opt:1210
msgid "Enable loop invariant motion on trees"
@@ -16704,9 +16635,8 @@ msgid "Construct webs and split unrelated uses of single variable"
msgstr "Construye redes y divide usos no relacionados de una sola variable"
#: common.opt:1357
-#, fuzzy
msgid "Enable conditional dead code elimination for builtin calls"
-msgstr "Activa la optimización de eliminación de código muerto SSA en árboles"
+msgstr "Activa la eliminación de código muerto condicional para llamadas internas"
#: common.opt:1361
msgid "Perform whole program optimizations"
@@ -16926,7 +16856,7 @@ msgstr "ambos argumentos de %<__builtin_clear_cache%> deben ser punteros"
#: builtins.c:6011 builtins.c:6026
#, gcc-internal-format
msgid "%qD changed semantics in GCC 4.4"
-msgstr ""
+msgstr "%qD cambió su semántica en GCC 4.4"
#. All valid uses of __builtin_va_arg_pack () are removed during
#. inlining.
@@ -16985,7 +16915,7 @@ msgstr "el segundo parámetro de %<va_start%> no es el último argumento nombrado"
#: builtins.c:11661
#, gcc-internal-format
msgid "undefined behaviour when second parameter of %<va_start%> is declared with %<register%> storage"
-msgstr ""
+msgstr "la conducta es indefinida cuando el segundo parámetro de %<va_start%> se declara con almacenamiento %<register%>"
#: builtins.c:11776
msgid "%Kfirst argument of %D must be a pointer, second integer constant"
@@ -17005,11 +16935,11 @@ msgstr "%Kla llamada a %D puede desbordar el almacenamiento temporal destino"
#: builtins.c:12077
msgid "%Kattempt to free a non-heap object %qD"
-msgstr ""
+msgstr "%Kse intenta liberar un objeto %qD que no es de pila"
#: builtins.c:12079
msgid "%Kattempt to free a non-heap object"
-msgstr ""
+msgstr "%Kse intenta liberar un objeto que no es de pila"
#: c-common.c:1026
#, gcc-internal-format
@@ -17061,20 +16991,26 @@ msgstr "desbordamiento de coma flotante compleja en la expresión"
msgid "logical %<%s%> with non-zero constant will always evaluate as true"
msgstr "%<%s%> lógico con una constante diferente de cero siempre se evaluará como verdadero"
+# No existe una traducción para type-punning. Gracias a Jose María Pérez
+# por el comentario. cfuga
#: c-common.c:1245
#, gcc-internal-format
msgid "type-punning to incomplete type might break strict-aliasing rules"
-msgstr "el castigo de tipo a tipo incompleto puede romper las reglas de alias estricto"
+msgstr "el uso de %<type punning%> sobre un tipo incompleto puede romper las reglas de alias estricto"
+# No existe una traducción para type-punning. Gracias a Jose María Pérez
+# por el comentario. cfuga
#: c-common.c:1260
#, gcc-internal-format
msgid "dereferencing type-punned pointer will break strict-aliasing rules"
-msgstr "la dereferencia de punteros de tipo castigado romperá las reglas de alias estricto"
+msgstr "la dereferencia de punteros %<type-punned%> romperá las reglas de alias estricto"
+# No existe una traducción para type-punning. Gracias a Jose María Pérez
+# por el comentario. cfuga
#: c-common.c:1267 c-common.c:1285
#, gcc-internal-format
msgid "dereferencing type-punned pointer might break strict-aliasing rules"
-msgstr "la dereferencia de punteros de tipo castigado puede romper las reglas de alias estricto"
+msgstr "la dereferencia de punteros %<type-punned%> puede romper las reglas de alias estricto"
#: c-common.c:1316
#, gcc-internal-format
@@ -17102,9 +17038,9 @@ msgid "use -flax-vector-conversions to permit conversions between vectors with d
msgstr "use -flax-vector-conversions para permitir conversiones entre vectores con diferentes tipos de elementos o número de subpartes"
#: c-common.c:1548
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "conversion to %qT from boolean expression"
-msgstr "la conversión de %qT desde %qT puede alterar su valor"
+msgstr "la conversión de %qT desde la expresión booleana"
#: c-common.c:1570
#, gcc-internal-format
@@ -17440,9 +17376,9 @@ msgid "section of %q+D conflicts with previous declaration"
msgstr "la sección de %q+D genera un conflicto con la declaración previa"
#: c-common.c:5877
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "section of %q+D cannot be overridden"
-msgstr "no se puede sobrecargar %q+#D"
+msgstr "no se puede sobreescribir la sección de %q+D"
#: c-common.c:5885
#, gcc-internal-format
@@ -17485,9 +17421,9 @@ msgid "alignment for %q+D must be at least %d"
msgstr "la alineación para %q+D debe ser por lo menos %d"
#: c-common.c:5995
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "inline function %q+D cannot be declared weak"
-msgstr "la función %qs no se puede declarar %<mutable%>"
+msgstr "la función inline %q+D no se puede declarar weak"
#: c-common.c:6024
#, gcc-internal-format
@@ -17657,15 +17593,15 @@ msgstr "la posición solicitada es menor a cero"
#: c-common.c:7036
#, gcc-internal-format
msgid "Bad option %s to optimize attribute."
-msgstr ""
+msgstr "Opción %s errónea para optimizar el atributo."
#: c-common.c:7039
#, gcc-internal-format
msgid "Bad option %s to pragma attribute"
-msgstr ""
+msgstr "Opción %s errónea para el atributo pragma"
#: c-common.c:7232
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "not enough arguments to function %qE"
msgstr "faltan argumentos para la función %qE"
@@ -17675,19 +17611,19 @@ msgid "too many arguments to function %qE"
msgstr "demasiados argumentos para la función %qE"
#: c-common.c:7267 c-common.c:7313
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "non-floating-point argument in call to function %qE"
-msgstr "argumento que no es de coma flotante para la función %qs"
+msgstr "argumento que no es de coma flotante en la llamada a la función %qE"
#: c-common.c:7290
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "non-floating-point arguments in call to function %qE"
-msgstr "argumento que no es de coma flotante para la función %qs"
+msgstr "argumentos que no son de coma flotante en la llamada a la función %qE"
#: c-common.c:7306
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "non-const integer argument %u in call to function %qE"
-msgstr "argumento que no es de coma flotante para la función %qs"
+msgstr "argumento %u entero que no es constante en la llamada a la función %qE"
#: c-common.c:7532
#, gcc-internal-format
@@ -17760,89 +17696,89 @@ msgid "array subscript has type %<char%>"
msgstr "el subíndice de la matriz es de tipo %<char%>"
#: c-common.c:8083
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<+%> inside %<<<%>"
-msgstr "se sugieren paréntesis alrededor de + o - dentro de shift"
+msgstr "se sugieren paréntesis alrededor de %<+%> dentro de %<<<%>"
#: c-common.c:8086
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<-%> inside %<<<%>"
-msgstr "se sugieren paréntesis alrededor de + o - dentro de shift"
+msgstr "se sugieren paréntesis alrededor de %<-%> dentro de %<<<%>"
#: c-common.c:8092
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<+%> inside %<>>%>"
-msgstr "se sugieren paréntesis alrededor de + o - dentro de shift"
+msgstr "se sugieren paréntesis alrededor de %<+%> dentro de %<>>%>"
#: c-common.c:8095
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<-%> inside %<>>%>"
-msgstr "se sugieren paréntesis alrededor de + o - dentro de shift"
+msgstr "se sugieren paréntesis alrededor de %<-%> dentro de %<>>%>"
#: c-common.c:8101
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<&&%> within %<||%>"
-msgstr "se sugieren paréntesis alrededor de && junto con ||"
+msgstr "se sugieren paréntesis alrededor de %<&&%> junto con %<||%>"
#: c-common.c:8110
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around arithmetic in operand of %<|%>"
-msgstr "se sugieren paréntesis alrededor de la aritmética para operandos de |"
+msgstr "se sugieren paréntesis alrededor de la aritmética para un operando de %<|%>"
#: c-common.c:8115
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<|%>"
-msgstr "se sugieren paréntesis alrededor de las comparaciones para operandos de |"
+msgstr "se sugieren paréntesis alrededor de la comparación para un operando de %<|%>"
#: c-common.c:8119
#, gcc-internal-format
msgid "suggest parentheses around operand of %<!%> or change %<|%> to %<||%> or %<!%> to %<~%>"
-msgstr ""
+msgstr "se sugieren paréntesis alrededor del operando de %<!%> o cambie %<|%> a %<||%> o %<!%> a %<~%>"
#: c-common.c:8129
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around arithmetic in operand of %<^%>"
-msgstr "se sugieren paréntesis alrededor de la aritmética para operandos de ^"
+msgstr "se sugieren paréntesis alrededor de la aritmética para un operando de %<^%>"
#: c-common.c:8134
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<^%>"
-msgstr "se sugieren paréntesis alrededor de las comparaciones para operandos de ^"
+msgstr "se sugieren paréntesis alrededor de la comparación para un operando de %<^%>"
#: c-common.c:8140
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<+%> in operand of %<&%>"
-msgstr "se sugieren paréntesis alrededor de + o - para operandos de &"
+msgstr "se sugieren paréntesis alrededor de %<+%> para un operando de %<&%>"
#: c-common.c:8143
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around %<-%> in operand of %<&%>"
-msgstr "se sugieren paréntesis alrededor de + o - para operandos de &"
+msgstr "se sugieren paréntesis alrededor de %<-%> para un operando de %<&%>"
#: c-common.c:8148
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<&%>"
-msgstr "se sugieren paréntesis alrededor de las comparaciones para operandos de &"
+msgstr "se sugieren paréntesis alrededor de la comparación para un operando de %<&%>"
#: c-common.c:8152
#, gcc-internal-format
msgid "suggest parentheses around operand of %<!%> or change %<&%> to %<&&%> or %<!%> to %<~%>"
-msgstr ""
+msgstr "se sugieren paréntesis alrededor de un operando de %<!%> o cambie %<&%> a %<&&%> o %<!%> a %<~%>"
#: c-common.c:8160
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<==%>"
-msgstr "se sugieren paréntesis alrededor de la comparación en el operando de %s"
+msgstr "se sugieren paréntesis alrededor de la comparación en un operando de %<==%>"
#: c-common.c:8166
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<!=%>"
-msgstr "se sugieren paréntesis alrededor de la comparación en el operando de %s"
+msgstr "se sugieren paréntesis alrededor de la comparación en un operando de %<!=%>"
#: c-common.c:8175
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "comparisons like %<X<=Y<=Z%> do not have their mathematical meaning"
-msgstr "las comparaciones como X<=Y<=Z no tienen su significado matemático"
+msgstr "las comparaciones como %<X<=Y<=Z%> no tienen su significado matemático"
#: c-common.c:8190
#, gcc-internal-format
@@ -17860,9 +17796,9 @@ msgid "division by zero"
msgstr "división por cero"
#: c-common.c:8244
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "comparison between types %qT and %qT"
-msgstr "comparación entre los tipos %q#T y %q#T"
+msgstr "comparación entre los tipos %qT y %qT"
#: c-common.c:8295
#, gcc-internal-format
@@ -17872,7 +17808,7 @@ msgstr "comparación entre expresiones enteras signed y unsigned"
#: c-common.c:8346
#, gcc-internal-format
msgid "promoted ~unsigned is always non-zero"
-msgstr ""
+msgstr "el ~unsigned promovido es siempre diferente de cero"
#: c-common.c:8349
#, gcc-internal-format
@@ -17918,12 +17854,12 @@ msgstr "se usa la etiqueta %q+D pero no está definida"
#: c-decl.c:781
#, gcc-internal-format
msgid "nested function %q+D declared but never defined"
-msgstr "se declara la función anidada %q+D pero nunca se definió"
+msgstr "se declara la función anidada %q+D pero nunca se define"
#: c-decl.c:791
#, gcc-internal-format
msgid "inline function %q+D declared but never defined"
-msgstr "se declara la función inline %q+D pero nunca se definió"
+msgstr "se declara la función inline %q+D pero nunca se define"
#: c-decl.c:804 cp/decl.c:603
#, gcc-internal-format
@@ -18970,9 +18906,9 @@ msgid "promoted argument %qD doesn%'t match prototype"
msgstr "el argumento promovido %qD no coincide con el prototipo"
#: c-decl.c:6541
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "prototype declaration"
-msgstr "%Hdeclaración vacía"
+msgstr "declaración de prototipo"
#: c-decl.c:6547
#, gcc-internal-format
@@ -18993,14 +18929,14 @@ msgstr "no hay una declaración de devolución en la función que no devuelve void"
#. the C99 for loop scope. This doesn't make much sense, so don't
#. allow it.
#: c-decl.c:6833
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%<for%> loop initial declarations are only allowed in C99 mode"
-msgstr "se usó la declaración inicial del ciclo %<for%> fuera del modo C99"
+msgstr "sólo se permiten las declaraciones iniciales del ciclo %<for%> en modo C99"
#: c-decl.c:6837
#, gcc-internal-format
msgid "use option -std=c99 or -std=gnu99 to compile your code"
-msgstr ""
+msgstr "use la opción -std=c99 o -std=gnu99 para compilar su código"
#: c-decl.c:6868
#, gcc-internal-format
@@ -19430,7 +19366,7 @@ msgstr "ISO C no admite tipos enteros complejos"
#: c-decl.c:8001 toplev.c:836
#, gcc-internal-format
msgid "%q+F used but never defined"
-msgstr "se usa %q+F pero nunca se definió"
+msgstr "se usa %q+F pero nunca se define"
#: c-format.c:98 c-format.c:209
#, gcc-internal-format
@@ -19671,7 +19607,7 @@ msgstr "%s no admite el formato %<%%%s%c%> %s"
#: c-format.c:2044
#, gcc-internal-format
msgid "operand number specified with suppressed assignment"
-msgstr "número de operandos especificado con asignación suprimida"
+msgstr "se especificó un número de operandos con asignación suprimida"
#: c-format.c:2047
#, gcc-internal-format
@@ -19721,32 +19657,32 @@ msgstr "el formato %q.*s espera el tipo %<%T%s%>, pero el argumento %d es de tip
#: c-format.c:2405 c-format.c:2411 c-format.c:2562
#, gcc-internal-format
msgid "%<__gcc_host_wide_int__%> is not defined as a type"
-msgstr "%<__gcc_host_wide_int__%> no se definió como un tipo"
+msgstr "%<__gcc_host_wide_int__%> no se define como un tipo"
#: c-format.c:2418 c-format.c:2572
#, gcc-internal-format
msgid "%<__gcc_host_wide_int__%> is not defined as %<long%> or %<long long%>"
-msgstr "%<__gcc_host_wide_int__%> no se definió como %<long%> o %<long long%>"
+msgstr "%<__gcc_host_wide_int__%> no se define como %<long%> o %<long long%>"
#: c-format.c:2468
#, gcc-internal-format
msgid "%<locus%> is not defined as a type"
-msgstr "%<locus%> no se definió como un tipo"
+msgstr "%<locus%> no se define como un tipo"
#: c-format.c:2521
#, gcc-internal-format
msgid "%<location_t%> is not defined as a type"
-msgstr "%<location_t%> no se definió como un tipo"
+msgstr "%<location_t%> no se define como un tipo"
#: c-format.c:2538
#, gcc-internal-format
msgid "%<tree%> is not defined as a type"
-msgstr "%<tree%> no se definió como un tipo"
+msgstr "%<tree%> no se define como un tipo"
#: c-format.c:2543
#, gcc-internal-format
msgid "%<tree%> is not defined as a pointer type"
-msgstr "%<tree%> no se definió como un tipo puntero"
+msgstr "%<tree%> no se define como un tipo puntero"
#: c-format.c:2850
#, gcc-internal-format
@@ -19830,9 +19766,9 @@ msgid "floating constant truncated to zero"
msgstr "constante de coma flotante truncada a cero"
#: c-lex.c:888
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "unsupported non-standard concatenation of string literals"
-msgstr "no se admite el sufijo no estándar en una constante de coma flotante"
+msgstr "no se admite la concatenación no estándar de literales de cadena"
#: c-lex.c:910
#, gcc-internal-format
@@ -19845,34 +19781,34 @@ msgid "invalid expression type for %<#pragma omp atomic%>"
msgstr "tipo de expresión inválido para %<#pragma omp atomic%>"
#: c-omp.c:245
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid type for iteration variable %qE"
-msgstr "%Htipo inválido para la variable de iteración %qE"
+msgstr "tipo inválido para la variable de iteración %qE"
#: c-omp.c:258
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qE is not initialized"
-msgstr "%H%qE no está inicializado"
+msgstr "%qE no está inicializado"
#: c-omp.c:270
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "missing controlling predicate"
-msgstr "%Hfalta el predicado controlador"
+msgstr "falta el predicado controlador"
#: c-omp.c:331
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid controlling predicate"
-msgstr "%Hpredicado controlador inválido"
+msgstr "predicado controlador inválido"
#: c-omp.c:338
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "missing increment expression"
-msgstr "%Hfalta la expresión de incremento"
+msgstr "falta la expresión de incremento"
#: c-omp.c:404
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid increment expression"
-msgstr "%Hfalta la expresión de decremento"
+msgstr "expresión de incremento inválida"
#: c-opts.c:150
#, gcc-internal-format
@@ -20015,9 +19951,9 @@ msgid "to generate dependencies you must specify either -M or -MM"
msgstr "para generar dependencias debe especificar -M ó -MM"
#: c-opts.c:1394
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "-MG may only be used with -M or -MM"
-msgstr "se usó -mn sin -mh ó -ms"
+msgstr "-MG sólo se puede usar con -M ó -MM"
#: c-opts.c:1423
#, gcc-internal-format
@@ -20035,29 +19971,29 @@ msgid "too late for # directive to set debug directory"
msgstr "demasiado tarde para que la directiva # establezca el directorio de depuración"
#: c-parser.c:226
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "identifier %qs conflicts with C++ keyword"
-msgstr "el nombre de identificador `%s' causa conflictos con la estrategia interna de nombrado del C++ de GNU"
+msgstr "el identificador %qs causa conflictos con la palabra clave de C++"
#: c-parser.c:971
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids an empty translation unit"
-msgstr "%HISO C prohíbe un fichero fuente vacío"
+msgstr "ISO C prohíbe una unidad de traducción vacía"
#: c-parser.c:1056 c-parser.c:6085
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C does not allow extra %<;%> outside of a function"
-msgstr "%HISO C no permite %<;%> extra fuera de una función"
+msgstr "ISO C no permite un %<;%> extra fuera de una función"
#: c-parser.c:1158 c-parser.c:6643
#, gcc-internal-format
msgid "expected declaration specifiers"
-msgstr "se esperaba la declaración de especificadores"
+msgstr "se esperaban especificadores de declaración"
#: c-parser.c:1206
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "data definition has no type or storage class"
-msgstr "%Hla definición de datos no tiene tipo o clase de almacenamiento"
+msgstr "la definición de datos no tiene tipo o clase de almacenamiento"
#: c-parser.c:1260
#, gcc-internal-format
@@ -20073,9 +20009,9 @@ msgid "expected %<=%>, %<,%>, %<;%>, %<asm%> or %<__attribute__%>"
msgstr "se esperaba %<=%>, %<,%>, %<;%>, %<asm%> o %<__attribute__%>"
#: c-parser.c:1275
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids nested functions"
-msgstr "%HISO C prohíbe las funciones anidadas"
+msgstr "ISO C prohíbe las funciones anidadas"
#: c-parser.c:1641 c-parser.c:2454 c-parser.c:3091 c-parser.c:3343
#: c-parser.c:4277 c-parser.c:4877 c-parser.c:5284 c-parser.c:5305
@@ -20103,9 +20039,9 @@ msgid "expected %<{%>"
msgstr "se esperaba %<{%>"
#: c-parser.c:1706
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids forward references to %<enum%> types"
-msgstr "%HISO C prohíbe las referencias hacia adelante a tipos %<enum%>"
+msgstr "ISO C prohíbe las referencias hacia adelante a tipos %<enum%>"
#: c-parser.c:1812
#, gcc-internal-format
@@ -20113,14 +20049,14 @@ msgid "expected class name"
msgstr "se esperaba un nombre de clase"
#: c-parser.c:1831 c-parser.c:5831
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "extra semicolon in struct or union specified"
-msgstr "%Hse especificó un punto y coma extra en un struct o union"
+msgstr "se especificó un punto y coma extra en un struct o union"
#: c-parser.c:1860
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "no semicolon at end of struct or union"
-msgstr "%Hno hay punto y coma al final del struct o union"
+msgstr "no hay punto y coma al final del struct o union"
#: c-parser.c:1863
#, gcc-internal-format
@@ -20133,9 +20069,9 @@ msgid "expected specifier-qualifier-list"
msgstr "se esperaba una lista de calificadores-especificadores"
#: c-parser.c:1952
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids member declarations with no members"
-msgstr "%HISO C prohíbe declaraciones de miembros con no miembros"
+msgstr "ISO C prohíbe declaraciones de miembros con no miembros"
#: c-parser.c:2028
#, gcc-internal-format
@@ -20148,9 +20084,9 @@ msgid "expected %<:%>, %<,%>, %<;%>, %<}%> or %<__attribute__%>"
msgstr "se esperaba %<:%>, %<,%>, %<;%>, %<}%> o %<__attribute__%>"
#: c-parser.c:2086
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%<typeof%> applied to a bit-field"
-msgstr "%Hse aplicó %<typeof%> a un campo de bits"
+msgstr "se aplicó %<typeof%> a un campo de bits"
#: c-parser.c:2322
#, gcc-internal-format
@@ -20158,19 +20094,19 @@ msgid "expected identifier or %<(%>"
msgstr "se esperaba un identificador o %<(%>"
#: c-parser.c:2524
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C requires a named argument before %<...%>"
-msgstr "%HISO C requiere un argumento con nombre antes de %<...%>"
+msgstr "ISO C requiere un argumento con nombre antes de %<...%>"
#: c-parser.c:2630
#, gcc-internal-format
msgid "expected declaration specifiers or %<...%>"
-msgstr "se esperaba la declaración de especificadores o %<...%>"
+msgstr "se esperaban especificadores de declaración o %<...%>"
#: c-parser.c:2681
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "wide string literal in %<asm%>"
-msgstr "%Hliteral de cadena ancha en %<asm%>"
+msgstr "literal de cadena ancha en %<asm%>"
#: c-parser.c:2687 c-parser.c:6698
#, gcc-internal-format
@@ -20178,29 +20114,29 @@ msgid "expected string literal"
msgstr "se esperaba una cadena literal"
#: c-parser.c:3012
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids empty initializer braces"
-msgstr "%HISO C prohíbe las llaves de inicializador vacías"
+msgstr "ISO C prohíbe las llaves de inicializador vacías"
#: c-parser.c:3058
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "obsolete use of designated initializer with %<:%>"
-msgstr "%Huso obsoleto del inicializador designado con %<:%>"
+msgstr "uso obsoleto del inicializador designado con %<:%>"
#: c-parser.c:3188
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids specifying range of elements to initialize"
-msgstr "%HISO C prohíbe la especificación de rangos de elementos a inicializar"
+msgstr "ISO C prohíbe la especificación de rangos de elementos a inicializar"
#: c-parser.c:3201
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C90 forbids specifying subobject to initialize"
-msgstr "%HISO C90 prohíbe la especificación de subobjetos a inicializar"
+msgstr "ISO C90 prohíbe la especificación de subobjetos a inicializar"
#: c-parser.c:3208
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "obsolete use of designated initializer without %<=%>"
-msgstr "%Huso obsoleto del inicializador designado sin %<=%>"
+msgstr "uso obsoleto del inicializador designado sin %<=%>"
#: c-parser.c:3214
#, gcc-internal-format
@@ -20208,9 +20144,9 @@ msgid "expected %<=%>"
msgstr "se esperaba %<=%>"
#: c-parser.c:3358
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids label declarations"
-msgstr "%HISO C prohíbe las declaraciones etiquetadas"
+msgstr "ISO C prohíbe las declaraciones etiquetadas"
#: c-parser.c:3363 c-parser.c:3439
#, gcc-internal-format
@@ -20218,14 +20154,14 @@ msgid "expected declaration or statement"
msgstr "se esperaba una declaración"
#: c-parser.c:3393 c-parser.c:3421
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C90 forbids mixed declarations and code"
-msgstr "%HISO C90 prohíbe las declaraciones mezcladas y código"
+msgstr "ISO C90 prohíbe mezclar declaraciones y código"
#: c-parser.c:3446
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "expected %<}%> before %<else%>"
-msgstr "%Hse esperaba %<}%> antes de %<else%>"
+msgstr "se esperaba %<}%> antes de %<else%>"
#: c-parser.c:3451
#, gcc-internal-format
@@ -20233,9 +20169,9 @@ msgid "%<else%> without a previous %<if%>"
msgstr "%<else%> sin un %<if%> previo"
#: c-parser.c:3467
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "label at end of compound statement"
-msgstr "%Hetiqueta al final de una declaración compuesta"
+msgstr "etiqueta al final de una declaración compuesta"
#: c-parser.c:3510
#, gcc-internal-format
@@ -20243,9 +20179,9 @@ msgid "expected %<:%> or %<...%>"
msgstr "se esperaba %<:%> o %<...%>"
#: c-parser.c:3544
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "a label can only be part of a statement and a declaration is not a statement"
-msgstr "%Huna etiqueta sólo puede ser parte de una declaración y una declaración no es un enunciado"
+msgstr "una etiqueta sólo puede ser parte de una declaración y una declaración no es un enunciado"
#: c-parser.c:3706
#, gcc-internal-format
@@ -20262,39 +20198,39 @@ msgid "expected statement"
msgstr "se esperaba una declaración"
#: c-parser.c:3863 cp/parser.c:7228
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest braces around empty body in an %<if%> statement"
-msgstr "%Hse sugieren llaves alrededor del cuerpo vacío en una declaración %<if%>"
+msgstr "se sugieren llaves alrededor del cuerpo vacío en una declaración %<if%>"
#: c-parser.c:3889 cp/parser.c:7249
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest braces around empty body in an %<else%> statement"
-msgstr "%Hse sugieren llaves alrededor del cuerpo vacío en una declaración %<else%>"
+msgstr "se sugieren llaves alrededor del cuerpo vacío en una declaración %<else%>"
#: c-parser.c:4009
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "suggest braces around empty body in %<do%> statement"
-msgstr "%Hse sugiere llaves alrededor de un cuerpo vacío en una declaración %<do%>"
+msgstr "se sugiere llaves alrededor de un cuerpo vacío en una declaración %<do%>"
#: c-parser.c:4162
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%E qualifier ignored on asm"
-msgstr "%Hse descarta el calificador %E en asm"
+msgstr "se descarta el calificador %E en asm"
#: c-parser.c:4450
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids omitting the middle term of a ?: expression"
-msgstr "%HISO C prohíbe la omisión del término medio de una expresión ?:"
+msgstr "ISO C prohíbe la omisión del término medio de una expresión ?:"
#: c-parser.c:4846
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "traditional C rejects the unary plus operator"
-msgstr "%HC tradicional rechaza el operador unario mas"
+msgstr "C tradicional rechaza el operador unario mas"
#: c-parser.c:4970
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%<sizeof%> applied to a bit-field"
-msgstr "%Hse aplicó %<sizeof%> a un campo de bits"
+msgstr "se aplicó %<sizeof%> a un campo de bits"
#: c-parser.c:5118 c-parser.c:5464 c-parser.c:5486
#, gcc-internal-format
@@ -20302,34 +20238,34 @@ msgid "expected expression"
msgstr "se esperaba una expresión"
#: c-parser.c:5145
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "braced-group within expression allowed only inside a function"
-msgstr "%Hun grupo de llaves dentro de una expresión sólo se permite dentro de una función"
+msgstr "un grupo de llaves dentro de una expresión sólo se permite dentro de una función"
#: c-parser.c:5159
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C forbids braced-groups within expressions"
-msgstr "%HISO C prohíbe grupos de llaves dentro de expresiones"
+msgstr "ISO C prohíbe grupos de llaves dentro de expresiones"
#: c-parser.c:5346
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "first argument to %<__builtin_choose_expr%> not a constant"
-msgstr "%Hel primer argumento de %<__builtin_choose_expr%> no es una constante"
+msgstr "el primer argumento de %<__builtin_choose_expr%> no es una constante"
#: c-parser.c:5515
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "compound literal has variable size"
-msgstr "%Hla literal compuesta tiene tamaño variable"
+msgstr "la literal compuesta tiene tamaño variable"
#: c-parser.c:5523
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C90 forbids compound literals"
-msgstr "%HISO C90 prohíbe las literales compuestas"
+msgstr "ISO C90 prohíbe las literales compuestas"
#: c-parser.c:6048
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "extra semicolon in method definition specified"
-msgstr "%Hse especificó un punto y coma extra en la definición del método"
+msgstr "se especificó un punto y coma extra en la definición del método"
#: c-parser.c:6592
#, gcc-internal-format
@@ -20342,9 +20278,9 @@ msgid "%<#pragma omp flush%> may only be used in compound statements"
msgstr "%<#pragma omp flush%> sólo se puede usar en declaraciones compuestas"
#: c-parser.c:6614
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%<#pragma omp taskwait%> may only be used in compound statements"
-msgstr "%<#pragma omp barrier%> sólo se puede usar en declaraciones compuestas"
+msgstr "%<#pragma omp taskwait%> sólo se puede usar en declaraciones compuestas"
#: c-parser.c:6627
#, gcc-internal-format
@@ -20362,9 +20298,9 @@ msgid "too many %qs clauses"
msgstr "demasiadas cláusulas %qs"
#: c-parser.c:6887
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "collapse argument needs positive constant integer expression"
-msgstr "la etiqueta de `case' debe ser una expresión constante discreta"
+msgstr "el argumento de collapse necesita una expresión entera constante positiva"
#: c-parser.c:6952
#, gcc-internal-format
@@ -20382,9 +20318,9 @@ msgid "expected integer expression"
msgstr "se esperaba una expresión entera"
#: c-parser.c:7049
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%<num_threads%> value must be positive"
-msgstr "%Hel valor de %<num_threads%> debe ser positivo"
+msgstr "el valor de %<num_threads%> debe ser positivo"
#: c-parser.c:7129
#, gcc-internal-format
@@ -20397,9 +20333,9 @@ msgid "schedule %<runtime%> does not take a %<chunk_size%> parameter"
msgstr "el calendarizador %<runtime%> no toma un parámetro %<chunk_size%>"
#: c-parser.c:7218
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "schedule %<auto%> does not take a %<chunk_size%> parameter"
-msgstr "el calendarizador %<runtime%> no toma un parámetro %<chunk_size%>"
+msgstr "el calendarizador %<auto%> no toma un parámetro %<chunk_size%>"
#: c-parser.c:7236
#, gcc-internal-format
@@ -20439,27 +20375,27 @@ msgstr "se esperaba una declaración de iteración o una inicialización"
#: c-parser.c:7684
#, gcc-internal-format
msgid "not enough perfectly nested loops"
-msgstr ""
+msgstr "no hay suficientes ciclos perfectamente anidados"
#: c-parser.c:7732
#, gcc-internal-format
msgid "collapsed loops not perfectly nested"
-msgstr ""
+msgstr "los ciclos colapsados no están perfectamente anidados"
#: c-parser.c:7769 cp/pt.c:10362
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "iteration variable %qD should not be firstprivate"
-msgstr "la variable de iteración %qs no debe ser firstprivate"
+msgstr "la variable de iteración %qD no debe ser firstprivate"
#: c-parser.c:7919
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "expected %<#pragma omp section%> or %<}%>"
-msgstr "%Hse esperaba %<#pragma omp section%> o %<}%>"
+msgstr "se esperaba %<#pragma omp section%> o %<}%>"
#: c-parser.c:8189
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qD is not a variable"
-msgstr "'%s' en %C no es una variable"
+msgstr "%qD no es una variable"
#: c-parser.c:8191 cp/semantics.c:3787
#, gcc-internal-format
@@ -20757,84 +20693,84 @@ msgid "unknown option after %<#pragma GCC diagnostic%> kind"
msgstr "opción desconocida después del tipo %<#pragma GCC diagnostic%>"
#: c-pragma.c:879
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "#pragma GCC option is not allowed inside functions"
-msgstr "no se permite #pragma GCC diagnostic dentro de funciones"
+msgstr "no se permite #pragma GCC option dentro de funciones"
#: c-pragma.c:892
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%<#pragma GCC option%> is not a string"
-msgstr "%<#pragma%> no se permite aquí"
+msgstr "%<#pragma GCC option%> no es una cadena"
#: c-pragma.c:919
#, gcc-internal-format
msgid "%<#pragma GCC target (string [,string]...)%> does not have a final %<)%>."
-msgstr ""
+msgstr "%<#pragma GCC target (cadena, [,cadena]...)%> no tiene un %<)%> final."
#: c-pragma.c:925
#, gcc-internal-format
msgid "#pragma GCC target string... is badly formed"
-msgstr ""
+msgstr "#pragma GCC target cadena... está mal formado"
#: c-pragma.c:948
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "#pragma GCC optimize is not allowed inside functions"
-msgstr "no se permite #pragma GCC diagnostic dentro de funciones"
+msgstr "no se permite #pragma GCC optimize dentro de funciones"
#: c-pragma.c:961
#, gcc-internal-format
msgid "%<#pragma GCC optimize%> is not a string or number"
-msgstr ""
+msgstr "%<#pragma GCC optimize%> no es una cadena o un número"
#: c-pragma.c:987
#, gcc-internal-format
msgid "%<#pragma GCC optimize (string [,string]...)%> does not have a final %<)%>."
-msgstr ""
+msgstr "%<#pragma GCC optimize (cadena [,string]...)%> no tiene un %<)%> final."
#: c-pragma.c:993
#, gcc-internal-format
msgid "#pragma GCC optimize string... is badly formed"
-msgstr ""
+msgstr "#pragma GCC optimize cadena... está mal formado"
#: c-pragma.c:1036
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "junk at end of %<#pragma push_options%>"
-msgstr "basura al final de %<#pragma push_macro%>"
+msgstr "basura al final de %<#pragma push_options%>"
#: c-pragma.c:1066
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "junk at end of %<#pragma pop_options%>"
-msgstr "basura al final de %<#pragma pop_macro%>"
+msgstr "basura al final de %<#pragma pop_options%>"
#: c-pragma.c:1073
#, gcc-internal-format
msgid "%<#pragma GCC pop_options%> without a corresponding %<#pragma GCC push_options%>"
-msgstr ""
+msgstr "%<#pragma GCC pop_options%> sin un %<#pragma GCC push_options%> correspondiente"
#: c-pragma.c:1114
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "junk at end of %<#pragma reset_options%>"
-msgstr "basura al final de '#pragma options'"
+msgstr "basura al final de %<#pragma reset_options%>"
#: c-pragma.c:1151 c-pragma.c:1158
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "expected a string after %<#pragma message%>"
-msgstr "se esperaba [error|warning|ignored] después de %<#pragma GCC diagnostic%>"
+msgstr "se esperaba una cadena después de %<#pragma message%>"
#: c-pragma.c:1153
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "malformed %<#pragma message%>, ignored"
-msgstr "#pragma weak malformado, descartado"
+msgstr "%<#pragma message%> malformado, se descarta"
#: c-pragma.c:1163
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "junk at end of %<#pragma message%>"
-msgstr "basura al final de %<#pragma weak%>"
+msgstr "basura al final de %<#pragma message%>"
#: c-pragma.c:1166
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "#pragma message: %s"
-msgstr "programas: %s\n"
+msgstr "#pragma message: %s"
#: c-typeck.c:173
#, gcc-internal-format
@@ -20945,7 +20881,7 @@ msgstr "el valor de subíndice es un puntero a función"
#: c-typeck.c:2129
#, gcc-internal-format
msgid "ISO C forbids subscripting %<register%> array"
-msgstr "ISO C prohíbe el subíndice de una matriz %<registe%>"
+msgstr "ISO C prohíbe el subíndice de una matriz %<register%>"
#: c-typeck.c:2132
#, gcc-internal-format
@@ -20953,9 +20889,9 @@ msgid "ISO C90 forbids subscripting non-lvalue array"
msgstr "ISO C90 prohíbe el subíndice de una matriz no-lvaluada"
#: c-typeck.c:2249
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qD is static but used in inline function %qD which is not static"
-msgstr "%H%qD es estática pero se usa en la función inline %qD la cual no es estática"
+msgstr "%qD es estática pero se usa en la función inline %qD la cual no es estática"
#: c-typeck.c:2397
#, gcc-internal-format
@@ -21301,9 +21237,9 @@ msgstr "ISO C prohíbe la conversión de objeto apuntador a un tipo de apuntador a
#. strings are complete sentences, visible to gettext and checked at
#. compile time.
#: c-typeck.c:4013 c-typeck.c:4446
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "expected %qT but argument is of type %qT"
-msgstr "el formato %q.*s espera el tipo %<%T%s%>, pero el argumento %d es de tipo %qT"
+msgstr "se esperaba %qT pero el argumento es de tipo %qT"
#: c-typeck.c:4092
#, gcc-internal-format
@@ -21481,19 +21417,19 @@ msgid "return makes integer from pointer without a cast"
msgstr "la devolución crea un entero desde un puntero sin una conversión"
#: c-typeck.c:4449
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "incompatible types when assigning to type %qT from type %qT"
-msgstr "tipos incompatible en la asignación de %qT a %qT"
+msgstr "tipos incompatible en la asignación al tipo %qT del tipo %qT"
#: c-typeck.c:4453
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "incompatible types when initializing type %qT using type %qT"
-msgstr "tipos incompatibles en la inicialización"
+msgstr "tipos incompatibles en la inicialización del tipo %qT usando el tipo %qT"
#: c-typeck.c:4457
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "incompatible types when returning type %qT but %qT was expected"
-msgstr "tipos incompatible en la asignación de %qT a %qT"
+msgstr "tipos incompatible al devolver el tipo %qT pero se esperaba %qT"
#: c-typeck.c:4514
#, gcc-internal-format
@@ -21753,7 +21689,7 @@ msgstr "la llamada a la función tiene valor agregado"
#: cfgexpand.c:298
#, gcc-internal-format
msgid "Unrecognized GIMPLE statement during RTL expansion"
-msgstr ""
+msgstr "No se reconoce la declaración GIMPLE durante la expansión RTL"
#: cfgexpand.c:2343
#, gcc-internal-format
@@ -22251,7 +22187,7 @@ msgid "failed to reclaim unneeded function"
msgstr "falló al reclamar una función innecesaria"
#: cgraphunit.c:1343
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "nodes with unreleased memory found"
msgstr "se encontraron nodos sin memoria liberada"
@@ -22413,7 +22349,7 @@ msgstr " %s"
#: dbxout.c:3227
#, gcc-internal-format
msgid "common symbol debug info is not structured as symbol+offset"
-msgstr ""
+msgstr "la información de depuración de símbolos comunes no está estructurada como símbolo+desplazamiento"
#: diagnostic.c:712
#, gcc-internal-format
@@ -22529,9 +22465,9 @@ msgid "invalid argument %qs to -fdebug-prefix-map"
msgstr "argumento inválido %qs para -fdebug-prefix-map"
#: final.c:1533
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "the frame size of %wd bytes is larger than %wd bytes"
-msgstr "el tamaño de %q+D es mayor que %wd bytes"
+msgstr "el tamaño de marco de %wd bytes es mayor que %wd bytes"
#: fixed-value.c:104
#, gcc-internal-format
@@ -22755,9 +22691,9 @@ msgid "can't seek PCH file: %m"
msgstr "no se puede buscar en el fichero PCH: %m"
#: gimple.c:1111
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "gimple check: expected %s(%s), have %s(%s) in %s, at %s:%d"
-msgstr "revisión de árbol: se esperaba la clase %qs, se tiene %qs (%s) en %s, en %s:%d"
+msgstr "revisión gimple: se esperaba %s(%s), se tiene %s(%s) en %s, en %s:%d"
#: gimplify.c:4660
#, gcc-internal-format
@@ -22820,9 +22756,9 @@ msgid "can't open %s: %m"
msgstr "no se puede abrir %s: %m"
#: graphite.c:5253 toplev.c:1712
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "Graphite loop optimizations cannot be used"
-msgstr "Activa las optimizaciones de ciclo a nivel de árbol"
+msgstr "No se pueden usar las optimizaciones de ciclo Graphite"
#: haifa-sched.c:184
#, gcc-internal-format
@@ -22830,24 +22766,24 @@ msgid "fix_sched_param: unknown param: %s"
msgstr "fix_sched_param: parámetro desconocido: %s"
#: omp-low.c:1817
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "barrier region may not be closely nested inside of work-sharing, critical, ordered, master or explicit task region"
-msgstr "la región de trabajo compartido puede no estar bien anidada dentro de la región de trabajo compartido, ordenado o maestra"
+msgstr "la región de barrera puede no estar bien anidada dentro de la región de trabajo compartido, crítica, ordenada, maestra o de tarea explícita"
#: omp-low.c:1822
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "work-sharing region may not be closely nested inside of work-sharing, critical, ordered, master or explicit task region"
-msgstr "la región de trabajo compartido puede no estar bien anidada dentro de la región de trabajo compartido, ordenado o maestra"
+msgstr "la región de trabajo compartido puede no estar bien anidada dentro de la región de trabajo compartido, crítica, ordenada, maestra o de tarea explícita"
#: omp-low.c:1840
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "master region may not be closely nested inside of work-sharing or explicit task region"
-msgstr "la región maestra puede no estar bien anidada dentro de la región de trabajo compartido"
+msgstr "la región maestra puede no estar bien anidada dentro de la región de trabajo compartido o de tarea explícita"
#: omp-low.c:1855
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ordered region may not be closely nested inside of critical or explicit task region"
-msgstr "la región ordenada puede no estar bien anidada dentro de la región crítica"
+msgstr "la región ordenada puede no estar bien anidada dentro de la región crítica o de tarea explícita"
#: omp-low.c:1861
#, gcc-internal-format
@@ -22871,9 +22807,9 @@ msgstr "entrada inválida a un bloque estructurado OpenMP"
#. Otherwise, be vague and lazy, but efficient.
#: omp-low.c:6632
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid branch to/from an OpenMP structured block"
-msgstr "salida inválida de un bloque estructurado OpenMP"
+msgstr "ramificación inválida desde/para un bloque estructurado OpenMP"
#: opts.c:171
#, gcc-internal-format
@@ -22917,24 +22853,24 @@ msgid "argument to \"%s\" should be a non-negative integer"
msgstr "el argumento para \"%s\" debe ser un entero no negativo"
#: opts.c:761
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "disallowed call to %qs"
-msgstr " en la llamada a %qD"
+msgstr "no se permite la llamada a %qs"
#: opts.c:1015
#, gcc-internal-format
msgid "Section anchors must be disabled when unit-at-a-time is disabled."
-msgstr ""
+msgstr "Las anclas de sección se deben desactivar cuando se desactiva unidad-cada-vez."
#: opts.c:1019
#, gcc-internal-format
msgid "Toplevel reorder must be disabled when unit-at-a-time is disabled."
-msgstr ""
+msgstr "El reordenamiento de nivel principal se debe desactivar cuando se desactiva unidad-cada-vez."
#: opts.c:1034
#, gcc-internal-format
msgid "section anchors must be disabled when toplevel reorder is disabled"
-msgstr ""
+msgstr "las anclas de seccions se deben desactivar cando el reordenamiento de nivel principal se desactiva"
#: opts.c:1064
#, gcc-internal-format
@@ -22952,9 +22888,9 @@ msgid "-freorder-blocks-and-partition does not work on this architecture"
msgstr "-freorder-blocks-and-partition no funciona en esta arquitectura"
#: opts.c:1101
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "-fira does not work on this architecture"
-msgstr "-freorder-blocks-and-partition no funciona en esta arquitectura"
+msgstr "-fira no funciona en esta arquitectura"
#: opts.c:1406
#, gcc-internal-format
@@ -22972,9 +22908,9 @@ msgid "unrecognized visibility value \"%s\""
msgstr "no se reconoce el valor de visibilidad \"%s\""
#: opts.c:1925
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "unknown stack check parameter \"%s\""
-msgstr "parámetro %qs sin uso"
+msgstr "parámetro de revisión de pila \"%s\" desconocido"
#: opts.c:1951
#, gcc-internal-format
@@ -22987,9 +22923,9 @@ msgid "unknown tls-model \"%s\""
msgstr "tls-model \"%s\" desconocido"
#: opts.c:1986
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "unknown ira algorithm \"%s\""
-msgstr "nombre de registro desconocido: %s"
+msgstr "algoritmo ira \"%s\" desconocido"
#: opts.c:2089
#, gcc-internal-format
@@ -23060,12 +22996,12 @@ msgstr "información de análisis de perfil corrupta: sum_all es menor que sum_max
#: profile.c:632
#, gcc-internal-format
msgid "correcting inconsistent profile data"
-msgstr ""
+msgstr "se corrige los datos de análisis de perfil inconsistentes"
#: profile.c:642
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "corrupted profile info: profile data is not flow-consistent"
-msgstr "información de análisis de perfil corrupta: el borde de %i a %i excede la cuenta maximal"
+msgstr "información de análisis de perfil corrupta: los datos de análisis de perfil no es consistente en flujo"
#: profile.c:660
#, gcc-internal-format
@@ -23442,14 +23378,14 @@ msgid "__builtin_saveregs not supported by this target"
msgstr "no se admite __builtin_saveregs en este objetivo"
#: targhooks.c:728
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "target attribute is not supported on this machine"
-msgstr "el atributo %qE no se admite en esta plataforma"
+msgstr "el atributo target no se admite en esta plataforma"
#: targhooks.c:738
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "#pragma GCC target is not supported for this machine"
-msgstr "No se admite #pragma extern_prefix en este objetivo"
+msgstr "No se admite #pragma GCC target en este objetivo"
#: tlink.c:482
#, gcc-internal-format
@@ -23484,12 +23420,12 @@ msgstr "estableciendo el límite del tamaño máximo del fichero core: %m"
#: toplev.c:838
#, gcc-internal-format
msgid "%q+F declared %<static%> but never defined"
-msgstr "%q+F se declaró %<static%> pero nunca se definió"
+msgstr "%q+F se declaró %<static%> pero nunca se define"
#: toplev.c:866
#, gcc-internal-format
msgid "%q+D defined but not used"
-msgstr "se definió %q+D pero no se usa"
+msgstr "se define %q+D pero no se usa"
#: toplev.c:909
#, gcc-internal-format
@@ -23672,19 +23608,19 @@ msgid "invalid conditional operand"
msgstr "operando condicional inválido"
#: tree-cfg.c:2934
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid position or size operand to BIT_FIELD_REF"
-msgstr "restricciones inválidas para el operando"
+msgstr "posición o tamaño de operando inválido para BIT_FIELD_REF"
#: tree-cfg.c:2941
#, gcc-internal-format
msgid "integral result type precision does not match field size of BIT_FIELD_REF"
-msgstr ""
+msgstr "la precisión del tipo de resultado integral no coincide con el tamaño del campo de BIT_FIELD_REF"
#: tree-cfg.c:2949
#, gcc-internal-format
msgid "mode precision of non-integral result does not match field size of BIT_FIELD_REF"
-msgstr ""
+msgstr "el modo de precisión del resultado que no es integral no coincide con el tamaño del campo de BIT_FIELD_REF"
#: tree-cfg.c:2960
#, gcc-internal-format
@@ -23747,24 +23683,24 @@ msgid "type mismatch in component reference"
msgstr "los tipos de datos no coinciden en la referencia a componente"
#: tree-cfg.c:3210
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "non-function in gimple call"
-msgstr "la función no se puede incluir en línea"
+msgstr "no es función en la llamada gimple"
#: tree-cfg.c:3217
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid LHS in gimple call"
-msgstr "PC inválido en la tabla de números de línea"
+msgstr "LHS inválido en la llamada gimple"
#: tree-cfg.c:3233
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid conversion in gimple call"
-msgstr "número de versión `%s' inválido"
+msgstr "conversión inválida en la llamada gimple"
#: tree-cfg.c:3258
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid operands in gimple comparison"
-msgstr "operandos inválidos en la expresión compleja"
+msgstr "operandos inválidos en la comparación gimple"
#: tree-cfg.c:3276
#, gcc-internal-format
@@ -23774,12 +23710,12 @@ msgstr "los tipos de datos no coinciden en la expresión de comparación"
#: tree-cfg.c:3302
#, gcc-internal-format
msgid "non-register as LHS of unary operation"
-msgstr ""
+msgstr "el LHS de una operación unaria no es un registro"
#: tree-cfg.c:3308
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid operand in unary operation"
-msgstr "operando inválido en el not unario"
+msgstr "operando inválido en la operación unaria"
#: tree-cfg.c:3343
#, gcc-internal-format
@@ -23787,9 +23723,9 @@ msgid "invalid types in nop conversion"
msgstr "tipos inválidos en la conversión nop"
#: tree-cfg.c:3357
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid types in fixed-point conversion"
-msgstr "tipos inválidos en la conversión nop"
+msgstr "tipos inválidos en la conversión de coma fija"
#: tree-cfg.c:3370
#, gcc-internal-format
@@ -23802,19 +23738,19 @@ msgid "invalid types in conversion to integer"
msgstr "tipos inválidos en la conversión a entero"
#: tree-cfg.c:3418
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "non-trivial conversion in unary operation"
-msgstr "conversión que no es trivial en la asignación"
+msgstr "conversión que no es trivial en la operación unaria"
#: tree-cfg.c:3445
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "non-register as LHS of binary operation"
-msgstr "operación binaria elemental"
+msgstr "el LHS de una operación binaria no es un registro"
#: tree-cfg.c:3452
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid operands in binary operation"
-msgstr "operandos inválidos en la expresión binaria"
+msgstr "operandos inválidos en la operación binaria"
#: tree-cfg.c:3467
#, gcc-internal-format
@@ -23827,9 +23763,9 @@ msgid "type mismatch in shift expression"
msgstr "los tipos de datos no coinciden en la expresión shift"
#: tree-cfg.c:3506
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "type mismatch in vector shift expression"
-msgstr "los tipos de datos no coinciden en la expresión shift"
+msgstr "los tipos de datos no coinciden en la expresión shift de vector"
#: tree-cfg.c:3522
#, gcc-internal-format
@@ -23867,24 +23803,24 @@ msgid "type mismatch in address expression"
msgstr "no coincide el tipo en la expresión de dirección"
#: tree-cfg.c:3701 tree-cfg.c:3727
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid rhs for gimple memory store"
-msgstr "dirección indirecta de memoria inválida"
+msgstr "rhs inválido para el almacenamiento de memoria gimple"
#: tree-cfg.c:3793
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid operand in return statement"
-msgstr "operando inválido para la declaración switch"
+msgstr "operando inválido en la declaración return"
#: tree-cfg.c:3805
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid conversion in return statement"
-msgstr "Declaración de expresión inválida"
+msgstr "conversión inválida en la declaración return"
#: tree-cfg.c:3829
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "goto destination is neither a label nor a pointer"
-msgstr "el valor indicado por el subíndice no es ni matriz ni puntero"
+msgstr "el destino de goto no es una etiqueta ni un puntero"
#: tree-cfg.c:3844
#, gcc-internal-format
@@ -23892,19 +23828,19 @@ msgid "invalid operand to switch statement"
msgstr "operando inválido para la declaración switch"
#: tree-cfg.c:3864
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "Invalid PHI result"
-msgstr "argumento IACC inválido"
+msgstr "Resultado PHI inválido"
#: tree-cfg.c:3876
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "Invalid PHI argument"
-msgstr "argumento IACC inválido"
+msgstr "Argumento PHI inválido"
#: tree-cfg.c:3882
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "Incompatible types in PHI argument"
-msgstr "tipos incompatibles en la asignación"
+msgstr "Tipos incompatibles en el argumento PHI"
#: tree-cfg.c:4007
#, gcc-internal-format
@@ -23912,14 +23848,14 @@ msgid "verify_gimple failed"
msgstr "falló verify_gimple"
#: tree-cfg.c:4041
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid function in call statement"
-msgstr "declaración inválida de función"
+msgstr "función inválida en la declaración call"
#: tree-cfg.c:4052
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid pure const state for function"
-msgstr "clase de almacenamiento inválida para la función %qs"
+msgstr "estado const pure inválido para la función"
#: tree-cfg.c:4062 tree-ssa.c:845 tree-ssa.c:855
#, gcc-internal-format
@@ -23942,9 +23878,9 @@ msgid "Dead STMT in EH table"
msgstr "STMT muerto en la tabla EH"
#: tree-cfg.c:4191
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "gimple_bb (phi) is set to a wrong basic block"
-msgstr "se estableción bb_for_stmt (phi) a un bloque básico erróneo"
+msgstr "se estableció gimple_bb (phi) a un bloque básico erróneo"
#: tree-cfg.c:4202
#, gcc-internal-format
@@ -23952,9 +23888,9 @@ msgid "missing PHI def"
msgstr "falta la definición PHI"
#: tree-cfg.c:4213
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "PHI argument is not a GIMPLE value"
-msgstr "La definición de PHI no es un valor GIMPLE"
+msgstr "El argumento PHI no es un valor GIMPLE"
#: tree-cfg.c:4222 tree-cfg.c:4267
#, gcc-internal-format
@@ -23962,19 +23898,19 @@ msgid "incorrect sharing of tree nodes"
msgstr "compartición incorrecta de nodos de árbol"
#: tree-cfg.c:4237
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid GIMPLE statement"
-msgstr "no es una declaración GIMPLE válida"
+msgstr "declaración GIMPLE inválida"
#: tree-cfg.c:4246
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "gimple_bb (stmt) is set to a wrong basic block"
-msgstr "se estableción bb_for_stmt (stmt) a un bloque básico erróneo"
+msgstr "se estableció gimple_bb (stmt) a un bloque básico erróneo"
#: tree-cfg.c:4258
#, gcc-internal-format
msgid "incorrect entry in label_to_block_map.\n"
-msgstr ""
+msgstr "entrada incorrecta en label_to_block_map.\n"
#: tree-cfg.c:4283
#, gcc-internal-format
@@ -24017,9 +23953,9 @@ msgid "fallthru edge after a control statement in bb %d"
msgstr "borde de caída después de una sentencia de control en bb %d"
#: tree-cfg.c:4419
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "true/false edge after a non-GIMPLE_COND in bb %d"
-msgstr "borde verdadero/falso después de una expresión que no es COND_EXPR en bb %d"
+msgstr "borde verdadero/falso después de una expresión que no es GIMPLE_COND en bb %d"
#: tree-cfg.c:4442 tree-cfg.c:4464 tree-cfg.c:4477 tree-cfg.c:4546
#, gcc-internal-format
@@ -24037,9 +23973,9 @@ msgid "return edge does not point to exit in bb %d"
msgstr "el borde de devolución no apunta a exit en el bb %d"
#: tree-cfg.c:4512
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "found default case not at the start of case vector"
-msgstr "se encontró un case por defecto que no está al final del vector case"
+msgstr "se encontró un case por defecto que no está al inicio del vector case"
#: tree-cfg.c:4520
#, gcc-internal-format
@@ -24062,9 +23998,9 @@ msgid "%H%<noreturn%> function does return"
msgstr "%Hla función %<noreturn%> devuelve"
#: tree-cfg.c:7056
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "control reaches end of non-void function"
-msgstr "%Hel control alcanza el final de una función que no es void"
+msgstr "el control alcanza el final de una función que no es void"
#: tree-cfg.c:7118
#, gcc-internal-format
@@ -24243,15 +24179,19 @@ msgstr " No se ejecutaron los stmts pendientes en el borde EXIT (%d, %d)\n"
msgid "unimplemented functionality"
msgstr "funcionalidad sin implementar"
+# No existe una traducción para type-punning. Gracias a Jose María Pérez
+# por el comentario. cfuga
#: tree-ssa-alias-warnings.c:843
#, gcc-internal-format
msgid "%Hlikely type-punning may break strict-aliasing rules: object %<%s%s%> of main type %qT is referenced at or around %s:%d and may be aliased to object %<%s%s%> of main type %qT which is referenced at or around %s:%d."
-msgstr "%Hes probable que el castigo a tipo rompa las reglas de alias estricto: el objeto %<%s%s%> del tipo principal %qT se referencía en o cerca de %s:%d y tal vez tenga como alias el objeto %<%s%s%> del tipo principal %qT el cual se referencía en o cerca de %s:%d."
+msgstr "%Hes probable que el %<type-punning%> rompa las reglas de alias estricto: el objeto %<%s%s%> del tipo principal %qT se referencía en o cerca de %s:%d y tal vez tenga como alias el objeto %<%s%s%> del tipo principal %qT el cual se referencía en o cerca de %s:%d."
+# No existe una traducción para type-punning. Gracias a Jose María Pérez
+# por el comentario. cfuga
#: tree-ssa-alias-warnings.c:969
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "dereferencing type-punned pointer %D will break strict-aliasing rules"
-msgstr "la dereferencia de punteros de tipo castigado romperá las reglas de alias estricto"
+msgstr "la dereferencia del puntero %D \"type-punned\" romperá las reglas de alias estricto"
#: tree-ssa.c:252
#, gcc-internal-format
@@ -24429,14 +24369,14 @@ msgid "%J%qD was declared here"
msgstr "%J%qD se declaró aquí"
#: tree-ssa.c:1517
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qD is used uninitialized in this function"
-msgstr "%Hse utiliza %qD sin inicializar en esta función"
+msgstr "se utiliza %qD sin inicializar en esta función"
#: tree-ssa.c:1520 tree-ssa.c:1559
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qD may be used uninitialized in this function"
-msgstr "%Hpuede ser que se utilice %qD sin inicializar en esta función"
+msgstr "puede ser que se utilice %qD sin inicializar en esta función"
#: tree-vrp.c:4919
#, gcc-internal-format
@@ -24464,12 +24404,12 @@ msgid "assuming signed overflow does not occur when simplifying conditional"
msgstr "se asume que el desbordamiento con signo no ocurre al simplificar el condicional"
#: tree-vrp.c:5620
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "comparison always false due to limited range of data type"
msgstr "la comparación siempre es falsa debido al rango limitado del tipo de datos"
#: tree-vrp.c:5623
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "comparison always true due to limited range of data type"
msgstr "la comparación siempre es verdadera debido al rango limitado del tipo de datos"
@@ -24589,9 +24529,9 @@ msgid "Dead histogram"
msgstr "Histograma muerto"
#: value-prof.c:407
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "Histogram value statement does not correspond to the statement it is associated with"
-msgstr "La sentencia de valor del histograma no corresponde a la sentencia con la que está asociado"
+msgstr "La sentencia de valor del histograma no corresponde a la sentencia con la que está asociada"
#: value-prof.c:420
#, gcc-internal-format
@@ -24599,9 +24539,9 @@ msgid "verify_histograms failed"
msgstr "falló verify_histograms"
#: value-prof.c:467
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "Correcting inconsistent value profile: %s profiler overall count (%d) does not match BB count (%d)"
-msgstr "%HValor de perfil corrupto: %s la cuenta general del perfilador (%d) no coincide con la cuenta BB (%d)"
+msgstr "Se corrige el valor de perfil inconsistente: %s la cuenta general del perfilador (%d) no coincide con la cuenta BB (%d)"
#: value-prof.c:477
#, gcc-internal-format
@@ -25294,22 +25234,22 @@ msgstr "no se pueden especificar -msep-data y -mid-shared-library al mismo tiemp
#: config/bfin/bfin.c:2631
#, gcc-internal-format
msgid "-mmulticore can only be used with BF561"
-msgstr ""
+msgstr "-mmulticore sólo se puede usar con BF561"
#: config/bfin/bfin.c:2634
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "-mcorea should be used with -mmulticore"
-msgstr "-frepo se debe usar con -c"
+msgstr "-mcorea se debe usar con -mmulticore"
#: config/bfin/bfin.c:2637
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "-mcoreb should be used with -mmulticore"
-msgstr "-frepo se debe usar con -c"
+msgstr "-mcoreb se debe usar con -mmulticore"
#: config/bfin/bfin.c:2640
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "-mcorea and -mcoreb can't be used together"
-msgstr "no se pueden usar juntos -mips16 y -mdsp"
+msgstr "no se pueden usar juntos -mcorea y -mcoreab"
#: config/bfin/bfin.c:5178
#, gcc-internal-format
@@ -25566,29 +25506,29 @@ msgid "can't set position in PCH file: %m"
msgstr "no se puede establecer la posición en el fichero PCH: %m"
#: config/i386/i386.c:2656 config/i386/i386.c:2882
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "bad value (%s) for %stune=%s %s"
-msgstr "valor erróneo (%s) para el interruptor -tune="
+msgstr "valor erróneo (%s) para %stune=%s %s"
#: config/i386/i386.c:2698
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "bad value (%s) for %sstringop-strategy=%s %s"
-msgstr "valor erróneo (%s) para la opción -mstringop-strategy="
+msgstr "valor erróneo (%s) para %sstringop-strategy=%s %s"
#: config/i386/i386.c:2702
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%stune=x86-64%s is deprecated. Use %stune=k8%s or %stune=generic%s instead as appropriate."
-msgstr "-mtune=x86-64 es obsoleto. Use en su lugar -mtune=k8 o -mtune=generic como sea adecuado."
+msgstr "%stune=x86-64%s es obsoleto. Use en su lugar %stune=k8%s o %stune=generic%s como sea adecuado."
#: config/i386/i386.c:2712
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "generic CPU can be used only for %stune=%s %s"
-msgstr "el CPU generic sólo se puede usar para el interruptor -mtune="
+msgstr "el CPU generic sólo se puede usar para %stune=%s %s"
#: config/i386/i386.c:2715 config/i386/i386.c:2843
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "bad value (%s) for %sarch=%s %s"
-msgstr "valor erróneo (%s) para el interruptor -march="
+msgstr "valor erróneo (%s) para %sarch=%s %s"
#: config/i386/i386.c:2727
#, gcc-internal-format
@@ -25596,14 +25536,14 @@ msgid "code model %s does not support PIC mode"
msgstr "el modelo de código %s no admite el modo PIC"
#: config/i386/i386.c:2733
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "bad value (%s) for %scmodel=%s %s"
-msgstr "valor erróneo (%s) para el interruptor -mcmodel="
+msgstr "valor erróneo (%s) para el interruptor %scmodel=%s %s"
#: config/i386/i386.c:2757
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "bad value (%s) for %sasm=%s %s"
-msgstr "valor erróneo (%s) para %s"
+msgstr "valor erróneo (%s) para %sasm=%s %s"
#: config/i386/i386.c:2761
#, gcc-internal-format
@@ -25621,49 +25561,49 @@ msgid "CPU you selected does not support x86-64 instruction set"
msgstr "el CPU que seleccionó no admite el conjunto de instrucciones x86-64"
#: config/i386/i386.c:2901
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%sregparm%s is ignored in 64-bit mode"
-msgstr "se descarta -mregparm en modo de 64-bit"
+msgstr "se descarta %sregparm%s en modo de 64-bit"
#: config/i386/i386.c:2904
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%sregparm=%d%s is not between 0 and %d"
-msgstr "-mregparm=%d no está entre 0 y %d"
+msgstr "%sregparm=%d%s no está entre 0 y %d"
#: config/i386/i386.c:2917
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%salign-loops%s is obsolete, use %salign-loops%s"
-msgstr "-malign-loops es obsoleto, use -falign-loops"
+msgstr "%salign-loops%s es obsoleto, use %salign-loops%s"
#: config/i386/i386.c:2923 config/i386/i386.c:2938 config/i386/i386.c:2953
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%salign-loops=%d%s is not between 0 and %d"
-msgstr "-malign-loops=%d no está entre 0 y %d"
+msgstr "%salign-loops=%d%s no está entre 0 y %d"
#: config/i386/i386.c:2932
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%salign-jumps%s is obsolete, use %salign-jumps%s"
-msgstr "-malign-jumps es obsoleto, use -falign-jumps"
+msgstr "%salign-jumps%s es obsoleto, use %salign-jumps%s"
#: config/i386/i386.c:2947
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%salign-functions%s is obsolete, use %salign-functions%s"
-msgstr "-malign-functions es obsoleto, use -falign-functions"
+msgstr "%salign-functions%s es obsoleto, use %salign-functions%s"
#: config/i386/i386.c:2982
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%sbranch-cost=%d%s is not between 0 and 5"
-msgstr "-mbranch-cost=%d no está entre 0 y 5"
+msgstr "%sbranch-cost=%d%s no está entre 0 y 5"
#: config/i386/i386.c:2990
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%slarge-data-threshold=%d%s is negative"
-msgstr "-mlarge-data-threshold=%d es negativo"
+msgstr "%slarge-data-threshold=%d%s es negativo"
#: config/i386/i386.c:3004
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "bad value (%s) for %stls-dialect=%s %s"
-msgstr "valor erróneo (%s) para la opción -mtls-dialect="
+msgstr "valor erróneo (%s) para %stls-dialect=%s %s"
#: config/i386/i386.c:3012
#, gcc-internal-format
@@ -25671,24 +25611,24 @@ msgid "pc%d is not valid precision setting (32, 64 or 80)"
msgstr "pc%d no es una opción de precisión válida (32, 64 u 80)"
#: config/i386/i386.c:3028
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%srtd%s is ignored in 64bit mode"
-msgstr "se descarta -mrtd en el modo de 64bit"
+msgstr "se descarta %srtd%s en el modo de 64bit"
#: config/i386/i386.c:3083
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%spreferred-stack-boundary=%d%s is not between %d and 12"
-msgstr "-mpreferred-stack-boundary=%d no está entre %d y 12"
+msgstr "%spreferred-stack-boundary=%d%s no está entre %d y 12"
#: config/i386/i386.c:3104
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "-mincoming-stack-boundary=%d is not between %d and 12"
-msgstr "-mpreferred-stack-boundary=%d no está entre %d y 12"
+msgstr "-mincoming-stack-boundary=%d no está entre %d y 12"
#: config/i386/i386.c:3117
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%ssseregparm%s used without SSE enabled"
-msgstr "se usó -msseregparm sin SSE activado"
+msgstr "se usó %ssseregparm%s sin SSE activado"
#: config/i386/i386.c:3128 config/i386/i386.c:3142
#, gcc-internal-format
@@ -25701,34 +25641,34 @@ msgid "387 instruction set disabled, using SSE arithmetics"
msgstr "el conjunto de instrucciones 387 está desactivado, usando la aritmética SSE"
#: config/i386/i386.c:3154
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "bad value (%s) for %sfpmath=%s %s"
-msgstr "valor erróneo (%s) para el interruptor -mfpmath="
+msgstr "valor erróneo (%s) para %sfpmath=%s %s"
#: config/i386/i386.c:3170
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "unknown vectorization library ABI type (%s) for %sveclibabi=%s %s"
-msgstr "tipo de ABI de biblioteca de vectorización desconocida (%s) para la opción -mveclibabi="
+msgstr "tipo de ABI de biblioteca de vectorización desconocida (%s) para %sveclibabi=%s %s"
#: config/i386/i386.c:3190
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "unwind tables currently require either a frame pointer or %saccumulate-outgoing-args%s for correctness"
-msgstr "actualmente las tablas de desenredo requieren un puntero de marco o -maccumulate-outgoing-args para ser correctas"
+msgstr "actualmente las tablas de desenredo requieren un puntero de marco o %saccumulate-outgoing-args%s para ser correctas"
#: config/i386/i386.c:3203
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "stack probing requires %saccumulate-outgoing-args%s for correctness"
-msgstr "actualmente las tablas de desenredo requieren un puntero de marco o -maccumulate-outgoing-args para ser correctas"
+msgstr "actualmente la prueba de pila requiere un puntero de marco o %saccumulate-outgoing-args%s para ser correctas"
#: config/i386/i386.c:3540
#, gcc-internal-format
msgid "attribute(target(\"%s\")) is unknown"
-msgstr ""
+msgstr "se desconoce attribute(target(\"%s\"))"
#: config/i386/i386.c:3562
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "option(\"%s\") was already specified"
-msgstr "La especificación ACCESS en %L ya se había especificado"
+msgstr "ya se había especificado option(\"%s\")"
#: config/i386/i386.c:4147 config/i386/i386.c:4191
#, gcc-internal-format
@@ -25766,9 +25706,9 @@ msgid "stdcall and fastcall attributes are not compatible"
msgstr "los atributos stdcall y fastcall no son compatibles"
#: config/i386/i386.c:4294
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "nested functions are limited to 2 register parameters"
-msgstr "las funciones %s están limitadas a %d parámetros de registro"
+msgstr "las funciones anidadas están limitadas a 2 parámetros de registro"
#: config/i386/i386.c:4378
#, gcc-internal-format
@@ -25801,9 +25741,9 @@ msgid "SSE vector argument without SSE enabled changes the ABI"
msgstr "el argumento de vector SSE sin SSE activado cambia la ABI"
#: config/i386/i386.c:5581 config/i386/i386.c:5649
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "AVX vector argument without AVX enabled changes the ABI"
-msgstr "el argumento de vector MMX sin MMX activado cambia la ABI"
+msgstr "el argumento de vector AVX sin AVX activado cambia la ABI"
#: config/i386/i386.c:5600
#, gcc-internal-format
@@ -25846,34 +25786,34 @@ msgid "the third argument must be a 8-bit immediate"
msgstr "el tercer argumento debe ser un inmediato de 8-bit"
#: config/i386/i386.c:23735
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "the last argument must be a 4-bit immediate"
-msgstr "el tercer argumento debe ser un inmediato de 4-bit"
+msgstr "el último argumento debe ser un inmediato de 4-bit"
#: config/i386/i386.c:23744
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "the last argument must be a 2-bit immediate"
-msgstr "el tercer argumento debe ser un inmediato de 4-bit"
+msgstr "el tercer argumento debe ser un inmediato de 2-bit"
#: config/i386/i386.c:23753
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "the last argument must be a 1-bit immediate"
-msgstr "el tercer argumento debe ser un inmediato de 4-bit"
+msgstr "el último argumento debe ser un inmediato de 1-bit"
#: config/i386/i386.c:23762
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "the last argument must be a 5-bit immediate"
-msgstr "el tercer argumento debe ser un inmediato de 4-bit"
+msgstr "el tercer argumento debe ser un inmediato de 5-bit"
#: config/i386/i386.c:23771
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "the next to last argument must be an 8-bit immediate"
-msgstr "el tercer argumento debe ser un inmediato de 8-bit"
+msgstr "el penúltimo argumento debe ser un inmediato de 8-bit"
#: config/i386/i386.c:23775 config/i386/i386.c:23952
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "the last argument must be an 8-bit immediate"
-msgstr "el tercer argumento debe ser un inmediato de 8-bit"
+msgstr "el último argumento debe ser un inmediato de 8-bit"
#: config/i386/i386.c:24010 config/rs6000/rs6000.c:8519
#, gcc-internal-format
@@ -25883,22 +25823,22 @@ msgstr "el selector debe ser una constante entera en el rango 0..%wi"
#: config/i386/i386.c:24153
#, gcc-internal-format
msgid "%qE needs unknown isa option"
-msgstr ""
+msgstr "%qE necesita la opción isa desconocida"
#: config/i386/i386.c:24157
#, gcc-internal-format
msgid "%qE needs isa option %s"
-msgstr ""
+msgstr "%qE necesita la opción isa %s"
#: config/i386/i386.c:25800
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qs attribute only available for 64-bit"
-msgstr "el atributo %qs solamente se aplica a variables"
+msgstr "el atributo %qs solamente está disponible para 64-bit"
#: config/i386/i386.c:25811 config/i386/i386.c:25820
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ms_abi and sysv_abi attributes are not compatible"
-msgstr "los atributos fastcall y stdcall no son compatibles"
+msgstr "los atributos ms_abi y sysv_abi no son compatibles"
#: config/i386/i386.c:25858 config/rs6000/rs6000.c:20747
#, gcc-internal-format
@@ -26153,19 +26093,19 @@ msgid "built-in function %qs not supported for MIPS16"
msgstr "no se admite la función interna %qs para MIPS16"
#: config/mips/mips.c:12517
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qs does not support MIPS16 code"
-msgstr "%s no admite %s"
+msgstr "%qs no admite código MIPS16"
#: config/mips/mips.c:13491
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "MIPS16 PIC for ABIs other than o32 and o64"
-msgstr "código MIPS16 de coma flotante hard para ABIs diferentes de o32 y o64"
+msgstr "PIC MIPS16 para ABIs diferentes de o32 y o64"
#: config/mips/mips.c:13494
#, gcc-internal-format
msgid "MIPS16 -mxgot code"
-msgstr ""
+msgstr "código MIPS16 -mxgot"
#: config/mips/mips.c:13497
#, gcc-internal-format
@@ -26250,12 +26190,12 @@ msgstr "la arquitectura %qs no admite las instrucciones par-sencillo"
#: config/mips/mips.c:13970
#, gcc-internal-format
msgid "%qs requires a target that provides the %qs instruction"
-msgstr ""
+msgstr "%qs requiere un objetivo que provea la instrucción %qs"
#: config/mips/mips.c:14049
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qs requires branch-likely instructions"
-msgstr "la arquitectura %qs no admite las instrucciones con probabilidad de ramificación"
+msgstr "%qs requiere instrucciones con probabilidad de ramificación"
#. Output assembler code to FILE to increment profiler label # LABELNO
#. for profiling a function entry.
@@ -26346,95 +26286,95 @@ msgid "-munix=98 option required for C89 Amendment 1 features.\n"
msgstr "se requiere la opción -munix=98 para las características C89 Enmienda 1.\n"
#: config/picochip/picochip.c:369
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid AE type specified (%s)\n"
-msgstr "argumento de tipo inválido de %qs"
+msgstr "se especificó un tipo AE inválido (%s)\n"
#: config/picochip/picochip.c:392
#, gcc-internal-format
msgid "Invalid mul type specified (%s) - expected mac, mul or none"
-msgstr ""
+msgstr "Se especificó un tipo mul inválido (%s) - se esperaba mac, mul o none"
#: config/picochip/picochip.c:624
#, gcc-internal-format
msgid "unexpected mode %s encountered in picochip_emit_save_register\n"
-msgstr ""
+msgstr "se encontró el modo inesperado %s en picochip_emit_save_register\n"
#: config/picochip/picochip.c:791
#, gcc-internal-format
msgid "Defaulting to stack for %s register creation\n"
-msgstr ""
+msgstr "Cambiando a pila por defecto para la creación del registro %s\n"
#: config/picochip/picochip.c:1330
#, gcc-internal-format
msgid "LCFI labels have already been deferred."
-msgstr ""
+msgstr "Las etiquetas LCFI ya se habían deferenciado."
#: config/picochip/picochip.c:1393
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "LM label has already been deferred."
-msgstr "`%D' ya ha sido declarado en `%T'"
+msgstr "La etiqueta LM ya se había deferenciado."
#: config/picochip/picochip.c:1673
#, gcc-internal-format
msgid "picochip_asm_output_opcode - Found multiple lines in VLIW packet %s\n"
-msgstr ""
+msgstr "picochip_asm_output_opcode - Se encontraron múltiples líneas en el paquete VLIW %s\n"
#: config/picochip/picochip.c:1776
#, gcc-internal-format
msgid "picochip_asm_output_opcode - can't output unknown operator %c\n"
-msgstr ""
+msgstr "picochip_asm_output_opcode - no se puede mostrar el operador desconocido %c\n"
#: config/picochip/picochip.c:2028 config/picochip/picochip.c:2087
#, gcc-internal-format
msgid "%s: At least one operand can't be handled"
-msgstr ""
+msgstr "%s: Por lo menos no se puede manejar un operando"
#: config/picochip/picochip.c:2168
#, gcc-internal-format
msgid "Unknown short branch in %s (type %d)\n"
-msgstr ""
+msgstr "Ramificación short desconocida en %s (tipo %d)\n"
#: config/picochip/picochip.c:2205
#, gcc-internal-format
msgid "Unknown long branch in %s (type %d)\n"
-msgstr ""
+msgstr "Ramificación long desconocida en %s (tipo %d)\n"
#: config/picochip/picochip.c:2245 config/picochip/picochip.c:2313
#, gcc-internal-format
msgid "PUT uses port array index %d, which is out of range [%d..%d)"
-msgstr ""
+msgstr "PUT usa el índice de matriz de puerto %d, el cual está fuera de rango [%d..%d]"
#: config/picochip/picochip.c:2279
#, gcc-internal-format
msgid "GET uses port array index %d, which is out of range [%d..%d)"
-msgstr ""
+msgstr "GET usa el índice de matriz de puerto %d, el cual está fuera de rango [%d..%d]"
#: config/picochip/picochip.c:3122
#, gcc-internal-format
msgid "Too many ALU instructions emitted (%d)\n"
-msgstr ""
+msgstr "Se emitieron demasiadas instrucciones ALU (%d)\n"
#: config/picochip/picochip.c:3753 config/picochip/picochip.c:3846
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%s: Second source operand is not a constant"
-msgstr "el operando 'o' no es una constante"
+msgstr "%s: El segundo operando fuente no es una constante"
#: config/picochip/picochip.c:3756 config/picochip/picochip.c:3807
#: config/picochip/picochip.c:3849
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%s: Third source operand is not a constant"
-msgstr "el operando 'o' no es una constante"
+msgstr "%s: El tercer operando fuente no es una constante"
#: config/picochip/picochip.c:3810
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%s: Fourth source operand is not a constant"
-msgstr "el operando 'o' no es una constante"
+msgstr "%s: El cuarto operando fuente no es una constante"
#: config/picochip/picochip.c:4144
#, gcc-internal-format
msgid "%s (disable warning using -mno-inefficient-warnings)"
-msgstr ""
+msgstr "%s (desactive los avisos utilizando -mno-inefficient-warnings)"
#: config/rs6000/host-darwin.c:62
#, gcc-internal-format
@@ -26496,29 +26436,29 @@ msgid "junk at end of #pragma longcall"
msgstr "basura al final de #pragma longcall"
#: config/rs6000/rs6000-c.c:2989
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%s only accepts %d arguments"
-msgstr "no coinciden los argumentos"
+msgstr "%s sólo acepta %d argumentos"
#: config/rs6000/rs6000-c.c:2994
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%s only accepts 1 argument"
-msgstr "-split no tiene argumentos."
+msgstr "%s sólo acepta 1 argumento"
#: config/rs6000/rs6000-c.c:2999 config/rs6000/rs6000-c.c:3006
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%s only accepts 2 arguments"
-msgstr "%q+D sólo toma cero o dos argumentos"
+msgstr "%s sólo acepta 2 argumentos"
#: config/rs6000/rs6000-c.c:3067
#, gcc-internal-format
msgid "vec_extract only accepts 2 arguments"
-msgstr ""
+msgstr "vec_extract sólo acepta 2 argumentos"
#: config/rs6000/rs6000-c.c:3124
#, gcc-internal-format
msgid "vec_insert only accepts 3 arguments"
-msgstr ""
+msgstr "vec_insert sólo acepta 3 argumentos"
#: config/rs6000/rs6000-c.c:3206
#, gcc-internal-format
@@ -26541,24 +26481,24 @@ msgid "-m64 requires PowerPC64 architecture, enabling"
msgstr "-m64 requiere la arquitectura PowerPC64, activando"
#: config/rs6000/rs6000.c:1605
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "AltiVec not supported in this target"
-msgstr "no se admiten límites de la pila en este objetivo"
+msgstr "no se admite AltiVec en este objetivo"
#: config/rs6000/rs6000.c:1607
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "Spe not supported in this target"
-msgstr "no se admiten límites de la pila en este objetivo"
+msgstr "no se admite Spe en este objetivo"
#: config/rs6000/rs6000.c:1634
#, gcc-internal-format
msgid "-mmultiple is not supported on little endian systems"
-msgstr "-mmultiple no se admite en sistemas little endian"
+msgstr "no se admite -mmultiple en sistemas little endian"
#: config/rs6000/rs6000.c:1641
#, gcc-internal-format
msgid "-mstring is not supported on little endian systems"
-msgstr "-mstring no se admite en sistemas little endian"
+msgstr "no se admite -mstring en sistemas little endian"
#: config/rs6000/rs6000.c:1655
#, gcc-internal-format
@@ -26576,9 +26516,9 @@ msgid "unknown -m%s= option specified: '%s'"
msgstr "se desconoce la opción -m%s= especificada: '%s'"
#: config/rs6000/rs6000.c:2215
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "unknown value %s for -mfpu"
-msgstr "valor %qs erróneo para el interruptor -mcpu"
+msgstr "valor %s desconocido para -mfpu"
#: config/rs6000/rs6000.c:2408
#, gcc-internal-format
@@ -26633,12 +26573,12 @@ msgstr "opción -malign-XXXXX especificada desconocida: '%s'"
#: config/rs6000/rs6000.c:2517
#, gcc-internal-format
msgid "-msingle-float option equivalent to -mhard-float"
-msgstr ""
+msgstr "la opción -msingle-float es equivalente a -mhard-float"
#: config/rs6000/rs6000.c:2533
#, gcc-internal-format
msgid "-msimple-fpu option ignored"
-msgstr ""
+msgstr "se descarta la opción -msimple-fpu"
#: config/rs6000/rs6000.c:5355
#, gcc-internal-format
@@ -26774,12 +26714,12 @@ msgstr "el uso de tipos de coma flotante decimal en tipos AltiVec es inválido"
#: config/rs6000/rs6000.c:22851
#, gcc-internal-format
msgid "emitting microcode insn %s\t[%s] #%d"
-msgstr ""
+msgstr "se emite el insn de microcódigo %s\t[%s] #%d"
#: config/rs6000/rs6000.c:22855
#, gcc-internal-format
msgid "emitting conditional microcode insn %s\t[%s] #%d"
-msgstr ""
+msgstr "se emite el insn de microcódigo condicional %s\t[%s] #%d"
#: config/rs6000/aix43.h:38 config/rs6000/aix51.h:37 config/rs6000/aix52.h:38
#: config/rs6000/aix53.h:38 config/rs6000/aix61.h:38
@@ -27001,9 +26941,9 @@ msgid "%qs attribute only applies to interrupt functions"
msgstr "el atributo %qs se aplica solamente a funciones de interrupción"
#: config/sh/sh.c:8121
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qs attribute is supported only for SH2A"
-msgstr "el atributo %qE no se admite en esta plataforma"
+msgstr "el atributo %qs solo se admite para SH2A"
#: config/sh/sh.c:8151
#, gcc-internal-format
@@ -27011,14 +26951,14 @@ msgid "attribute interrupt_handler is not compatible with -m5-compact"
msgstr "el atributo interrupt_handler no es compatible con -m5-compact"
#: config/sh/sh.c:8168
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qs attribute only applies to SH2A"
-msgstr "el atributo %qs se aplica solamente a funciones"
+msgstr "el atributo %qs solo se aplica a SH2A"
#: config/sh/sh.c:8190
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "`%s' attribute argument should be between 0 to 255"
-msgstr "el argumento del atributo `%s' debe estar entre 18 a 255"
+msgstr "el argumento del atributo `%s' debe estar entre 0 y 255"
#. The argument must be a constant string.
#: config/sh/sh.c:8263
@@ -27478,9 +27418,9 @@ msgid "comparison between %q#T and %q#T"
msgstr "comparación entre %q#T y %q#T"
#: cp/call.c:4406
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "no corresponding deallocation function for %qD"
-msgstr "no existe una función de desalojo correspondiente para `%D'"
+msgstr "no existe una función de desalojo correspondiente para %qD"
#: cp/call.c:4411
#, gcc-internal-format
@@ -27515,7 +27455,7 @@ msgstr "se pasó NULL al argumento %P de %qD que no es puntero"
#: cp/call.c:4483
#, gcc-internal-format
msgid "converting to non-pointer type %qT from NULL"
-msgstr "convirtiendo al tipo %qT que no es puntero desde NULL"
+msgstr "se convierte al tipo %qT que no es puntero desde NULL"
#: cp/call.c:4489
#, gcc-internal-format
@@ -27535,7 +27475,7 @@ msgstr " argumento de inicialización %P de %qD"
#: cp/call.c:4566
#, gcc-internal-format
msgid "converting to %qT from initializer list would use explicit constructor %qD"
-msgstr ""
+msgstr "la conversión a %qT desde la lista del inicializador usaría el constructor explícito %qD"
#: cp/call.c:4723
#, gcc-internal-format
@@ -28033,7 +27973,7 @@ msgstr "declaración sin efecto"
#: cp/cp-gimplify.c:1150
#, gcc-internal-format
msgid "%qE implicitly determined as %<firstprivate%> has reference type"
-msgstr ""
+msgstr "%qE se determina implícitamente ya que %<firstprivate%> tiene tipo de referencia"
#: cp/cvt.c:90
#, gcc-internal-format
@@ -28073,7 +28013,7 @@ msgstr "conversión de %q#T a %q#T"
#: cp/cvt.c:667
#, gcc-internal-format
msgid "the result of the conversion is unspecified because %qE is outside the range of type %qT"
-msgstr ""
+msgstr "el resultado de la conversión no está especificado porque %qE está fuera del rango del tipo %qT"
#: cp/cvt.c:678 cp/cvt.c:698
#, gcc-internal-format
@@ -28133,7 +28073,7 @@ msgstr "no se usa el valor calculado"
#: cp/cvt.c:1095
#, gcc-internal-format
msgid "converting NULL to non-pointer type"
-msgstr "convirtiendo NULL a un tipo que no es puntero"
+msgstr "se convierte NULL a un tipo que no es puntero"
#: cp/cvt.c:1201
#, gcc-internal-format
@@ -28275,7 +28215,7 @@ msgstr "declaración previa del espacio de nombres %q+D aquí"
#: cp/decl.c:1465
#, gcc-internal-format
msgid "%q+#D previously defined here"
-msgstr "se definió %q+#D previamente aquí"
+msgstr "se define %q+#D previamente aquí"
#. Prototype decl follows defn w/o prototype.
#: cp/decl.c:1475
@@ -28314,14 +28254,14 @@ msgid "redundant redeclaration of %qD in same scope"
msgstr "declaración redundante de %qD en el mismo ámbito"
#: cp/decl.c:1610
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "deleted definition of %qD"
-msgstr "redefinición de %q+D"
+msgstr "se borró la definición de %qD"
#: cp/decl.c:1611
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "after previous declaration %q+D"
-msgstr "declaración previa de %q+D"
+msgstr "después de la declaración previa de %q+D"
#. From [temp.expl.spec]:
#.
@@ -28559,9 +28499,9 @@ msgid "ignoring attributes applied to dependent type %qT without an associated d
msgstr "se descartan los atributos aplicados al tipo dependiente %qT sin una declaración asociada"
#: cp/decl.c:4032
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "typedef %qD is initialized (use decltype instead)"
-msgstr "typedef %qD está inicializado (utilice __typeof__ en su lugar)"
+msgstr "typedef %qD está inicializado (utilice decltype en su lugar)"
#: cp/decl.c:4050
#, gcc-internal-format
@@ -28609,9 +28549,9 @@ msgid "elements of array %q#D have incomplete type"
msgstr "elementos de la matriz %q#D con tipo de dato incompleto"
#: cp/decl.c:4264 cp/decl.c:5495
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "declaration of %q#D has no initializer"
-msgstr "la declaración de %q#D tiene %<extern%> y está inicializada"
+msgstr "la declaración de %q#D no tiene inicializadores"
#: cp/decl.c:4266
#, gcc-internal-format
@@ -28712,9 +28652,9 @@ msgid "too many initializers for %qT"
msgstr "demasiados inicializadores para %qT"
#: cp/decl.c:5001
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "elements of array %q#T have incomplete type"
-msgstr "elementos de la matriz %q#D con tipo de dato incompleto"
+msgstr "elementos de la matriz %q#T tienen tipo de dato incompleto"
#: cp/decl.c:5010
#, gcc-internal-format
@@ -28722,9 +28662,9 @@ msgid "variable-sized object %qD may not be initialized"
msgstr "el objeto de tamaño variable %qD no se puede inicializar"
#: cp/decl.c:5012
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "variable-sized compound literal"
-msgstr "%HISO C90 prohíbe las literales compuestas"
+msgstr "literal compuesta de tamaño variable"
#: cp/decl.c:5066
#, gcc-internal-format
@@ -28737,9 +28677,9 @@ msgid "scalar object %qD requires one element in initializer"
msgstr "el objeto escalar %qD requiere un elemento en el inicializador"
#: cp/decl.c:5117
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "in C++98 %qD must be initialized by constructor, not by %<{...}%>"
-msgstr "%qD debe ser inicializado por un constructor, no por %<{...}%>"
+msgstr "en C++98 %qD debe ser inicializado por un constructor, no por %<{...}%>"
#: cp/decl.c:5149
#, gcc-internal-format
@@ -28792,9 +28732,9 @@ msgid "non-static data member %qD has Java class type"
msgstr "el dato miembro que no es estático %qD tiene un tipo de clase Java"
#: cp/decl.c:5778 cp/decl2.c:835
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qD cannot be defaulted"
-msgstr "%q+#D no se puede declarar"
+msgstr "%qD no se puede definir por omisión"
#: cp/decl.c:5789
#, gcc-internal-format
@@ -28834,7 +28774,7 @@ msgstr "%q+D se declaró como friend"
#: cp/decl.c:6414
#, gcc-internal-format
msgid "%q+D declared with an exception specification"
-msgstr "%q+D se declaró con una excepción de especificación"
+msgstr "%q+D se declaró con una especificación de excepción"
#: cp/decl.c:6448
#, gcc-internal-format
@@ -29146,7 +29086,7 @@ msgstr "%<long%> o %<short%> inválidos para %qs"
#: cp/decl.c:7887
#, gcc-internal-format
msgid "%<long%> or %<short%> specified with char for %qs"
-msgstr "%<long%> o %<short%> especificados con char para %qs"
+msgstr "se especificó %<long%> o %<short%> con char para %qs"
#: cp/decl.c:7889
#, gcc-internal-format
@@ -29154,9 +29094,9 @@ msgid "%<long%> and %<short%> specified together for %qs"
msgstr "%<long%> y %<short%> se especificaron juntos para %qs"
#: cp/decl.c:7895
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%<short%> or %<long%> invalid for %qs"
-msgstr "%<long%> o %<short%> inválidos para %qs"
+msgstr "%<short%> o %<long%> inválidos para %qs"
#: cp/decl.c:7903
#, gcc-internal-format
@@ -29199,14 +29139,14 @@ msgid "storage class specifiers invalid in parameter declarations"
msgstr "especificadores de clase de almacenamiento inválidos en las declaraciones de parámetros"
#: cp/decl.c:8059
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "parameter declared %<auto%>"
-msgstr "el parámetro %q+D se declaró %<inline%>"
+msgstr "el parámetro se declaró %<auto%>"
#: cp/decl.c:8068
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%<virtual%> outside class declaration"
-msgstr "declaración de virtual fuera de clase"
+msgstr "declaración de clase fuera de %<virtual%>"
#: cp/decl.c:8086
#, gcc-internal-format
@@ -29229,24 +29169,24 @@ msgid "storage class specifiers invalid in friend function declarations"
msgstr "especificadores de clase de almacenamiento inválidos en las declaraciones de funciones friend"
#: cp/decl.c:8257
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid use of %<auto%> in conversion operator"
-msgstr "uso inválido de %<this%> en la función que no es miembro"
+msgstr "uso inválido de %<auto%> en el operador de conversión"
#: cp/decl.c:8262
#, gcc-internal-format
msgid "%qs function uses %<auto%> type specifier without late return type"
-msgstr ""
+msgstr "la función %qs usa el especificador de tipo %<auto%> sin un tipo de devolución late"
#: cp/decl.c:8268
#, gcc-internal-format
msgid "%qs function with late return type has %qT as its type rather than plain %<auto%>"
-msgstr ""
+msgstr "la función %qs con tipo de devolución late tiene %T como su tipo en lugar de un simple %<auto%>"
#: cp/decl.c:8276
#, gcc-internal-format
msgid "%qs function with late return type not declared with %<auto%> type specifier"
-msgstr ""
+msgstr "no se declaró la función %qs con tipo de devolución late con el especificador de tipo %<auto%>"
#: cp/decl.c:8309
#, gcc-internal-format
@@ -29848,9 +29788,9 @@ msgid "%Jprevious definition here"
msgstr "%Jdefinición previa aquí"
#: cp/decl.c:10927
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "underlying type %<%T%> of %<%T%> must be an integral type"
-msgstr "el argumento %d para ABSTIME debe ser de tipo entero"
+msgstr "el tipo subyacente %<%T%> de %<%T%> debe ser un tipo integral"
#. DR 377
#.
@@ -29872,9 +29812,9 @@ msgid "overflow in enumeration values at %qD"
msgstr "desbordamiento en valores de enumeración en %qD"
#: cp/decl.c:11242
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "enumerator value %E is too large for underlying type %<%T%>"
-msgstr "el valor de enumerador para %qE no es una constante entera"
+msgstr "el valor de enumerador %E es demasiado grande para el tipo subyacente %<%T%>"
#: cp/decl.c:11339
#, gcc-internal-format
@@ -30039,7 +29979,7 @@ msgstr "struct anónimo no está dentro de un tipo nombrado"
#: cp/decl2.c:1335
#, gcc-internal-format
msgid "namespace-scope anonymous aggregates must be static"
-msgstr "los agregados anónimos de alcance de nombre de espacio deben ser static"
+msgstr "los agregados anónimos de alcance de espacio de nombres deben ser static"
#: cp/decl2.c:1344
#, gcc-internal-format
@@ -30098,7 +30038,7 @@ msgstr "%qT se declaró con mayor visibilidad que su base %qT"
#: cp/decl2.c:3582
#, gcc-internal-format
msgid "inline function %q+D used but never defined"
-msgstr "se usó la función inline %q+D pero nunca se definió"
+msgstr "se usó la función inline %q+D pero nunca se define"
#: cp/decl2.c:3731
#, gcc-internal-format
@@ -30106,14 +30046,14 @@ msgid "default argument missing for parameter %P of %q+#D"
msgstr "falta el argumento por defecto para el parámetro %P de %q+#D"
#: cp/decl2.c:3780 cp/search.c:1919
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "deleted function %q+D"
-msgstr "se repitió usando la declaración %q+D"
+msgstr "se borró la función %q+D"
#: cp/decl2.c:3781
#, gcc-internal-format
msgid "used here"
-msgstr ""
+msgstr "se usó aquí"
#. We really want to suppress this warning in system headers,
#. because libstdc++ uses variadic templates even when we aren't
@@ -30121,7 +30061,7 @@ msgstr ""
#: cp/error.c:2701
#, gcc-internal-format
msgid "%s only available with -std=c++0x or -std=gnu++0x"
-msgstr ""
+msgstr "%s sólo está disponible con -std=c++0x o -std=gnu++0x"
#. Can't throw a reference.
#: cp/except.c:286
@@ -30382,9 +30322,9 @@ msgid "bad array initializer"
msgstr "inicializador de matriz erróneo"
#: cp/init.c:1457 cp/semantics.c:2490
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qT is not a class type"
-msgstr "%q#T no es una clase"
+msgstr "%qT no es un tipo de clase"
#: cp/init.c:1511
#, gcc-internal-format
@@ -30561,7 +30501,7 @@ msgstr "se decodifica typeof, utilice decltype en su lugar"
#: cp/mangle.c:2282
#, gcc-internal-format
msgid "mangling function-style cast with more than one argument"
-msgstr ""
+msgstr "decodificación de una conversión de estilo función con más de un argumento"
#: cp/mangle.c:2310
#, gcc-internal-format
@@ -30589,9 +30529,9 @@ msgid "non-static reference member %q#D, can't use default assignment operator"
msgstr "el miembro de referencia %q#D que no es static, no puede usar el operador de asignación por defecto"
#: cp/method.c:816
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "synthesized method %qD first required here "
-msgstr "%Hse requirió primero el método sintetizado %qD aquí "
+msgstr "se requirió primero el método sintetizado %qD aquí "
#: cp/method.c:1159
#, gcc-internal-format
@@ -30620,14 +30560,14 @@ msgid "as %qD"
msgstr "como %qD"
#: cp/name-lookup.c:805
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "declaration of %q#D with C language linkage"
-msgstr "redeclaración de %q+D sin enlazado"
+msgstr "redeclaración de %q#D con enlazado de lenguaje C"
#: cp/name-lookup.c:809
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "due to different exception specifications"
-msgstr "Genera código para revisar excepciones de especificaciones"
+msgstr "debido a diferentes especificaciones de excepciones"
#: cp/name-lookup.c:899
#, gcc-internal-format
@@ -30686,7 +30626,7 @@ msgid " matches this %q+D under old rules"
msgstr " coincide con este %q+D bajo las reglas antiguas"
#: cp/name-lookup.c:1218 cp/name-lookup.c:1226
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "name lookup of %qD changed for ISO %<for%> scoping"
msgstr "la búsqueda de nombre de %qD cambió por el nuevo alcance ISO de %<for%>"
@@ -30701,9 +30641,9 @@ msgid " using obsolete binding at %q+D"
msgstr " se usa la asignación obsoleta en %q+D"
#: cp/name-lookup.c:1235 cp/parser.c:10068
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "(if you use %<-fpermissive%> G++ will accept your code)"
-msgstr "(si utiliza -fpermissive, G++ aceptará su código)"
+msgstr "(si utiliza %<-fpermissive%>, G++ aceptará su código)"
#: cp/name-lookup.c:1291
#, gcc-internal-format
@@ -30871,54 +30811,54 @@ msgid "identifier %<%s%> will become a keyword in C++0x"
msgstr "el identificador %<%s%> se convertirá en una palabra clave en C++0x"
#: cp/parser.c:2081
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<#pragma%> is not allowed here"
-msgstr "%<#pragma%> no se permite aquí"
+msgstr "%H%<#pragma%> no se permite aquí"
#: cp/parser.c:2112
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<%E::%E%> has not been declared"
-msgstr "%<%E::%E%> no se ha declarado"
+msgstr "%H%<%E::%E%> no se ha declarado"
#: cp/parser.c:2115
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<::%E%> has not been declared"
-msgstr "%<::%E%> no se ha declarado"
+msgstr "%H%<::%E%> no se ha declarado"
#: cp/parser.c:2118
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hrequest for member %qE in non-class type %qT"
-msgstr "solicitud por el miembro %qE en el tipo %qT que no es clase"
+msgstr "%Hsolicitud por el miembro %qE en el tipo %qT que no es clase"
#: cp/parser.c:2121
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<%T::%E%> has not been declared"
-msgstr "%<%T::%E%> no se ha declarado"
+msgstr "%H%<%T::%E%> no se ha declarado"
#: cp/parser.c:2124
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qE has not been declared"
-msgstr "%qE no se ha declarado"
+msgstr "%H%qE no se ha declarado"
#: cp/parser.c:2127
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<%E::%E%> %s"
-msgstr "%<%E::%E%> %s"
+msgstr "%H%<%E::%E%> %s"
#: cp/parser.c:2129
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<::%E%> %s"
-msgstr "%<::%E%> %s"
+msgstr "%H%<::%E%> %s"
#: cp/parser.c:2131
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qE %s"
-msgstr "%qE %s"
+msgstr "%H%qE %s"
#: cp/parser.c:2166
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<long long long%> is too long for GCC"
-msgstr "%<long long long%> es demasiado largo para GCC"
+msgstr "%H%<long long long%> es demasiado largo para GCC"
#: cp/parser.c:2170
#, gcc-internal-format
@@ -30926,14 +30866,14 @@ msgid "ISO C++ 1998 does not support %<long long%>"
msgstr "ISO C++ 1998 no admite %<long long%>"
#: cp/parser.c:2190
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hduplicate %qs"
-msgstr "%qs duplicado"
+msgstr "%H%qs duplicado"
#: cp/parser.c:2234
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hnew types may not be defined in a return type"
-msgstr "no se pueden definir tipos nuevos en una devolución de tipo"
+msgstr "%Hno se pueden definir tipos nuevos en un tipo de devolución"
#: cp/parser.c:2236
#, gcc-internal-format
@@ -30941,41 +30881,41 @@ msgid "(perhaps a semicolon is missing after the definition of %qT)"
msgstr "(tal vez falta un punto y coma después de la definición de %qT)"
#: cp/parser.c:2256
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qT is not a template"
-msgstr "%qT no es una plantilla"
+msgstr "%H%qT no es una plantilla"
#: cp/parser.c:2258
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qE is not a template"
-msgstr "%qE no es una plantilla"
+msgstr "%H%qE no es una plantilla"
#: cp/parser.c:2260
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hinvalid template-id"
-msgstr "id de plantilla inválido"
+msgstr "%Hid de plantilla inválido"
#: cp/parser.c:2322
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hinvalid use of template-name %qE without an argument list"
-msgstr "uso inválido del nombre de plantilla %qE sin una lista de argumentos"
+msgstr "%Huso inválido del nombre de plantilla %qE sin una lista de argumentos"
#: cp/parser.c:2325
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hinvalid use of destructor %qD as a type"
-msgstr "uso inválido del destructor %qD como un tipo"
+msgstr "%Huso inválido del destructor %qD como un tipo"
#. Something like 'unsigned A a;'
#: cp/parser.c:2328
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hinvalid combination of multiple type-specifiers"
-msgstr "combinación inválida de especificadores de tipo múltiples"
+msgstr "%Hcombinación inválida de especificadores de tipo múltiples"
#. Issue an error message.
#: cp/parser.c:2333
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qE does not name a type"
-msgstr "%qE no nombra a un tipo"
+msgstr "%H%qE no nombra a un tipo"
#: cp/parser.c:2366
#, gcc-internal-format
@@ -30983,19 +30923,19 @@ msgid "(perhaps %<typename %T::%E%> was intended)"
msgstr "(tal vez intentó %<typename %T::%E%>)"
#: cp/parser.c:2381
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qE in namespace %qE does not name a type"
-msgstr "%qE en el espacio de nombres %qE no nombra un tipo"
+msgstr "%H%qE en el espacio de nombres %qE no nombra un tipo"
#: cp/parser.c:2384
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qE in class %qT does not name a type"
-msgstr "%qE en la clase %qT no nombra un tipo"
+msgstr "%H%qE en la clase %qT no nombra un tipo"
#: cp/parser.c:2946
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hunsupported non-standard concatenation of string literals"
-msgstr "no se admite el sufijo no estándar en una constante de coma flotante"
+msgstr "%Hno se admite la concatenació no estándar de literales de cadena"
#: cp/parser.c:3224
#, gcc-internal-format
@@ -31003,44 +30943,44 @@ msgid "ISO C++ forbids braced-groups within expressions"
msgstr "ISO C++ prohíbe grupos de llaves dentro de expresiones"
#: cp/parser.c:3235
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hstatement-expressions are not allowed outside functions nor in template-argument lists"
-msgstr "las expresiones de declaraciones no se permiten fuera de funciones ni en listas de argumentos plantilla"
+msgstr "%Hlas expresiones de declaraciones no se permiten fuera de funciones ni en listas de argumentos plantilla"
#: cp/parser.c:3294
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<this%> may not be used in this context"
-msgstr "no se puede usar %<this%> en este contexto"
+msgstr "%Hno se puede usar %<this%> en este contexto"
#: cp/parser.c:3480
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hlocal variable %qD may not appear in this context"
-msgstr "la variable local %qD no puede aparecer en este contexto"
+msgstr "%Hla variable local %qD no puede aparecer en este contexto"
#: cp/parser.c:3780
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hscope %qT before %<~%> is not a class-name"
-msgstr "el ámbito %qT antes de %<~%> no es un nombre de clase"
+msgstr "%Hel ámbito %qT antes de %<~%> no es un nombre de clase"
#: cp/parser.c:3882
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hdeclaration of %<~%T%> as member of %qT"
-msgstr "declaración de %<~%T%> como miembro de %qT"
+msgstr "%Hdeclaración de %<~%T%> como miembro de %qT"
#: cp/parser.c:3896
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Htypedef-name %qD used as destructor declarator"
-msgstr "se usa el nombre de definición de tipo %qD como un declarador de destructor"
+msgstr "%Hse usa el nombre de definición de tipo %qD como un declarador de destructor"
#: cp/parser.c:4110
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qD used without template parameters"
-msgstr "se usa %qD sin parámetros de plantilla"
+msgstr "%Hse usa %qD sin parámetros de plantilla"
#: cp/parser.c:4114 cp/parser.c:14760 cp/parser.c:17038
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hreference to %qD is ambiguous"
-msgstr "la referencia a %qD es ambigua"
+msgstr "%Hla referencia a %qD es ambigua"
#: cp/parser.c:4160 cp/pt.c:5599
#, gcc-internal-format
@@ -31055,19 +30995,19 @@ msgid "ISO C++ forbids compound-literals"
msgstr "ISO C++ prohíbe las literales compuestas"
#: cp/parser.c:4951
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qE does not have class type"
-msgstr "%qE no tiene un tipo de clase"
+msgstr "%H%qE no tiene un tipo de clase"
#: cp/parser.c:5035
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hinvalid use of %qD"
-msgstr "uso inválido de %qD"
+msgstr "%Huso inválido de %qD"
#: cp/parser.c:5612
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Harray bound forbidden after parenthesized type-id"
-msgstr "se prohíbe el límite de matriz después del id de tipo entre paréntesis"
+msgstr "%Hse prohíbe el límite de matriz después del id de tipo entre paréntesis"
#: cp/parser.c:5615
#, gcc-internal-format
@@ -31075,9 +31015,9 @@ msgid "try removing the parentheses around the type-id"
msgstr "intente borrar los paréntesis alrededor del id de tipo"
#: cp/parser.c:5808
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hexpression in new-declarator must have integral or enumeration type"
-msgstr "la expresión en el declarador new debe tener un tipo integral o de enumeración"
+msgstr "%Hla expresión en el declarador new debe tener un tipo integral o de enumeración"
#: cp/parser.c:6062
#, gcc-internal-format
@@ -31095,14 +31035,14 @@ msgid "suggest parentheses around %<>>%> expression"
msgstr "se sugieren paréntesis alrededor de la expresión %<>>%>"
#: cp/parser.c:7016
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hcase label %qE not within a switch statement"
-msgstr "la etiqueta case %qE no está dentro de una declaración switch"
+msgstr "%Hla etiqueta case %qE no está dentro de una declaración switch"
#: cp/parser.c:7028
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hcase label not within a switch statement"
-msgstr "la etiqueta case no se encuentra dentro de una declaración switch"
+msgstr "%Hla etiqueta case no se encuentra dentro de una declaración switch"
#: cp/parser.c:7146
#, gcc-internal-format
@@ -31110,24 +31050,24 @@ msgid "%H%<else%> without a previous %<if%>"
msgstr "%H%<else%> sin un %<if%> previo"
#: cp/parser.c:7625
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hbreak statement not within loop or switch"
-msgstr "la declaración break no está dentro de un ciclo o switch"
+msgstr "%Hla declaración break no está dentro de un ciclo o switch"
#: cp/parser.c:7633 cp/parser.c:7653
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hinvalid exit from OpenMP structured block"
-msgstr "salida inválida de un bloque estructurado OpenMP"
+msgstr "%Hsalida inválida de un bloque estructurado OpenMP"
#: cp/parser.c:7636
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hbreak statement used with OpenMP for loop"
-msgstr "se usó la declaración break en un ciclo for de OpenMP"
+msgstr "%Hse usó la declaración break con un ciclo for de OpenMP"
#: cp/parser.c:7646
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hcontinue statement not within a loop"
-msgstr "la declaración continue no está dentro de un ciclo"
+msgstr "%Hla declaración continue no está dentro de un ciclo"
#. Issue a warning about this use of a GNU extension.
#: cp/parser.c:7689
@@ -31141,44 +31081,44 @@ msgid "extra %<;%>"
msgstr "<;%> extra"
#: cp/parser.c:8050
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<__label__%> not at the beginning of a block"
-msgstr "%<__label%> no está al inicio de un bloque"
+msgstr "%H%<__label%> no está al inicio de un bloque"
#: cp/parser.c:8187
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hmixing declarations and function-definitions is forbidden"
-msgstr "se prohíbe mezclar declaraciones y definiciones de función"
+msgstr "%Hse prohíbe mezclar declaraciones y definiciones de función"
#: cp/parser.c:8327
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<friend%> used outside of class"
-msgstr "se usó %<friend%> fuera de la clase"
+msgstr "%Hse usó %<friend%> fuera de la clase"
#: cp/parser.c:8383
#, gcc-internal-format
msgid "%H%<auto%> will change meaning in C++0x; please remove it"
-msgstr ""
+msgstr "%H%<auto%> cambiará su significado en C++0x; por favor bórrelo"
#: cp/parser.c:8502
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hclass definition may not be declared a friend"
-msgstr "la definición de clase no se puede declarar como friend"
+msgstr "%Hla definición de clase no se puede declarar como friend"
#: cp/parser.c:8572 cp/parser.c:15946
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Htemplates may not be %<virtual%>"
-msgstr "las plantillas no pueden ser %<virtual%>"
+msgstr "%Hlas plantillas no pueden ser %<virtual%>"
#: cp/parser.c:9049
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Honly constructors take base initializers"
-msgstr "solamente los constructores toman inicializadores base"
+msgstr "%Hsolamente los constructores toman inicializadores base"
#: cp/parser.c:9071
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hcannot expand initializer for member %<%D%>"
-msgstr "no se puede expandir el inicializador para el miembro %<%D%>"
+msgstr "%Hno se puede expandir el inicializador para el miembro %<%D%>"
#: cp/parser.c:9126
#, gcc-internal-format
@@ -31186,9 +31126,9 @@ msgid "anachronistic old-style base class initializer"
msgstr "inicializador de clase base de estilo antiguo anacrónico"
#: cp/parser.c:9182
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hkeyword %<typename%> not allowed in this context (a qualified member initializer is implicitly a type)"
-msgstr "no se permite la palabra clave %<typename%> en este contexto (un inicializador de miembro calificado es implícitamente un tipo)"
+msgstr "%Hno se permite la palabra clave %<typename%> en este contexto (un inicializador de miembro calificado es implícitamente un tipo)"
#. Warn that we do not support `export'.
#: cp/parser.c:9528
@@ -31197,19 +31137,19 @@ msgid "keyword %<export%> not implemented, and will be ignored"
msgstr "no se admite la palabra clave %<export%>, y se descartará"
#: cp/parser.c:9710 cp/parser.c:9808 cp/parser.c:9914
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Htemplate parameter pack %qD cannot have a default argument"
-msgstr "el paquete de parámetros plantilla %qD no puede tener un argumento por defecto"
+msgstr "%Hel paquete de parámetros plantilla %qD no puede tener un argumento por defecto"
#: cp/parser.c:9713
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Htemplate parameter pack cannot have a default argument"
-msgstr "el paquete de parámetros plantilla no puede tener un argumento por defecto"
+msgstr "%Hel paquete de parámetros plantilla no puede tener un argumento por defecto"
#: cp/parser.c:9811 cp/parser.c:9918
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Htemplate parameter packs cannot have default arguments"
-msgstr "los paquetes de parámetro de plantilla no pueden tener argumentos por defecto"
+msgstr "%Hlos paquetes de parámetro de plantilla no pueden tener argumentos por defecto"
#: cp/parser.c:10060
#, gcc-internal-format
@@ -31222,15 +31162,15 @@ msgid "%<<:%> is an alternate spelling for %<[%>. Insert whitespace between %<<%
msgstr "%<<:%> es una forma alternativa para %<[%>. Inserte espacios en blanco entre %<<%> y %<::%>"
#: cp/parser.c:10142
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hparse error in template argument list"
-msgstr "error de decodificación en la lista de argumentos de plantilla"
+msgstr "%Herror de decodificación en la lista de argumentos de plantilla"
#. Explain what went wrong.
#: cp/parser.c:10257
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hnon-template %qD used as template"
-msgstr "se usó %qD que no es plantilla como plantilla"
+msgstr "%Hse usó %qD que no es plantilla como plantilla"
#: cp/parser.c:10259
#, gcc-internal-format
@@ -31238,9 +31178,9 @@ msgid "use %<%T::template %D%> to indicate that it is a template"
msgstr "utilice %<%T::template %D%> para indicar que es una plantilla"
#: cp/parser.c:10796
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Htemplate specialization with C linkage"
-msgstr "especialización de plantilla con enlazado C"
+msgstr "%Hespecialización de plantilla con enlazado C"
#: cp/parser.c:11442
#, gcc-internal-format
@@ -31265,40 +31205,40 @@ msgstr "se descartan los atributos en la instanciación de una plantilla"
#: cp/parser.c:11700
#, gcc-internal-format
msgid "attributes ignored on elaborated-type-specifier that is not a forward declaration"
-msgstr "se descartan los atributos en un especificador de tipo anidado que no es una declaración adelantada"
+msgstr "se descartan los atributos en un especificador de tipo elaborado que no es una declaración adelantada"
#: cp/parser.c:11977
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qD is not a namespace-name"
-msgstr "%qD no es un nombre de espacio de nombres"
+msgstr "%H%qD no es un nombre de espacio de nombres"
#: cp/parser.c:12104
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<namespace%> definition is not allowed here"
-msgstr "la definición %<namespace%> no se permite aquí"
+msgstr "%Hla definición %<namespace%> no se permite aquí"
#. [namespace.udecl]
#.
#. A using declaration shall not name a template-id.
#: cp/parser.c:12244
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Ha template-id may not appear in a using-declaration"
-msgstr "un id de plantilla no puede aparecer en una declaración using"
+msgstr "%Hun id de plantilla no puede aparecer en una declaración using"
#: cp/parser.c:12621
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Han asm-specification is not allowed on a function-definition"
-msgstr "no se permite una especificación de asm en una definición de función"
+msgstr "%Hno se permite una especificación de asm en una definición de función"
#: cp/parser.c:12625
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hattributes are not allowed on a function-definition"
-msgstr "no se permiten atributos en una definición de función"
+msgstr "%Hno se permiten atributos en una definición de función"
#: cp/parser.c:12778
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hinitializer provided for function"
-msgstr "se proporciona un inicializador para la función"
+msgstr "%Hse proporciona un inicializador para la función"
#: cp/parser.c:12800
#, gcc-internal-format
@@ -31306,19 +31246,19 @@ msgid "attributes after parenthesized initializer ignored"
msgstr "se descartan los atributos después del inicializador entre paréntesis"
#: cp/parser.c:13198
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Harray bound is not an integer constant"
-msgstr "el límite de la matriz no es una constante entera"
+msgstr "%Hel límite de la matriz no es una constante entera"
#: cp/parser.c:13310
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<%T::%E%> is not a type"
-msgstr "%<%T::%E%> no es un tipo"
+msgstr "%H%<%T::%E%> no es un tipo"
#: cp/parser.c:13337
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hinvalid use of constructor as a template"
-msgstr "uso inválido del constructor como una plantilla"
+msgstr "%Huso inválido del constructor como una plantilla"
#: cp/parser.c:13339
#, gcc-internal-format
@@ -31326,24 +31266,24 @@ msgid "use %<%T::%D%> instead of %<%T::%D%> to name the constructor in a qualifi
msgstr "use %<%T::%D%> en lugar de %<%T::%D%> para nombrar el constructor en un nombre calificado"
#: cp/parser.c:13512
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qD is a namespace"
-msgstr "%qD es un nombre de espacio"
+msgstr "%H%qD es un espacio de nombres"
#: cp/parser.c:13587
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hduplicate cv-qualifier"
-msgstr "calificador-cv duplicado"
+msgstr "%Hcalificador-cv duplicado"
#: cp/parser.c:13699
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid use of %<auto%>"
-msgstr "uso inválido de %<::%>"
+msgstr "uso inválido de %<auto%>"
#: cp/parser.c:14273
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hfile ends in default argument"
-msgstr "el fichero termina en el argumento por defecto"
+msgstr "%Hel fichero termina en el argumento por defecto"
#: cp/parser.c:14319
#, gcc-internal-format
@@ -31351,19 +31291,19 @@ msgid "deprecated use of default argument for parameter of non-function"
msgstr "uso obsoleto del argumento por defecto para el parámetro de una no función"
#: cp/parser.c:14322
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hdefault arguments are only permitted for function parameters"
-msgstr "los argumentos por defecto sólo se permiten para parámetros de función"
+msgstr "%Hlos argumentos por defecto sólo se permiten para parámetros de función"
#: cp/parser.c:14340
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%sparameter pack %qD cannot have a default argument"
-msgstr "%sel paquete de parámetros plantilla %qD no puede tener un argumento por defecto"
+msgstr "%H%sel paquete de parámetros plantilla %qD no puede tener un argumento por defecto"
#: cp/parser.c:14344
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%sparameter pack cannot have a default argument"
-msgstr "%sel paquete de parámetros plantilla no puede tener un argumento por defecto"
+msgstr "%H%sel paquete de parámetros plantilla no puede tener un argumento por defecto"
#: cp/parser.c:14607
#, gcc-internal-format
@@ -31371,112 +31311,112 @@ msgid "ISO C++ does not allow designated initializers"
msgstr "ISO C++ no permite inicializadores designados"
#: cp/parser.c:15223
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hinvalid class name in declaration of %qD"
-msgstr "nombre de clase inválido en la declaración de %qD"
+msgstr "%Hnombre de clase inválido en la declaración de %qD"
#: cp/parser.c:15236
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hdeclaration of %qD in namespace %qD which does not enclose %qD"
-msgstr "la declaración de %qD en el espacio de nombres %qD el cual no incluye a %qD"
+msgstr "%Hla declaración de %qD en el espacio de nombres %qD el cual no incluye a %qD"
#: cp/parser.c:15241
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hdeclaration of %qD in %qD which does not enclose %qD"
-msgstr "la declaración de %qD en %qD la cual no incluye a %qD"
+msgstr "%Hla declaración de %qD en %qD la cual no incluye a %qD"
#: cp/parser.c:15255
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hextra qualification not allowed"
-msgstr "se descarta la calificación extra"
+msgstr "%Hno se permite la calificación extra"
#: cp/parser.c:15267
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Han explicit specialization must be preceded by %<template <>%>"
-msgstr "una especialización explícita debe ser precedida por %<template <>%>"
+msgstr "%Huna especialización explícita se debe preceder con %<template <>%>"
#: cp/parser.c:15296
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hfunction template %qD redeclared as a class template"
-msgstr "la función plantilla %qD se redeclaró commo una plantilla de clase"
+msgstr "%Hla función plantilla %qD se redeclaró commo una plantilla de clase"
#: cp/parser.c:15378
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hredefinition of %q#T"
-msgstr "redefinición de %q#T"
+msgstr "%Hredefinición de %q#T"
#: cp/parser.c:15380
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hprevious definition of %q+#T"
-msgstr "definición previa de %q+#T"
+msgstr "%Hdefinición previa de %q+#T"
#: cp/parser.c:15648
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Ha class-key must be used when declaring a friend"
-msgstr "se debe usar una llave clase cuando se declara un friend"
+msgstr "%Hse debe usar una llave clase cuando se declara un friend"
#: cp/parser.c:15663
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hfriend declaration does not name a class or function"
-msgstr "la declaración friend no nombra una clase o función"
+msgstr "%Hla declaración friend no nombra una clase o función"
#: cp/parser.c:15843
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hpure-specifier on function-definition"
-msgstr "especificador pure en la definición de función"
+msgstr "%Hespecificador pure en la definición de función"
#: cp/parser.c:16150
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hkeyword %<typename%> not allowed outside of templates"
-msgstr "no se permite la palabra clave %<typename%> fuera de las plantillas"
+msgstr "%Hno se permite la palabra clave %<typename%> fuera de las plantillas"
#: cp/parser.c:16153
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hkeyword %<typename%> not allowed in this context (the base class is implicitly a type)"
-msgstr "no se permite la palabra clave %<typename%> en este contexto (la clase base es implícitamente un tipo)"
+msgstr "%Hno se permite la palabra clave %<typename%> en este contexto (la clase base es implícitamente un tipo)"
#: cp/parser.c:17216
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Htoo few template-parameter-lists"
-msgstr "faltan listas de parámetros de plantilla"
+msgstr "%Hfaltan listas de parámetros de plantilla"
#. Otherwise, there are too many template parameter lists. We have
#. something like:
#.
#. template <class T> template <class U> void S::f();
#: cp/parser.c:17231
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Htoo many template-parameter-lists"
-msgstr "demasiadas listas de parámetros de plantilla"
+msgstr "%Hdemasiadas listas de parámetros de plantilla"
#. Issue an error message.
#: cp/parser.c:17505
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hnamed return values are no longer supported"
-msgstr "ya no se admiten los valores de devolución nombrados"
+msgstr "%Hya no se admiten los valores de devolución nombrados"
#. 14.5.2.2 [temp.mem]
#.
#. A local class shall not have member templates.
#: cp/parser.c:17580
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hinvalid declaration of member template in local class"
-msgstr "declaración inválida de plantilla miembro en la clase local"
+msgstr "%Hdeclaración inválida de plantilla miembro en la clase local"
#: cp/parser.c:17590
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Htemplate with C linkage"
-msgstr "plantilla con enlazado C"
+msgstr "%Hplantilla con enlazado C"
#: cp/parser.c:17737
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Htemplate declaration of %qs"
-msgstr "declaración de plantilla de %qs"
+msgstr "%Hdeclaración de plantilla de %qs"
#: cp/parser.c:17801
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hexplicit template specialization cannot have a storage class"
-msgstr "la especialización de plantilla explícita no puede tener una clase de almacenamiento"
+msgstr "%Hla especialización de plantilla explícita no puede tener una clase de almacenamiento"
#: cp/parser.c:18019
#, gcc-internal-format
@@ -31484,19 +31424,19 @@ msgid "%H%<>>%> should be %<> >%> within a nested template argument list"
msgstr "%H%<>>%> debe ser %<> >%> dentro de una lista de argumentos de plantilla anidada"
#: cp/parser.c:18032
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hspurious %<>>%>, use %<>%> to terminate a template argument list"
-msgstr "%<>>%> sobrante, use %<>%> para terminar la lista de argumentos de plantilla"
+msgstr "%H%<>>%> sobrante, use %<>%> para terminar la lista de argumentos de plantilla"
#: cp/parser.c:18361
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hinvalid use of %qD in linkage specification"
-msgstr "uso inválido de %qD en la especificación de enlazado"
+msgstr "%Huso inválido de %qD en la especificación de enlazado"
#: cp/parser.c:18374
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<__thread%> before %qD"
-msgstr "%<__thread%> antes de %qD"
+msgstr "%H%<__thread%> antes de %qD"
#: cp/parser.c:18695
#, gcc-internal-format
@@ -31504,44 +31444,44 @@ msgid "%qs tag used in naming %q#T"
msgstr "se usó la etiqueta %qs al nombrar a %q#T"
#: cp/parser.c:18716
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qD redeclared with different access"
-msgstr "%qD se redeclaró con acceso diferente"
+msgstr "%H%qD se redeclaró con acceso diferente"
#: cp/parser.c:18734
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<template%> (as a disambiguator) is only allowed within templates"
-msgstr "%<template%> (como desambiguador) sólo se permite dentro de plantillas"
+msgstr "%H%<template%> (como desambiguador) sólo se permite dentro de plantillas"
#: cp/parser.c:19000 cp/parser.c:19927 cp/parser.c:20059
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hmisplaced %<@%D%> Objective-C++ construct"
-msgstr "construct Objective-C++ %<@%D%> mal colocado"
+msgstr "%Hconstruct Objective-C++ %<@%D%> mal colocado"
#: cp/parser.c:19144
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<@encode%> must specify a type as an argument"
-msgstr "%<@encode%> debe especificar un tipo como un argumento"
+msgstr "%H%<@encode%> debe especificar un tipo como un argumento"
#: cp/parser.c:19460
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hinvalid Objective-C++ selector name"
-msgstr "nombre de selector Objective-C++ inválido"
+msgstr "%Hnombre de selector Objective-C++ inválido"
#: cp/parser.c:19791
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hidentifier expected after %<@protocol%>"
-msgstr "se esperaba un identificador después de %<@protocol%>"
+msgstr "%Hse esperaba un identificador después de %<@protocol%>"
#: cp/parser.c:20152
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Htoo many %qs clauses"
-msgstr "demasiadas cláusulas %qs"
+msgstr "%Hdemasiadas cláusulas %qs"
#: cp/parser.c:20266
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hcollapse argument needs positive constant integer expression"
-msgstr "la etiqueta de `case' debe ser una expresión constante discreta"
+msgstr "%Hel argumento de collapse necesita ser una expresión entera constante positiva"
#: cp/parser.c:20555
#, gcc-internal-format
@@ -31549,9 +31489,9 @@ msgid "%Hschedule %<runtime%> does not take a %<chunk_size%> parameter"
msgstr "%Hel calendarizador %<runtime%> no toma un parámetro %<chunk_size%>"
#: cp/parser.c:20558
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hschedule %<auto%> does not take a %<chunk_size%> parameter"
-msgstr "%Hel calendarizador %<runtime%> no toma un parámetro %<chunk_size%>"
+msgstr "%Hel calendarizador %<auto%> no toma un parámetro %<chunk_size%>"
#: cp/parser.c:20706
#, gcc-internal-format
@@ -31561,57 +31501,57 @@ msgstr "%H%qs no es válido para %qs"
#: cp/parser.c:21130
#, gcc-internal-format
msgid "parenthesized initialization is not allowed in OpenMP %<for%> loop"
-msgstr ""
+msgstr "no se permite la inicialización entre paréntesis para el ciclo %<for%> en OpenMP"
#: cp/parser.c:21242 cp/parser.c:21280
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hiteration variable %qD should not be firstprivate"
-msgstr "la variable de iteración %qs no debe ser firstprivate"
+msgstr "%Hla variable de iteración %qD no debe ser firstprivate"
#: cp/parser.c:21284
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hiteration variable %qD should not be reduction"
-msgstr "la variable de iteración %qs no debe ser reduction"
+msgstr "%Hla variable de iteración %qD no debe ser reduction"
#: cp/parser.c:21360
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hnot enough collapsed for loops"
-msgstr "no hay suficiente información de tipo"
+msgstr "%Hno se colapsó lo suficiente para los ciclos"
#: cp/parser.c:21406
#, gcc-internal-format
msgid "%Hcollapsed loops not perfectly nested"
-msgstr ""
+msgstr "%Hlos ciclos colapsados no están perfectamente anidados"
#: cp/parser.c:21817
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hjunk at end of %<#pragma GCC pch_preprocess%>"
-msgstr "basura al final de %<#pragma GCC pch_preprocess%>"
+msgstr "%Hbasura al final de %<#pragma GCC pch_preprocess%>"
#: cp/parser.c:21821
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hexpected string literal"
-msgstr "se esperaba una cadena literal"
+msgstr "%Hse esperaba una cadena literal"
#: cp/parser.c:21854
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<#pragma GCC pch_preprocess%> must be first"
-msgstr "%<#pragma GCC pch_preprocess%> debe ser primero"
+msgstr "%H%<#pragma GCC pch_preprocess%> debe ser primero"
#: cp/parser.c:21865
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<#pragma omp barrier%> may only be used in compound statements"
-msgstr "%<#pragma omp barrier%> sólo se puede usar en declaraciones compuestas"
+msgstr "%H%<#pragma omp barrier%> sólo se puede usar en declaraciones compuestas"
#: cp/parser.c:21880
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<#pragma omp flush%> may only be used in compound statements"
-msgstr "%<#pragma omp flush%> sólo se puede usar en declaraciones compuestas"
+msgstr "%H%<#pragma omp flush%> sólo se puede usar en declaraciones compuestas"
#: cp/parser.c:21895
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<#pragma omp taskwait%> may only be used in compound statements"
-msgstr "%<#pragma omp barrier%> sólo se puede usar en declaraciones compuestas"
+msgstr "%H%<#pragma omp taskwait%> sólo se puede usar en declaraciones compuestas"
#: cp/parser.c:21923
#, gcc-internal-format
@@ -31789,9 +31729,9 @@ msgid "expansion pattern %<%E%> contains no argument packs"
msgstr "el patrón de expansión %<%E%> no contiene paquetes de argumento"
#: cp/pt.c:2729
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "parameter packs not expanded with %<...%>:"
-msgstr "no se expanden los paquetes de argumento con `...'"
+msgstr "no se expanden los paquetes de parámetro con %<...%>"
#: cp/pt.c:2744 cp/pt.c:3365
#, gcc-internal-format
@@ -32264,9 +32204,9 @@ msgid "use %<...%> to expand argument pack"
msgstr "use %<...%> para expandir el paquete de argumentos"
#: cp/pt.c:10365
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "iteration variable %qD should not be reduction"
-msgstr "la variable de iteración %qs no debe ser reduction"
+msgstr "la variable de iteración %qD no debe ser reduction"
#: cp/pt.c:11034
#, gcc-internal-format
@@ -32349,9 +32289,9 @@ msgid "duplicate explicit instantiation of %q#D"
msgstr "instanciación explícita duplicada de %q#D"
#: cp/pt.c:14650 cp/pt.c:14742
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "ISO C++ 1998 forbids the use of %<extern%> on explicit instantiations"
-msgstr "ISO C++ prohíbe el uso de %<extern%> en instanciaciones explícitas"
+msgstr "ISO C++ 1998 prohíbe el uso de %<extern%> en instanciaciones explícitas"
#: cp/pt.c:14655 cp/pt.c:14759
#, gcc-internal-format
@@ -32401,14 +32341,14 @@ msgid "%q#T is not a valid type for a template constant parameter"
msgstr "%q#T no es un tipo válido para un parámetro constante de plantilla"
#: cp/pt.c:16749
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "deducing auto from brace-enclosed initializer list requires #include <initializer_list>"
-msgstr "se utilizó un inicializador encerrado entre llaves para inicializar a %qT"
+msgstr "la deducción de auto de una lista inicializadora encerrada entre llaves requiere #include <initializer_list>"
#: cp/pt.c:16790
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "unable to deduce %qT from %qE"
-msgstr "no se puede emular %qs"
+msgstr "no se puede deducir %qT de %qE"
#: cp/repo.c:111
#, gcc-internal-format
@@ -32483,7 +32423,7 @@ msgstr "tipo de devolución covariante inválido para %q+#D"
#: cp/search.c:1890
#, gcc-internal-format
msgid "conflicting return type specified for %q+#D"
-msgstr "tipos de devolución en conflicto especificados para %q+#D"
+msgstr "se especificaron tipos de devolución en conflicto para %q+#D"
#: cp/search.c:1900
#, gcc-internal-format
@@ -32498,22 +32438,22 @@ msgstr " se sustituye %q+#F"
#: cp/search.c:1909
#, gcc-internal-format
msgid "conflicting type attributes specified for %q+#D"
-msgstr "atributos de tipo en conflicto especificados para %q+#D"
+msgstr "se especificaron atributos de tipo en conflicto para %q+#D"
#: cp/search.c:1920
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "overriding non-deleted function %q+D"
-msgstr "función virtual %qs que no es clase"
+msgstr "se sobreescribe la función %q+D que no se borró"
#: cp/search.c:1924
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "non-deleted function %q+D"
-msgstr "llamada a %qD que no es función"
+msgstr "la función %q+D que no se borró"
#: cp/search.c:1925
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "overriding deleted function %q+D"
-msgstr "oscureciendo la función %s %q#D"
+msgstr "se sobreescribe la función borrada %q+D"
#. A static member function cannot match an inherited
#. virtual member function.
@@ -32638,29 +32578,29 @@ msgid "base class %qT has cv qualifiers"
msgstr "la clase base %qT tiene calificadores cv"
#: cp/semantics.c:2522
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hincomplete type %qT used in nested name specifier"
-msgstr "se utilizó el tipo incompleto %qT en un especificador de nombre anidado"
+msgstr "%Hse utilizó el tipo incompleto %qT en un especificador de nombre anidado"
#: cp/semantics.c:2526
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hreference to %<%T::%D%> is ambiguous"
-msgstr "la referencia a %<%T::%D%> es ambigua"
+msgstr "%Hla referencia a %<%T::%D%> es ambigua"
#: cp/semantics.c:2530
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qD is not a member of %qT"
-msgstr "%qD no es un miembro de %qT"
+msgstr "%H%qD no es un miembro de %qT"
#: cp/semantics.c:2533
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%qD is not a member of %qD"
-msgstr "%qD no es un miembro de %qD"
+msgstr "%H%qD no es un miembro de %qD"
#: cp/semantics.c:2535
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%H%<::%D%> has not been declared"
-msgstr "%<::%D%> no se ha declarado"
+msgstr "%H%<::%D%> no se ha declarado"
#: cp/semantics.c:2676
#, gcc-internal-format
@@ -32724,14 +32664,14 @@ msgid "%qD appears more than once in data clauses"
msgstr "%qD aparece más de una vez en las cláusulas de datos"
#: cp/semantics.c:3511
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qD is not a variable in clause %<firstprivate%>"
-msgstr "%qE no es una variable en la cláusula %<firstprivate%>"
+msgstr "%qD no es una variable en la cláusula %<firstprivate%>"
#: cp/semantics.c:3533
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%qD is not a variable in clause %<lastprivate%>"
-msgstr "%qE no es una variable en la cláusula %<lastprivate%>"
+msgstr "%qD no es una variable en la cláusula %<lastprivate%>"
#: cp/semantics.c:3563
#, gcc-internal-format
@@ -32749,14 +32689,14 @@ msgid "%qE has reference type for %qs"
msgstr "%qE tiene tipo de referencia para %qs"
#: cp/semantics.c:3780
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%<threadprivate%> %qD is not file, namespace or block scope variable"
-msgstr "%<threadprivate%> %qE no es un fichero, espacio de nombres o variable de ámbito de bloque"
+msgstr "%<threadprivate%> %qD no es un fichero, espacio de nombres o variable de ámbito de bloque"
#: cp/semantics.c:3794
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%<threadprivate%> %qE directive not in %qT definition"
-msgstr "%<threadprivate%> %qE tiene tipo incompleto"
+msgstr "la directiva %<threadprivate%> %qE no está en la definición %qT"
#: cp/semantics.c:3926
#, gcc-internal-format
@@ -32766,7 +32706,7 @@ msgstr "%Hpredicado controlador inválido"
#: cp/semantics.c:3936
#, gcc-internal-format
msgid "%Hdifference between %qE and %qD does not have integer type"
-msgstr ""
+msgstr "%Hla diferencia entre %qE y %qD no tiene tipo entero"
#: cp/semantics.c:4031
#, gcc-internal-format
@@ -32774,9 +32714,9 @@ msgid "%Hinvalid increment expression"
msgstr "%Hfalta la expresión de decremento"
#: cp/semantics.c:4157 cp/semantics.c:4228
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "%Hexpected iteration declaration or initialization"
-msgstr "se esperaba una declaración de iteración o una inicialización"
+msgstr "%Hse esperaba una declaración de iteración o una inicialización"
#: cp/semantics.c:4168
#, gcc-internal-format
@@ -32817,7 +32757,7 @@ msgstr "%qE refiere a un conjunto de funciones sobrecargadas"
#: cp/semantics.c:4589
#, gcc-internal-format
msgid "unable to determine the declared type of expression %<%E%>"
-msgstr ""
+msgstr "no se puede determinar el tipo declarado de la expresión %<%E%>"
#: cp/semantics.c:4802
#, gcc-internal-format
@@ -32960,9 +32900,9 @@ msgid "(perhaps the %<offsetof%> macro was used incorrectly)"
msgstr "(tal vez se utilizó incorrectamente la macro %<offsetof%>)"
#: cp/typeck.c:2000
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "invalid access to non-static data member %qD of NULL object"
-msgstr "acceso inválido a datos del miembro que no es static %qD del objeto NULL"
+msgstr "acceso inválido a datos del miembro que no es static %qD del objeto NULL"
#: cp/typeck.c:2090
#, gcc-internal-format
@@ -33045,9 +32985,9 @@ msgid "ISO C++ forbids calling %<::main%> from within program"
msgstr "ISO C++ prohíbe la llamada %<::main%> dentro del mismo programa"
#: cp/typeck.c:2878
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "must use %<.*%> or %<->*%> to call pointer-to-member function in %<%E (...)%>, e.g. %<(... ->* %E) (...)%>"
-msgstr "se debe usar %<.*%> o %<->*%> en la llamada a la función puntero-a-miembro en %<%E (...)%>"
+msgstr "se debe usar %<.*%> o %<->*%> en la llamada a la función puntero-a-miembro en %<%E (...)%>, p.e. %<(... ->* %E) (...)%>"
#: cp/typeck.c:2893
#, gcc-internal-format
@@ -33265,19 +33205,19 @@ msgid "%s expression list treated as compound expression"
msgstr "se trata la lista de expresiones %s como una expresión compuesta"
#: cp/typeck.c:4971
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "cast from type %qT to type %qT casts away constness"
-msgstr "%s del tipo %qT al tipo %qT proscribe la constancia"
+msgstr "la conversión del tipo %qT al tipo %qT proscribe la constancia"
#: cp/typeck.c:4976
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "static_cast from type %qT to type %qT casts away constness"
-msgstr "%s del tipo %qT al tipo %qT proscribe la constancia"
+msgstr "static_cast del tipo %qT al tipo %qT proscribe la constancia"
#: cp/typeck.c:4981
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "reinterpret_cast from type %qT to type %qT casts away constness"
-msgstr "%s del tipo %qT al tipo %qT proscribe la constancia"
+msgstr "reinterpret_cast del tipo %qT al tipo %qT proscribe la constancia"
#: cp/typeck.c:5301
#, gcc-internal-format
@@ -33287,7 +33227,7 @@ msgstr "static_cast inválido del tipo %qT al tipo %qT"
#: cp/typeck.c:5324
#, gcc-internal-format
msgid "converting from %qT to %qT"
-msgstr "convirtiendo de %qT a %qT"
+msgstr "se convierte de %qT a %qT"
#: cp/typeck.c:5373
#, gcc-internal-format
@@ -33558,9 +33498,9 @@ msgid "cannot initialize arrays using this syntax"
msgstr "no se puede inicializar matrices usando esta sintaxis"
#: cp/typeck2.c:707
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "narrowing conversion of %qE from %qT to %qT inside { }"
-msgstr "la conversión de %qE desde %qT a %qT es ambigua"
+msgstr "conversión estrechadora de %qE desde %qT a %qT dentro de { }"
#: cp/typeck2.c:765
#, gcc-internal-format
@@ -33568,9 +33508,9 @@ msgid "int-array initialized from non-wide string"
msgstr "matriz de enteros inicializada con una cadena que no es ancha"
#: cp/typeck2.c:770
-#, fuzzy, gcc-internal-format
+#, gcc-internal-format
msgid "int-array initialized from incompatible wide string"
-msgstr "matriz de enteros inicializada con una cadena que no es ancha"
+msgstr "matriz de enteros inicializada con una cadena ancha incompatible"
#: cp/typeck2.c:829
#, gcc-internal-format
@@ -43748,7 +43688,7 @@ msgstr "la declaración local de %qs oculta la variable de instancia"
#~ msgstr "se envió una señal sin una prioridad"
#~ msgid " and no default priority was set."
-#~ msgstr " y no se estableción una prioridad por omisión."
+#~ msgstr " y no se estableció una prioridad por omisión."
#~ msgid " PRIORITY defaulted to 0"
#~ msgstr " PRIORITY es 0 por omisión"
diff --git a/gcc/po/gcc.pot b/gcc/po/gcc.pot
index 2414e0ba22f..32bbfbd6b9d 100644
--- a/gcc/po/gcc.pot
+++ b/gcc/po/gcc.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
-"POT-Creation-Date: 2008-11-18 20:02+0000\n"
+"POT-Creation-Date: 2009-03-28 07:02+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: c-decl.c:3815
+#: c-decl.c:3819
msgid "<anonymous>"
msgstr ""
@@ -277,58 +277,58 @@ msgstr ""
msgid "field precision"
msgstr ""
-#: c-opts.c:1459 fortran/cpp.c:548
+#: c-opts.c:1468 fortran/cpp.c:552
msgid "<built-in>"
msgstr ""
#. Handle deferred options from command-line.
-#: c-opts.c:1477 fortran/cpp.c:553
+#: c-opts.c:1486 fortran/cpp.c:557
msgid "<command-line>"
msgstr ""
-#: c-typeck.c:2473 c-typeck.c:4943 c-typeck.c:4946 c-typeck.c:4954
-#: c-typeck.c:4984 c-typeck.c:6354
+#: c-typeck.c:2491 c-typeck.c:4961 c-typeck.c:4964 c-typeck.c:4972
+#: c-typeck.c:5002 c-typeck.c:6388
msgid "initializer element is not constant"
msgstr ""
-#: c-typeck.c:4733
+#: c-typeck.c:4751
msgid "array initialized from parenthesized string constant"
msgstr ""
-#: c-typeck.c:4795 cp/typeck2.c:757
+#: c-typeck.c:4813 cp/typeck2.c:757
#, gcc-internal-format
msgid "char-array initialized from wide string"
msgstr ""
-#: c-typeck.c:4803
+#: c-typeck.c:4821
msgid "wide character array initialized from non-wide string"
msgstr ""
-#: c-typeck.c:4809
+#: c-typeck.c:4827
msgid "wide character array initialized from incompatible wide string"
msgstr ""
-#: c-typeck.c:4827 cp/typeck2.c:785
+#: c-typeck.c:4845 cp/typeck2.c:785
#, gcc-internal-format
msgid "initializer-string for array of chars is too long"
msgstr ""
-#: c-typeck.c:4833
+#: c-typeck.c:4851
msgid "array of inappropriate type initialized from string constant"
msgstr ""
#. ??? This should not be an error when inlining calls to
#. unprototyped functions.
-#: c-typeck.c:4900 c-typeck.c:4403 cp/typeck.c:1631
+#: c-typeck.c:4918 c-typeck.c:4421 cp/typeck.c:1645
#, gcc-internal-format
msgid "invalid use of non-lvalue array"
msgstr ""
-#: c-typeck.c:4926
+#: c-typeck.c:4944
msgid "array initialized from non-constant array expression"
msgstr ""
-#: c-typeck.c:4991 c-typeck.c:6359
+#: c-typeck.c:5009 c-typeck.c:6393
#, gcc-internal-format
msgid "initializer element is not computable at load time"
msgstr ""
@@ -337,108 +337,108 @@ msgstr ""
#. of VLAs themselves count as VLAs, it does not make
#. sense to permit them to be initialized given that
#. ordinary VLAs may not be initialized.
-#: c-typeck.c:5002 c-decl.c:3220 c-decl.c:3235
+#: c-typeck.c:5020 c-decl.c:3224 c-decl.c:3239
#, gcc-internal-format
msgid "variable-sized object may not be initialized"
msgstr ""
-#: c-typeck.c:5006
+#: c-typeck.c:5024
msgid "invalid initializer"
msgstr ""
-#: c-typeck.c:5480
+#: c-typeck.c:5498
msgid "extra brace group at end of initializer"
msgstr ""
-#: c-typeck.c:5500
+#: c-typeck.c:5518
msgid "missing braces around initializer"
msgstr ""
-#: c-typeck.c:5561
+#: c-typeck.c:5579
msgid "braces around scalar initializer"
msgstr ""
-#: c-typeck.c:5618
+#: c-typeck.c:5636
msgid "initialization of flexible array member in a nested context"
msgstr ""
-#: c-typeck.c:5621
+#: c-typeck.c:5639
msgid "initialization of a flexible array member"
msgstr ""
-#: c-typeck.c:5649
+#: c-typeck.c:5667
msgid "missing initializer"
msgstr ""
-#: c-typeck.c:5671
+#: c-typeck.c:5689
msgid "empty scalar initializer"
msgstr ""
-#: c-typeck.c:5676
+#: c-typeck.c:5694
msgid "extra elements in scalar initializer"
msgstr ""
-#: c-typeck.c:5773 c-typeck.c:5833
+#: c-typeck.c:5791 c-typeck.c:5851
msgid "array index in non-array initializer"
msgstr ""
-#: c-typeck.c:5778 c-typeck.c:5886
+#: c-typeck.c:5796 c-typeck.c:5904
msgid "field name not in record or union initializer"
msgstr ""
-#: c-typeck.c:5824
+#: c-typeck.c:5842
msgid "array index in initializer not of integer type"
msgstr ""
-#: c-typeck.c:5829 c-typeck.c:5831
+#: c-typeck.c:5847 c-typeck.c:5849
msgid "nonconstant array index in initializer"
msgstr ""
-#: c-typeck.c:5835 c-typeck.c:5838
+#: c-typeck.c:5853 c-typeck.c:5856
msgid "array index in initializer exceeds array bounds"
msgstr ""
-#: c-typeck.c:5849
+#: c-typeck.c:5867
msgid "empty index range in initializer"
msgstr ""
-#: c-typeck.c:5858
+#: c-typeck.c:5876
msgid "array index range in initializer exceeds array bounds"
msgstr ""
-#: c-typeck.c:5933 c-typeck.c:5956 c-typeck.c:6423
+#: c-typeck.c:5958 c-typeck.c:5984 c-typeck.c:6460
msgid "initialized field with side-effects overwritten"
msgstr ""
-#: c-typeck.c:5935 c-typeck.c:5958 c-typeck.c:6425
+#: c-typeck.c:5960 c-typeck.c:5986 c-typeck.c:6462
msgid "initialized field overwritten"
msgstr ""
-#: c-typeck.c:6633
+#: c-typeck.c:6676
msgid "excess elements in char array initializer"
msgstr ""
-#: c-typeck.c:6640 c-typeck.c:6687
+#: c-typeck.c:6683 c-typeck.c:6730
msgid "excess elements in struct initializer"
msgstr ""
-#: c-typeck.c:6702
+#: c-typeck.c:6745
msgid "non-static initialization of a flexible array member"
msgstr ""
-#: c-typeck.c:6771
+#: c-typeck.c:6814
msgid "excess elements in union initializer"
msgstr ""
-#: c-typeck.c:6859
+#: c-typeck.c:6902
msgid "excess elements in array initializer"
msgstr ""
-#: c-typeck.c:6890
+#: c-typeck.c:6933
msgid "excess elements in vector initializer"
msgstr ""
-#: c-typeck.c:6915
+#: c-typeck.c:6958
msgid "excess elements in scalar initializer"
msgstr ""
@@ -478,146 +478,146 @@ msgstr ""
msgid "mismatched arguments"
msgstr ""
-#: collect2.c:395 gcc.c:6987
+#: collect2.c:396 gcc.c:7008
#, c-format
msgid "internal gcc abort in %s, at %s:%d"
msgstr ""
-#: collect2.c:909
+#: collect2.c:910
#, c-format
msgid "no arguments"
msgstr ""
-#: collect2.c:1283 collect2.c:1431 collect2.c:1466
+#: collect2.c:1284 collect2.c:1432 collect2.c:1467
#, c-format
msgid "fopen %s"
msgstr ""
-#: collect2.c:1286 collect2.c:1436 collect2.c:1469
+#: collect2.c:1287 collect2.c:1437 collect2.c:1470
#, c-format
msgid "fclose %s"
msgstr ""
-#: collect2.c:1295
+#: collect2.c:1296
#, c-format
msgid "collect2 version %s"
msgstr ""
-#: collect2.c:1385
+#: collect2.c:1386
#, c-format
msgid "%d constructor(s) found\n"
msgstr ""
-#: collect2.c:1386
+#: collect2.c:1387
#, c-format
msgid "%d destructor(s) found\n"
msgstr ""
-#: collect2.c:1387
+#: collect2.c:1388
#, c-format
msgid "%d frame table(s) found\n"
msgstr ""
-#: collect2.c:1524
+#: collect2.c:1525
#, c-format
msgid "can't get program status"
msgstr ""
-#: collect2.c:1593
+#: collect2.c:1594
#, c-format
msgid "could not open response file %s"
msgstr ""
-#: collect2.c:1598
+#: collect2.c:1599
#, c-format
msgid "could not write to response file %s"
msgstr ""
-#: collect2.c:1603
+#: collect2.c:1604
#, c-format
msgid "could not close response file %s"
msgstr ""
-#: collect2.c:1621
+#: collect2.c:1622
#, c-format
msgid "[cannot find %s]"
msgstr ""
-#: collect2.c:1636
+#: collect2.c:1637
#, c-format
msgid "cannot find '%s'"
msgstr ""
-#: collect2.c:1640 collect2.c:2131 collect2.c:2286 gcc.c:2994
+#: collect2.c:1641 collect2.c:2132 collect2.c:2287 gcc.c:2994
#, c-format
msgid "pex_init failed"
msgstr ""
-#: collect2.c:1678
+#: collect2.c:1679
#, c-format
msgid "[Leaving %s]\n"
msgstr ""
-#: collect2.c:1899
+#: collect2.c:1900
#, c-format
msgid ""
"\n"
"write_c_file - output name is %s, prefix is %s\n"
msgstr ""
-#: collect2.c:2105
+#: collect2.c:2106
#, c-format
msgid "cannot find 'nm'"
msgstr ""
-#: collect2.c:2152
+#: collect2.c:2153
#, c-format
msgid "can't open nm output"
msgstr ""
-#: collect2.c:2196
+#: collect2.c:2197
#, c-format
msgid "init function found in object %s"
msgstr ""
-#: collect2.c:2204
+#: collect2.c:2205
#, c-format
msgid "fini function found in object %s"
msgstr ""
-#: collect2.c:2307
+#: collect2.c:2308
#, c-format
msgid "can't open ldd output"
msgstr ""
-#: collect2.c:2310
+#: collect2.c:2311
#, c-format
msgid ""
"\n"
"ldd output with constructors/destructors.\n"
msgstr ""
-#: collect2.c:2325
+#: collect2.c:2326
#, c-format
msgid "dynamic dependency %s not found"
msgstr ""
-#: collect2.c:2337
+#: collect2.c:2338
#, c-format
msgid "unable to open dynamic dependency '%s'"
msgstr ""
-#: collect2.c:2493
+#: collect2.c:2494
#, c-format
msgid "%s: not a COFF file"
msgstr ""
-#: collect2.c:2613
+#: collect2.c:2614
#, c-format
msgid "%s: cannot open as COFF file"
msgstr ""
-#: collect2.c:2671
+#: collect2.c:2672
#, c-format
msgid "library lib%s not found"
msgstr ""
@@ -708,14 +708,14 @@ msgstr ""
#. handle them.
#. We can't handle floating point constants;
#. PRINT_OPERAND must handle them.
-#: final.c:3481 vmsdbgout.c:487 config/i386/i386.c:9865
-#: config/pdp11/pdp11.c:1710
+#: final.c:3493 vmsdbgout.c:487 config/i386/i386.c:10157
+#: config/pdp11/pdp11.c:1677
#, c-format
msgid "floating constant misused"
msgstr ""
-#: final.c:3543 vmsdbgout.c:544 config/i386/i386.c:9952
-#: config/pdp11/pdp11.c:1757
+#: final.c:3555 vmsdbgout.c:544 config/i386/i386.c:10244
+#: config/pdp11/pdp11.c:1724
#, c-format
msgid "invalid expression as operand"
msgstr ""
@@ -789,7 +789,7 @@ msgstr ""
msgid "spec file has no spec for linking"
msgstr ""
-#: gcc.c:2615 gcc.c:4824
+#: gcc.c:2615 gcc.c:4842
#, c-format
msgid "%s\n"
msgstr ""
@@ -856,8 +856,8 @@ msgstr ""
#: gcc.c:3231
msgid ""
-" --help={target|optimizers|warnings|undocumented|params}[,{[^]joined|[^]"
-"separate}]\n"
+" --help={target|optimizers|warnings|params|[^]{joined|separate|"
+"undocumented}}[,...]\n"
msgstr ""
#: gcc.c:3232
@@ -870,174 +870,178 @@ msgid " (Use '-v --help' to display command line options of sub-processes)\n"
msgstr ""
#: gcc.c:3235
-msgid " -dumpspecs Display all of the built in spec strings\n"
+msgid " --version Display compiler version information\n"
msgstr ""
#: gcc.c:3236
-msgid " -dumpversion Display the version of the compiler\n"
+msgid " -dumpspecs Display all of the built in spec strings\n"
msgstr ""
#: gcc.c:3237
-msgid " -dumpmachine Display the compiler's target processor\n"
+msgid " -dumpversion Display the version of the compiler\n"
msgstr ""
#: gcc.c:3238
+msgid " -dumpmachine Display the compiler's target processor\n"
+msgstr ""
+
+#: gcc.c:3239
msgid ""
" -print-search-dirs Display the directories in the compiler's search "
"path\n"
msgstr ""
-#: gcc.c:3239
+#: gcc.c:3240
msgid ""
" -print-libgcc-file-name Display the name of the compiler's companion "
"library\n"
msgstr ""
-#: gcc.c:3240
+#: gcc.c:3241
msgid " -print-file-name=<lib> Display the full path to library <lib>\n"
msgstr ""
-#: gcc.c:3241
+#: gcc.c:3242
msgid ""
" -print-prog-name=<prog> Display the full path to compiler component "
"<prog>\n"
msgstr ""
-#: gcc.c:3242
+#: gcc.c:3243
msgid ""
" -print-multi-directory Display the root directory for versions of "
"libgcc\n"
msgstr ""
-#: gcc.c:3243
+#: gcc.c:3244
msgid ""
" -print-multi-lib Display the mapping between command line options "
"and\n"
" multiple library search directories\n"
msgstr ""
-#: gcc.c:3246
+#: gcc.c:3247
msgid " -print-multi-os-directory Display the relative path to OS libraries\n"
msgstr ""
-#: gcc.c:3247
+#: gcc.c:3248
msgid " -print-sysroot Display the target libraries directory\n"
msgstr ""
-#: gcc.c:3248
+#: gcc.c:3249
msgid ""
" -print-sysroot-headers-suffix Display the sysroot suffix used to find "
"headers\n"
msgstr ""
-#: gcc.c:3249
+#: gcc.c:3250
msgid ""
" -Wa,<options> Pass comma-separated <options> on to the "
"assembler\n"
msgstr ""
-#: gcc.c:3250
+#: gcc.c:3251
msgid ""
" -Wp,<options> Pass comma-separated <options> on to the "
"preprocessor\n"
msgstr ""
-#: gcc.c:3251
+#: gcc.c:3252
msgid ""
" -Wl,<options> Pass comma-separated <options> on to the linker\n"
msgstr ""
-#: gcc.c:3252
+#: gcc.c:3253
msgid " -Xassembler <arg> Pass <arg> on to the assembler\n"
msgstr ""
-#: gcc.c:3253
+#: gcc.c:3254
msgid " -Xpreprocessor <arg> Pass <arg> on to the preprocessor\n"
msgstr ""
-#: gcc.c:3254
+#: gcc.c:3255
msgid " -Xlinker <arg> Pass <arg> on to the linker\n"
msgstr ""
-#: gcc.c:3255
+#: gcc.c:3256
msgid ""
" -combine Pass multiple source files to compiler at once\n"
msgstr ""
-#: gcc.c:3256
+#: gcc.c:3257
msgid " -save-temps Do not delete intermediate files\n"
msgstr ""
-#: gcc.c:3257
+#: gcc.c:3258
msgid " -pipe Use pipes rather than intermediate files\n"
msgstr ""
-#: gcc.c:3258
+#: gcc.c:3259
msgid " -time Time the execution of each subprocess\n"
msgstr ""
-#: gcc.c:3259
+#: gcc.c:3260
msgid ""
" -specs=<file> Override built-in specs with the contents of "
"<file>\n"
msgstr ""
-#: gcc.c:3260
+#: gcc.c:3261
msgid ""
" -std=<standard> Assume that the input sources are for <standard>\n"
msgstr ""
-#: gcc.c:3261
+#: gcc.c:3262
msgid ""
" --sysroot=<directory> Use <directory> as the root directory for "
"headers\n"
" and libraries\n"
msgstr ""
-#: gcc.c:3264
+#: gcc.c:3265
msgid ""
" -B <directory> Add <directory> to the compiler's search paths\n"
msgstr ""
-#: gcc.c:3265
+#: gcc.c:3266
msgid " -b <machine> Run gcc for target <machine>, if installed\n"
msgstr ""
-#: gcc.c:3266
+#: gcc.c:3267
msgid ""
" -V <version> Run gcc version number <version>, if installed\n"
msgstr ""
-#: gcc.c:3267
+#: gcc.c:3268
msgid ""
" -v Display the programs invoked by the compiler\n"
msgstr ""
-#: gcc.c:3268
+#: gcc.c:3269
msgid ""
" -### Like -v but options quoted and commands not "
"executed\n"
msgstr ""
-#: gcc.c:3269
+#: gcc.c:3270
msgid ""
" -E Preprocess only; do not compile, assemble or "
"link\n"
msgstr ""
-#: gcc.c:3270
+#: gcc.c:3271
msgid " -S Compile only; do not assemble or link\n"
msgstr ""
-#: gcc.c:3271
+#: gcc.c:3272
msgid " -c Compile and assemble, but do not link\n"
msgstr ""
-#: gcc.c:3272
+#: gcc.c:3273
msgid " -o <file> Place the output into <file>\n"
msgstr ""
-#: gcc.c:3273
+#: gcc.c:3274
msgid ""
" -x <language> Specify the language of the following input "
"files\n"
@@ -1048,7 +1052,7 @@ msgid ""
"extension\n"
msgstr ""
-#: gcc.c:3280
+#: gcc.c:3281
#, c-format
msgid ""
"\n"
@@ -1057,27 +1061,32 @@ msgid ""
" other options on to these processes the -W<letter> options must be used.\n"
msgstr ""
-#: gcc.c:3403
+#: gcc.c:3411
#, c-format
msgid "'-%c' option must have argument"
msgstr ""
-#: gcc.c:3424
+#: gcc.c:3437
#, c-format
msgid "couldn't run '%s': %s"
msgstr ""
+#: gcc.c:3439
+#, c-format
+msgid "couldn't run '%s': %s: %s"
+msgstr ""
+
#. translate_options () has turned --version into -fversion.
-#: gcc.c:3625
+#: gcc.c:3643
#, c-format
msgid "%s %s%s\n"
msgstr ""
-#: gcc.c:3628 gcov.c:430 fortran/gfortranspec.c:383 java/jcf-dump.c:1170
+#: gcc.c:3646 gcov.c:430 fortran/gfortranspec.c:383 java/jcf-dump.c:1170
msgid "(C)"
msgstr ""
-#: gcc.c:3629 java/jcf-dump.c:1171
+#: gcc.c:3647 java/jcf-dump.c:1171
#, c-format
msgid ""
"This is free software; see the source for copying conditions. There is NO\n"
@@ -1085,212 +1094,212 @@ msgid ""
"\n"
msgstr ""
-#: gcc.c:3743
+#: gcc.c:3761
#, c-format
msgid "argument to '-Xlinker' is missing"
msgstr ""
-#: gcc.c:3751
+#: gcc.c:3769
#, c-format
msgid "argument to '-Xpreprocessor' is missing"
msgstr ""
-#: gcc.c:3758
+#: gcc.c:3776
#, c-format
msgid "argument to '-Xassembler' is missing"
msgstr ""
-#: gcc.c:3765
+#: gcc.c:3783
#, c-format
msgid "argument to '-l' is missing"
msgstr ""
-#: gcc.c:3786
+#: gcc.c:3804
#, c-format
msgid "argument to '-specs' is missing"
msgstr ""
-#: gcc.c:3800
+#: gcc.c:3818
#, c-format
msgid "argument to '-specs=' is missing"
msgstr ""
-#: gcc.c:3822
+#: gcc.c:3840
#, c-format
msgid "argument to '-wrapper' is missing"
msgstr ""
-#: gcc.c:3850
+#: gcc.c:3868
#, c-format
msgid "'-%c' must come at the start of the command line"
msgstr ""
-#: gcc.c:3859
+#: gcc.c:3877
#, c-format
msgid "argument to '-B' is missing"
msgstr ""
-#: gcc.c:4213
+#: gcc.c:4231
#, c-format
msgid "argument to '-x' is missing"
msgstr ""
-#: gcc.c:4241
+#: gcc.c:4259
#, c-format
msgid "argument to '-%s' is missing"
msgstr ""
-#: gcc.c:4614
+#: gcc.c:4632
#, c-format
msgid "switch '%s' does not start with '-'"
msgstr ""
-#: gcc.c:4758
+#: gcc.c:4776
#, c-format
msgid "spec '%s' invalid"
msgstr ""
-#: gcc.c:4897
+#: gcc.c:4915
#, c-format
msgid "spec '%s' has invalid '%%0%c'"
msgstr ""
-#: gcc.c:5126
+#: gcc.c:5144
#, c-format
msgid "could not open temporary response file %s"
msgstr ""
-#: gcc.c:5132
+#: gcc.c:5150
#, c-format
msgid "could not write to temporary response file %s"
msgstr ""
-#: gcc.c:5138
+#: gcc.c:5156
#, c-format
msgid "could not close temporary response file %s"
msgstr ""
-#: gcc.c:5172
+#: gcc.c:5190
#, c-format
msgid "spec '%s' has invalid '%%W%c"
msgstr ""
-#: gcc.c:5192
+#: gcc.c:5210
#, c-format
msgid "spec '%s' has invalid '%%x%c'"
msgstr ""
-#: gcc.c:5414
+#: gcc.c:5432
#, c-format
msgid "Processing spec %c%s%c, which is '%s'\n"
msgstr ""
-#: gcc.c:5538
+#: gcc.c:5556
#, c-format
msgid "unknown spec function '%s'"
msgstr ""
-#: gcc.c:5557
+#: gcc.c:5575
#, c-format
msgid "error in args to spec function '%s'"
msgstr ""
-#: gcc.c:5605
+#: gcc.c:5623
#, c-format
msgid "malformed spec function name"
msgstr ""
#. )
-#: gcc.c:5608
+#: gcc.c:5626
#, c-format
msgid "no arguments for spec function"
msgstr ""
-#: gcc.c:5627
+#: gcc.c:5645
#, c-format
msgid "malformed spec function arguments"
msgstr ""
-#: gcc.c:5873
+#: gcc.c:5891
#, c-format
msgid "braced spec '%s' is invalid at '%c'"
msgstr ""
-#: gcc.c:5961
+#: gcc.c:5979
#, c-format
msgid "braced spec body '%s' is invalid"
msgstr ""
-#: gcc.c:6499
+#: gcc.c:6517
#, c-format
msgid "install: %s%s\n"
msgstr ""
-#: gcc.c:6502
+#: gcc.c:6520
#, c-format
msgid "programs: %s\n"
msgstr ""
-#: gcc.c:6504
+#: gcc.c:6522
#, c-format
msgid "libraries: %s\n"
msgstr ""
#. The error status indicates that only one set of fixed
#. headers should be built.
-#: gcc.c:6570
+#: gcc.c:6588
#, c-format
msgid "not configured with sysroot headers suffix"
msgstr ""
-#: gcc.c:6579
+#: gcc.c:6597
#, c-format
msgid ""
"\n"
"For bug reporting instructions, please see:\n"
msgstr ""
-#: gcc.c:6595
+#: gcc.c:6616
#, c-format
msgid "Target: %s\n"
msgstr ""
-#: gcc.c:6596
+#: gcc.c:6617
#, c-format
msgid "Configured with: %s\n"
msgstr ""
-#: gcc.c:6610
+#: gcc.c:6631
#, c-format
msgid "Thread model: %s\n"
msgstr ""
-#: gcc.c:6621
+#: gcc.c:6642
#, c-format
msgid "gcc version %s %s\n"
msgstr ""
-#: gcc.c:6623
+#: gcc.c:6644
#, c-format
msgid "gcc driver version %s %sexecuting gcc version %s\n"
msgstr ""
-#: gcc.c:6631
+#: gcc.c:6652
#, c-format
msgid "no input files"
msgstr ""
-#: gcc.c:6680
+#: gcc.c:6701
#, c-format
msgid "cannot specify -o with -c or -S with multiple files"
msgstr ""
-#: gcc.c:6714
+#: gcc.c:6735
#, c-format
msgid "spec '%s' is invalid"
msgstr ""
-#: gcc.c:6850
+#: gcc.c:6871
#, c-format
msgid ""
"\n"
@@ -1299,59 +1308,59 @@ msgid ""
"\n"
msgstr ""
-#: gcc.c:6851
+#: gcc.c:6872
#, c-format
msgid ""
"Use \"-Wl,OPTION\" to pass \"OPTION\" to the linker.\n"
"\n"
msgstr ""
-#: gcc.c:7203
+#: gcc.c:7224
#, c-format
msgid "multilib spec '%s' is invalid"
msgstr ""
-#: gcc.c:7394
+#: gcc.c:7415
#, c-format
msgid "multilib exclusions '%s' is invalid"
msgstr ""
-#: gcc.c:7452 gcc.c:7593
+#: gcc.c:7473 gcc.c:7614
#, c-format
msgid "multilib select '%s' is invalid"
msgstr ""
-#: gcc.c:7631
+#: gcc.c:7652
#, c-format
msgid "multilib exclusion '%s' is invalid"
msgstr ""
-#: gcc.c:7837
+#: gcc.c:7858
#, c-format
msgid "environment variable \"%s\" not defined"
msgstr ""
-#: gcc.c:7928 gcc.c:7933
+#: gcc.c:7949 gcc.c:7954
#, c-format
msgid "invalid version number `%s'"
msgstr ""
-#: gcc.c:7976
+#: gcc.c:7997
#, c-format
msgid "too few arguments to %%:version-compare"
msgstr ""
-#: gcc.c:7982
+#: gcc.c:8003
#, c-format
msgid "too many arguments to %%:version-compare"
msgstr ""
-#: gcc.c:8023
+#: gcc.c:8044
#, c-format
msgid "unknown operator '%s' in %%:version-compare"
msgstr ""
-#: gcc.c:8057
+#: gcc.c:8078
#, c-format
msgid ""
"Assembler options\n"
@@ -1359,7 +1368,7 @@ msgid ""
"\n"
msgstr ""
-#: gcc.c:8058
+#: gcc.c:8079
#, c-format
msgid ""
"Use \"-Wa,OPTION\" to pass \"OPTION\" to the assembler.\n"
@@ -1700,12 +1709,12 @@ msgid "End of search list.\n"
msgstr ""
#. Opening quotation mark.
-#: intl.c:57
+#: intl.c:58
msgid "`"
msgstr ""
#. Closing quotation mark.
-#: intl.c:60
+#: intl.c:61
msgid "'"
msgstr ""
@@ -1782,19 +1791,19 @@ msgstr ""
msgid " inlined from %qs"
msgstr ""
-#: loop-iv.c:2806 tree-ssa-loop-niter.c:1845
+#: loop-iv.c:2823 tree-ssa-loop-niter.c:1871
msgid "assuming that the loop is not infinite"
msgstr ""
-#: loop-iv.c:2807 tree-ssa-loop-niter.c:1846
+#: loop-iv.c:2824 tree-ssa-loop-niter.c:1872
msgid "cannot optimize possibly infinite loops"
msgstr ""
-#: loop-iv.c:2815 tree-ssa-loop-niter.c:1850
+#: loop-iv.c:2832 tree-ssa-loop-niter.c:1876
msgid "assuming that the loop counter does not overflow"
msgstr ""
-#: loop-iv.c:2816 tree-ssa-loop-niter.c:1851
+#: loop-iv.c:2833 tree-ssa-loop-niter.c:1877
msgid "cannot optimize loop, the loop counter may overflow"
msgstr ""
@@ -1802,382 +1811,87 @@ msgstr ""
msgid "This switch lacks documentation"
msgstr ""
-#: opts.c:1288
+#: opts.c:1306
msgid "[enabled]"
msgstr ""
-#: opts.c:1288
+#: opts.c:1306
msgid "[disabled]"
msgstr ""
-#: opts.c:1303
+#: opts.c:1321
#, c-format
msgid " No options with the desired characteristics were found\n"
msgstr ""
-#: opts.c:1312
+#: opts.c:1330
#, c-format
msgid ""
" None found. Use --help=%s to show *all* the options supported by the %s "
"front-end\n"
msgstr ""
-#: opts.c:1318
+#: opts.c:1336
#, c-format
msgid ""
" All options with the desired characteristics have already been displayed\n"
msgstr ""
-#: opts.c:1372
+#: opts.c:1390
msgid "The following options are target specific"
msgstr ""
-#: opts.c:1375
+#: opts.c:1393
msgid "The following options control compiler warning messages"
msgstr ""
-#: opts.c:1378
+#: opts.c:1396
msgid "The following options control optimizations"
msgstr ""
-#: opts.c:1381 opts.c:1416
+#: opts.c:1399 opts.c:1438
msgid "The following options are language-independent"
msgstr ""
-#: opts.c:1384
+#: opts.c:1402
msgid "The --param option recognizes the following as parameters"
msgstr ""
-#: opts.c:1390
+#: opts.c:1408
msgid "The following options are specific to just the language "
msgstr ""
-#: opts.c:1392
+#: opts.c:1410
msgid "The following options are supported by the language "
msgstr ""
-#: opts.c:1403
+#: opts.c:1421
msgid "The following options are not documented"
msgstr ""
-#: opts.c:1414
-msgid "The following options are language-related"
-msgstr ""
-
-#: opts.c:1567
-#, c-format
-msgid "warning: --help argument %.*s is ambiguous, please be more specific\n"
-msgstr ""
-
-#: opts.c:1575
-#, c-format
-msgid "warning: unrecognized argument to --help= option: %.*s\n"
-msgstr ""
-
-#: protoize.c:583
-#, c-format
-msgid "%s: error writing file '%s': %s\n"
-msgstr ""
-
-#: protoize.c:627
-#, c-format
-msgid "%s: usage '%s [ -VqfnkN ] [ -i <istring> ] [ filename ... ]'\n"
-msgstr ""
-
-#: protoize.c:630
-#, c-format
-msgid "%s: usage '%s [ -VqfnkNlgC ] [ -B <dirname> ] [ filename ... ]'\n"
-msgstr ""
-
-#: protoize.c:731
-#, c-format
-msgid "%s: warning: no read access for file '%s'\n"
-msgstr ""
-
-#: protoize.c:739
-#, c-format
-msgid "%s: warning: no write access for file '%s'\n"
-msgstr ""
-
-#: protoize.c:747
-#, c-format
-msgid "%s: warning: no write access for dir containing '%s'\n"
-msgstr ""
-
-#. Catch cases like /.. where we try to backup to a
-#. point above the absolute root of the logical file
-#. system.
-#: protoize.c:1134
-#, c-format
-msgid "%s: invalid file name: %s\n"
-msgstr ""
-
-#: protoize.c:1282
-#, c-format
-msgid "%s: %s: can't get status: %s\n"
-msgstr ""
-
-#: protoize.c:1303
-#, c-format
-msgid ""
-"\n"
-"%s: fatal error: aux info file corrupted at line %d\n"
-msgstr ""
-
-#: protoize.c:1632
-#, c-format
-msgid "%s:%d: declaration of function '%s' takes different forms\n"
-msgstr ""
-
-#: protoize.c:1887
-#, c-format
-msgid "%s: compiling '%s'\n"
-msgstr ""
-
-#: protoize.c:1910
-#, c-format
-msgid "%s: wait: %s\n"
-msgstr ""
-
-#: protoize.c:1915
-#, c-format
-msgid "%s: subprocess got fatal signal %d\n"
-msgstr ""
-
-#: protoize.c:1923
-#, c-format
-msgid "%s: %s exited with status %d\n"
-msgstr ""
-
-#: protoize.c:1972
-#, c-format
-msgid "%s: warning: missing SYSCALLS file '%s'\n"
-msgstr ""
-
-#: protoize.c:1981 protoize.c:2010
-#, c-format
-msgid "%s: can't read aux info file '%s': %s\n"
-msgstr ""
-
-#: protoize.c:2026 protoize.c:2054
-#, c-format
-msgid "%s: can't get status of aux info file '%s': %s\n"
-msgstr ""
-
-#: protoize.c:2082
-#, c-format
-msgid "%s: can't open aux info file '%s' for reading: %s\n"
-msgstr ""
-
-#: protoize.c:2100
-#, c-format
-msgid "%s: error reading aux info file '%s': %s\n"
-msgstr ""
-
-#: protoize.c:2113
-#, c-format
-msgid "%s: error closing aux info file '%s': %s\n"
-msgstr ""
-
-#: protoize.c:2129
-#, c-format
-msgid "%s: can't delete aux info file '%s': %s\n"
-msgstr ""
-
-#: protoize.c:2211 protoize.c:4181
-#, c-format
-msgid "%s: can't delete file '%s': %s\n"
-msgstr ""
-
-#: protoize.c:2289
-#, c-format
-msgid "%s: warning: can't rename file '%s' to '%s': %s\n"
-msgstr ""
-
-#: protoize.c:2411
-#, c-format
-msgid "%s: conflicting extern definitions of '%s'\n"
-msgstr ""
-
-#: protoize.c:2415
-#, c-format
-msgid "%s: declarations of '%s' will not be converted\n"
-msgstr ""
-
-#: protoize.c:2417
-#, c-format
-msgid "%s: conflict list for '%s' follows:\n"
-msgstr ""
-
-#: protoize.c:2450
-#, c-format
-msgid "%s: warning: using formals list from %s(%d) for function '%s'\n"
-msgstr ""
-
-#: protoize.c:2490
-#, c-format
-msgid "%s: %d: '%s' used but missing from SYSCALLS\n"
-msgstr ""
-
-#: protoize.c:2496
-#, c-format
-msgid "%s: %d: warning: no extern definition for '%s'\n"
-msgstr ""
-
-#: protoize.c:2526
-#, c-format
-msgid "%s: warning: no static definition for '%s' in file '%s'\n"
-msgstr ""
-
-#: protoize.c:2532
-#, c-format
-msgid "%s: multiple static defs of '%s' in file '%s'\n"
-msgstr ""
-
-#: protoize.c:2702 protoize.c:2705
-#, c-format
-msgid "%s: %d: warning: source too confusing\n"
-msgstr ""
-
-#: protoize.c:2900
-#, c-format
-msgid "%s: %d: warning: varargs function declaration not converted\n"
-msgstr ""
-
-#: protoize.c:2915
-#, c-format
-msgid "%s: declaration of function '%s' not converted\n"
-msgstr ""
-
-#: protoize.c:3038
-#, c-format
-msgid "%s: warning: too many parameter lists in declaration of '%s'\n"
+#: opts.c:1423
+msgid "The following options take separate arguments"
msgstr ""
-#: protoize.c:3059
-#, c-format
-msgid ""
-"\n"
-"%s: warning: too few parameter lists in declaration of '%s'\n"
+#: opts.c:1425
+msgid "The following options take joined arguments"
msgstr ""
-#: protoize.c:3155
-#, c-format
-msgid "%s: %d: warning: found '%s' but expected '%s'\n"
-msgstr ""
-
-#: protoize.c:3330
-#, c-format
-msgid "%s: local declaration for function '%s' not inserted\n"
-msgstr ""
-
-#: protoize.c:3357
-#, c-format
-msgid ""
-"\n"
-"%s: %d: warning: can't add declaration of '%s' into macro call\n"
-msgstr ""
-
-#: protoize.c:3429
-#, c-format
-msgid "%s: global declarations for file '%s' not inserted\n"
-msgstr ""
-
-#: protoize.c:3519 protoize.c:3549
-#, c-format
-msgid "%s: definition of function '%s' not converted\n"
-msgstr ""
-
-#: protoize.c:3538
-#, c-format
-msgid "%s: %d: warning: definition of %s not converted\n"
-msgstr ""
-
-#: protoize.c:3864
-#, c-format
-msgid "%s: found definition of '%s' at %s(%d)\n"
-msgstr ""
-
-#. If we make it here, then we did not know about this
-#. function definition.
-#: protoize.c:3880
-#, c-format
-msgid "%s: %d: warning: '%s' excluded by preprocessing\n"
-msgstr ""
-
-#: protoize.c:3883
-#, c-format
-msgid "%s: function definition not converted\n"
-msgstr ""
-
-#: protoize.c:3941
-#, c-format
-msgid "%s: '%s' not converted\n"
-msgstr ""
-
-#: protoize.c:3949
-#, c-format
-msgid "%s: would convert file '%s'\n"
-msgstr ""
-
-#: protoize.c:3952
-#, c-format
-msgid "%s: converting file '%s'\n"
-msgstr ""
-
-#: protoize.c:3962
-#, c-format
-msgid "%s: can't get status for file '%s': %s\n"
-msgstr ""
-
-#: protoize.c:4004
-#, c-format
-msgid "%s: can't open file '%s' for reading: %s\n"
-msgstr ""
-
-#: protoize.c:4019
-#, c-format
-msgid ""
-"\n"
-"%s: error reading input file '%s': %s\n"
-msgstr ""
-
-#: protoize.c:4053
-#, c-format
-msgid "%s: can't create/open clean file '%s': %s\n"
-msgstr ""
-
-#: protoize.c:4158
-#, c-format
-msgid "%s: warning: file '%s' already saved in '%s'\n"
-msgstr ""
-
-#: protoize.c:4166
-#, c-format
-msgid "%s: can't link file '%s' to '%s': %s\n"
-msgstr ""
-
-#: protoize.c:4196
-#, c-format
-msgid "%s: can't create/open output file '%s': %s\n"
-msgstr ""
-
-#: protoize.c:4229
-#, c-format
-msgid "%s: can't change mode of file '%s': %s\n"
+#: opts.c:1436
+msgid "The following options are language-related"
msgstr ""
-#: protoize.c:4405
+#: opts.c:1596
#, c-format
-msgid "%s: cannot get working directory: %s\n"
+msgid "warning: --help argument %.*s is ambiguous, please be more specific\n"
msgstr ""
-#: protoize.c:4503
+#: opts.c:1604
#, c-format
-msgid "%s: input file names must have .c suffixes: %s\n"
+msgid "warning: unrecognized argument to --help= option: %.*s\n"
msgstr ""
-#: reload.c:3785
+#: reload.c:3781
msgid "unable to generate reloads for:"
msgstr ""
@@ -2186,16 +1900,16 @@ msgid "this is the insn:"
msgstr ""
#. It's the compiler's fault.
-#: reload1.c:5611
+#: reload1.c:5627
msgid "could not find a spill register"
msgstr ""
#. It's the compiler's fault.
-#: reload1.c:7564
+#: reload1.c:7582
msgid "VOIDmode on an output"
msgstr ""
-#: reload1.c:8319
+#: reload1.c:8337
msgid "Failure trying to reload:"
msgstr ""
@@ -2223,104 +1937,104 @@ msgstr ""
msgid "time in %s: %ld.%06ld (%ld%%)\n"
msgstr ""
-#: tlink.c:382
+#: tlink.c:383
#, c-format
msgid "collect: reading %s\n"
msgstr ""
-#: tlink.c:476
+#: tlink.c:477
#, c-format
msgid "removing .rpo file"
msgstr ""
-#: tlink.c:478
+#: tlink.c:479
#, c-format
msgid "renaming .rpo file"
msgstr ""
-#: tlink.c:532
+#: tlink.c:533
#, c-format
msgid "collect: recompiling %s\n"
msgstr ""
-#: tlink.c:739
+#: tlink.c:740
#, c-format
msgid "collect: tweaking %s in %s\n"
msgstr ""
-#: tlink.c:789
+#: tlink.c:790
#, c-format
msgid "collect: relinking\n"
msgstr ""
-#: toplev.c:595
+#: toplev.c:597
#, c-format
msgid "unrecoverable error"
msgstr ""
-#: toplev.c:1108
+#: toplev.c:1110
#, c-format
msgid ""
"%s%s%s %sversion %s (%s)\n"
"%s\tcompiled by GNU C version %s, "
msgstr ""
-#: toplev.c:1110
+#: toplev.c:1112
#, c-format
msgid "%s%s%s %sversion %s (%s) compiled by CC, "
msgstr ""
-#: toplev.c:1114
+#: toplev.c:1116
#, c-format
msgid "GMP version %s, MPFR version %s.\n"
msgstr ""
-#: toplev.c:1116
+#: toplev.c:1118
#, c-format
msgid "%s%swarning: %s header version %s differs from library version %s.\n"
msgstr ""
-#: toplev.c:1118
+#: toplev.c:1120
#, c-format
msgid ""
"%s%sGGC heuristics: --param ggc-min-expand=%d --param ggc-min-heapsize=%d\n"
msgstr ""
-#: toplev.c:1270
+#: toplev.c:1272
msgid "options passed: "
msgstr ""
-#: toplev.c:1304
+#: toplev.c:1306
msgid "options enabled: "
msgstr ""
-#: toplev.c:1439
+#: toplev.c:1441
#, c-format
msgid "created and used with differing settings of '%s'"
msgstr ""
-#: toplev.c:1441
+#: toplev.c:1443
msgid "out of memory"
msgstr ""
-#: toplev.c:1456
+#: toplev.c:1458
msgid "created and used with different settings of -fpic"
msgstr ""
-#: toplev.c:1458
+#: toplev.c:1460
msgid "created and used with different settings of -fpie"
msgstr ""
-#: tree-inline.c:3139
+#: tree-inline.c:3221
msgid "originally indirect function call not considered for inlining"
msgstr ""
-#: tree-vrp.c:6383
+#: tree-vrp.c:6509
msgid ""
"assuming signed overflow does not occur when simplifying && or || to & or |"
msgstr ""
-#: tree-vrp.c:6387
+#: tree-vrp.c:6513
msgid ""
"assuming signed overflow does not occur when simplifying ==, != or ! to "
"identity or ^"
@@ -2894,101 +2608,105 @@ msgstr ""
msgid "Maximum size of a SCC before SCCVN stops processing a function"
msgstr ""
-#: params.def:751
-msgid "Multiplier used for determining the double-queueing threshold"
+#: params.def:750
+msgid "max loops number for regional RA"
msgstr ""
-#: params.def:756
-msgid "max loops number for regional RA"
+#: params.def:755
+msgid "max size of conflict table in MB"
msgstr ""
-#: params.def:764
+#: params.def:763
msgid ""
"The maximum ratio between array size and switch branches for a switch "
"conversion to take place"
msgstr ""
-#: config/alpha/alpha.c:5025
+#: params.def:771
+msgid "max basic blocks number in loop for loop invariant motion"
+msgstr ""
+
+#: config/alpha/alpha.c:5039
#, c-format
msgid "invalid %%H value"
msgstr ""
-#: config/alpha/alpha.c:5046 config/bfin/bfin.c:1646
+#: config/alpha/alpha.c:5060 config/bfin/bfin.c:1646
#, c-format
msgid "invalid %%J value"
msgstr ""
-#: config/alpha/alpha.c:5076 config/ia64/ia64.c:4754
+#: config/alpha/alpha.c:5090 config/ia64/ia64.c:4759
#, c-format
msgid "invalid %%r value"
msgstr ""
-#: config/alpha/alpha.c:5086 config/ia64/ia64.c:4708
-#: config/rs6000/rs6000.c:12215 config/xtensa/xtensa.c:2238
+#: config/alpha/alpha.c:5100 config/ia64/ia64.c:4713
+#: config/rs6000/rs6000.c:12236 config/xtensa/xtensa.c:2238
#, c-format
msgid "invalid %%R value"
msgstr ""
-#: config/alpha/alpha.c:5092 config/rs6000/rs6000.c:12134
+#: config/alpha/alpha.c:5106 config/rs6000/rs6000.c:12155
#: config/xtensa/xtensa.c:2205
#, c-format
msgid "invalid %%N value"
msgstr ""
-#: config/alpha/alpha.c:5100 config/rs6000/rs6000.c:12162
+#: config/alpha/alpha.c:5114 config/rs6000/rs6000.c:12183
#, c-format
msgid "invalid %%P value"
msgstr ""
-#: config/alpha/alpha.c:5108
+#: config/alpha/alpha.c:5122
#, c-format
msgid "invalid %%h value"
msgstr ""
-#: config/alpha/alpha.c:5116 config/xtensa/xtensa.c:2231
+#: config/alpha/alpha.c:5130 config/xtensa/xtensa.c:2231
#, c-format
msgid "invalid %%L value"
msgstr ""
-#: config/alpha/alpha.c:5155 config/rs6000/rs6000.c:12116
+#: config/alpha/alpha.c:5169 config/rs6000/rs6000.c:12137
#, c-format
msgid "invalid %%m value"
msgstr ""
-#: config/alpha/alpha.c:5163 config/rs6000/rs6000.c:12124
+#: config/alpha/alpha.c:5177 config/rs6000/rs6000.c:12145
#, c-format
msgid "invalid %%M value"
msgstr ""
-#: config/alpha/alpha.c:5207
+#: config/alpha/alpha.c:5221
#, c-format
msgid "invalid %%U value"
msgstr ""
-#: config/alpha/alpha.c:5219 config/alpha/alpha.c:5233
-#: config/rs6000/rs6000.c:12223
+#: config/alpha/alpha.c:5233 config/alpha/alpha.c:5247
+#: config/rs6000/rs6000.c:12244
#, c-format
msgid "invalid %%s value"
msgstr ""
-#: config/alpha/alpha.c:5256
+#: config/alpha/alpha.c:5270
#, c-format
msgid "invalid %%C value"
msgstr ""
-#: config/alpha/alpha.c:5293 config/rs6000/rs6000.c:11951
-#: config/rs6000/rs6000.c:11970
+#: config/alpha/alpha.c:5307 config/rs6000/rs6000.c:11972
+#: config/rs6000/rs6000.c:11991
#, c-format
msgid "invalid %%E value"
msgstr ""
-#: config/alpha/alpha.c:5318 config/alpha/alpha.c:5366
+#: config/alpha/alpha.c:5332 config/alpha/alpha.c:5380
#, c-format
msgid "unknown relocation unspec"
msgstr ""
-#: config/alpha/alpha.c:5327 config/crx/crx.c:1081
-#: config/rs6000/rs6000.c:12554 config/spu/spu.c:1535
+#: config/alpha/alpha.c:5341 config/crx/crx.c:1081
+#: config/rs6000/rs6000.c:12575 config/spu/spu.c:1539
#, c-format
msgid "invalid %%xn code"
msgstr ""
@@ -3020,26 +2738,26 @@ msgstr ""
msgid "invalid operand output code"
msgstr ""
-#: config/arm/arm.c:12852 config/arm/arm.c:12870
+#: config/arm/arm.c:13300 config/arm/arm.c:13318
#, c-format
msgid "predicated Thumb instruction"
msgstr ""
-#: config/arm/arm.c:12858
+#: config/arm/arm.c:13306
#, c-format
msgid "predicated instruction in conditional sequence"
msgstr ""
-#: config/arm/arm.c:13028
+#: config/arm/arm.c:13476
#, c-format
msgid "invalid shift operand"
msgstr ""
-#: config/arm/arm.c:13075 config/arm/arm.c:13085 config/arm/arm.c:13095
-#: config/arm/arm.c:13105 config/arm/arm.c:13115 config/arm/arm.c:13154
-#: config/arm/arm.c:13172 config/arm/arm.c:13207 config/arm/arm.c:13226
-#: config/arm/arm.c:13241 config/arm/arm.c:13269 config/arm/arm.c:13276
-#: config/arm/arm.c:13284 config/arm/arm.c:13305 config/arm/arm.c:13312
+#: config/arm/arm.c:13523 config/arm/arm.c:13533 config/arm/arm.c:13543
+#: config/arm/arm.c:13553 config/arm/arm.c:13563 config/arm/arm.c:13602
+#: config/arm/arm.c:13620 config/arm/arm.c:13655 config/arm/arm.c:13674
+#: config/arm/arm.c:13689 config/arm/arm.c:13717 config/arm/arm.c:13724
+#: config/arm/arm.c:13732 config/arm/arm.c:13753 config/arm/arm.c:13760
#: config/bfin/bfin.c:1659 config/bfin/bfin.c:1666 config/bfin/bfin.c:1673
#: config/bfin/bfin.c:1680 config/bfin/bfin.c:1689 config/bfin/bfin.c:1696
#: config/bfin/bfin.c:1703 config/bfin/bfin.c:1710
@@ -3047,57 +2765,57 @@ msgstr ""
msgid "invalid operand for code '%c'"
msgstr ""
-#: config/arm/arm.c:13167
+#: config/arm/arm.c:13615
#, c-format
msgid "instruction never executed"
msgstr ""
-#: config/arm/arm.c:13379
+#: config/arm/arm.c:13827
#, c-format
msgid "missing operand"
msgstr ""
-#: config/avr/avr.c:1186
+#: config/avr/avr.c:1196
#, c-format
msgid "address operand requires constraint for X, Y, or Z register"
msgstr ""
-#: config/avr/avr.c:1298
+#: config/avr/avr.c:1308
msgid "bad address, not (reg+disp):"
msgstr ""
-#: config/avr/avr.c:1305
+#: config/avr/avr.c:1315
msgid "bad address, not post_inc or pre_dec:"
msgstr ""
-#: config/avr/avr.c:1316
+#: config/avr/avr.c:1326
msgid "internal compiler error. Bad address:"
msgstr ""
-#: config/avr/avr.c:1329
+#: config/avr/avr.c:1339
msgid "internal compiler error. Unknown mode:"
msgstr ""
-#: config/avr/avr.c:1924 config/avr/avr.c:2612
+#: config/avr/avr.c:1934 config/avr/avr.c:2622
msgid "invalid insn:"
msgstr ""
-#: config/avr/avr.c:1963 config/avr/avr.c:2049 config/avr/avr.c:2098
-#: config/avr/avr.c:2126 config/avr/avr.c:2221 config/avr/avr.c:2390
-#: config/avr/avr.c:2651 config/avr/avr.c:2763
+#: config/avr/avr.c:1973 config/avr/avr.c:2059 config/avr/avr.c:2108
+#: config/avr/avr.c:2136 config/avr/avr.c:2231 config/avr/avr.c:2400
+#: config/avr/avr.c:2661 config/avr/avr.c:2773
msgid "incorrect insn:"
msgstr ""
-#: config/avr/avr.c:2145 config/avr/avr.c:2306 config/avr/avr.c:2461
-#: config/avr/avr.c:2829
+#: config/avr/avr.c:2155 config/avr/avr.c:2316 config/avr/avr.c:2471
+#: config/avr/avr.c:2839
msgid "unknown move insn:"
msgstr ""
-#: config/avr/avr.c:3059
+#: config/avr/avr.c:3069
msgid "bad shift insn:"
msgstr ""
-#: config/avr/avr.c:3175 config/avr/avr.c:3595 config/avr/avr.c:3953
+#: config/avr/avr.c:3185 config/avr/avr.c:3605 config/avr/avr.c:3963
msgid "internal compiler error. Incorrect shift:"
msgstr ""
@@ -3111,9 +2829,9 @@ msgstr ""
msgid "invalid const_double operand"
msgstr ""
-#: config/cris/cris.c:504 c-typeck.c:4682 c-typeck.c:4698 c-typeck.c:4715
-#: final.c:3000 final.c:3002 gcc.c:4810 loop-iv.c:2808 loop-iv.c:2817
-#: rtl-error.c:105 toplev.c:599 tree-ssa-loop-niter.c:1856 cp/typeck.c:4657
+#: config/cris/cris.c:504 c-typeck.c:4700 c-typeck.c:4716 c-typeck.c:4733
+#: final.c:3000 final.c:3002 gcc.c:4828 loop-iv.c:2825 loop-iv.c:2834
+#: rtl-error.c:105 toplev.c:601 tree-ssa-loop-niter.c:1882 cp/typeck.c:4720
#: java/expr.c:411
#, gcc-internal-format
msgid "%s"
@@ -3348,28 +3066,51 @@ msgstr ""
msgid " (frv)"
msgstr ""
-#: config/i386/i386.c:9946
+#: config/i386/i386.c:10238
#, c-format
msgid "invalid UNSPEC as operand"
msgstr ""
-#: config/i386/i386.c:10747
+#: config/i386/i386.c:10963 config/i386/i386.c:11002 config/i386/i386.c:11176
+#, c-format
+msgid "operand is not a condition code, invalid operand code 'D'"
+msgstr ""
+
+#: config/i386/i386.c:11027
+#, c-format
+msgid ""
+"operand is neither a constant nor a condition code, invalid operand code 'C'"
+msgstr ""
+
+#: config/i386/i386.c:11037
+#, c-format
+msgid ""
+"operand is neither a constant nor a condition code, invalid operand code 'F'"
+msgstr ""
+
+#: config/i386/i386.c:11055
#, c-format
msgid ""
"operand is neither a constant nor a condition code, invalid operand code 'c'"
msgstr ""
-#: config/i386/i386.c:10872
+#: config/i386/i386.c:11065
+#, c-format
+msgid ""
+"operand is neither a constant nor a condition code, invalid operand code 'f'"
+msgstr ""
+
+#: config/i386/i386.c:11190
#, c-format
msgid "invalid operand code '%c'"
msgstr ""
-#: config/i386/i386.c:10921
+#: config/i386/i386.c:11239
#, c-format
msgid "invalid constraints for operand"
msgstr ""
-#: config/i386/i386.c:18332
+#: config/i386/i386.c:18927
msgid "unknown insn mode"
msgstr ""
@@ -3390,34 +3131,34 @@ msgstr ""
msgid "environment variable DJGPP points to corrupt file '%s'"
msgstr ""
-#: config/ia64/ia64.c:4806
+#: config/ia64/ia64.c:4811
#, c-format
msgid "ia64_print_operand: unknown code"
msgstr ""
-#: config/ia64/ia64.c:10410
+#: config/ia64/ia64.c:10473
msgid "invalid conversion from %<__fpreg%>"
msgstr ""
-#: config/ia64/ia64.c:10413
+#: config/ia64/ia64.c:10476
msgid "invalid conversion to %<__fpreg%>"
msgstr ""
-#: config/ia64/ia64.c:10426 config/ia64/ia64.c:10437
+#: config/ia64/ia64.c:10489 config/ia64/ia64.c:10500
msgid "invalid operation on %<__fpreg%>"
msgstr ""
-#: config/iq2000/iq2000.c:3121
+#: config/iq2000/iq2000.c:3122
#, c-format
msgid "invalid %%P operand"
msgstr ""
-#: config/iq2000/iq2000.c:3129 config/rs6000/rs6000.c:12152
+#: config/iq2000/iq2000.c:3130 config/rs6000/rs6000.c:12173
#, c-format
msgid "invalid %%p value"
msgstr ""
-#: config/iq2000/iq2000.c:3185
+#: config/iq2000/iq2000.c:3186
#, c-format
msgid "invalid use of %%d, %%x, or %%X"
msgstr ""
@@ -3459,7 +3200,7 @@ msgid "post-increment address is not a register"
msgstr ""
#: config/m32r/m32r.c:2031 config/m32r/m32r.c:2045
-#: config/rs6000/rs6000.c:20951
+#: config/rs6000/rs6000.c:20952
msgid "bad address"
msgstr ""
@@ -3505,18 +3246,18 @@ msgstr ""
msgid "invalid Z register replacement for insn"
msgstr ""
-#: config/mips/mips.c:7065 config/mips/mips.c:7086 config/mips/mips.c:7198
+#: config/mips/mips.c:7068 config/mips/mips.c:7089 config/mips/mips.c:7201
#, c-format
msgid "'%%%c' is not a valid operand prefix"
msgstr ""
-#: config/mips/mips.c:7135 config/mips/mips.c:7142 config/mips/mips.c:7149
-#: config/mips/mips.c:7156 config/mips/mips.c:7216
+#: config/mips/mips.c:7138 config/mips/mips.c:7145 config/mips/mips.c:7152
+#: config/mips/mips.c:7159 config/mips/mips.c:7219
#, c-format
msgid "invalid use of '%%%c'"
msgstr ""
-#: config/mips/mips.c:7464
+#: config/mips/mips.c:7467
msgid "mips_debugger_offset called with non stack/frame/arg pointer"
msgstr ""
@@ -3561,19 +3302,19 @@ msgstr ""
msgid "MMIX Internal: This is not a constant:"
msgstr ""
-#: config/picochip/picochip.c:2398
+#: config/picochip/picochip.c:2406
msgid "picochip_print_memory_address - Operand isn't memory based"
msgstr ""
-#: config/picochip/picochip.c:2657
+#: config/picochip/picochip.c:2665
msgid "Unknown mode in print_operand (CONST_DOUBLE) :"
msgstr ""
-#: config/picochip/picochip.c:2703 config/picochip/picochip.c:2735
+#: config/picochip/picochip.c:2711 config/picochip/picochip.c:2743
msgid "Bad address, not (reg+disp):"
msgstr ""
-#: config/picochip/picochip.c:2749
+#: config/picochip/picochip.c:2757
msgid "Bad address, not register:"
msgstr ""
@@ -3587,77 +3328,77 @@ msgstr ""
msgid "Try running '%s' in the shell to raise its limit.\n"
msgstr ""
-#: config/rs6000/rs6000.c:11979
+#: config/rs6000/rs6000.c:12000
#, c-format
msgid "invalid %%f value"
msgstr ""
-#: config/rs6000/rs6000.c:11988
+#: config/rs6000/rs6000.c:12009
#, c-format
msgid "invalid %%F value"
msgstr ""
-#: config/rs6000/rs6000.c:11997
+#: config/rs6000/rs6000.c:12018
#, c-format
msgid "invalid %%G value"
msgstr ""
-#: config/rs6000/rs6000.c:12032
+#: config/rs6000/rs6000.c:12053
#, c-format
msgid "invalid %%j code"
msgstr ""
-#: config/rs6000/rs6000.c:12042
+#: config/rs6000/rs6000.c:12063
#, c-format
msgid "invalid %%J code"
msgstr ""
-#: config/rs6000/rs6000.c:12052
+#: config/rs6000/rs6000.c:12073
#, c-format
msgid "invalid %%k value"
msgstr ""
-#: config/rs6000/rs6000.c:12072 config/xtensa/xtensa.c:2224
+#: config/rs6000/rs6000.c:12093 config/xtensa/xtensa.c:2224
#, c-format
msgid "invalid %%K value"
msgstr ""
-#: config/rs6000/rs6000.c:12142
+#: config/rs6000/rs6000.c:12163
#, c-format
msgid "invalid %%O value"
msgstr ""
-#: config/rs6000/rs6000.c:12189
+#: config/rs6000/rs6000.c:12210
#, c-format
msgid "invalid %%q value"
msgstr ""
-#: config/rs6000/rs6000.c:12233
+#: config/rs6000/rs6000.c:12254
#, c-format
msgid "invalid %%S value"
msgstr ""
-#: config/rs6000/rs6000.c:12273
+#: config/rs6000/rs6000.c:12294
#, c-format
msgid "invalid %%T value"
msgstr ""
-#: config/rs6000/rs6000.c:12283
+#: config/rs6000/rs6000.c:12304
#, c-format
msgid "invalid %%u value"
msgstr ""
-#: config/rs6000/rs6000.c:12292 config/xtensa/xtensa.c:2194
+#: config/rs6000/rs6000.c:12313 config/xtensa/xtensa.c:2194
#, c-format
msgid "invalid %%v value"
msgstr ""
-#: config/rs6000/rs6000.c:12513
+#: config/rs6000/rs6000.c:12534
#, c-format
msgid "invalid %%y value, try using the 'Z' constraint"
msgstr ""
-#: config/rs6000/rs6000.c:22816
+#: config/rs6000/rs6000.c:22817
msgid "AltiVec argument passed to unprototyped function"
msgstr ""
@@ -3686,15 +3427,15 @@ msgstr ""
msgid "invalid operand to %%S"
msgstr ""
-#: config/sh/sh.c:8379
+#: config/sh/sh.c:8381
msgid "created and used with different architectures / ABIs"
msgstr ""
-#: config/sh/sh.c:8381
+#: config/sh/sh.c:8383
msgid "created and used with different ABIs"
msgstr ""
-#: config/sh/sh.c:8383
+#: config/sh/sh.c:8385
msgid "created and used with different endianness"
msgstr ""
@@ -3743,22 +3484,22 @@ msgstr ""
msgid "floating point constant not a valid immediate operand"
msgstr ""
-#: config/stormy16/stormy16.c:1750 config/stormy16/stormy16.c:1821
+#: config/stormy16/stormy16.c:1746 config/stormy16/stormy16.c:1817
#, c-format
msgid "'B' operand is not constant"
msgstr ""
-#: config/stormy16/stormy16.c:1777
+#: config/stormy16/stormy16.c:1773
#, c-format
msgid "'B' operand has multiple bits set"
msgstr ""
-#: config/stormy16/stormy16.c:1803
+#: config/stormy16/stormy16.c:1799
#, c-format
msgid "'o' operand is not constant"
msgstr ""
-#: config/stormy16/stormy16.c:1835
+#: config/stormy16/stormy16.c:1831
#, c-format
msgid "xstormy16_print_operand: unknown code"
msgstr ""
@@ -3812,23 +3553,23 @@ msgstr ""
msgid "address offset not a constant"
msgstr ""
-#: cp/call.c:2602
+#: cp/call.c:2604
msgid "candidates are:"
msgstr ""
-#: cp/call.c:6779
+#: cp/call.c:6824
msgid "candidate 1:"
msgstr ""
-#: cp/call.c:6780
+#: cp/call.c:6825
msgid "candidate 2:"
msgstr ""
-#: cp/decl2.c:671
+#: cp/decl2.c:676
msgid "candidates are: %+#D"
msgstr ""
-#: cp/decl2.c:673
+#: cp/decl2.c:678
msgid "candidate is: %+#D"
msgstr ""
@@ -3870,59 +3611,59 @@ msgstr ""
msgid "Integer outside symmetric range implied by Standard Fortran at %L"
msgstr ""
-#: fortran/arith.c:1481
+#: fortran/arith.c:1482
msgid "elemental binary operation"
msgstr ""
-#: fortran/arith.c:2059
+#: fortran/arith.c:2060
#, no-c-format
msgid "Arithmetic OK converting %s to %s at %L"
msgstr ""
-#: fortran/arith.c:2063
+#: fortran/arith.c:2064
#, no-c-format
msgid ""
"Arithmetic overflow converting %s to %s at %L. This check can be disabled "
"with the option -fno-range-check"
msgstr ""
-#: fortran/arith.c:2068
+#: fortran/arith.c:2069
#, no-c-format
msgid ""
"Arithmetic underflow converting %s to %s at %L. This check can be disabled "
"with the option -fno-range-check"
msgstr ""
-#: fortran/arith.c:2073
+#: fortran/arith.c:2074
#, no-c-format
msgid ""
"Arithmetic NaN converting %s to %s at %L. This check can be disabled with "
"the option -fno-range-check"
msgstr ""
-#: fortran/arith.c:2078
+#: fortran/arith.c:2079
#, no-c-format
msgid "Division by zero converting %s to %s at %L"
msgstr ""
-#: fortran/arith.c:2082
+#: fortran/arith.c:2083
#, no-c-format
msgid "Array operands are incommensurate converting %s to %s at %L"
msgstr ""
-#: fortran/arith.c:2086
+#: fortran/arith.c:2087
#, no-c-format
msgid ""
"Integer outside symmetric range implied by Standard Fortran converting %s to "
"%s at %L"
msgstr ""
-#: fortran/arith.c:2419
+#: fortran/arith.c:2420
#, no-c-format
msgid "The Hollerith constant at %L is too long to convert to %s"
msgstr ""
-#: fortran/arith.c:2578
+#: fortran/arith.c:2579
#, no-c-format
msgid "Enumerator exceeds the C integer type at %C"
msgstr ""
@@ -4052,7 +3793,7 @@ msgstr ""
msgid "'%s' argument of '%s' intrinsic at %L must be a numeric type"
msgstr ""
-#: fortran/check.c:101 fortran/check.c:825 fortran/check.c:835
+#: fortran/check.c:101 fortran/check.c:830 fortran/check.c:840
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be INTEGER or REAL"
msgstr ""
@@ -4118,145 +3859,145 @@ msgstr ""
msgid "'%s' argument of '%s' intrinsic at %L must be a variable"
msgstr ""
-#: fortran/check.c:356
+#: fortran/check.c:361
#, no-c-format
msgid "'dim' argument of '%s' intrinsic at %L is not a valid dimension index"
msgstr ""
-#: fortran/check.c:426
+#: fortran/check.c:431
#, no-c-format
-msgid "Unequal character lengths (%ld and %ld) in %s intrinsic at %L"
+msgid "Unequal character lengths (%ld/%ld) in %s at %L"
msgstr ""
-#: fortran/check.c:532 fortran/check.c:2025 fortran/check.c:2040
+#: fortran/check.c:537 fortran/check.c:2039 fortran/check.c:2054
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be ALLOCATABLE"
msgstr ""
-#: fortran/check.c:556 fortran/check.c:3885
+#: fortran/check.c:561 fortran/check.c:3908
#, no-c-format
msgid "'%s' and '%s' arguments of '%s' intrinsic at %L must have the same type"
msgstr ""
-#: fortran/check.c:565 fortran/check.c:1197 fortran/check.c:1340
-#: fortran/check.c:1414 fortran/check.c:1703
+#: fortran/check.c:570 fortran/check.c:1202 fortran/check.c:1345
+#: fortran/check.c:1419 fortran/check.c:1708
#, no-c-format
msgid "Extension: Different type kinds at %L"
msgstr ""
-#: fortran/check.c:605 fortran/check.c:2109
+#: fortran/check.c:610 fortran/check.c:2123
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be a POINTER"
msgstr ""
-#: fortran/check.c:625
+#: fortran/check.c:630
#, no-c-format
msgid ""
"'%s' argument of '%s' intrinsic at %L must be a pointer or target VARIABLE "
"or FUNCTION"
msgstr ""
-#: fortran/check.c:633
+#: fortran/check.c:638
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be a POINTER or a TARGET"
msgstr ""
-#: fortran/check.c:649
+#: fortran/check.c:654
#, no-c-format
msgid ""
"Array section with a vector subscript at %L shall not be the target of a "
"pointer"
msgstr ""
-#: fortran/check.c:660
+#: fortran/check.c:665
#, no-c-format
msgid ""
"NULL pointer at %L is not permitted as actual argument of '%s' intrinsic "
"function"
msgstr ""
-#: fortran/check.c:806 fortran/check.c:930
+#: fortran/check.c:811 fortran/check.c:935
#, no-c-format
msgid ""
"'%s' argument of '%s' intrinsic at %L must not be present if 'x' is COMPLEX"
msgstr ""
-#: fortran/check.c:856 fortran/check.c:1259 fortran/check.c:1362
-#: fortran/check.c:1521 fortran/check.c:1538 fortran/check.c:2413
-#: fortran/check.c:2555 fortran/check.c:2898 fortran/check.c:2959
+#: fortran/check.c:861 fortran/check.c:1264 fortran/check.c:1367
+#: fortran/check.c:1526 fortran/check.c:1543 fortran/check.c:2427
+#: fortran/check.c:2569 fortran/check.c:2912 fortran/check.c:2973
#, no-c-format
msgid "Fortran 2003: '%s' intrinsic with KIND argument at %L"
msgstr ""
-#: fortran/check.c:881
+#: fortran/check.c:886
#, no-c-format
msgid "SHIFT argument at %L of CSHIFT must have rank %d or be a scalar"
msgstr ""
-#: fortran/check.c:979 fortran/check.c:1799 fortran/check.c:1807
+#: fortran/check.c:984 fortran/check.c:1804 fortran/check.c:1812
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be numeric or LOGICAL"
msgstr ""
-#: fortran/check.c:993
+#: fortran/check.c:998
#, no-c-format
msgid ""
"Different shape for arguments '%s' and '%s' at %L for intrinsic 'dot_product'"
msgstr ""
-#: fortran/check.c:1012 fortran/check.c:1020
+#: fortran/check.c:1017 fortran/check.c:1025
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be default real"
msgstr ""
-#: fortran/check.c:1047
+#: fortran/check.c:1052
#, no-c-format
msgid "SHIFT argument at %L of EOSHIFT must have rank %d or be a scalar"
msgstr ""
-#: fortran/check.c:1067
+#: fortran/check.c:1072
#, no-c-format
msgid "BOUNDARY argument at %L of EOSHIFT must have rank %d or be a scalar"
msgstr ""
-#: fortran/check.c:1078
+#: fortran/check.c:1083
#, no-c-format
msgid ""
"Different shape in dimension %d for SHIFT and BOUNDARY arguments of EOSHIFT "
"at %L"
msgstr ""
-#: fortran/check.c:1310
+#: fortran/check.c:1315
#, no-c-format
msgid "Argument of %s at %L must be of length one"
msgstr ""
-#: fortran/check.c:1369
+#: fortran/check.c:1374
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be the same kind as '%s'"
msgstr ""
-#: fortran/check.c:1494
+#: fortran/check.c:1499
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be a non-derived type"
msgstr ""
-#: fortran/check.c:1676
+#: fortran/check.c:1681
#, no-c-format
msgid "Intrinsic '%s' at %L must have at least two arguments"
msgstr ""
-#: fortran/check.c:1709
+#: fortran/check.c:1714
#, no-c-format
msgid "'a%d' argument of '%s' intrinsic at %L must be %s(%d)"
msgstr ""
-#: fortran/check.c:1742
+#: fortran/check.c:1747
#, no-c-format
msgid "Fortran 2003: '%s' intrinsic with CHARACTER argument at %L"
msgstr ""
-#: fortran/check.c:1749
+#: fortran/check.c:1754
#, no-c-format
msgid ""
"'a1' argument of '%s' intrinsic at %L must be INTEGER, REAL or CHARACTER"
@@ -4264,149 +4005,154 @@ msgstr ""
#: fortran/check.c:1821
#, no-c-format
+msgid "Argument types of '%s' intrinsic at %L must match (%s/%s)"
+msgstr ""
+
+#: fortran/check.c:1835
+#, no-c-format
msgid ""
"Different shape on dimension 1 for arguments '%s' and '%s' at %L for "
"intrinsic matmul"
msgstr ""
-#: fortran/check.c:1840
+#: fortran/check.c:1854
#, no-c-format
msgid ""
"Different shape on dimension 2 for argument '%s' and dimension 1 for "
"argument '%s' at %L for intrinsic matmul"
msgstr ""
-#: fortran/check.c:1849
+#: fortran/check.c:1863
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be of rank 1 or 2"
msgstr ""
-#: fortran/check.c:2051
+#: fortran/check.c:2065
#, no-c-format
msgid ""
"the '%s' and '%s' arguments of '%s' intrinsic at %L must have the same rank %"
"d/%d"
msgstr ""
-#: fortran/check.c:2060
+#: fortran/check.c:2074
#, no-c-format
msgid ""
"the '%s' and '%s' arguments of '%s' intrinsic at %L must be of the same kind "
"%d/%d"
msgstr ""
-#: fortran/check.c:2156
+#: fortran/check.c:2170
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be of type REAL or COMPLEX"
msgstr ""
-#: fortran/check.c:2177
+#: fortran/check.c:2191
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be of a dummy variable"
msgstr ""
-#: fortran/check.c:2185
+#: fortran/check.c:2199
#, no-c-format
msgid ""
"'%s' argument of '%s' intrinsic at %L must be of an OPTIONAL dummy variable"
msgstr ""
-#: fortran/check.c:2201
+#: fortran/check.c:2215
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must not be a subobject of '%s'"
msgstr ""
-#: fortran/check.c:2326
+#: fortran/check.c:2340
#, no-c-format
msgid ""
"'shape' argument of 'reshape' intrinsic at %L must be an array of constant "
"size"
msgstr ""
-#: fortran/check.c:2336
+#: fortran/check.c:2350
#, no-c-format
msgid "'shape' argument of 'reshape' intrinsic at %L has more than %d elements"
msgstr ""
-#: fortran/check.c:2374
+#: fortran/check.c:2388
#, no-c-format
msgid ""
"Without padding, there are not enough elements in the intrinsic RESHAPE "
"source at %L to match the shape"
msgstr ""
-#: fortran/check.c:2475
+#: fortran/check.c:2489
#, no-c-format
msgid "Missing arguments to %s intrinsic at %L"
msgstr ""
-#: fortran/check.c:2516
+#: fortran/check.c:2530
#, no-c-format
msgid ""
"'source' argument of 'shape' intrinsic at %L must not be an assumed size "
"array"
msgstr ""
-#: fortran/check.c:2590
+#: fortran/check.c:2604
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be less than rank %d"
msgstr ""
-#: fortran/check.c:2850
+#: fortran/check.c:2864
#, no-c-format
msgid "'MOLD' argument of 'TRANSFER' intrinsic at %L must not be %s"
msgstr ""
-#: fortran/check.c:2924
+#: fortran/check.c:2938
#, no-c-format
msgid ""
"FIELD argument at %L of UNPACK must have the same rank as MASK or be a scalar"
msgstr ""
-#: fortran/check.c:2935
+#: fortran/check.c:2949
#, no-c-format
msgid ""
"Different shape in dimension %d for MASK and FIELD arguments of UNPACK at %L"
msgstr ""
-#: fortran/check.c:3175
+#: fortran/check.c:3190 fortran/check.c:3222
#, no-c-format
-msgid "Array PUT of intrinsic %s is too small (%i/%i) at %L"
+msgid "Size of '%s' argument of '%s' intrinsic at %L too small (%i/%i)"
msgstr ""
-#: fortran/check.c:3207
+#: fortran/check.c:3230
#, no-c-format
msgid "Too many arguments to %s at %L"
msgstr ""
-#: fortran/check.c:3319 fortran/check.c:3796 fortran/check.c:3820
+#: fortran/check.c:3342 fortran/check.c:3819 fortran/check.c:3843
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be INTEGER or PROCEDURE"
msgstr ""
-#: fortran/check.c:3502
+#: fortran/check.c:3525
#, no-c-format
msgid ""
"'%s' argument of '%s' intrinsic at %L must be of a kind not wider than the "
"default kind (%d)"
msgstr ""
-#: fortran/check.c:3869 fortran/check.c:3877
+#: fortran/check.c:3892 fortran/check.c:3900
#, no-c-format
msgid "'%s' argument of '%s' intrinsic at %L must be INTEGER or LOGICAL"
msgstr ""
-#: fortran/cpp.c:374 c-opts.c:891
+#: fortran/cpp.c:378 c-opts.c:891
#, gcc-internal-format
msgid "output filename specified twice"
msgstr ""
-#: fortran/cpp.c:432
+#: fortran/cpp.c:436
#, no-c-format
msgid "To enable preprocessing, use -cpp"
msgstr ""
-#: fortran/cpp.c:521 fortran/cpp.c:531
+#: fortran/cpp.c:525 fortran/cpp.c:535
#, no-c-format
msgid "opening output file %s: %s"
msgstr ""
@@ -4642,7 +4388,7 @@ msgstr ""
msgid "NULL() initialization at %C is ambiguous"
msgstr ""
-#: fortran/decl.c:1646 fortran/decl.c:5534
+#: fortran/decl.c:1646 fortran/decl.c:5523
#, no-c-format
msgid "Duplicate array spec for Cray pointee at %C"
msgstr ""
@@ -4662,17 +4408,17 @@ msgstr ""
msgid "Extension: Old-style initialization at %C"
msgstr ""
-#: fortran/decl.c:1753 fortran/decl.c:4237
+#: fortran/decl.c:1753 fortran/decl.c:4226
#, no-c-format
msgid "Initialization at %C isn't for a pointer variable"
msgstr ""
-#: fortran/decl.c:1761 fortran/decl.c:4245
+#: fortran/decl.c:1761 fortran/decl.c:4234
#, no-c-format
msgid "Pointer initialization requires a NULL() at %C"
msgstr ""
-#: fortran/decl.c:1767 fortran/decl.c:4251
+#: fortran/decl.c:1767 fortran/decl.c:4240
#, no-c-format
msgid "Initialization of pointer at %C is not allowed in a PURE procedure"
msgstr ""
@@ -4682,7 +4428,7 @@ msgstr ""
msgid "Pointer initialization at %C requires '=>', not '='"
msgstr ""
-#: fortran/decl.c:1789 fortran/decl.c:6620
+#: fortran/decl.c:1789 fortran/decl.c:6609
#, no-c-format
msgid "Expected an initialization expression at %C"
msgstr ""
@@ -4707,17 +4453,17 @@ msgstr ""
msgid "Nonstandard type declaration %s*%d at %C"
msgstr ""
-#: fortran/decl.c:1927 fortran/decl.c:1992
+#: fortran/decl.c:1927 fortran/decl.c:2003
#, no-c-format
msgid "Missing right parenthesis at %C"
msgstr ""
-#: fortran/decl.c:1940 fortran/decl.c:2037
+#: fortran/decl.c:1940 fortran/decl.c:2048
#, no-c-format
msgid "Expected initialization expression at %C"
msgstr ""
-#: fortran/decl.c:1948 fortran/decl.c:2043
+#: fortran/decl.c:1948 fortran/decl.c:2054
#, no-c-format
msgid "Expected scalar initialization expression at %C"
msgstr ""
@@ -4727,217 +4473,216 @@ msgstr ""
msgid "Kind %d not supported for type %s at %C"
msgstr ""
-#: fortran/decl.c:1990
+#: fortran/decl.c:1992
+#, no-c-format
+msgid "C kind type parameter is for type %s but type at %L is %s"
+msgstr ""
+
+#: fortran/decl.c:2001
#, no-c-format
msgid "Missing right parenthesis or comma at %C"
msgstr ""
-#: fortran/decl.c:2063
+#: fortran/decl.c:2074
#, no-c-format
msgid "Kind %d is not supported for CHARACTER at %C"
msgstr ""
-#: fortran/decl.c:2192
+#: fortran/decl.c:2203
#, no-c-format
msgid "Syntax error in CHARACTER declaration at %C"
msgstr ""
-#: fortran/decl.c:2277
+#: fortran/decl.c:2288
#, no-c-format
msgid "Extension: BYTE type at %C"
msgstr ""
-#: fortran/decl.c:2283
+#: fortran/decl.c:2294
#, no-c-format
msgid "BYTE type used at %C is not available on the target machine"
msgstr ""
-#: fortran/decl.c:2332
+#: fortran/decl.c:2343
#, no-c-format
msgid "DOUBLE COMPLEX at %C does not conform to the Fortran 95 standard"
msgstr ""
-#: fortran/decl.c:2372 fortran/decl.c:2381 fortran/decl.c:2696
-#: fortran/decl.c:2704
+#: fortran/decl.c:2383 fortran/decl.c:2392 fortran/decl.c:2707
+#: fortran/decl.c:2715
#, no-c-format
msgid "Type name '%s' at %C is ambiguous"
msgstr ""
-#: fortran/decl.c:2457
+#: fortran/decl.c:2468
#, no-c-format
msgid "Missing character range in IMPLICIT at %C"
msgstr ""
-#: fortran/decl.c:2503
+#: fortran/decl.c:2514
#, no-c-format
msgid "Letters must be in alphabetic order in IMPLICIT statement at %C"
msgstr ""
-#: fortran/decl.c:2559
+#: fortran/decl.c:2570
#, no-c-format
msgid "Empty IMPLICIT statement at %C"
msgstr ""
-#: fortran/decl.c:2662
+#: fortran/decl.c:2673
#, no-c-format
msgid "IMPORT statement at %C only permitted in an INTERFACE body"
msgstr ""
-#: fortran/decl.c:2667
+#: fortran/decl.c:2678
#, no-c-format
msgid "Fortran 2003: IMPORT statement at %C"
msgstr ""
-#: fortran/decl.c:2682
+#: fortran/decl.c:2693
#, no-c-format
msgid "Expecting list of named entities at %C"
msgstr ""
-#: fortran/decl.c:2710
+#: fortran/decl.c:2721
#, no-c-format
msgid "Cannot IMPORT '%s' from host scoping unit at %C - does not exist."
msgstr ""
-#: fortran/decl.c:2717
+#: fortran/decl.c:2728
#, no-c-format
msgid "'%s' is already IMPORTed from host scoping unit at %C."
msgstr ""
-#: fortran/decl.c:2746
+#: fortran/decl.c:2757
#, no-c-format
msgid "Syntax error in IMPORT statement at %C"
msgstr ""
-#: fortran/decl.c:2995
+#: fortran/decl.c:3006
#, no-c-format
msgid "Missing dimension specification at %C"
msgstr ""
-#: fortran/decl.c:3069
+#: fortran/decl.c:3080
#, no-c-format
msgid "Duplicate %s attribute at %L"
msgstr ""
-#: fortran/decl.c:3088
+#: fortran/decl.c:3099
#, no-c-format
msgid "Fortran 2003: ALLOCATABLE attribute at %C in a TYPE definition"
msgstr ""
-#: fortran/decl.c:3098
+#: fortran/decl.c:3109
#, no-c-format
msgid "Attribute at %L is not allowed in a TYPE definition"
msgstr ""
-#: fortran/decl.c:3116
+#: fortran/decl.c:3127
#, no-c-format
msgid "Fortran 2003: Attribute %s at %L in a TYPE definition"
msgstr ""
-#: fortran/decl.c:3127
+#: fortran/decl.c:3138
#, no-c-format
msgid ""
"%s attribute at %L is not allowed outside of the specification part of a "
"module"
msgstr ""
-#: fortran/decl.c:3179 fortran/decl.c:5774
+#: fortran/decl.c:3190 fortran/decl.c:5763
#, no-c-format
msgid "PROTECTED at %C only allowed in specification part of a module"
msgstr ""
-#: fortran/decl.c:3185
+#: fortran/decl.c:3196
#, no-c-format
msgid "Fortran 2003: PROTECTED attribute at %C"
msgstr ""
-#: fortran/decl.c:3216
+#: fortran/decl.c:3227
#, no-c-format
msgid "Fortran 2003: VALUE attribute at %C"
msgstr ""
-#: fortran/decl.c:3226
+#: fortran/decl.c:3237
#, no-c-format
msgid "Fortran 2003: VOLATILE attribute at %C"
msgstr ""
-#: fortran/decl.c:3266
+#: fortran/decl.c:3277
#, no-c-format
msgid "Multiple identifiers provided with single NAME= specifier at %C"
msgstr ""
-#. Print an error, but continue parsing line.
-#: fortran/decl.c:3315
-#, no-c-format
-msgid "C kind parameter is for type %s but symbol '%s' at %L is of type %s"
-msgstr ""
-
-#: fortran/decl.c:3383
+#: fortran/decl.c:3373
#, no-c-format
msgid ""
"Implicitly declared BIND(C) function '%s' at %L may not be C interoperable"
msgstr ""
-#: fortran/decl.c:3405
+#: fortran/decl.c:3394
#, no-c-format
msgid ""
"Variable '%s' in common block '%s' at %L may not be a C interoperable kind "
"though common block '%s' is BIND(C)"
msgstr ""
-#: fortran/decl.c:3414
+#: fortran/decl.c:3403
#, no-c-format
msgid "Type declaration '%s' at %L is not C interoperable but it is BIND(C)"
msgstr ""
-#: fortran/decl.c:3418
+#: fortran/decl.c:3407
#, no-c-format
msgid "Variable '%s' at %L may not be a C interoperable kind but it is bind(c)"
msgstr ""
-#: fortran/decl.c:3430
+#: fortran/decl.c:3419
#, no-c-format
msgid ""
"Variable '%s' in common block '%s' at %L cannot be declared with BIND(C) "
"since it is not a global"
msgstr ""
-#: fortran/decl.c:3444
+#: fortran/decl.c:3433
#, no-c-format
msgid "Variable '%s' at %L cannot have both the POINTER and BIND(C) attributes"
msgstr ""
-#: fortran/decl.c:3452
+#: fortran/decl.c:3441
#, no-c-format
msgid ""
"Variable '%s' at %L cannot have both the ALLOCATABLE and BIND(C) attributes"
msgstr ""
-#: fortran/decl.c:3464
+#: fortran/decl.c:3453
#, no-c-format
msgid "Return type of BIND(C) function '%s' at %L cannot be an array"
msgstr ""
-#: fortran/decl.c:3472
+#: fortran/decl.c:3461
#, no-c-format
msgid "Return type of BIND(C) function '%s' at %L cannot be a character string"
msgstr ""
#. Use gfc_warning_now because we won't say that the symbol fails
#. just because of this.
-#: fortran/decl.c:3483
+#: fortran/decl.c:3472
#, no-c-format
msgid ""
"Symbol '%s' at %L is marked PRIVATE but has been given the binding label '%s'"
msgstr ""
-#: fortran/decl.c:3558
+#: fortran/decl.c:3547
#, no-c-format
msgid ""
"Need either entity or common block name for attribute specification "
"statement at %C"
msgstr ""
-#: fortran/decl.c:3605
+#: fortran/decl.c:3594
#, no-c-format
msgid ""
"Missing entity or common block name for attribute specification statement at "
@@ -4946,644 +4691,644 @@ msgstr ""
#. Now we have an error, which we signal, and then fix up
#. because the knock-on is plain and simple confusing.
-#: fortran/decl.c:3712
+#: fortran/decl.c:3701
#, no-c-format
msgid ""
"Derived type at %C has not been previously defined and so cannot appear in a "
"derived type definition"
msgstr ""
-#: fortran/decl.c:3744
+#: fortran/decl.c:3733
#, no-c-format
msgid "Syntax error in data declaration at %C"
msgstr ""
-#: fortran/decl.c:3901
+#: fortran/decl.c:3890
#, no-c-format
msgid "Name '%s' at %C is the name of the procedure"
msgstr ""
-#: fortran/decl.c:3913
+#: fortran/decl.c:3902
#, no-c-format
msgid "Unexpected junk in formal argument list at %C"
msgstr ""
-#: fortran/decl.c:3930
+#: fortran/decl.c:3919
#, no-c-format
msgid "Duplicate symbol '%s' in formal argument list at %C"
msgstr ""
-#: fortran/decl.c:3981
+#: fortran/decl.c:3970
#, no-c-format
msgid "RESULT variable at %C must be different than function name"
msgstr ""
-#: fortran/decl.c:4059
+#: fortran/decl.c:4047
#, no-c-format
msgid "Unexpected junk after function declaration at %C"
msgstr ""
-#: fortran/decl.c:4069 fortran/decl.c:4869
+#: fortran/decl.c:4057 fortran/decl.c:4858
#, no-c-format
msgid ""
"Fortran 2008: BIND(C) attribute at %L may not be specified for an internal "
"procedure"
msgstr ""
-#: fortran/decl.c:4137
+#: fortran/decl.c:4126
#, no-c-format
msgid "Interface '%s' at %C may not be generic"
msgstr ""
-#: fortran/decl.c:4142
+#: fortran/decl.c:4131
#, no-c-format
msgid "Interface '%s' at %C may not be a statement function"
msgstr ""
-#: fortran/decl.c:4155
+#: fortran/decl.c:4144
#, no-c-format
msgid "Intrinsic procedure '%s' not allowed in PROCEDURE statement at %C"
msgstr ""
-#: fortran/decl.c:4191
+#: fortran/decl.c:4180
#, no-c-format
msgid "BIND(C) attribute at %C requires an interface with BIND(C)"
msgstr ""
-#: fortran/decl.c:4198
+#: fortran/decl.c:4187
#, no-c-format
msgid "BIND(C) procedure with NAME may not have POINTER attribute at %C"
msgstr ""
-#: fortran/decl.c:4204
+#: fortran/decl.c:4193
#, no-c-format
msgid "Dummy procedure at %C may not have BIND(C) attribute with NAME"
msgstr ""
-#: fortran/decl.c:4274 fortran/decl.c:4322
+#: fortran/decl.c:4263 fortran/decl.c:4311
#, no-c-format
msgid "Syntax error in PROCEDURE statement at %C"
msgstr ""
-#: fortran/decl.c:4296
+#: fortran/decl.c:4285
#, no-c-format
msgid "PROCEDURE at %C must be in a generic interface"
msgstr ""
-#: fortran/decl.c:4349
+#: fortran/decl.c:4338
#, no-c-format
msgid ""
"Fortran 2003: Procedure components at %C are not yet implemented in gfortran"
msgstr ""
-#: fortran/decl.c:4362
+#: fortran/decl.c:4351
#, no-c-format
msgid "Fortran 2003: PROCEDURE statement at %C"
msgstr ""
-#: fortran/decl.c:4426
+#: fortran/decl.c:4415
#, no-c-format
msgid "Expected formal argument list in function definition at %C"
msgstr ""
-#: fortran/decl.c:4450 fortran/decl.c:4454 fortran/decl.c:4655
-#: fortran/decl.c:4659 fortran/decl.c:4837 fortran/decl.c:4841
-#: fortran/symbol.c:1467
+#: fortran/decl.c:4439 fortran/decl.c:4443 fortran/decl.c:4644
+#: fortran/decl.c:4648 fortran/decl.c:4826 fortran/decl.c:4830
+#: fortran/symbol.c:1472
#, no-c-format
msgid "BIND(C) attribute at %L can only be used for variables or common blocks"
msgstr ""
-#: fortran/decl.c:4486
+#: fortran/decl.c:4475
#, no-c-format
msgid "Function '%s' at %C already has a type of %s"
msgstr ""
-#: fortran/decl.c:4577
+#: fortran/decl.c:4566
#, no-c-format
msgid "ENTRY statement at %C cannot appear within a PROGRAM"
msgstr ""
-#: fortran/decl.c:4580
+#: fortran/decl.c:4569
#, no-c-format
msgid "ENTRY statement at %C cannot appear within a MODULE"
msgstr ""
-#: fortran/decl.c:4583
+#: fortran/decl.c:4572
#, no-c-format
msgid "ENTRY statement at %C cannot appear within a BLOCK DATA"
msgstr ""
-#: fortran/decl.c:4587
+#: fortran/decl.c:4576
#, no-c-format
msgid "ENTRY statement at %C cannot appear within an INTERFACE"
msgstr ""
-#: fortran/decl.c:4591
+#: fortran/decl.c:4580
#, no-c-format
msgid "ENTRY statement at %C cannot appear within a DERIVED TYPE block"
msgstr ""
-#: fortran/decl.c:4595
+#: fortran/decl.c:4584
#, no-c-format
msgid "ENTRY statement at %C cannot appear within an IF-THEN block"
msgstr ""
-#: fortran/decl.c:4599
+#: fortran/decl.c:4588
#, no-c-format
msgid "ENTRY statement at %C cannot appear within a DO block"
msgstr ""
-#: fortran/decl.c:4603
+#: fortran/decl.c:4592
#, no-c-format
msgid "ENTRY statement at %C cannot appear within a SELECT block"
msgstr ""
-#: fortran/decl.c:4607
+#: fortran/decl.c:4596
#, no-c-format
msgid "ENTRY statement at %C cannot appear within a FORALL block"
msgstr ""
-#: fortran/decl.c:4611
+#: fortran/decl.c:4600
#, no-c-format
msgid "ENTRY statement at %C cannot appear within a WHERE block"
msgstr ""
-#: fortran/decl.c:4615
+#: fortran/decl.c:4604
#, no-c-format
msgid "ENTRY statement at %C cannot appear within a contained subprogram"
msgstr ""
-#: fortran/decl.c:4633
+#: fortran/decl.c:4622
#, no-c-format
msgid "ENTRY statement at %C cannot appear in a contained procedure"
msgstr ""
-#: fortran/decl.c:4687 fortran/decl.c:4877
+#: fortran/decl.c:4676 fortran/decl.c:4866
#, no-c-format
msgid "Missing required parentheses before BIND(C) at %C"
msgstr ""
-#: fortran/decl.c:4939 fortran/decl.c:4955
+#: fortran/decl.c:4928 fortran/decl.c:4944
#, no-c-format
msgid "Syntax error in NAME= specifier for binding label at %C"
msgstr ""
-#: fortran/decl.c:4970
+#: fortran/decl.c:4959
#, no-c-format
msgid "Missing closing quote '\"' for binding label at %C"
msgstr ""
-#: fortran/decl.c:4979
+#: fortran/decl.c:4968
#, no-c-format
msgid "Missing closing quote ''' for binding label at %C"
msgstr ""
-#: fortran/decl.c:4989
+#: fortran/decl.c:4978
#, no-c-format
msgid "Missing closing paren for binding label at %C"
msgstr ""
-#: fortran/decl.c:4995
+#: fortran/decl.c:4984
#, no-c-format
msgid "No binding name is allowed in BIND(C) at %C"
msgstr ""
-#: fortran/decl.c:5001
+#: fortran/decl.c:4990
#, no-c-format
msgid "For dummy procedure %s, no binding name is allowed in BIND(C) at %C"
msgstr ""
-#: fortran/decl.c:5032
+#: fortran/decl.c:5021
#, no-c-format
msgid "NAME not allowed on BIND(C) for ABSTRACT INTERFACE at %C"
msgstr ""
-#: fortran/decl.c:5205
+#: fortran/decl.c:5194
#, no-c-format
msgid "Unexpected END statement at %C"
msgstr ""
#. We would have required END [something].
-#: fortran/decl.c:5214
+#: fortran/decl.c:5203
#, no-c-format
msgid "%s statement expected at %L"
msgstr ""
-#: fortran/decl.c:5225
+#: fortran/decl.c:5214
#, no-c-format
msgid "Expecting %s statement at %C"
msgstr ""
-#: fortran/decl.c:5240
+#: fortran/decl.c:5229
#, no-c-format
msgid "Expected block name of '%s' in %s statement at %C"
msgstr ""
-#: fortran/decl.c:5257
+#: fortran/decl.c:5246
#, no-c-format
msgid "Expected terminating name at %C"
msgstr ""
-#: fortran/decl.c:5266
+#: fortran/decl.c:5255
#, no-c-format
msgid "Expected label '%s' for %s statement at %C"
msgstr ""
-#: fortran/decl.c:5320
+#: fortran/decl.c:5309
#, no-c-format
msgid "Missing array specification at %L in DIMENSION statement"
msgstr ""
-#: fortran/decl.c:5328
+#: fortran/decl.c:5317
#, no-c-format
msgid "Dimensions specified for %s at %L after its initialisation"
msgstr ""
-#: fortran/decl.c:5337
+#: fortran/decl.c:5326
#, no-c-format
msgid "Array specification must be deferred at %L"
msgstr ""
-#: fortran/decl.c:5414
+#: fortran/decl.c:5403
#, no-c-format
msgid "Unexpected character in variable list at %C"
msgstr ""
-#: fortran/decl.c:5451
+#: fortran/decl.c:5440
#, no-c-format
msgid "Expected '(' at %C"
msgstr ""
-#: fortran/decl.c:5465 fortran/decl.c:5505
+#: fortran/decl.c:5454 fortran/decl.c:5494
#, no-c-format
msgid "Expected variable name at %C"
msgstr ""
-#: fortran/decl.c:5481
+#: fortran/decl.c:5470
#, no-c-format
msgid "Cray pointer at %C must be an integer"
msgstr ""
-#: fortran/decl.c:5485
+#: fortran/decl.c:5474
#, no-c-format
msgid ""
"Cray pointer at %C has %d bytes of precision; memory addresses require %d "
"bytes"
msgstr ""
-#: fortran/decl.c:5491
+#: fortran/decl.c:5480
#, no-c-format
msgid "Expected \",\" at %C"
msgstr ""
-#: fortran/decl.c:5554
+#: fortran/decl.c:5543
#, no-c-format
msgid "Expected \")\" at %C"
msgstr ""
-#: fortran/decl.c:5566
+#: fortran/decl.c:5555
#, no-c-format
msgid "Expected \",\" or end of statement at %C"
msgstr ""
-#: fortran/decl.c:5630
+#: fortran/decl.c:5619
#, no-c-format
msgid "Cray pointer declaration at %C requires -fcray-pointer flag"
msgstr ""
-#: fortran/decl.c:5725
+#: fortran/decl.c:5714
#, no-c-format
msgid ""
"Access specification of the %s operator at %C has already been specified"
msgstr ""
-#: fortran/decl.c:5742
+#: fortran/decl.c:5731
#, no-c-format
msgid ""
"Access specification of the .%s. operator at %C has already been specified"
msgstr ""
-#: fortran/decl.c:5780
+#: fortran/decl.c:5769
#, no-c-format
msgid "Fortran 2003: PROTECTED statement at %C"
msgstr ""
-#: fortran/decl.c:5820
+#: fortran/decl.c:5809
#, no-c-format
msgid "Syntax error in PROTECTED statement at %C"
msgstr ""
-#: fortran/decl.c:5844
+#: fortran/decl.c:5833
#, no-c-format
msgid ""
"PRIVATE statement at %C is only allowed in the specification part of a module"
msgstr ""
-#: fortran/decl.c:5881
+#: fortran/decl.c:5870
#, no-c-format
msgid ""
"PUBLIC statement at %C is only allowed in the specification part of a module"
msgstr ""
-#: fortran/decl.c:5908
+#: fortran/decl.c:5897
#, no-c-format
msgid "Expected variable name at %C in PARAMETER statement"
msgstr ""
-#: fortran/decl.c:5915
+#: fortran/decl.c:5904
#, no-c-format
msgid "Expected = sign in PARAMETER statement at %C"
msgstr ""
-#: fortran/decl.c:5921
+#: fortran/decl.c:5910
#, no-c-format
msgid "Expected expression at %C in PARAMETER statement"
msgstr ""
-#: fortran/decl.c:5941
+#: fortran/decl.c:5930
#, no-c-format
msgid "Initializing already initialized variable at %C"
msgstr ""
-#: fortran/decl.c:6003
+#: fortran/decl.c:5992
#, no-c-format
msgid "Unexpected characters in PARAMETER statement at %C"
msgstr ""
-#: fortran/decl.c:6027
+#: fortran/decl.c:6016
#, no-c-format
msgid "Blanket SAVE statement at %C follows previous SAVE statement"
msgstr ""
-#: fortran/decl.c:6039
+#: fortran/decl.c:6028
#, no-c-format
msgid "SAVE statement at %C follows blanket SAVE statement"
msgstr ""
-#: fortran/decl.c:6086
+#: fortran/decl.c:6075
#, no-c-format
msgid "Syntax error in SAVE statement at %C"
msgstr ""
-#: fortran/decl.c:6097
+#: fortran/decl.c:6086
#, no-c-format
msgid "Fortran 2003: VALUE statement at %C"
msgstr ""
-#: fortran/decl.c:6137
+#: fortran/decl.c:6126
#, no-c-format
msgid "Syntax error in VALUE statement at %C"
msgstr ""
-#: fortran/decl.c:6148
+#: fortran/decl.c:6137
#, no-c-format
msgid "Fortran 2003: VOLATILE statement at %C"
msgstr ""
-#: fortran/decl.c:6190
+#: fortran/decl.c:6179
#, no-c-format
msgid "Syntax error in VOLATILE statement at %C"
msgstr ""
-#: fortran/decl.c:6213
+#: fortran/decl.c:6202
#, no-c-format
msgid "MODULE PROCEDURE at %C must be in a generic module interface"
msgstr ""
-#: fortran/decl.c:6295
+#: fortran/decl.c:6284
#, no-c-format
msgid "Ambiguous symbol in TYPE definition at %C"
msgstr ""
-#: fortran/decl.c:6301
+#: fortran/decl.c:6290
#, no-c-format
msgid "No such symbol in TYPE definition at %C"
msgstr ""
-#: fortran/decl.c:6307
+#: fortran/decl.c:6296
#, no-c-format
msgid "'%s' in EXTENDS expression at %C is not a derived type"
msgstr ""
-#: fortran/decl.c:6314
+#: fortran/decl.c:6303
#, no-c-format
msgid "'%s' cannot be extended at %C because it is BIND(C)"
msgstr ""
-#: fortran/decl.c:6321
+#: fortran/decl.c:6310
#, no-c-format
msgid "'%s' cannot be extended at %C because it is a SEQUENCE type"
msgstr ""
-#: fortran/decl.c:6344
+#: fortran/decl.c:6333
#, no-c-format
msgid ""
"Derived type at %C can only be PRIVATE in the specification part of a module"
msgstr ""
-#: fortran/decl.c:6356
+#: fortran/decl.c:6345
#, no-c-format
msgid ""
"Derived type at %C can only be PUBLIC in the specification part of a module"
msgstr ""
-#: fortran/decl.c:6377
+#: fortran/decl.c:6366
#, no-c-format
msgid "Fortran 2003: ABSTRACT type at %C"
msgstr ""
-#: fortran/decl.c:6441
+#: fortran/decl.c:6430
#, no-c-format
msgid "Expected :: in TYPE definition at %C"
msgstr ""
-#: fortran/decl.c:6452
+#: fortran/decl.c:6441
#, no-c-format
msgid "Type name '%s' at %C cannot be the same as an intrinsic type"
msgstr ""
-#: fortran/decl.c:6462
+#: fortran/decl.c:6451
#, no-c-format
msgid "Derived type name '%s' at %C already has a basic type of %s"
msgstr ""
-#: fortran/decl.c:6478
+#: fortran/decl.c:6467
#, no-c-format
msgid "Derived type definition of '%s' at %C has already been defined"
msgstr ""
-#: fortran/decl.c:6545
+#: fortran/decl.c:6534
#, no-c-format
msgid "Cray Pointee at %C cannot be assumed shape array"
msgstr ""
-#: fortran/decl.c:6565
+#: fortran/decl.c:6554
#, no-c-format
msgid "Fortran 2003: ENUM and ENUMERATOR at %C"
msgstr ""
-#: fortran/decl.c:6637
+#: fortran/decl.c:6626
#, no-c-format
msgid "ENUMERATOR %L not initialized with integer expression"
msgstr ""
-#: fortran/decl.c:6686
+#: fortran/decl.c:6675
#, no-c-format
msgid "ENUM definition statement expected before %C"
msgstr ""
-#: fortran/decl.c:6719
+#: fortran/decl.c:6708
#, no-c-format
msgid "Syntax error in ENUMERATOR definition at %C"
msgstr ""
-#: fortran/decl.c:6765 fortran/decl.c:6780
+#: fortran/decl.c:6754 fortran/decl.c:6769
#, no-c-format
msgid "Duplicate access-specifier at %C"
msgstr ""
-#: fortran/decl.c:6800
+#: fortran/decl.c:6789
#, no-c-format
msgid "Binding attributes already specify passing, illegal NOPASS at %C"
msgstr ""
-#: fortran/decl.c:6818
+#: fortran/decl.c:6807
#, no-c-format
msgid "Duplicate NON_OVERRIDABLE at %C"
msgstr ""
-#: fortran/decl.c:6833
+#: fortran/decl.c:6822
#, no-c-format
msgid "DEFERRED not yet implemented at %C"
msgstr ""
-#: fortran/decl.c:6847
+#: fortran/decl.c:6836
#, no-c-format
msgid "Binding attributes already specify passing, illegal PASS at %C"
msgstr ""
-#: fortran/decl.c:6868
+#: fortran/decl.c:6857
#, no-c-format
msgid "Expected access-specifier at %C"
msgstr ""
-#: fortran/decl.c:6870
+#: fortran/decl.c:6859
#, no-c-format
msgid "Expected binding attribute at %C"
msgstr ""
-#: fortran/decl.c:6910
+#: fortran/decl.c:6899
#, no-c-format
msgid "PROCEDURE(interface) at %C is not yet implemented"
msgstr ""
-#: fortran/decl.c:6932
+#: fortran/decl.c:6921
#, no-c-format
msgid "Expected '::' after binding-attributes at %C"
msgstr ""
-#: fortran/decl.c:6942
+#: fortran/decl.c:6931
#, no-c-format
msgid "Expected binding name at %C"
msgstr ""
-#: fortran/decl.c:6955
+#: fortran/decl.c:6944
#, no-c-format
msgid "'::' needed in PROCEDURE binding with explicit target at %C"
msgstr ""
-#: fortran/decl.c:6965
+#: fortran/decl.c:6954
#, no-c-format
msgid "Expected binding target after '=>' at %C"
msgstr ""
-#: fortran/decl.c:6977
+#: fortran/decl.c:6966
#, no-c-format
msgid "Junk after PROCEDURE declaration at %C"
msgstr ""
-#: fortran/decl.c:6995
+#: fortran/decl.c:6984
#, no-c-format
msgid ""
"There's already a procedure with binding name '%s' for the derived type '%s' "
"at %C"
msgstr ""
-#: fortran/decl.c:7028
+#: fortran/decl.c:7017
#, no-c-format
msgid "GENERIC at %C must be inside a derived-type CONTAINS"
msgstr ""
-#: fortran/decl.c:7045
+#: fortran/decl.c:7034
#, no-c-format
msgid "Expected '::' at %C"
msgstr ""
-#: fortran/decl.c:7055
+#: fortran/decl.c:7044
#, no-c-format
msgid "Expected generic name at %C"
msgstr ""
-#: fortran/decl.c:7066
+#: fortran/decl.c:7055
#, no-c-format
msgid ""
"There's already a non-generic procedure with binding name '%s' for the "
"derived type '%s' at %C"
msgstr ""
-#: fortran/decl.c:7075
+#: fortran/decl.c:7064
#, no-c-format
msgid "Binding at %C must have the same access as already defined binding '%s'"
msgstr ""
-#: fortran/decl.c:7103
+#: fortran/decl.c:7092
#, no-c-format
msgid "Expected specific binding name at %C"
msgstr ""
-#: fortran/decl.c:7114
+#: fortran/decl.c:7103
#, no-c-format
msgid "'%s' already defined as specific binding for the generic '%s' at %C"
msgstr ""
-#: fortran/decl.c:7132
+#: fortran/decl.c:7121
#, no-c-format
msgid "Junk after GENERIC binding at %C"
msgstr ""
-#: fortran/decl.c:7157
+#: fortran/decl.c:7146
#, no-c-format
msgid "FINAL declaration at %C must be inside a derived type CONTAINS section"
msgstr ""
-#: fortran/decl.c:7168
+#: fortran/decl.c:7157
#, no-c-format
msgid ""
"Derived type declaration with FINAL at %C must be in the specification part "
"of a MODULE"
msgstr ""
-#: fortran/decl.c:7190
+#: fortran/decl.c:7179
#, no-c-format
msgid "Empty FINAL at %C"
msgstr ""
-#: fortran/decl.c:7197
+#: fortran/decl.c:7186
#, no-c-format
msgid "Expected module procedure name at %C"
msgstr ""
-#: fortran/decl.c:7207
+#: fortran/decl.c:7196
#, no-c-format
msgid "Expected ',' at %C"
msgstr ""
-#: fortran/decl.c:7213
+#: fortran/decl.c:7202
#, no-c-format
msgid "Unknown procedure name \"%s\" at %C"
msgstr ""
-#: fortran/decl.c:7227
+#: fortran/decl.c:7216
#, no-c-format
msgid "'%s' at %C is already defined as FINAL procedure!"
msgstr ""
@@ -5593,7 +5338,7 @@ msgstr ""
#. If a dependency is found in the case
#. elemental == ELEM_CHECK_VARIABLE, we will generate
#. a temporary, so we don't need to bother the user.
-#: fortran/dependency.c:461
+#: fortran/dependency.c:486
#, no-c-format
msgid ""
"INTENT(%s) actual argument at %L might interfere with actual argument at %L."
@@ -5604,29 +5349,29 @@ msgstr ""
msgid " Included at %s:%d:"
msgstr ""
-#: fortran/error.c:390
+#: fortran/error.c:382
#, no-c-format
msgid "<During initialization>\n"
msgstr ""
-#: fortran/error.c:723
+#: fortran/error.c:715
#, no-c-format
msgid "Error count reached limit of %d."
msgstr ""
-#: fortran/error.c:742 fortran/error.c:796 fortran/error.c:833
+#: fortran/error.c:734 fortran/error.c:788 fortran/error.c:825
msgid "Warning:"
msgstr ""
-#: fortran/error.c:798 fortran/error.c:881 fortran/error.c:907
+#: fortran/error.c:790 fortran/error.c:873 fortran/error.c:899
msgid "Error:"
msgstr ""
-#: fortran/error.c:931
+#: fortran/error.c:923
msgid "Fatal Error:"
msgstr ""
-#: fortran/error.c:950
+#: fortran/error.c:942
#, no-c-format
msgid "Internal Error at (1):"
msgstr ""
@@ -5646,360 +5391,366 @@ msgstr ""
msgid "Integer value too large in expression at %C"
msgstr ""
-#: fortran/expr.c:1047
+#: fortran/expr.c:1056
#, no-c-format
msgid "Index in dimension %d is out of bounds at %L"
msgstr ""
-#: fortran/expr.c:1218 fortran/expr.c:1269
+#: fortran/expr.c:1227 fortran/expr.c:1278
#, no-c-format
msgid "index in dimension %d is out of bounds at %L"
msgstr ""
-#: fortran/expr.c:1871
+#: fortran/expr.c:1880
#, no-c-format
msgid "elemental function arguments at %C are not compliant"
msgstr ""
-#: fortran/expr.c:1915
+#: fortran/expr.c:1924
#, no-c-format
msgid "Numeric or CHARACTER operands are required in expression at %L"
msgstr ""
-#: fortran/expr.c:1935
+#: fortran/expr.c:1944
#, no-c-format
msgid "Fortran 2003: Noninteger exponent in an initialization expression at %L"
msgstr ""
-#: fortran/expr.c:1950
+#: fortran/expr.c:1959
#, no-c-format
msgid ""
"Concatenation operator in expression at %L must have two CHARACTER operands"
msgstr ""
-#: fortran/expr.c:1957
+#: fortran/expr.c:1966
#, no-c-format
msgid "Concat operator at %L must concatenate strings of the same kind"
msgstr ""
-#: fortran/expr.c:1967
+#: fortran/expr.c:1976
#, no-c-format
msgid ".NOT. operator in expression at %L must have a LOGICAL operand"
msgstr ""
-#: fortran/expr.c:1983
+#: fortran/expr.c:1992
#, no-c-format
msgid "LOGICAL operands are required in expression at %L"
msgstr ""
-#: fortran/expr.c:1994
+#: fortran/expr.c:2003
#, no-c-format
msgid "Only intrinsic operators can be used in expression at %L"
msgstr ""
-#: fortran/expr.c:2002
+#: fortran/expr.c:2011
#, no-c-format
msgid "Numeric operands are required in expression at %L"
msgstr ""
-#: fortran/expr.c:2095
+#: fortran/expr.c:2104
#, no-c-format
msgid "Assumed character length variable '%s' in constant expression at %L"
msgstr ""
-#: fortran/expr.c:2146 fortran/expr.c:2152
+#: fortran/expr.c:2155 fortran/expr.c:2161
#, no-c-format
msgid ""
"transformational intrinsic '%s' at %L is not permitted in an initialization "
"expression"
msgstr ""
-#: fortran/expr.c:2184
+#: fortran/expr.c:2193
#, no-c-format
msgid "Extension: Evaluation of nonstandard initialization expression at %L"
msgstr ""
-#: fortran/expr.c:2241
+#: fortran/expr.c:2250
#, no-c-format
msgid ""
"Function '%s' in initialization expression at %L must be an intrinsic or a "
"specification function"
msgstr ""
-#: fortran/expr.c:2253
+#: fortran/expr.c:2262
#, no-c-format
msgid ""
"Intrinsic function '%s' at %L is not permitted in an initialization "
"expression"
msgstr ""
-#: fortran/expr.c:2285
+#: fortran/expr.c:2294
#, no-c-format
msgid "PARAMETER '%s' is used at %L before its definition is complete"
msgstr ""
-#: fortran/expr.c:2305
+#: fortran/expr.c:2314
#, no-c-format
msgid ""
"Assumed size array '%s' at %L is not permitted in an initialization "
"expression"
msgstr ""
-#: fortran/expr.c:2311
+#: fortran/expr.c:2320
#, no-c-format
msgid ""
"Assumed shape array '%s' at %L is not permitted in an initialization "
"expression"
msgstr ""
-#: fortran/expr.c:2317
+#: fortran/expr.c:2326
#, no-c-format
msgid ""
"Deferred array '%s' at %L is not permitted in an initialization expression"
msgstr ""
-#: fortran/expr.c:2323
+#: fortran/expr.c:2332
#, no-c-format
msgid ""
"Array '%s' at %L is a variable, which does not reduce to a constant "
"expression"
msgstr ""
-#: fortran/expr.c:2333
+#: fortran/expr.c:2342
#, no-c-format
msgid ""
"Parameter '%s' at %L has not been declared or is a variable, which does not "
"reduce to a constant expression"
msgstr ""
-#: fortran/expr.c:2409
+#: fortran/expr.c:2418
#, no-c-format
msgid "Initialization expression didn't reduce %C"
msgstr ""
-#: fortran/expr.c:2477
+#: fortran/expr.c:2486
#, no-c-format
msgid "Specification function '%s' at %L cannot be a statement function"
msgstr ""
-#: fortran/expr.c:2484
+#: fortran/expr.c:2493
#, no-c-format
msgid "Specification function '%s' at %L cannot be an internal function"
msgstr ""
-#: fortran/expr.c:2491
+#: fortran/expr.c:2500
#, no-c-format
msgid "Specification function '%s' at %L must be PURE"
msgstr ""
-#: fortran/expr.c:2498
+#: fortran/expr.c:2507
#, no-c-format
msgid "Specification function '%s' at %L cannot be RECURSIVE"
msgstr ""
-#: fortran/expr.c:2632
+#: fortran/expr.c:2641
#, no-c-format
msgid "Dummy argument '%s' not allowed in expression at %L"
msgstr ""
-#: fortran/expr.c:2639
+#: fortran/expr.c:2648
#, no-c-format
msgid "Dummy argument '%s' at %L cannot be OPTIONAL"
msgstr ""
-#: fortran/expr.c:2646
+#: fortran/expr.c:2655
#, no-c-format
msgid "Dummy argument '%s' at %L cannot be INTENT(OUT)"
msgstr ""
-#: fortran/expr.c:2677
+#: fortran/expr.c:2686
#, no-c-format
msgid "Variable '%s' cannot appear in the expression at %L"
msgstr ""
-#: fortran/expr.c:2727
+#: fortran/expr.c:2736
#, no-c-format
msgid "Expression at %L must be of INTEGER type, found %s"
msgstr ""
-#: fortran/expr.c:2737
+#: fortran/expr.c:2746
#, no-c-format
msgid "Function '%s' at %L must be PURE"
msgstr ""
-#: fortran/expr.c:2746
+#: fortran/expr.c:2755
#, no-c-format
msgid "Expression at %L must be scalar"
msgstr ""
-#: fortran/expr.c:2773
+#: fortran/expr.c:2782
#, no-c-format
msgid "Incompatible ranks in %s (%d and %d) at %L"
msgstr ""
-#: fortran/expr.c:2787
+#: fortran/expr.c:2796
#, no-c-format
msgid "Different shape for %s at %L on dimension %d (%d and %d)"
msgstr ""
-#: fortran/expr.c:2833 fortran/expr.c:3089
+#: fortran/expr.c:2842 fortran/expr.c:3099
#, no-c-format
msgid "Cannot assign to INTENT(IN) variable '%s' at %L"
msgstr ""
-#: fortran/expr.c:2885
+#: fortran/expr.c:2894
#, no-c-format
msgid "'%s' at %L is not a VALUE"
msgstr ""
-#: fortran/expr.c:2892
+#: fortran/expr.c:2901
#, no-c-format
msgid "Incompatible ranks %d and %d in assignment at %L"
msgstr ""
-#: fortran/expr.c:2899
+#: fortran/expr.c:2908
#, no-c-format
msgid "Variable type is UNKNOWN in assignment at %L"
msgstr ""
-#: fortran/expr.c:2911
+#: fortran/expr.c:2920
#, no-c-format
msgid "NULL appears on right-hand side in assignment at %L"
msgstr ""
-#: fortran/expr.c:2922
+#: fortran/expr.c:2931
#, no-c-format
msgid "Vector assignment to assumed-size Cray Pointee at %L is illegal"
msgstr ""
-#: fortran/expr.c:2931
+#: fortran/expr.c:2940
#, no-c-format
msgid "POINTER valued function appears on right-hand side of assignment at %L"
msgstr ""
-#: fortran/expr.c:2936
+#: fortran/expr.c:2945
msgid "array assignment"
msgstr ""
-#: fortran/expr.c:2941
+#: fortran/expr.c:2950
#, no-c-format
msgid ""
"Extension: BOZ literal at %L used to initialize non-integer variable '%s'"
msgstr ""
-#: fortran/expr.c:2947 fortran/resolve.c:6456
+#: fortran/expr.c:2956 fortran/resolve.c:6536
#, no-c-format
msgid ""
"Extension: BOZ literal at %L outside a DATA statement and outside INT/REAL/"
"DBLE/CMPLX"
msgstr ""
-#: fortran/expr.c:2957 fortran/resolve.c:6466
+#: fortran/expr.c:2966 fortran/resolve.c:6546
#, no-c-format
msgid "BOZ literal at %L is bitwise transferred non-integer symbol '%s'"
msgstr ""
-#: fortran/expr.c:2965 fortran/resolve.c:6475
+#: fortran/expr.c:2974 fortran/resolve.c:6555
#, no-c-format
msgid ""
"Arithmetic underflow of bit-wise transferred BOZ at %L. This check can be "
"disabled with the option -fno-range-check"
msgstr ""
-#: fortran/expr.c:2969 fortran/resolve.c:6479
+#: fortran/expr.c:2978 fortran/resolve.c:6559
#, no-c-format
msgid ""
"Arithmetic overflow of bit-wise transferred BOZ at %L. This check can be "
"disabled with the option -fno-range-check"
msgstr ""
-#: fortran/expr.c:2973 fortran/resolve.c:6483
+#: fortran/expr.c:2982 fortran/resolve.c:6563
#, no-c-format
msgid ""
"Arithmetic NaN of bit-wise transferred BOZ at %L. This check can be disabled "
"with the option -fno-range-check"
msgstr ""
-#: fortran/expr.c:2995
+#: fortran/expr.c:3004
#, no-c-format
msgid ""
"Incompatible types in DATA statement at %L; attempted conversion of %s to %s"
msgstr ""
-#: fortran/expr.c:3031
+#: fortran/expr.c:3040
#, no-c-format
msgid "Pointer assignment target is not a POINTER at %L"
msgstr ""
-#: fortran/expr.c:3039
+#: fortran/expr.c:3049
#, no-c-format
msgid ""
"'%s' in the pointer assignment at %L cannot be an l-value since it is a "
"procedure"
msgstr ""
-#: fortran/expr.c:3067
+#: fortran/expr.c:3077
#, no-c-format
msgid "Expected bounds specification for '%s' at %L"
msgstr ""
-#: fortran/expr.c:3072
+#: fortran/expr.c:3082
#, no-c-format
msgid "Fortran 2003: Bounds specification for '%s' in pointer assignment at %L"
msgstr ""
-#: fortran/expr.c:3078
+#: fortran/expr.c:3088
#, no-c-format
msgid "Pointer bounds remapping at %L is not yet implemented in gfortran"
msgstr ""
-#: fortran/expr.c:3096
+#: fortran/expr.c:3106
#, no-c-format
msgid "Pointer assignment to non-POINTER at %L"
msgstr ""
-#: fortran/expr.c:3105
+#: fortran/expr.c:3115
#, no-c-format
msgid "Bad pointer object in PURE procedure at %L"
msgstr ""
-#: fortran/expr.c:3121
+#: fortran/expr.c:3134
+#, no-c-format
+msgid "Invalid procedure pointer assignment at %L"
+msgstr ""
+
+#: fortran/expr.c:3140
#, no-c-format
msgid ""
-"Different types in pointer assignment at %L; attempted assignment of %s to %s"
+"Abstract interface '%s' is invalid in procedure pointer assignment at %L"
msgstr ""
-#: fortran/expr.c:3129
+#: fortran/expr.c:3159
#, no-c-format
-msgid "Different kind type parameters in pointer assignment at %L"
+msgid ""
+"Different types in pointer assignment at %L; attempted assignment of %s to %s"
msgstr ""
-#: fortran/expr.c:3136
+#: fortran/expr.c:3167
#, no-c-format
-msgid "Different ranks in pointer assignment at %L"
+msgid "Different kind type parameters in pointer assignment at %L"
msgstr ""
-#: fortran/expr.c:3151
+#: fortran/expr.c:3174
#, no-c-format
-msgid "Different character lengths in pointer assignment at %L"
+msgid "Different ranks in pointer assignment at %L"
msgstr ""
-#: fortran/expr.c:3162
+#: fortran/expr.c:3196
#, no-c-format
msgid "Pointer assignment target is neither TARGET nor POINTER at %L"
msgstr ""
-#: fortran/expr.c:3169
+#: fortran/expr.c:3203
#, no-c-format
msgid "Bad target in pointer assignment in PURE procedure at %L"
msgstr ""
-#: fortran/expr.c:3175
+#: fortran/expr.c:3209
#, no-c-format
msgid "Pointer assignment with vector subscript on rhs at %L"
msgstr ""
-#: fortran/expr.c:3183
+#: fortran/expr.c:3217
#, no-c-format
msgid "Pointer assignment target has PROTECTED attribute at %L"
msgstr ""
@@ -6094,212 +5845,212 @@ msgstr ""
msgid "Expecting 'END INTERFACE %s' at %C"
msgstr ""
-#: fortran/interface.c:562
+#: fortran/interface.c:571
#, no-c-format
msgid "Alternate return cannot appear in operator interface at %L"
msgstr ""
-#: fortran/interface.c:592
+#: fortran/interface.c:601
#, no-c-format
msgid "Operator interface at %L has the wrong number of arguments"
msgstr ""
-#: fortran/interface.c:603
+#: fortran/interface.c:612
#, no-c-format
msgid "Assignment operator interface at %L must be a SUBROUTINE"
msgstr ""
-#: fortran/interface.c:609
+#: fortran/interface.c:618
#, no-c-format
msgid "Assignment operator interface at %L must have two arguments"
msgstr ""
-#: fortran/interface.c:624
+#: fortran/interface.c:633
#, no-c-format
msgid ""
"Assignment operator interface at %L must not redefine an INTRINSIC type "
"assignment"
msgstr ""
-#: fortran/interface.c:633
+#: fortran/interface.c:642
#, no-c-format
msgid "Intrinsic operator interface at %L must be a FUNCTION"
msgstr ""
-#: fortran/interface.c:643
+#: fortran/interface.c:652
#, no-c-format
msgid ""
"First argument of defined assignment at %L must be INTENT(OUT) or INTENT"
"(INOUT)"
msgstr ""
-#: fortran/interface.c:647
+#: fortran/interface.c:656
#, no-c-format
msgid "Second argument of defined assignment at %L must be INTENT(IN)"
msgstr ""
-#: fortran/interface.c:653 fortran/resolve.c:10246
+#: fortran/interface.c:662 fortran/resolve.c:10333
#, no-c-format
msgid "First argument of operator interface at %L must be INTENT(IN)"
msgstr ""
-#: fortran/interface.c:657 fortran/resolve.c:10258
+#: fortran/interface.c:666 fortran/resolve.c:10345
#, no-c-format
msgid "Second argument of operator interface at %L must be INTENT(IN)"
msgstr ""
-#: fortran/interface.c:760
+#: fortran/interface.c:769
#, no-c-format
msgid "Operator interface at %L conflicts with intrinsic interface"
msgstr ""
-#: fortran/interface.c:1121
+#: fortran/interface.c:1130
#, no-c-format
msgid "Procedure '%s' in %s at %L has no explicit interface"
msgstr ""
-#: fortran/interface.c:1124
+#: fortran/interface.c:1133
#, no-c-format
msgid "Procedure '%s' in %s at %L is neither function nor subroutine"
msgstr ""
-#: fortran/interface.c:1179 fortran/interface.c:1185
+#: fortran/interface.c:1188 fortran/interface.c:1194
#, no-c-format
msgid "Ambiguous interfaces '%s' and '%s' in %s at %L"
msgstr ""
-#: fortran/interface.c:1221
+#: fortran/interface.c:1230
#, no-c-format
msgid "'%s' at %L is not a module procedure"
msgstr ""
-#: fortran/interface.c:1469 fortran/interface.c:2428
+#: fortran/interface.c:1478 fortran/interface.c:2440
#, no-c-format
msgid "Type/rank mismatch in argument '%s' at %L"
msgstr ""
-#: fortran/interface.c:1478
+#: fortran/interface.c:1487
#, no-c-format
msgid "Type mismatch in argument '%s' at %L; passed %s to %s"
msgstr ""
-#: fortran/interface.c:1496 fortran/interface.c:1536
+#: fortran/interface.c:1505 fortran/interface.c:1545
#, no-c-format
msgid "Rank mismatch in argument '%s' at %L (%d and %d)"
msgstr ""
-#: fortran/interface.c:1523
+#: fortran/interface.c:1532
#, no-c-format
msgid ""
"Fortran 2003: Scalar CHARACTER actual argument with array dummy argument '%"
"s' at %L"
msgstr ""
-#: fortran/interface.c:1548
+#: fortran/interface.c:1557
#, no-c-format
msgid "Element of assumed-shaped array passed to dummy argument '%s' at %L"
msgstr ""
-#: fortran/interface.c:1865
+#: fortran/interface.c:1874
#, no-c-format
msgid "Keyword argument '%s' at %L is not in the procedure"
msgstr ""
-#: fortran/interface.c:1873
+#: fortran/interface.c:1882
#, no-c-format
msgid ""
"Keyword argument '%s' at %L is already associated with another actual "
"argument"
msgstr ""
-#: fortran/interface.c:1883
+#: fortran/interface.c:1892
#, no-c-format
msgid "More actual than formal arguments in procedure call at %L"
msgstr ""
-#: fortran/interface.c:1895 fortran/interface.c:2127
+#: fortran/interface.c:1904 fortran/interface.c:2136
#, no-c-format
msgid "Missing alternate return spec in subroutine call at %L"
msgstr ""
-#: fortran/interface.c:1903
+#: fortran/interface.c:1912
#, no-c-format
msgid "Unexpected alternate return spec in subroutine call at %L"
msgstr ""
-#: fortran/interface.c:1926
+#: fortran/interface.c:1935
#, no-c-format
msgid ""
"Character length mismatch (%ld/%ld) between actual argument and pointer or "
"allocatable dummy argument '%s' at %L"
msgstr ""
-#: fortran/interface.c:1933
+#: fortran/interface.c:1942
#, no-c-format
msgid ""
"Character length mismatch (%ld/%ld) between actual argument and assumed-"
"shape dummy argument '%s' at %L"
msgstr ""
-#: fortran/interface.c:1949
+#: fortran/interface.c:1958
#, no-c-format
msgid ""
"Character length of actual argument shorter than of dummy argument '%s' (%lu/"
"%lu) at %L"
msgstr ""
-#: fortran/interface.c:1954
+#: fortran/interface.c:1963
#, no-c-format
msgid ""
"Actual argument contains too few elements for dummy argument '%s' (%lu/%lu) "
"at %L"
msgstr ""
-#: fortran/interface.c:1967
+#: fortran/interface.c:1976
#, no-c-format
msgid "Expected a procedure pointer for argument '%s' at %L"
msgstr ""
-#: fortran/interface.c:1979
+#: fortran/interface.c:1988
#, no-c-format
msgid "Expected a procedure for argument '%s' at %L"
msgstr ""
-#: fortran/interface.c:1989
+#: fortran/interface.c:1998
#, no-c-format
msgid "Expected a PURE procedure for argument '%s' at %L"
msgstr ""
-#: fortran/interface.c:2003
+#: fortran/interface.c:2012
#, no-c-format
msgid "Actual argument for '%s' cannot be an assumed-size array at %L"
msgstr ""
-#: fortran/interface.c:2012
+#: fortran/interface.c:2021
#, no-c-format
msgid "Actual argument for '%s' must be a pointer at %L"
msgstr ""
-#: fortran/interface.c:2021
+#: fortran/interface.c:2030
#, no-c-format
msgid "Actual argument for '%s' must be ALLOCATABLE at %L"
msgstr ""
-#: fortran/interface.c:2034
+#: fortran/interface.c:2043
#, no-c-format
msgid ""
"Actual argument at %L must be definable as the dummy argument '%s' is INTENT "
"= OUT/INOUT"
msgstr ""
-#: fortran/interface.c:2043
+#: fortran/interface.c:2052
#, no-c-format
msgid ""
"Actual argument at %L is use-associated with PROTECTED attribute and dummy "
"argument '%s' is INTENT = OUT/INOUT"
msgstr ""
-#: fortran/interface.c:2056
+#: fortran/interface.c:2065
#, no-c-format
msgid ""
"Array-section actual argument with vector subscripts at %L is incompatible "
@@ -6307,75 +6058,75 @@ msgid ""
"'%s'"
msgstr ""
-#: fortran/interface.c:2073
+#: fortran/interface.c:2082
#, no-c-format
msgid ""
"Assumed-shape actual argument at %L is incompatible with the non-assumed-"
"shape dummy argument '%s' due to VOLATILE attribute"
msgstr ""
-#: fortran/interface.c:2085
+#: fortran/interface.c:2094
#, no-c-format
msgid ""
"Array-section actual argument at %L is incompatible with the non-assumed-"
"shape dummy argument '%s' due to VOLATILE attribute"
msgstr ""
-#: fortran/interface.c:2104
+#: fortran/interface.c:2113
#, no-c-format
msgid ""
"Pointer-array actual argument at %L requires an assumed-shape or pointer-"
"array dummy argument '%s' due to VOLATILE attribute"
msgstr ""
-#: fortran/interface.c:2134
+#: fortran/interface.c:2143
#, no-c-format
msgid "Missing actual argument for argument '%s' at %L"
msgstr ""
-#: fortran/interface.c:2320
+#: fortran/interface.c:2329
#, no-c-format
msgid ""
"Same actual argument associated with INTENT(%s) argument '%s' and INTENT(%s) "
"argument '%s' at %L"
msgstr ""
-#: fortran/interface.c:2376
+#: fortran/interface.c:2385
#, no-c-format
msgid ""
"Procedure argument at %L is INTENT(IN) while interface specifies INTENT(%s)"
msgstr ""
-#: fortran/interface.c:2386
+#: fortran/interface.c:2395
#, no-c-format
msgid ""
"Procedure argument at %L is local to a PURE procedure and is passed to an "
"INTENT(%s) argument"
msgstr ""
-#: fortran/interface.c:2394
+#: fortran/interface.c:2403
#, no-c-format
msgid ""
"Procedure argument at %L is local to a PURE procedure and has the POINTER "
"attribute"
msgstr ""
-#: fortran/interface.c:2417
+#: fortran/interface.c:2429
#, no-c-format
msgid "Procedure '%s' called with an implicit interface at %L"
msgstr ""
-#: fortran/interface.c:2442
+#: fortran/interface.c:2454
#, no-c-format
msgid "Keyword argument requires explicit interface for procedure '%s' at %L"
msgstr ""
-#: fortran/interface.c:2676
+#: fortran/interface.c:2689
#, no-c-format
msgid "Function '%s' called in lieu of an operator at %L must be PURE"
msgstr ""
-#: fortran/interface.c:2756
+#: fortran/interface.c:2769
#, no-c-format
msgid "Entity '%s' at %C is already present in the interface"
msgstr ""
@@ -6425,459 +6176,463 @@ msgstr ""
msgid "Type of argument '%s' in call to '%s' at %L should be %s, not %s"
msgstr ""
-#: fortran/intrinsic.c:3559
+#: fortran/intrinsic.c:3556
#, no-c-format
msgid "Intrinsic '%s' (is %s) is used at %L"
msgstr ""
-#: fortran/intrinsic.c:3623
+#: fortran/intrinsic.c:3620
#, no-c-format
msgid "Fortran 2003: Function '%s' as initialization expression at %L"
msgstr ""
-#: fortran/intrinsic.c:3699
+#: fortran/intrinsic.c:3696
#, no-c-format
msgid ""
"Fortran 2003: Elemental function as initialization expression with non-"
"integer/non-character arguments at %L"
msgstr ""
-#: fortran/intrinsic.c:3760
+#: fortran/intrinsic.c:3757
#, no-c-format
msgid "Subroutine call to intrinsic '%s' at %L is not PURE"
msgstr ""
-#: fortran/intrinsic.c:3832
+#: fortran/intrinsic.c:3829
#, no-c-format
msgid "Extension: Conversion from %s to %s at %L"
msgstr ""
-#: fortran/intrinsic.c:3835
+#: fortran/intrinsic.c:3832
#, no-c-format
msgid "Conversion from %s to %s at %L"
msgstr ""
-#: fortran/intrinsic.c:3882
+#: fortran/intrinsic.c:3879
#, no-c-format
msgid "Can't convert %s to %s at %L"
msgstr ""
-#: fortran/intrinsic.c:3978
+#: fortran/intrinsic.c:3975
#, no-c-format
msgid ""
"'%s' declared at %L may shadow the intrinsic of the same name. In order to "
"call the intrinsic, explicit INTRINSIC declarations may be required."
msgstr ""
-#: fortran/intrinsic.c:3983
+#: fortran/intrinsic.c:3980
#, no-c-format
msgid ""
"'%s' declared at %L is also the name of an intrinsic. It can only be called "
"via an explicit interface or if declared EXTERNAL."
msgstr ""
-#: fortran/io.c:164 fortran/primary.c:768
+#: fortran/io.c:165 fortran/primary.c:768
#, no-c-format
msgid "Extension: backslash character at %C"
msgstr ""
-#: fortran/io.c:198 fortran/io.c:201
+#: fortran/io.c:201 fortran/io.c:204
#, no-c-format
msgid "Extension: Tab character in format at %C"
msgstr ""
-#: fortran/io.c:445
+#: fortran/io.c:448
#, no-c-format
msgid "Fortran 2003: DP format specifier not allowed at %C"
msgstr ""
-#: fortran/io.c:452
+#: fortran/io.c:455
#, no-c-format
msgid "Fortran 2003: DC format specifier not allowed at %C"
msgstr ""
-#: fortran/io.c:488
+#: fortran/io.c:491
msgid "Positive width required"
msgstr ""
-#: fortran/io.c:489
+#: fortran/io.c:492
msgid "Nonnegative width required"
msgstr ""
-#: fortran/io.c:490
+#: fortran/io.c:493
msgid "Unexpected element '%c' in format string at %L"
msgstr ""
-#: fortran/io.c:492
+#: fortran/io.c:495
msgid "Unexpected end of format string"
msgstr ""
-#: fortran/io.c:493
+#: fortran/io.c:496
msgid "Zero width in format descriptor"
msgstr ""
-#: fortran/io.c:512
+#: fortran/io.c:516
msgid "Missing leading left parenthesis"
msgstr ""
-#: fortran/io.c:559
+#: fortran/io.c:563
msgid "Expected P edit descriptor"
msgstr ""
#. P requires a prior number.
-#: fortran/io.c:567
+#: fortran/io.c:571
msgid "P descriptor requires leading scale factor"
msgstr ""
#. X requires a prior number if we're being pedantic.
-#: fortran/io.c:572
+#: fortran/io.c:576
#, no-c-format
msgid "Extension: X descriptor requires leading space count at %C"
msgstr ""
-#: fortran/io.c:596
+#: fortran/io.c:600
#, no-c-format
msgid "Extension: $ descriptor at %C"
msgstr ""
-#: fortran/io.c:601
+#: fortran/io.c:605
#, no-c-format
msgid "$ should be the last specifier in format at %C"
msgstr ""
-#: fortran/io.c:650
+#: fortran/io.c:654
msgid "Repeat count cannot follow P descriptor"
msgstr ""
-#: fortran/io.c:665
+#: fortran/io.c:669
msgid "Positive width required with T descriptor"
msgstr ""
-#: fortran/io.c:680
+#: fortran/io.c:684
#, no-c-format
msgid "Extension: Missing positive width after L descriptor at %C"
msgstr ""
-#: fortran/io.c:723
+#: fortran/io.c:727
#, no-c-format
msgid "Fortran 2008: 'G0' in format at %C"
msgstr ""
-#: fortran/io.c:751 fortran/io.c:753 fortran/io.c:814 fortran/io.c:816
+#: fortran/io.c:745
+msgid "E specifier not allowed with g0 descriptor"
+msgstr ""
+
+#: fortran/io.c:759 fortran/io.c:761 fortran/io.c:822 fortran/io.c:824
#, no-c-format
msgid "Period required in format specifier at %C"
msgstr ""
-#: fortran/io.c:785
+#: fortran/io.c:793
msgid "Positive exponent width required"
msgstr ""
-#: fortran/io.c:834
+#: fortran/io.c:842
#, no-c-format
msgid "The H format specifier at %C is a Fortran 95 deleted feature"
msgstr ""
-#: fortran/io.c:919 fortran/io.c:976
+#: fortran/io.c:927 fortran/io.c:984
#, no-c-format
msgid "Extension: Missing comma at %C"
msgstr ""
-#: fortran/io.c:989
+#: fortran/io.c:999
#, no-c-format
msgid "%s in format string at %L"
msgstr ""
-#: fortran/io.c:1034
+#: fortran/io.c:1044
#, no-c-format
msgid "Format statement in module main block at %C"
msgstr ""
-#: fortran/io.c:1040
+#: fortran/io.c:1050
#, no-c-format
msgid "Missing format label at %C"
msgstr ""
-#: fortran/io.c:1100 fortran/io.c:1131 fortran/io.c:1193
+#: fortran/io.c:1110 fortran/io.c:1141 fortran/io.c:1203
#, no-c-format
msgid "Invalid value for %s specification at %C"
msgstr ""
-#: fortran/io.c:1106 fortran/io.c:1137
+#: fortran/io.c:1116 fortran/io.c:1147
#, no-c-format
msgid "Duplicate %s specification at %C"
msgstr ""
-#: fortran/io.c:1144
+#: fortran/io.c:1154
#, no-c-format
msgid "Variable %s cannot be INTENT(IN) at %C"
msgstr ""
-#: fortran/io.c:1151
+#: fortran/io.c:1161
#, no-c-format
msgid "Variable %s cannot be assigned in PURE procedure at %C"
msgstr ""
-#: fortran/io.c:1199
+#: fortran/io.c:1209
#, no-c-format
msgid "Duplicate %s label specification at %C"
msgstr ""
-#: fortran/io.c:1219
+#: fortran/io.c:1229
#, no-c-format
msgid ""
"Constant expression in FORMAT tag at %L must be of type default CHARACTER"
msgstr ""
-#: fortran/io.c:1232
+#: fortran/io.c:1242
#, no-c-format
msgid "FORMAT tag at %L must be of type CHARACTER or INTEGER"
msgstr ""
-#: fortran/io.c:1238
+#: fortran/io.c:1248
#, no-c-format
msgid "Deleted feature: ASSIGNED variable in FORMAT tag at %L"
msgstr ""
-#: fortran/io.c:1244
+#: fortran/io.c:1254
#, no-c-format
msgid "Variable '%s' at %L has not been assigned a format label"
msgstr ""
-#: fortran/io.c:1251
+#: fortran/io.c:1261
#, no-c-format
msgid "Scalar '%s' in FORMAT tag at %L is not an ASSIGNED variable"
msgstr ""
-#: fortran/io.c:1264
+#: fortran/io.c:1274
#, no-c-format
msgid "Extension: Character array in FORMAT tag at %L"
msgstr ""
-#: fortran/io.c:1270
+#: fortran/io.c:1280
#, no-c-format
msgid "Extension: Non-character in FORMAT tag at %L"
msgstr ""
-#: fortran/io.c:1295
+#: fortran/io.c:1305
#, no-c-format
msgid "%s tag at %L must be of type %s"
msgstr ""
-#: fortran/io.c:1302
+#: fortran/io.c:1312
#, no-c-format
msgid "%s tag at %L must be scalar"
msgstr ""
-#: fortran/io.c:1308
+#: fortran/io.c:1318
#, no-c-format
msgid "Fortran 2003: IOMSG tag at %L"
msgstr ""
-#: fortran/io.c:1316
+#: fortran/io.c:1326
#, no-c-format
msgid "Fortran 95 requires default INTEGER in %s tag at %L"
msgstr ""
-#: fortran/io.c:1324
+#: fortran/io.c:1334
#, no-c-format
msgid "Extension: CONVERT tag at %L"
msgstr ""
-#: fortran/io.c:1505 fortran/io.c:1513
+#: fortran/io.c:1515 fortran/io.c:1523
#, no-c-format
msgid "Fortran 2003: %s specifier in %s statement at %C has value '%s'"
msgstr ""
-#: fortran/io.c:1532 fortran/io.c:1540
+#: fortran/io.c:1542 fortran/io.c:1550
#, no-c-format
msgid "Extension: %s specifier in %s statement at %C has value '%s'"
msgstr ""
-#: fortran/io.c:1553 fortran/io.c:1561
+#: fortran/io.c:1563 fortran/io.c:1571
#, no-c-format
msgid "%s specifier in %s statement at %C has invalid value '%s'"
msgstr ""
-#: fortran/io.c:1616
+#: fortran/io.c:1626
#, no-c-format
msgid "OPEN statement not allowed in PURE procedure at %C"
msgstr ""
-#: fortran/io.c:1649
+#: fortran/io.c:1659
#, no-c-format
msgid "Fortran 2003: ASYNCHRONOUS= at %C not allowed in Fortran 95"
msgstr ""
-#: fortran/io.c:1667 fortran/io.c:3045
+#: fortran/io.c:1677 fortran/io.c:3060
#, no-c-format
msgid "Fortran 2003: BLANK= at %C not allowed in Fortran 95"
msgstr ""
-#: fortran/io.c:1685 fortran/io.c:3024
+#: fortran/io.c:1695 fortran/io.c:3039
#, no-c-format
msgid "Fortran 2003: DECIMAL= at %C not allowed in Fortran 95"
msgstr ""
-#: fortran/io.c:1703 fortran/io.c:3135
+#: fortran/io.c:1713 fortran/io.c:3150
#, no-c-format
msgid "Fortran 2003: DELIM= at %C not allowed in Fortran 95"
msgstr ""
-#: fortran/io.c:1721
+#: fortran/io.c:1731
#, no-c-format
msgid "Fortran 2003: ENCODING= at %C not allowed in Fortran 95"
msgstr ""
#. When implemented, change the following to use gfc_notify_std F2003.
-#: fortran/io.c:1773
+#: fortran/io.c:1783
#, no-c-format
msgid "Fortran F2003: ROUND= specifier at %C not implemented"
msgstr ""
-#: fortran/io.c:1792
+#: fortran/io.c:1802
#, no-c-format
msgid "Fortran 2003: SIGN= at %C not allowed in Fortran 95"
msgstr ""
-#: fortran/io.c:2005
+#: fortran/io.c:2015
#, no-c-format
msgid "CLOSE statement not allowed in PURE procedure at %C"
msgstr ""
-#: fortran/io.c:2142 fortran/match.c:1948
+#: fortran/io.c:2152 fortran/match.c:1948
#, no-c-format
msgid "%s statement not allowed in PURE procedure at %C"
msgstr ""
-#: fortran/io.c:2198
+#: fortran/io.c:2208
#, no-c-format
msgid "Fortran 2003: FLUSH statement at %C"
msgstr ""
-#: fortran/io.c:2254
+#: fortran/io.c:2264
#, no-c-format
msgid "Duplicate UNIT specification at %C"
msgstr ""
-#: fortran/io.c:2314
+#: fortran/io.c:2324
#, no-c-format
msgid "Duplicate format specification at %C"
msgstr ""
-#: fortran/io.c:2331
+#: fortran/io.c:2341
#, no-c-format
msgid "Symbol '%s' in namelist '%s' is INTENT(IN) at %C"
msgstr ""
-#: fortran/io.c:2367
+#: fortran/io.c:2377
#, no-c-format
msgid "Duplicate NML specification at %C"
msgstr ""
-#: fortran/io.c:2376
+#: fortran/io.c:2386
#, no-c-format
msgid "Symbol '%s' at %C must be a NAMELIST group name"
msgstr ""
-#: fortran/io.c:2441
+#: fortran/io.c:2451
#, no-c-format
msgid "END tag at %C not allowed in output statement"
msgstr ""
-#: fortran/io.c:2517
+#: fortran/io.c:2528
#, no-c-format
msgid ""
"UNIT specification at %L must be an INTEGER expression or a CHARACTER "
"variable"
msgstr ""
-#: fortran/io.c:2542
+#: fortran/io.c:2553
#, no-c-format
msgid "Invalid form of WRITE statement at %L, UNIT required"
msgstr ""
-#: fortran/io.c:2553
+#: fortran/io.c:2564
#, no-c-format
msgid "Internal unit with vector subscript at %L"
msgstr ""
-#: fortran/io.c:2560
+#: fortran/io.c:2571
#, no-c-format
msgid "External IO UNIT cannot be an array at %L"
msgstr ""
-#: fortran/io.c:2565
+#: fortran/io.c:2576
#, no-c-format
msgid "Extension: Comma before i/o item list at %L"
msgstr ""
-#: fortran/io.c:2575
+#: fortran/io.c:2586
#, no-c-format
msgid "ERR tag label %d at %L not defined"
msgstr ""
-#: fortran/io.c:2587
+#: fortran/io.c:2598
#, no-c-format
msgid "END tag label %d at %L not defined"
msgstr ""
-#: fortran/io.c:2599
+#: fortran/io.c:2610
#, no-c-format
msgid "EOR tag label %d at %L not defined"
msgstr ""
-#: fortran/io.c:2609
+#: fortran/io.c:2620
#, no-c-format
msgid "FORMAT label %d at %L not defined"
msgstr ""
-#: fortran/io.c:2730
+#: fortran/io.c:2741
#, no-c-format
msgid "Syntax error in I/O iterator at %C"
msgstr ""
-#: fortran/io.c:2761
+#: fortran/io.c:2772
#, no-c-format
msgid "Expected variable in READ statement at %C"
msgstr ""
-#: fortran/io.c:2767
+#: fortran/io.c:2778
#, no-c-format
msgid "Expected expression in %s statement at %C"
msgstr ""
-#: fortran/io.c:2777
+#: fortran/io.c:2788
#, no-c-format
msgid "Variable '%s' in input list at %C cannot be INTENT(IN)"
msgstr ""
-#: fortran/io.c:2786
+#: fortran/io.c:2797
#, no-c-format
msgid "Cannot read to variable '%s' in PURE procedure at %C"
msgstr ""
-#: fortran/io.c:2802
+#: fortran/io.c:2813
#, no-c-format
msgid "Cannot write to internal file unit '%s' at %C inside a PURE procedure"
msgstr ""
#. A general purpose syntax error.
-#: fortran/io.c:2863 fortran/io.c:3462 fortran/gfortran.h:2202
+#: fortran/io.c:2874 fortran/io.c:3481 fortran/gfortran.h:2209
#, no-c-format
msgid "Syntax error in %s statement at %C"
msgstr ""
-#: fortran/io.c:2944
+#: fortran/io.c:2959
#, no-c-format
msgid "Fortran 2003: Internal file at %L with namelist"
msgstr ""
-#: fortran/io.c:2998
+#: fortran/io.c:3013
#, no-c-format
msgid "ASYNCHRONOUS= specifier at %L must be an initialization expression"
msgstr ""
-#: fortran/io.c:3066
+#: fortran/io.c:3081
#, no-c-format
msgid "Fortran 2003: PAD= at %C not allowed in Fortran 95"
msgstr ""
@@ -6886,58 +6641,58 @@ msgstr ""
#. if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: ROUND= at %C "
#. "not allowed in Fortran 95") == FAILURE)
#. return MATCH_ERROR;
-#: fortran/io.c:3091
+#: fortran/io.c:3106
#, no-c-format
msgid "F2003 Feature: ROUND= specifier at %C not implemented"
msgstr ""
-#: fortran/io.c:3280
+#: fortran/io.c:3299
#, no-c-format
msgid "PRINT namelist at %C is an extension"
msgstr ""
-#: fortran/io.c:3432
+#: fortran/io.c:3451
#, no-c-format
msgid "Expected comma in I/O list at %C"
msgstr ""
-#: fortran/io.c:3496
+#: fortran/io.c:3515
#, no-c-format
msgid "PRINT statement at %C not allowed within PURE procedure"
msgstr ""
-#: fortran/io.c:3650 fortran/io.c:3701
+#: fortran/io.c:3671 fortran/io.c:3722
#, no-c-format
msgid "INQUIRE statement not allowed in PURE procedure at %C"
msgstr ""
-#: fortran/io.c:3677
+#: fortran/io.c:3698
#, no-c-format
msgid "IOLENGTH tag invalid in INQUIRE statement at %C"
msgstr ""
-#: fortran/io.c:3687 fortran/trans-io.c:1178
+#: fortran/io.c:3708 fortran/trans-io.c:1178
#, no-c-format
msgid "INQUIRE statement at %L cannot contain both FILE and UNIT specifiers"
msgstr ""
-#: fortran/io.c:3694
+#: fortran/io.c:3715
#, no-c-format
msgid "INQUIRE statement at %L requires either FILE or UNIT specifier"
msgstr ""
-#: fortran/io.c:3707
+#: fortran/io.c:3728
#, no-c-format
msgid ""
"INQUIRE statement at %L requires a PENDING= specifier with the ID= specifier"
msgstr ""
-#: fortran/io.c:3866
+#: fortran/io.c:3888
#, no-c-format
msgid "Fortran 2003: WAIT at %C not allowed in Fortran 95"
msgstr ""
-#: fortran/io.c:3872
+#: fortran/io.c:3894
#, no-c-format
msgid "WAIT statement not allowed in PURE procedure at %C"
msgstr ""
@@ -7348,254 +7103,279 @@ msgstr ""
msgid "Out of memory-- malloc() failed"
msgstr ""
-#: fortran/module.c:505
+#: fortran/module.c:509
#, no-c-format
msgid "Fortran 2003: module nature in USE statement at %C"
msgstr ""
-#: fortran/module.c:517
+#: fortran/module.c:521
#, no-c-format
msgid ""
"Module nature in USE statement at %C shall be either INTRINSIC or "
"NON_INTRINSIC"
msgstr ""
-#: fortran/module.c:530
+#: fortran/module.c:534
#, no-c-format
msgid "\"::\" was expected after module nature at %C but was not found"
msgstr ""
-#: fortran/module.c:539
+#: fortran/module.c:543
#, no-c-format
msgid "Fortran 2003: \"USE :: module\" at %C"
msgstr ""
-#: fortran/module.c:593
+#: fortran/module.c:597
#, no-c-format
msgid "Missing generic specification in USE statement at %C"
msgstr ""
-#: fortran/module.c:601
+#: fortran/module.c:605
#, no-c-format
msgid "Fortran 2003: Renaming operators in USE statements at %C"
msgstr ""
-#: fortran/module.c:643
+#: fortran/module.c:647
#, no-c-format
msgid "The name '%s' at %C has already been used as an external module name."
msgstr ""
-#: fortran/module.c:921
+#: fortran/module.c:925
#, no-c-format
msgid "Reading module %s at line %d column %d: %s"
msgstr ""
-#: fortran/module.c:925
+#: fortran/module.c:929
#, no-c-format
msgid "Writing module %s at line %d column %d: %s"
msgstr ""
-#: fortran/module.c:929
+#: fortran/module.c:933
#, no-c-format
msgid "Module %s at line %d column %d: %s"
msgstr ""
-#: fortran/module.c:969
+#: fortran/module.c:973
msgid "Unexpected EOF"
msgstr ""
-#: fortran/module.c:1001
+#: fortran/module.c:1005
msgid "Unexpected end of module in string constant"
msgstr ""
-#: fortran/module.c:1055
+#: fortran/module.c:1059
msgid "Integer overflow"
msgstr ""
-#: fortran/module.c:1086
+#: fortran/module.c:1090
msgid "Name too long"
msgstr ""
-#: fortran/module.c:1193
+#: fortran/module.c:1197
msgid "Bad name"
msgstr ""
-#: fortran/module.c:1237
+#: fortran/module.c:1241
msgid "Expected name"
msgstr ""
-#: fortran/module.c:1240
+#: fortran/module.c:1244
msgid "Expected left parenthesis"
msgstr ""
-#: fortran/module.c:1243
+#: fortran/module.c:1247
msgid "Expected right parenthesis"
msgstr ""
-#: fortran/module.c:1246
+#: fortran/module.c:1250
msgid "Expected integer"
msgstr ""
-#: fortran/module.c:1249
+#: fortran/module.c:1253
msgid "Expected string"
msgstr ""
-#: fortran/module.c:1273
+#: fortran/module.c:1277
msgid "find_enum(): Enum not found"
msgstr ""
-#: fortran/module.c:1287
+#: fortran/module.c:1291
#, no-c-format
msgid "Error writing modules file: %s"
msgstr ""
-#: fortran/module.c:1836
+#: fortran/module.c:1840
msgid "Expected attribute bit name"
msgstr ""
-#: fortran/module.c:2661
+#: fortran/module.c:2665
msgid "Expected integer string"
msgstr ""
-#: fortran/module.c:2665
+#: fortran/module.c:2669
msgid "Error converting integer"
msgstr ""
-#: fortran/module.c:2687
+#: fortran/module.c:2691
msgid "Expected real string"
msgstr ""
-#: fortran/module.c:2889
+#: fortran/module.c:2893
msgid "Expected expression type"
msgstr ""
-#: fortran/module.c:2943
+#: fortran/module.c:2947
msgid "Bad operator"
msgstr ""
-#: fortran/module.c:3032
+#: fortran/module.c:3036
msgid "Bad type in constant expression"
msgstr ""
-#: fortran/module.c:3073
+#: fortran/module.c:3077
#, no-c-format
msgid "Namelist %s cannot be renamed by USE association to %s"
msgstr ""
-#: fortran/module.c:4244
+#: fortran/module.c:4250
#, no-c-format
msgid "Symbol '%s' referenced at %L not found in module '%s'"
msgstr ""
-#: fortran/module.c:4251
+#: fortran/module.c:4257
#, no-c-format
msgid "User operator '%s' referenced at %L not found in module '%s'"
msgstr ""
-#: fortran/module.c:4256
+#: fortran/module.c:4262
#, no-c-format
msgid "Intrinsic operator '%s' referenced at %L not found in module '%s'"
msgstr ""
-#: fortran/module.c:4805
+#: fortran/module.c:4825
#, no-c-format
msgid "Can't open module file '%s' for writing at %C: %s"
msgstr ""
-#: fortran/module.c:4843
+#: fortran/module.c:4863
#, no-c-format
msgid "Error writing module file '%s' for writing: %s"
msgstr ""
-#: fortran/module.c:4873 fortran/module.c:4955
+#: fortran/module.c:4872
+#, no-c-format
+msgid "Can't delete module file '%s': %s"
+msgstr ""
+
+#: fortran/module.c:4875
+#, no-c-format
+msgid "Can't rename module file '%s' to '%s': %s"
+msgstr ""
+
+#: fortran/module.c:4881
+#, no-c-format
+msgid "Can't delete temporary module file '%s': %s"
+msgstr ""
+
+#: fortran/module.c:4901 fortran/module.c:4983
#, no-c-format
msgid ""
"Symbol '%s' referenced at %L does not exist in intrinsic module "
"ISO_C_BINDING."
msgstr ""
-#: fortran/module.c:4986
+#: fortran/module.c:5014
#, no-c-format
msgid ""
"Symbol '%s' referenced at %L not found in intrinsic module ISO_C_BINDING"
msgstr ""
-#: fortran/module.c:5008
+#: fortran/module.c:5036
#, no-c-format
msgid "Symbol '%s' already declared"
msgstr ""
-#: fortran/module.c:5063
+#: fortran/module.c:5091
#, no-c-format
msgid ""
"Use of intrinsic module '%s' at %C conflicts with non-intrinsic module name "
"used previously"
msgstr ""
-#: fortran/module.c:5076
+#: fortran/module.c:5104
#, no-c-format
msgid ""
"Symbol '%s' referenced at %L does not exist in intrinsic module "
"ISO_FORTRAN_ENV"
msgstr ""
-#: fortran/module.c:5084
+#: fortran/module.c:5112
#, no-c-format
msgid ""
"Use of the NUMERIC_STORAGE_SIZE named constant from intrinsic module "
"ISO_FORTRAN_ENV at %L is incompatible with option %s"
msgstr ""
-#: fortran/module.c:5112
+#: fortran/module.c:5140
#, no-c-format
msgid ""
"Use of the NUMERIC_STORAGE_SIZE named constant from intrinsic module "
"ISO_FORTRAN_ENV at %C is incompatible with option %s"
msgstr ""
-#: fortran/module.c:5128
+#: fortran/module.c:5156
#, no-c-format
msgid ""
"Symbol '%s' referenced at %L not found in intrinsic module ISO_FORTRAN_ENV"
msgstr ""
-#: fortran/module.c:5162
+#: fortran/module.c:5190
#, no-c-format
msgid "Fortran 2003: ISO_FORTRAN_ENV intrinsic module at %C"
msgstr ""
-#: fortran/module.c:5170
+#: fortran/module.c:5198
#, no-c-format
msgid "Fortran 2003: ISO_C_BINDING module at %C"
msgstr ""
-#: fortran/module.c:5180
+#: fortran/module.c:5208
#, no-c-format
msgid "Can't find an intrinsic module named '%s' at %C"
msgstr ""
-#: fortran/module.c:5185
+#: fortran/module.c:5213
#, no-c-format
msgid "Can't open module file '%s' for reading at %C: %s"
msgstr ""
-#: fortran/module.c:5193
+#: fortran/module.c:5221
#, no-c-format
msgid ""
"Use of non-intrinsic module '%s' at %C conflicts with intrinsic module name "
"used previously"
msgstr ""
-#: fortran/module.c:5208
+#: fortran/module.c:5236
msgid "Unexpected end of module"
msgstr ""
-#: fortran/module.c:5213
+#: fortran/module.c:5241
#, no-c-format
msgid "File '%s' opened at %C is not a GFORTRAN module file"
msgstr ""
-#: fortran/module.c:5223
+#: fortran/module.c:5248
+#, no-c-format
+msgid "Parse error when checking module version for file '%s' opened at %C"
+msgstr ""
+
+#: fortran/module.c:5253
+#, no-c-format
+msgid "Wrong module version '%s' (expected '"
+msgstr ""
+
+#: fortran/module.c:5266
#, no-c-format
msgid "Can't USE the same module we're building!"
msgstr ""
@@ -7630,7 +7410,7 @@ msgstr ""
msgid "Syntax error in !$OMP THREADPRIVATE list at %C"
msgstr ""
-#: fortran/openmp.c:759 fortran/resolve.c:6365 fortran/resolve.c:6718
+#: fortran/openmp.c:759 fortran/resolve.c:6445 fortran/resolve.c:6798
#, no-c-format
msgid "IF clause at %L requires a scalar LOGICAL expression"
msgstr ""
@@ -7927,17 +7707,17 @@ msgstr ""
msgid "Unrecognized option to -finit-logical: %s"
msgstr ""
-#: fortran/options.c:726
+#: fortran/options.c:728
#, no-c-format
msgid "Unrecognized option to -finit-real: %s"
msgstr ""
-#: fortran/options.c:742
+#: fortran/options.c:744
#, no-c-format
msgid "The value of n in -finit-character=n must be between 0 and 127"
msgstr ""
-#: fortran/options.c:833
+#: fortran/options.c:835
#, no-c-format
msgid "Maximum subrecord length cannot exceed %d"
msgstr ""
@@ -8180,129 +7960,129 @@ msgid ""
"INTERFACE procedure '%s' at %L has the same name as the enclosing procedure"
msgstr ""
-#: fortran/parse.c:2410
+#: fortran/parse.c:2411
#, no-c-format
msgid "%s statement must appear in a MODULE"
msgstr ""
-#: fortran/parse.c:2417
+#: fortran/parse.c:2418
#, no-c-format
msgid "%s statement at %C follows another accessibility specification"
msgstr ""
-#: fortran/parse.c:2467
+#: fortran/parse.c:2468
#, no-c-format
msgid "Bad kind expression for function '%s' at %L"
msgstr ""
-#: fortran/parse.c:2471
+#: fortran/parse.c:2472
#, no-c-format
msgid "The type for function '%s' at %L is not accessible"
msgstr ""
-#: fortran/parse.c:2529
+#: fortran/parse.c:2530
#, no-c-format
msgid "ELSEWHERE statement at %C follows previous unmasked ELSEWHERE"
msgstr ""
-#: fortran/parse.c:2550
+#: fortran/parse.c:2551
#, no-c-format
msgid "Unexpected %s statement in WHERE block at %C"
msgstr ""
-#: fortran/parse.c:2609
+#: fortran/parse.c:2610
#, no-c-format
msgid "Unexpected %s statement in FORALL block at %C"
msgstr ""
-#: fortran/parse.c:2660
+#: fortran/parse.c:2661
#, no-c-format
msgid "ELSE IF statement at %C cannot follow ELSE statement at %L"
msgstr ""
-#: fortran/parse.c:2678
+#: fortran/parse.c:2679
#, no-c-format
msgid "Duplicate ELSE statements at %L and %C"
msgstr ""
-#: fortran/parse.c:2739
+#: fortran/parse.c:2740
#, no-c-format
msgid "Expected a CASE or END SELECT statement following SELECT CASE at %C"
msgstr ""
-#: fortran/parse.c:2797
+#: fortran/parse.c:2798
#, no-c-format
msgid "Variable '%s' at %C cannot be redefined inside loop beginning at %L"
msgstr ""
-#: fortran/parse.c:2831
+#: fortran/parse.c:2832
#, no-c-format
msgid "End of nonblock DO statement at %C is within another block"
msgstr ""
-#: fortran/parse.c:2840
+#: fortran/parse.c:2841
#, no-c-format
msgid "End of nonblock DO statement at %C is interwoven with another DO loop"
msgstr ""
-#: fortran/parse.c:2889
+#: fortran/parse.c:2890
#, no-c-format
msgid "Statement label in ENDDO at %C doesn't match DO label"
msgstr ""
-#: fortran/parse.c:2905
+#: fortran/parse.c:2906
#, no-c-format
msgid "named block DO at %L requires matching ENDDO name"
msgstr ""
-#: fortran/parse.c:3164
+#: fortran/parse.c:3165
#, no-c-format
msgid "Name after !$omp critical and !$omp end critical does not match at %C"
msgstr ""
-#: fortran/parse.c:3220
+#: fortran/parse.c:3221
#, no-c-format
msgid "%s statement at %C cannot terminate a non-block DO loop"
msgstr ""
-#: fortran/parse.c:3407
+#: fortran/parse.c:3408
#, no-c-format
msgid "Contained procedure '%s' at %C is already ambiguous"
msgstr ""
-#: fortran/parse.c:3457
+#: fortran/parse.c:3458
#, no-c-format
msgid "Unexpected %s statement in CONTAINS section at %C"
msgstr ""
-#: fortran/parse.c:3481
+#: fortran/parse.c:3482
#, no-c-format
msgid ""
"Fortran 2008: CONTAINS statement without FUNCTION or SUBROUTINE statement at "
"%C"
msgstr ""
-#: fortran/parse.c:3552
+#: fortran/parse.c:3553
#, no-c-format
msgid "CONTAINS statement at %C is already in a contained program unit"
msgstr ""
-#: fortran/parse.c:3601
+#: fortran/parse.c:3602
#, no-c-format
msgid "Global name '%s' at %L is already being used as a %s at %L"
msgstr ""
-#: fortran/parse.c:3622
+#: fortran/parse.c:3623
#, no-c-format
msgid "Blank BLOCK DATA at %C conflicts with prior BLOCK DATA at %L"
msgstr ""
-#: fortran/parse.c:3648
+#: fortran/parse.c:3649
#, no-c-format
msgid "Unexpected %s statement in BLOCK DATA at %C"
msgstr ""
-#: fortran/parse.c:3691
+#: fortran/parse.c:3692
#, no-c-format
msgid "Unexpected %s statement in MODULE at %C"
msgstr ""
@@ -8310,7 +8090,7 @@ msgstr ""
#. If we see a duplicate main program, shut down. If the second
#. instance is an implied main program, i.e. data decls or executable
#. statements, we're in for lots of errors.
-#: fortran/parse.c:3874
+#: fortran/parse.c:3875
#, no-c-format
msgid "Two main PROGRAMs at %L and %C"
msgstr ""
@@ -8463,91 +8243,91 @@ msgstr ""
msgid "Syntax error in COMPLEX constant at %C"
msgstr ""
-#: fortran/primary.c:1475
+#: fortran/primary.c:1476
#, no-c-format
msgid "Keyword '%s' at %C has already appeared in the current argument list"
msgstr ""
-#: fortran/primary.c:1539
+#: fortran/primary.c:1540
#, no-c-format
msgid "Extension: argument list function at %C"
msgstr ""
-#: fortran/primary.c:1606
+#: fortran/primary.c:1607
#, no-c-format
msgid "Expected alternate return label at %C"
msgstr ""
-#: fortran/primary.c:1624
+#: fortran/primary.c:1625
#, no-c-format
msgid "Missing keyword name in actual argument list at %C"
msgstr ""
-#: fortran/primary.c:1669
+#: fortran/primary.c:1670
#, no-c-format
msgid "Syntax error in argument list at %C"
msgstr ""
-#: fortran/primary.c:1764
+#: fortran/primary.c:1765
#, no-c-format
msgid "Expected structure component name at %C"
msgstr ""
-#: fortran/primary.c:1801
+#: fortran/primary.c:1802
#, no-c-format
msgid "Expected argument list at %C"
msgstr ""
-#: fortran/primary.c:2095
+#: fortran/primary.c:2096
#, no-c-format
msgid ""
"Fortran 2003: Structure constructor with missing optional arguments at %C"
msgstr ""
-#: fortran/primary.c:2103
+#: fortran/primary.c:2104
#, no-c-format
msgid ""
"No initializer for component '%s' given in the structure constructor at %C!"
msgstr ""
-#: fortran/primary.c:2159
+#: fortran/primary.c:2160
#, no-c-format
msgid "Can't construct ABSTRACT type '%s' at %C"
msgstr ""
-#: fortran/primary.c:2187
+#: fortran/primary.c:2188
#, no-c-format
msgid "Fortran 2003: Structure constructor with named arguments at %C"
msgstr ""
-#: fortran/primary.c:2202
+#: fortran/primary.c:2203
#, no-c-format
msgid "Component initializer without name after component named %s at %C!"
msgstr ""
-#: fortran/primary.c:2205
+#: fortran/primary.c:2206
#, no-c-format
msgid "Too many components in structure constructor at %C!"
msgstr ""
-#: fortran/primary.c:2238
+#: fortran/primary.c:2239
#, no-c-format
msgid "Component '%s' is initialized twice in the structure constructor at %C!"
msgstr ""
-#: fortran/primary.c:2294
+#: fortran/primary.c:2295
#, no-c-format
msgid ""
"component '%s' at %L has already been set by a parent derived type "
"constructor"
msgstr ""
-#: fortran/primary.c:2317
+#: fortran/primary.c:2318
#, no-c-format
msgid "Syntax error in structure constructor at %C"
msgstr ""
-#: fortran/primary.c:2407
+#: fortran/primary.c:2408
#, no-c-format
msgid ""
"'%s' at %C is the name of a recursive function and so refers to the result "
@@ -8630,7 +8410,7 @@ msgstr ""
msgid "Dummy procedure at %L not allowed in ELEMENTAL procedure"
msgstr ""
-#: fortran/resolve.c:188 fortran/resolve.c:1205
+#: fortran/resolve.c:188 fortran/resolve.c:1277
#, no-c-format
msgid ""
"Unable to find a specific INTRINSIC procedure for the reference '%s' at %L"
@@ -8837,66 +8617,66 @@ msgstr ""
msgid "GENERIC procedure '%s' is not allowed as an actual argument at %L"
msgstr ""
-#: fortran/resolve.c:1100 fortran/resolve.c:5928 fortran/resolve.c:6683
+#: fortran/resolve.c:1148
+#, no-c-format
+msgid ""
+"Non-RECURSIVE procedure '%s' at %L is possibly calling itself recursively. "
+"Declare it RECURSIVE or use -frecursive"
+msgstr ""
+
+#: fortran/resolve.c:1181 fortran/resolve.c:6008 fortran/resolve.c:6763
#, no-c-format
msgid "Label %d referenced at %L is never defined"
msgstr ""
-#: fortran/resolve.c:1145
+#: fortran/resolve.c:1226
#, no-c-format
msgid "Statement function '%s' at %L is not allowed as an actual argument"
msgstr ""
-#: fortran/resolve.c:1153
+#: fortran/resolve.c:1234
#, no-c-format
msgid "Intrinsic '%s' at %L is not allowed as an actual argument"
msgstr ""
-#: fortran/resolve.c:1160
+#: fortran/resolve.c:1241
#, no-c-format
msgid "Internal procedure '%s' is not allowed as an actual argument at %L"
msgstr ""
-#: fortran/resolve.c:1166
+#: fortran/resolve.c:1247
#, no-c-format
msgid ""
"ELEMENTAL non-INTRINSIC procedure '%s' is not allowed as an actual argument "
"at %L"
msgstr ""
-#: fortran/resolve.c:1183
-#, no-c-format
-msgid ""
-"Reference to ENTRY '%s' at %L is recursive, but procedure '%s' is not "
-"declared as RECURSIVE"
-msgstr ""
-
-#: fortran/resolve.c:1224
+#: fortran/resolve.c:1299
#, no-c-format
msgid "Symbol '%s' at %L is ambiguous"
msgstr ""
-#: fortran/resolve.c:1273
+#: fortran/resolve.c:1350
#, no-c-format
msgid "By-value argument at %L is not of numeric type"
msgstr ""
-#: fortran/resolve.c:1280
+#: fortran/resolve.c:1357
#, no-c-format
msgid "By-value argument at %L cannot be an array or an array section"
msgstr ""
-#: fortran/resolve.c:1294
+#: fortran/resolve.c:1371
#, no-c-format
msgid "By-value argument at %L is not allowed in this context"
msgstr ""
-#: fortran/resolve.c:1306
+#: fortran/resolve.c:1383
#, no-c-format
msgid "Passing internal procedure at %L by location not allowed"
msgstr ""
-#: fortran/resolve.c:1431
+#: fortran/resolve.c:1508
#, no-c-format
msgid ""
"'%s' at %L is an array and OPTIONAL; IF IT IS MISSING, it cannot be the "
@@ -8904,570 +8684,572 @@ msgid ""
"argument with the same rank (12.4.1.5)"
msgstr ""
-#: fortran/resolve.c:1453
+#: fortran/resolve.c:1530
msgid "elemental procedure"
msgstr ""
-#: fortran/resolve.c:1470
+#: fortran/resolve.c:1547
#, no-c-format
msgid ""
"Actual argument at %L for INTENT(%s) dummy '%s' of ELEMENTAL subroutine '%s' "
"is a scalar, but another actual argument is an array"
msgstr ""
-#: fortran/resolve.c:1607
+#: fortran/resolve.c:1684
#, no-c-format
msgid "There is no specific function for the generic '%s' at %L"
msgstr ""
-#: fortran/resolve.c:1616
+#: fortran/resolve.c:1693
#, no-c-format
msgid ""
"Generic function '%s' at %L is not consistent with a specific intrinsic "
"interface"
msgstr ""
-#: fortran/resolve.c:1671
+#: fortran/resolve.c:1748
#, no-c-format
msgid ""
"Function '%s' at %L is INTRINSIC but is not compatible with an intrinsic"
msgstr ""
-#: fortran/resolve.c:1717
+#: fortran/resolve.c:1794
#, no-c-format
msgid "Unable to resolve the specific function '%s' at %L"
msgstr ""
-#: fortran/resolve.c:1773 fortran/resolve.c:10177
+#: fortran/resolve.c:1850 fortran/resolve.c:10264
#, no-c-format
msgid "Function '%s' at %L has no IMPLICIT type"
msgstr ""
-#: fortran/resolve.c:1984
+#: fortran/resolve.c:2059
#, no-c-format
msgid "Argument to '%s' at %L is not a variable"
msgstr ""
-#: fortran/resolve.c:2056
+#: fortran/resolve.c:2107
#, no-c-format
msgid "More actual than formal arguments in '%s' call at %L"
msgstr ""
-#: fortran/resolve.c:2068
+#: fortran/resolve.c:2116
#, no-c-format
msgid ""
"Parameter '%s' to '%s' at %L must be either a TARGET or an associated pointer"
msgstr ""
-#: fortran/resolve.c:2094
+#: fortran/resolve.c:2139
#, no-c-format
msgid ""
"Allocatable variable '%s' used as a parameter to '%s' at %L must not be an "
"array of zero size"
msgstr ""
-#: fortran/resolve.c:2111
+#: fortran/resolve.c:2156
#, no-c-format
msgid ""
"Assumed-shape array '%s' at %L cannot be an argument to the procedure '%s' "
"because it is not C interoperable"
msgstr ""
-#: fortran/resolve.c:2121
+#: fortran/resolve.c:2166
#, no-c-format
msgid ""
"Deferred-shape array '%s' at %L cannot be an argument to the procedure '%s' "
"because it is not C interoperable"
msgstr ""
-#: fortran/resolve.c:2144 fortran/resolve.c:2183
+#: fortran/resolve.c:2189 fortran/resolve.c:2226
#, no-c-format
msgid "CHARACTER argument '%s' to '%s' at %L must have a length of 1"
msgstr ""
#. Case 1c, section 15.1.2.5, J3/04-007: an associated
#. scalar pointer.
-#: fortran/resolve.c:2159
+#: fortran/resolve.c:2202
#, no-c-format
msgid "Argument '%s' to '%s' at %L must be an associated scalar POINTER"
msgstr ""
-#: fortran/resolve.c:2175
+#: fortran/resolve.c:2218
#, no-c-format
msgid "Parameter '%s' to '%s' at %L must be a scalar"
msgstr ""
#. TODO: Update this error message to allow for procedure
#. pointers once they are implemented.
-#: fortran/resolve.c:2197
+#: fortran/resolve.c:2240
#, no-c-format
msgid "Parameter '%s' to '%s' at %L must be a procedure"
msgstr ""
-#: fortran/resolve.c:2205
+#: fortran/resolve.c:2248
#, no-c-format
msgid "Parameter '%s' to '%s' at %L must be BIND(C)"
msgstr ""
-#: fortran/resolve.c:2251
+#: fortran/resolve.c:2294
#, no-c-format
msgid "Intrinsic subroutine '%s' used as a function at %L"
msgstr ""
-#: fortran/resolve.c:2258
+#: fortran/resolve.c:2301
#, no-c-format
msgid "'%s' at %L is not a function"
msgstr ""
-#: fortran/resolve.c:2264
+#: fortran/resolve.c:2307
#, no-c-format
msgid "ABSTRACT INTERFACE '%s' must not be referenced at %L"
msgstr ""
#. Internal procedures are taken care of in resolve_contained_fntype.
-#: fortran/resolve.c:2309
+#: fortran/resolve.c:2352
#, no-c-format
msgid ""
"Function '%s' is declared CHARACTER(*) and cannot be used at %L since it is "
"not a dummy argument"
msgstr ""
-#: fortran/resolve.c:2362
+#: fortran/resolve.c:2405
#, no-c-format
msgid ""
"User defined non-ELEMENTAL function '%s' at %L not allowed in WORKSHARE "
"construct"
msgstr ""
-#: fortran/resolve.c:2412
+#: fortran/resolve.c:2455
#, no-c-format
msgid "reference to non-PURE function '%s' at %L inside a FORALL %s"
msgstr ""
-#: fortran/resolve.c:2419
+#: fortran/resolve.c:2462
#, no-c-format
msgid ""
"Function reference to '%s' at %L is to a non-PURE procedure within a PURE "
"procedure"
msgstr ""
-#: fortran/resolve.c:2434
+#: fortran/resolve.c:2478
#, no-c-format
-msgid "Function '%s' at %L cannot call itself, as it is not RECURSIVE"
+msgid ""
+"ENTRY '%s' at %L cannot be called recursively, as function '%s' is not "
+"RECURSIVE"
msgstr ""
-#: fortran/resolve.c:2442
+#: fortran/resolve.c:2482
#, no-c-format
msgid ""
-"Call to ENTRY '%s' at %L is recursive, but function '%s' is not declared as "
-"RECURSIVE"
+"Function '%s' at %L cannot be called recursively, as it is not RECURSIVE"
msgstr ""
-#: fortran/resolve.c:2489
+#: fortran/resolve.c:2529
#, no-c-format
msgid "Subroutine call to '%s' in FORALL block at %L is not PURE"
msgstr ""
-#: fortran/resolve.c:2492
+#: fortran/resolve.c:2532
#, no-c-format
msgid "Subroutine call to '%s' at %L is not PURE"
msgstr ""
-#: fortran/resolve.c:2555
+#: fortran/resolve.c:2595
#, no-c-format
msgid "There is no specific subroutine for the generic '%s' at %L"
msgstr ""
-#: fortran/resolve.c:2564
+#: fortran/resolve.c:2604
#, no-c-format
msgid ""
"Generic subroutine '%s' at %L is not consistent with an intrinsic subroutine "
"interface"
msgstr ""
-#: fortran/resolve.c:2672
+#: fortran/resolve.c:2712
#, no-c-format
msgid "Missing SHAPE parameter for call to %s at %L"
msgstr ""
-#: fortran/resolve.c:2680
+#: fortran/resolve.c:2720
#, no-c-format
msgid "SHAPE parameter for call to %s at %L must be a rank 1 INTEGER array"
msgstr ""
-#: fortran/resolve.c:2764
+#: fortran/resolve.c:2805
#, no-c-format
msgid ""
"Subroutine '%s' at %L is INTRINSIC but is not compatible with an intrinsic"
msgstr ""
-#: fortran/resolve.c:2808
+#: fortran/resolve.c:2849
#, no-c-format
msgid "Unable to resolve the specific subroutine '%s' at %L"
msgstr ""
-#: fortran/resolve.c:2868
+#: fortran/resolve.c:2909
#, no-c-format
msgid "'%s' at %L has a type, which is not consistent with the CALL at %L"
msgstr ""
-#: fortran/resolve.c:2899
+#: fortran/resolve.c:2942
#, no-c-format
-msgid "SUBROUTINE '%s' at %L cannot call itself, as it is not RECURSIVE"
+msgid ""
+"ENTRY '%s' at %L cannot be called recursively, as subroutine '%s' is not "
+"RECURSIVE"
msgstr ""
-#: fortran/resolve.c:2907
+#: fortran/resolve.c:2946
#, no-c-format
msgid ""
-"Call to ENTRY '%s' at %L is recursive, but subroutine '%s' is not declared "
-"as RECURSIVE"
+"SUBROUTINE '%s' at %L cannot be called recursively, as it is not RECURSIVE"
msgstr ""
-#: fortran/resolve.c:2982
+#: fortran/resolve.c:3020
#, no-c-format
msgid "Shapes for operands at %L and %L are not conformable"
msgstr ""
-#: fortran/resolve.c:3033
+#: fortran/resolve.c:3071
#, c-format
msgid "Invalid context for NULL() pointer at %%L"
msgstr ""
-#: fortran/resolve.c:3049
+#: fortran/resolve.c:3087
#, c-format
msgid "Operand of unary numeric operator '%s' at %%L is %s"
msgstr ""
-#: fortran/resolve.c:3065
+#: fortran/resolve.c:3103
#, c-format
msgid "Operands of binary numeric operator '%s' at %%L are %s/%s"
msgstr ""
-#: fortran/resolve.c:3080
+#: fortran/resolve.c:3118
#, c-format
msgid "Operands of string concatenation operator at %%L are %s/%s"
msgstr ""
-#: fortran/resolve.c:3099
+#: fortran/resolve.c:3137
#, c-format
msgid "Operands of logical operator '%s' at %%L are %s/%s"
msgstr ""
-#: fortran/resolve.c:3113
+#: fortran/resolve.c:3151
#, c-format
msgid "Operand of .not. operator at %%L is %s"
msgstr ""
-#: fortran/resolve.c:3127
+#: fortran/resolve.c:3165
msgid "COMPLEX quantities cannot be compared at %L"
msgstr ""
-#: fortran/resolve.c:3156
+#: fortran/resolve.c:3194
#, c-format
msgid "Logicals at %%L must be compared with %s instead of %s"
msgstr ""
-#: fortran/resolve.c:3162
+#: fortran/resolve.c:3200
#, c-format
msgid "Operands of comparison operator '%s' at %%L are %s/%s"
msgstr ""
-#: fortran/resolve.c:3170
+#: fortran/resolve.c:3208
#, c-format
msgid "Unknown operator '%s' at %%L"
msgstr ""
-#: fortran/resolve.c:3172
+#: fortran/resolve.c:3210
#, c-format
msgid "Operand of user operator '%s' at %%L is %s"
msgstr ""
-#: fortran/resolve.c:3175
+#: fortran/resolve.c:3213
#, c-format
msgid "Operands of user operator '%s' at %%L are %s/%s"
msgstr ""
-#: fortran/resolve.c:3261
+#: fortran/resolve.c:3299
#, c-format
msgid "Inconsistent ranks for operator at %%L and %%L"
msgstr ""
-#: fortran/resolve.c:3458
+#: fortran/resolve.c:3496
#, no-c-format
msgid "Array reference at %L is out of bounds (%ld < %ld) in dimension %d"
msgstr ""
-#: fortran/resolve.c:3466
+#: fortran/resolve.c:3504
#, no-c-format
msgid "Array reference at %L is out of bounds (%ld > %ld) in dimension %d"
msgstr ""
-#: fortran/resolve.c:3485
+#: fortran/resolve.c:3523
#, no-c-format
msgid "Illegal stride of zero at %L"
msgstr ""
-#: fortran/resolve.c:3502
+#: fortran/resolve.c:3540
#, no-c-format
msgid ""
"Lower array reference at %L is out of bounds (%ld < %ld) in dimension %d"
msgstr ""
-#: fortran/resolve.c:3510
+#: fortran/resolve.c:3548
#, no-c-format
msgid ""
"Lower array reference at %L is out of bounds (%ld > %ld) in dimension %d"
msgstr ""
-#: fortran/resolve.c:3526
+#: fortran/resolve.c:3564
#, no-c-format
msgid ""
"Upper array reference at %L is out of bounds (%ld < %ld) in dimension %d"
msgstr ""
-#: fortran/resolve.c:3535
+#: fortran/resolve.c:3573
#, no-c-format
msgid ""
"Upper array reference at %L is out of bounds (%ld > %ld) in dimension %d"
msgstr ""
-#: fortran/resolve.c:3574
+#: fortran/resolve.c:3612
#, no-c-format
msgid "Rightmost upper bound of assumed size array section not specified at %L"
msgstr ""
-#: fortran/resolve.c:3584
+#: fortran/resolve.c:3622
#, no-c-format
msgid "Rank mismatch in array reference at %L (%d/%d)"
msgstr ""
-#: fortran/resolve.c:3612
+#: fortran/resolve.c:3650
#, no-c-format
msgid "Array index at %L must be scalar"
msgstr ""
-#: fortran/resolve.c:3618
+#: fortran/resolve.c:3656
#, no-c-format
msgid "Array index at %L must be of INTEGER type, found %s"
msgstr ""
-#: fortran/resolve.c:3624
+#: fortran/resolve.c:3662
#, no-c-format
msgid "Extension: REAL array index at %L"
msgstr ""
-#: fortran/resolve.c:3654
+#: fortran/resolve.c:3692
#, no-c-format
msgid "Argument dim at %L must be scalar"
msgstr ""
-#: fortran/resolve.c:3661
+#: fortran/resolve.c:3699
#, no-c-format
msgid "Argument dim at %L must be of INTEGER type"
msgstr ""
-#: fortran/resolve.c:3782
+#: fortran/resolve.c:3820
#, no-c-format
msgid "Array index at %L is an array of rank %d"
msgstr ""
-#: fortran/resolve.c:3819
+#: fortran/resolve.c:3857
#, no-c-format
msgid "Substring start index at %L must be of type INTEGER"
msgstr ""
-#: fortran/resolve.c:3826
+#: fortran/resolve.c:3864
#, no-c-format
msgid "Substring start index at %L must be scalar"
msgstr ""
-#: fortran/resolve.c:3835
+#: fortran/resolve.c:3873
#, no-c-format
msgid "Substring start index at %L is less than one"
msgstr ""
-#: fortran/resolve.c:3848
+#: fortran/resolve.c:3886
#, no-c-format
msgid "Substring end index at %L must be of type INTEGER"
msgstr ""
-#: fortran/resolve.c:3855
+#: fortran/resolve.c:3893
#, no-c-format
msgid "Substring end index at %L must be scalar"
msgstr ""
-#: fortran/resolve.c:3865
+#: fortran/resolve.c:3903
#, no-c-format
msgid "Substring end index at %L exceeds the string length"
msgstr ""
-#: fortran/resolve.c:4003
+#: fortran/resolve.c:4041
#, no-c-format
msgid ""
"Component to the right of a part reference with nonzero rank must not have "
"the POINTER attribute at %L"
msgstr ""
-#: fortran/resolve.c:4010
+#: fortran/resolve.c:4048
#, no-c-format
msgid ""
"Component to the right of a part reference with nonzero rank must not have "
"the ALLOCATABLE attribute at %L"
msgstr ""
-#: fortran/resolve.c:4029
+#: fortran/resolve.c:4067
#, no-c-format
msgid ""
"Two or more part references with nonzero rank must not be specified at %L"
msgstr ""
-#: fortran/resolve.c:4208
+#: fortran/resolve.c:4246
#, no-c-format
msgid ""
"Variable '%s', used in a specification expression, is referenced at %L "
"before the ENTRY statement in which it is a parameter"
msgstr ""
-#: fortran/resolve.c:4213
+#: fortran/resolve.c:4251
#, no-c-format
msgid ""
"Variable '%s' is used at %L before the ENTRY statement in which it is a "
"parameter"
msgstr ""
-#: fortran/resolve.c:4455
+#: fortran/resolve.c:4535
#, no-c-format
msgid "Passed-object at %L must be scalar"
msgstr ""
#. Nothing matching found!
-#: fortran/resolve.c:4565
+#: fortran/resolve.c:4645
#, no-c-format
msgid ""
"Found no matching specific binding for the call to the GENERIC '%s' at %L"
msgstr ""
-#: fortran/resolve.c:4585
+#: fortran/resolve.c:4665
#, no-c-format
msgid "'%s' at %L should be a SUBROUTINE"
msgstr ""
-#: fortran/resolve.c:4621
+#: fortran/resolve.c:4701
#, no-c-format
msgid "'%s' at %L should be a FUNCTION"
msgstr ""
-#: fortran/resolve.c:4757
+#: fortran/resolve.c:4837
#, no-c-format
msgid "%s at %L must be a scalar"
msgstr ""
-#: fortran/resolve.c:4767
+#: fortran/resolve.c:4847
#, no-c-format
msgid "Deleted feature: %s at %L must be integer"
msgstr ""
-#: fortran/resolve.c:4771 fortran/resolve.c:4778
+#: fortran/resolve.c:4851 fortran/resolve.c:4858
#, no-c-format
msgid "%s at %L must be INTEGER"
msgstr ""
-#: fortran/resolve.c:4798
+#: fortran/resolve.c:4878
#, no-c-format
msgid "Cannot assign to loop variable in PURE procedure at %L"
msgstr ""
-#: fortran/resolve.c:4822
+#: fortran/resolve.c:4902
#, no-c-format
msgid "Step expression in DO loop at %L cannot be zero"
msgstr ""
-#: fortran/resolve.c:4898
+#: fortran/resolve.c:4978
#, no-c-format
msgid "FORALL index-name at %L must be a scalar INTEGER"
msgstr ""
-#: fortran/resolve.c:4903
+#: fortran/resolve.c:4983
#, no-c-format
msgid "FORALL start expression at %L must be a scalar INTEGER"
msgstr ""
-#: fortran/resolve.c:4910
+#: fortran/resolve.c:4990
#, no-c-format
msgid "FORALL end expression at %L must be a scalar INTEGER"
msgstr ""
-#: fortran/resolve.c:4918
+#: fortran/resolve.c:4998
#, no-c-format
msgid "FORALL stride expression at %L must be a scalar %s"
msgstr ""
-#: fortran/resolve.c:4923
+#: fortran/resolve.c:5003
#, no-c-format
msgid "FORALL stride expression at %L cannot be zero"
msgstr ""
-#: fortran/resolve.c:4939
+#: fortran/resolve.c:5019
#, no-c-format
msgid "FORALL index '%s' may not appear in triplet specification at %L"
msgstr ""
-#: fortran/resolve.c:5019
+#: fortran/resolve.c:5099
#, no-c-format
msgid ""
"Expression in DEALLOCATE statement at %L must be ALLOCATABLE or a POINTER"
msgstr ""
-#: fortran/resolve.c:5026
+#: fortran/resolve.c:5106
#, no-c-format
msgid "Cannot deallocate INTENT(IN) variable '%s' at %L"
msgstr ""
-#: fortran/resolve.c:5130
+#: fortran/resolve.c:5210
#, no-c-format
msgid ""
"The STAT variable '%s' in an ALLOCATE statement must not be allocated in the "
"same statement at %L"
msgstr ""
-#: fortran/resolve.c:5166
+#: fortran/resolve.c:5246
#, no-c-format
msgid "Expression in ALLOCATE statement at %L must be ALLOCATABLE or a POINTER"
msgstr ""
-#: fortran/resolve.c:5174
+#: fortran/resolve.c:5254
#, no-c-format
msgid "Cannot allocate INTENT(IN) variable '%s' at %L"
msgstr ""
-#: fortran/resolve.c:5198
+#: fortran/resolve.c:5278
#, no-c-format
msgid "Array specification required in ALLOCATE statement at %L"
msgstr ""
-#: fortran/resolve.c:5228
+#: fortran/resolve.c:5308
#, no-c-format
msgid "Bad array specification in ALLOCATE statement at %L"
msgstr ""
-#: fortran/resolve.c:5248
+#: fortran/resolve.c:5328
#, no-c-format
msgid ""
"'%s' must not appear in the array specification at %L in the same ALLOCATE "
"statement where it is itself allocated"
msgstr ""
-#: fortran/resolve.c:5271
+#: fortran/resolve.c:5351
#, no-c-format
msgid "STAT variable '%s' of %s statement at %C cannot be INTENT(IN)"
msgstr ""
-#: fortran/resolve.c:5275
+#: fortran/resolve.c:5355
#, no-c-format
msgid "Illegal STAT variable in %s statement at %C for a PURE procedure"
msgstr ""
-#: fortran/resolve.c:5280
+#: fortran/resolve.c:5360
#, no-c-format
msgid "STAT tag in %s statement at %L must be of type INTEGER"
msgstr ""
@@ -9476,99 +9258,99 @@ msgstr ""
#. element in the list. Either way, we must
#. issue an error and get the next case from P.
#. FIXME: Sort P and Q by line number.
-#: fortran/resolve.c:5443
+#: fortran/resolve.c:5523
#, no-c-format
msgid "CASE label at %L overlaps with CASE label at %L"
msgstr ""
-#: fortran/resolve.c:5494
+#: fortran/resolve.c:5574
#, no-c-format
msgid "Expression in CASE statement at %L must be of type %s"
msgstr ""
-#: fortran/resolve.c:5505
+#: fortran/resolve.c:5585
#, no-c-format
msgid "Expression in CASE statement at %L must be of kind %d"
msgstr ""
-#: fortran/resolve.c:5517
+#: fortran/resolve.c:5597
#, no-c-format
msgid "Expression in CASE statement at %L must be scalar"
msgstr ""
-#: fortran/resolve.c:5563
+#: fortran/resolve.c:5643
#, no-c-format
msgid ""
"Selection expression in computed GOTO statement at %L must be a scalar "
"integer expression"
msgstr ""
-#: fortran/resolve.c:5581
+#: fortran/resolve.c:5661
#, no-c-format
msgid "Argument of SELECT statement at %L cannot be %s"
msgstr ""
-#: fortran/resolve.c:5590
+#: fortran/resolve.c:5670
#, no-c-format
msgid "Argument of SELECT statement at %L must be a scalar expression"
msgstr ""
-#: fortran/resolve.c:5655
+#: fortran/resolve.c:5735
#, no-c-format
msgid ""
"The DEFAULT CASE at %L cannot be followed by a second DEFAULT CASE at %L"
msgstr ""
-#: fortran/resolve.c:5681
+#: fortran/resolve.c:5761
#, no-c-format
msgid "Logical range in CASE statement at %L is not allowed"
msgstr ""
-#: fortran/resolve.c:5693
+#: fortran/resolve.c:5773
#, no-c-format
msgid "constant logical value in CASE statement is repeated at %L"
msgstr ""
-#: fortran/resolve.c:5707
+#: fortran/resolve.c:5787
#, no-c-format
msgid "Range specification at %L can never be matched"
msgstr ""
-#: fortran/resolve.c:5810
+#: fortran/resolve.c:5890
#, no-c-format
msgid "Logical SELECT CASE block at %L has more that two cases"
msgstr ""
-#: fortran/resolve.c:5848
+#: fortran/resolve.c:5928
#, no-c-format
msgid "Data transfer element at %L cannot have POINTER components"
msgstr ""
-#: fortran/resolve.c:5855
+#: fortran/resolve.c:5935
#, no-c-format
msgid "Data transfer element at %L cannot have ALLOCATABLE components"
msgstr ""
-#: fortran/resolve.c:5862
+#: fortran/resolve.c:5942
#, no-c-format
msgid "Data transfer element at %L cannot have PRIVATE components"
msgstr ""
-#: fortran/resolve.c:5871
+#: fortran/resolve.c:5951
#, no-c-format
msgid ""
"Data transfer element at %L cannot be a full reference to an assumed-size "
"array"
msgstr ""
-#: fortran/resolve.c:5935
+#: fortran/resolve.c:6015
#, no-c-format
msgid ""
"Statement at %L is not a valid branch target statement for the branch "
"statement at %L"
msgstr ""
-#: fortran/resolve.c:5944
+#: fortran/resolve.c:6024
#, no-c-format
msgid "Branch at %L may result in an infinite loop"
msgstr ""
@@ -9576,118 +9358,118 @@ msgstr ""
#. The label is not in an enclosing block, so illegal. This was
#. allowed in Fortran 66, so we allow it as extension. No
#. further checks are necessary in this case.
-#: fortran/resolve.c:5957
+#: fortran/resolve.c:6037
#, no-c-format
msgid "Label at %L is not in the same block as the GOTO statement at %L"
msgstr ""
-#: fortran/resolve.c:5972 fortran/resolve.c:5986
+#: fortran/resolve.c:6052 fortran/resolve.c:6066
#, no-c-format
msgid "Deleted feature: GOTO at %L jumps to END of construct at %L"
msgstr ""
-#: fortran/resolve.c:6063
+#: fortran/resolve.c:6143
#, no-c-format
msgid "WHERE mask at %L has inconsistent shape"
msgstr ""
-#: fortran/resolve.c:6079
+#: fortran/resolve.c:6159
#, no-c-format
msgid "WHERE assignment target at %L has inconsistent shape"
msgstr ""
-#: fortran/resolve.c:6087 fortran/resolve.c:6174
+#: fortran/resolve.c:6167 fortran/resolve.c:6254
#, no-c-format
msgid "Non-ELEMENTAL user-defined assignment in WHERE at %L"
msgstr ""
-#: fortran/resolve.c:6097 fortran/resolve.c:6184
+#: fortran/resolve.c:6177 fortran/resolve.c:6264
#, no-c-format
msgid "Unsupported statement inside WHERE at %L"
msgstr ""
-#: fortran/resolve.c:6128
+#: fortran/resolve.c:6208
#, no-c-format
msgid "Assignment to a FORALL index variable at %L"
msgstr ""
-#: fortran/resolve.c:6137
+#: fortran/resolve.c:6217
#, no-c-format
msgid ""
"The FORALL with index '%s' is not used on the left side of the assignment at "
"%L and so might cause multiple assignment to this object"
msgstr ""
-#: fortran/resolve.c:6306
+#: fortran/resolve.c:6386
#, no-c-format
msgid "An outer FORALL construct already has an index with this name %L"
msgstr ""
-#: fortran/resolve.c:6373
+#: fortran/resolve.c:6453
#, no-c-format
msgid "WHERE/ELSEWHERE clause at %L requires a LOGICAL array"
msgstr ""
-#: fortran/resolve.c:6435
+#: fortran/resolve.c:6515
#, no-c-format
msgid "Subroutine '%s' called instead of assignment at %L must be PURE"
msgstr ""
-#: fortran/resolve.c:6508
+#: fortran/resolve.c:6588
#, no-c-format
msgid "CHARACTER expression will be truncated in assignment (%d/%d) at %L"
msgstr ""
-#: fortran/resolve.c:6533
+#: fortran/resolve.c:6613
#, no-c-format
msgid "Cannot assign to variable '%s' in PURE procedure at %L"
msgstr ""
-#: fortran/resolve.c:6545
+#: fortran/resolve.c:6625
#, no-c-format
msgid ""
"The impure variable at %L is assigned to a derived type variable with a "
"POINTER component in a PURE procedure (12.6)"
msgstr ""
-#: fortran/resolve.c:6651
+#: fortran/resolve.c:6731
#, no-c-format
msgid "ASSIGNED GOTO statement at %L requires an INTEGER variable"
msgstr ""
-#: fortran/resolve.c:6654
+#: fortran/resolve.c:6734
#, no-c-format
msgid "Variable '%s' has not been assigned a target label at %L"
msgstr ""
-#: fortran/resolve.c:6665
+#: fortran/resolve.c:6745
#, no-c-format
msgid ""
"Alternate RETURN statement at %L requires a SCALAR-INTEGER return specifier"
msgstr ""
-#: fortran/resolve.c:6691
+#: fortran/resolve.c:6771
#, no-c-format
msgid "ASSIGN statement at %L requires a scalar default INTEGER variable"
msgstr ""
-#: fortran/resolve.c:6706
+#: fortran/resolve.c:6786
#, no-c-format
msgid "Arithmetic IF statement at %L requires a numeric expression"
msgstr ""
-#: fortran/resolve.c:6752
+#: fortran/resolve.c:6832
#, no-c-format
msgid ""
"Exit condition of DO WHILE loop at %L must be a scalar LOGICAL expression"
msgstr ""
-#: fortran/resolve.c:6834
+#: fortran/resolve.c:6914
#, no-c-format
msgid "FORALL mask clause at %L requires a LOGICAL expression"
msgstr ""
-#: fortran/resolve.c:6906 fortran/resolve.c:6962
+#: fortran/resolve.c:6986 fortran/resolve.c:7042
#, no-c-format
msgid ""
"Binding label '%s' for common block '%s' at %L collides with the global "
@@ -9695,14 +9477,14 @@ msgid ""
msgstr ""
#. Common block names match but binding labels do not.
-#: fortran/resolve.c:6927
+#: fortran/resolve.c:7007
#, no-c-format
msgid ""
"Binding label '%s' for common block '%s' at %L does not match the binding "
"label '%s' for common block '%s' at %L"
msgstr ""
-#: fortran/resolve.c:6974
+#: fortran/resolve.c:7054
#, no-c-format
msgid ""
"Binding label '%s' for common block '%s' at %L collides with global entity '%"
@@ -9710,57 +9492,57 @@ msgid ""
msgstr ""
#. Make sure global procedures don't collide with anything.
-#: fortran/resolve.c:7026
+#: fortran/resolve.c:7106
#, no-c-format
msgid "Binding label '%s' at %L collides with the global entity '%s' at %L"
msgstr ""
#. Make sure procedures in interface bodies don't collide.
-#: fortran/resolve.c:7039
+#: fortran/resolve.c:7119
#, no-c-format
msgid ""
"Binding label '%s' in interface body at %L collides with the global entity '%"
"s' at %L"
msgstr ""
-#: fortran/resolve.c:7052
+#: fortran/resolve.c:7132
#, no-c-format
msgid "Binding label '%s' at %L collides with global entity '%s' at %L"
msgstr ""
-#: fortran/resolve.c:7129
+#: fortran/resolve.c:7209
#, no-c-format
msgid "CHARACTER variable has zero length at %L"
msgstr ""
-#: fortran/resolve.c:7416
+#: fortran/resolve.c:7502
#, no-c-format
msgid "Allocatable array '%s' at %L must have a deferred shape"
msgstr ""
-#: fortran/resolve.c:7419
+#: fortran/resolve.c:7505
#, no-c-format
msgid "Scalar object '%s' at %L may not be ALLOCATABLE"
msgstr ""
-#: fortran/resolve.c:7426
+#: fortran/resolve.c:7512
#, no-c-format
msgid "Array pointer '%s' at %L must have a deferred shape"
msgstr ""
-#: fortran/resolve.c:7437
+#: fortran/resolve.c:7523
#, no-c-format
msgid "Array '%s' at %L cannot have a deferred shape"
msgstr ""
-#: fortran/resolve.c:7465
+#: fortran/resolve.c:7551
#, no-c-format
msgid ""
"The type '%s' cannot be host associated at %L because it is blocked by an "
"incompatible object of the same name declared at %L"
msgstr ""
-#: fortran/resolve.c:7488
+#: fortran/resolve.c:7574
#, no-c-format
msgid ""
"Object '%s' at %L must have the SAVE attribute for default initialization of "
@@ -9769,181 +9551,181 @@ msgstr ""
#. The shape of a main program or module array needs to be
#. constant.
-#: fortran/resolve.c:7535
+#: fortran/resolve.c:7621
#, no-c-format
msgid "The module or main program array '%s' at %L must have constant shape"
msgstr ""
-#: fortran/resolve.c:7548
+#: fortran/resolve.c:7634
#, no-c-format
msgid ""
"Entity with assumed character length at %L must be a dummy argument or a "
"PARAMETER"
msgstr ""
-#: fortran/resolve.c:7567
+#: fortran/resolve.c:7653
#, no-c-format
msgid "'%s' at %L must have constant character length in this context"
msgstr ""
-#: fortran/resolve.c:7603
+#: fortran/resolve.c:7689
#, no-c-format
msgid "Allocatable '%s' at %L cannot have an initializer"
msgstr ""
-#: fortran/resolve.c:7606
+#: fortran/resolve.c:7692
#, no-c-format
msgid "External '%s' at %L cannot have an initializer"
msgstr ""
-#: fortran/resolve.c:7610
+#: fortran/resolve.c:7696
#, no-c-format
msgid "Dummy '%s' at %L cannot have an initializer"
msgstr ""
-#: fortran/resolve.c:7613
+#: fortran/resolve.c:7699
#, no-c-format
msgid "Intrinsic '%s' at %L cannot have an initializer"
msgstr ""
-#: fortran/resolve.c:7616
+#: fortran/resolve.c:7702
#, no-c-format
msgid "Function result '%s' at %L cannot have an initializer"
msgstr ""
-#: fortran/resolve.c:7619
+#: fortran/resolve.c:7705
#, no-c-format
msgid "Automatic array '%s' at %L cannot have an initializer"
msgstr ""
-#: fortran/resolve.c:7642
+#: fortran/resolve.c:7728
#, no-c-format
msgid "Although not referenced, '%s' at %L has ambiguous interfaces"
msgstr ""
-#: fortran/resolve.c:7661
+#: fortran/resolve.c:7747
#, no-c-format
msgid ""
"Character-valued statement function '%s' at %L must have constant length"
msgstr ""
-#: fortran/resolve.c:7669
+#: fortran/resolve.c:7755
#, no-c-format
msgid ""
"Automatic character length function '%s' at %L must have an explicit "
"interface"
msgstr ""
-#: fortran/resolve.c:7694
+#: fortran/resolve.c:7780
#, no-c-format
msgid ""
"Fortran 2003: '%s' is of a PRIVATE type and cannot be a dummy argument of '%"
"s', which is PUBLIC at %L"
msgstr ""
-#: fortran/resolve.c:7717 fortran/resolve.c:7742
+#: fortran/resolve.c:7803 fortran/resolve.c:7828
#, no-c-format
msgid ""
"Fortran 2003: Procedure '%s' in PUBLIC interface '%s' at %L takes dummy "
"arguments of '%s' which is PRIVATE"
msgstr ""
-#: fortran/resolve.c:7760
+#: fortran/resolve.c:7846
#, no-c-format
msgid "Function '%s' at %L cannot have an initializer"
msgstr ""
-#: fortran/resolve.c:7769
+#: fortran/resolve.c:7855
#, no-c-format
msgid "External object '%s' at %L may not have an initializer"
msgstr ""
-#: fortran/resolve.c:7777
+#: fortran/resolve.c:7863
#, no-c-format
msgid "ELEMENTAL function '%s' at %L must have a scalar result"
msgstr ""
-#: fortran/resolve.c:7798
+#: fortran/resolve.c:7884
#, no-c-format
msgid "CHARACTER(*) function '%s' at %L cannot be array-valued"
msgstr ""
-#: fortran/resolve.c:7802
+#: fortran/resolve.c:7888
#, no-c-format
msgid "CHARACTER(*) function '%s' at %L cannot be pointer-valued"
msgstr ""
-#: fortran/resolve.c:7806
+#: fortran/resolve.c:7892
#, no-c-format
msgid "CHARACTER(*) function '%s' at %L cannot be pure"
msgstr ""
-#: fortran/resolve.c:7810
+#: fortran/resolve.c:7896
#, no-c-format
msgid "CHARACTER(*) function '%s' at %L cannot be recursive"
msgstr ""
-#: fortran/resolve.c:7819
+#: fortran/resolve.c:7905
#, no-c-format
msgid "CHARACTER(*) function '%s' at %L is obsolescent in fortran 95"
msgstr ""
-#: fortran/resolve.c:7872
+#: fortran/resolve.c:7958
#, no-c-format
msgid "PROCEDURE attribute conflicts with SAVE attribute in '%s' at %L"
msgstr ""
-#: fortran/resolve.c:7879
+#: fortran/resolve.c:7965
#, no-c-format
msgid "PROCEDURE attribute conflicts with INTENT attribute in '%s' at %L"
msgstr ""
-#: fortran/resolve.c:7923
+#: fortran/resolve.c:8009
#, no-c-format
msgid "FINAL procedure '%s' at %L is not a SUBROUTINE"
msgstr ""
-#: fortran/resolve.c:7931
+#: fortran/resolve.c:8017
#, no-c-format
msgid "FINAL procedure at %L must have exactly one argument"
msgstr ""
-#: fortran/resolve.c:7940
+#: fortran/resolve.c:8026
#, no-c-format
msgid "Argument of FINAL procedure at %L must be of type '%s'"
msgstr ""
-#: fortran/resolve.c:7948
+#: fortran/resolve.c:8034
#, no-c-format
msgid "Argument of FINAL procedure at %L must not be a POINTER"
msgstr ""
-#: fortran/resolve.c:7954
+#: fortran/resolve.c:8040
#, no-c-format
msgid "Argument of FINAL procedure at %L must not be ALLOCATABLE"
msgstr ""
-#: fortran/resolve.c:7960
+#: fortran/resolve.c:8046
#, no-c-format
msgid "Argument of FINAL procedure at %L must not be OPTIONAL"
msgstr ""
-#: fortran/resolve.c:7968
+#: fortran/resolve.c:8054
#, no-c-format
msgid "Argument of FINAL procedure at %L must not be INTENT(OUT)"
msgstr ""
-#: fortran/resolve.c:7976
+#: fortran/resolve.c:8062
#, no-c-format
msgid "Non-scalar FINAL procedure at %L should have assumed shape argument"
msgstr ""
-#: fortran/resolve.c:7995
+#: fortran/resolve.c:8081
#, no-c-format
msgid "FINAL procedure '%s' declared at %L has the same rank (%d) as '%s'"
msgstr ""
-#: fortran/resolve.c:8028
+#: fortran/resolve.c:8114
#, no-c-format
msgid ""
"Only array FINAL procedures declared for derived type '%s' defined at %L, "
@@ -9951,302 +9733,302 @@ msgid ""
msgstr ""
#. TODO: Remove this error when finalization is finished.
-#: fortran/resolve.c:8033
+#: fortran/resolve.c:8119
#, no-c-format
msgid "Finalization at %L is not yet implemented"
msgstr ""
-#: fortran/resolve.c:8059
+#: fortran/resolve.c:8145
#, no-c-format
msgid "Can't overwrite GENERIC '%s' at %L"
msgstr ""
-#: fortran/resolve.c:8071
+#: fortran/resolve.c:8157
#, no-c-format
msgid "'%s' at %L overrides a procedure binding declared NON_OVERRIDABLE"
msgstr ""
-#: fortran/resolve.c:8079
+#: fortran/resolve.c:8165
#, no-c-format
msgid "'%s' at %L overrides a PURE procedure and must also be PURE"
msgstr ""
-#: fortran/resolve.c:8088
+#: fortran/resolve.c:8174
#, no-c-format
msgid "'%s' at %L overrides an ELEMENTAL procedure and must also be ELEMENTAL"
msgstr ""
-#: fortran/resolve.c:8094
+#: fortran/resolve.c:8180
#, no-c-format
msgid ""
"'%s' at %L overrides a non-ELEMENTAL procedure and must not be ELEMENTAL, "
"either"
msgstr ""
-#: fortran/resolve.c:8103
+#: fortran/resolve.c:8189
#, no-c-format
msgid "'%s' at %L overrides a SUBROUTINE and must also be a SUBROUTINE"
msgstr ""
-#: fortran/resolve.c:8114
+#: fortran/resolve.c:8200
#, no-c-format
msgid "'%s' at %L overrides a FUNCTION and must also be a FUNCTION"
msgstr ""
-#: fortran/resolve.c:8125
+#: fortran/resolve.c:8211
#, no-c-format
msgid ""
"'%s' at %L and the overridden FUNCTION should have matching result types"
msgstr ""
-#: fortran/resolve.c:8136
+#: fortran/resolve.c:8222
#, no-c-format
msgid "'%s' at %L overrides a PUBLIC procedure and must not be PRIVATE"
msgstr ""
-#: fortran/resolve.c:8165
+#: fortran/resolve.c:8251
#, no-c-format
msgid ""
"Dummy argument '%s' of '%s' at %L should be named '%s' as to match the "
"corresponding argument of the overridden procedure"
msgstr ""
-#: fortran/resolve.c:8178
+#: fortran/resolve.c:8264
#, no-c-format
msgid ""
"Types mismatch for dummy argument '%s' of '%s' %L in in respect to the "
"overridden procedure"
msgstr ""
-#: fortran/resolve.c:8188
+#: fortran/resolve.c:8274
#, no-c-format
msgid ""
"'%s' at %L must have the same number of formal arguments as the overridden "
"procedure"
msgstr ""
-#: fortran/resolve.c:8197
+#: fortran/resolve.c:8283
#, no-c-format
msgid "'%s' at %L overrides a NOPASS binding and must also be NOPASS"
msgstr ""
-#: fortran/resolve.c:8208
+#: fortran/resolve.c:8294
#, no-c-format
msgid "'%s' at %L overrides a binding with PASS and must also be PASS"
msgstr ""
-#: fortran/resolve.c:8215
+#: fortran/resolve.c:8301
#, no-c-format
msgid ""
"Passed-object dummy argument of '%s' at %L must be at the same position as "
"the passed-object dummy argument of the overridden procedure"
msgstr ""
-#: fortran/resolve.c:8246
+#: fortran/resolve.c:8332
#, no-c-format
msgid "'%s' and '%s' can't be mixed FUNCTION/SUBROUTINE for GENERIC '%s' at %L"
msgstr ""
-#: fortran/resolve.c:8255
+#: fortran/resolve.c:8341
#, no-c-format
msgid "'%s' and '%s' for GENERIC '%s' at %L are ambiguous"
msgstr ""
-#: fortran/resolve.c:8324
+#: fortran/resolve.c:8410
#, no-c-format
msgid "Undefined specific binding '%s' as target of GENERIC '%s' at %L"
msgstr ""
-#: fortran/resolve.c:8336
+#: fortran/resolve.c:8422
#, no-c-format
msgid "GENERIC '%s' at %L must target a specific binding, '%s' is GENERIC, too"
msgstr ""
-#: fortran/resolve.c:8366
+#: fortran/resolve.c:8452
#, no-c-format
msgid "GENERIC '%s' at %L can't overwrite specific binding with the same name"
msgstr ""
-#: fortran/resolve.c:8424
+#: fortran/resolve.c:8510
#, no-c-format
msgid ""
"'%s' must be a module procedure or an external procedure with an explicit "
"interface at %L"
msgstr ""
-#: fortran/resolve.c:8461
+#: fortran/resolve.c:8547
#, no-c-format
msgid "Procedure '%s' with PASS(%s) at %L has no argument '%s'"
msgstr ""
-#: fortran/resolve.c:8475
+#: fortran/resolve.c:8561
#, no-c-format
msgid "Procedure '%s' with PASS at %L must have at least one argument"
msgstr ""
-#: fortran/resolve.c:8487
+#: fortran/resolve.c:8573
#, no-c-format
msgid ""
"Argument '%s' of '%s' with PASS(%s) at %L must be of the derived-type '%s'"
msgstr ""
-#: fortran/resolve.c:8493
+#: fortran/resolve.c:8579
#, no-c-format
msgid ""
"Polymorphic entities are not yet implemented, non-polymorphic passed-object "
"dummy argument of '%s' at %L accepted"
msgstr ""
-#: fortran/resolve.c:8518
+#: fortran/resolve.c:8604
#, no-c-format
msgid "Procedure '%s' at %L has the same name as a component of '%s'"
msgstr ""
-#: fortran/resolve.c:8527
+#: fortran/resolve.c:8613
#, no-c-format
msgid ""
"Procedure '%s' at %L has the same name as an inherited component of '%s'"
msgstr ""
-#: fortran/resolve.c:8595
+#: fortran/resolve.c:8681
#, no-c-format
msgid "Non-extensible derived-type '%s' at %L must not be ABSTRACT"
msgstr ""
-#: fortran/resolve.c:8612
+#: fortran/resolve.c:8698
#, no-c-format
msgid ""
"Component '%s' of '%s' at %L has the same name as an inherited type-bound "
"procedure"
msgstr ""
-#: fortran/resolve.c:8624
+#: fortran/resolve.c:8710
#, no-c-format
msgid ""
"Character length of component '%s' needs to be a constant specification "
"expression at %L"
msgstr ""
-#: fortran/resolve.c:8639
+#: fortran/resolve.c:8725
#, no-c-format
msgid ""
"The component '%s' is a PRIVATE type and cannot be a component of '%s', "
"which is PUBLIC at %L"
msgstr ""
-#: fortran/resolve.c:8649
+#: fortran/resolve.c:8735
#, no-c-format
msgid ""
"Component %s of SEQUENCE type declared at %L does not have the SEQUENCE "
"attribute"
msgstr ""
-#: fortran/resolve.c:8660
+#: fortran/resolve.c:8746
#, no-c-format
msgid ""
"The pointer component '%s' of '%s' at %L is a type that has not been declared"
msgstr ""
-#: fortran/resolve.c:8688
+#: fortran/resolve.c:8774
#, no-c-format
msgid "Component '%s' of '%s' at %L must have constant array bounds"
msgstr ""
-#: fortran/resolve.c:8729
+#: fortran/resolve.c:8815
#, no-c-format
msgid ""
"NAMELIST object '%s' was declared PRIVATE and cannot be member of PUBLIC "
"namelist '%s' at %L"
msgstr ""
-#: fortran/resolve.c:8739
+#: fortran/resolve.c:8825
#, no-c-format
msgid ""
"NAMELIST object '%s' has use-associated PRIVATE components and cannot be "
"member of namelist '%s' at %L"
msgstr ""
-#: fortran/resolve.c:8752
+#: fortran/resolve.c:8838
#, no-c-format
msgid ""
"NAMELIST object '%s' has PRIVATE components and cannot be a member of PUBLIC "
"namelist '%s' at %L"
msgstr ""
-#: fortran/resolve.c:8764
+#: fortran/resolve.c:8850
#, no-c-format
msgid ""
"NAMELIST array object '%s' must not have assumed shape in namelist '%s' at %L"
msgstr ""
-#: fortran/resolve.c:8773
+#: fortran/resolve.c:8859
#, no-c-format
msgid ""
"NAMELIST array object '%s' must have constant shape in namelist '%s' at %L"
msgstr ""
-#: fortran/resolve.c:8785
+#: fortran/resolve.c:8871
#, no-c-format
msgid ""
"NAMELIST object '%s' in namelist '%s' at %L cannot have ALLOCATABLE "
"components"
msgstr ""
-#: fortran/resolve.c:8793
+#: fortran/resolve.c:8879
#, no-c-format
msgid ""
"NAMELIST object '%s' in namelist '%s' at %L cannot have POINTER components"
msgstr ""
-#: fortran/resolve.c:8819
+#: fortran/resolve.c:8905
#, no-c-format
msgid "PROCEDURE attribute conflicts with NAMELIST attribute in '%s' at %L"
msgstr ""
-#: fortran/resolve.c:8838
+#: fortran/resolve.c:8924
#, no-c-format
msgid "Parameter array '%s' at %L cannot be automatic or of deferred shape"
msgstr ""
-#: fortran/resolve.c:8849
+#: fortran/resolve.c:8935
#, no-c-format
msgid ""
"Implicitly typed PARAMETER '%s' at %L doesn't match a later IMPLICIT type"
msgstr ""
-#: fortran/resolve.c:8860
+#: fortran/resolve.c:8946
#, no-c-format
msgid "Incompatible derived type in PARAMETER at %L"
msgstr ""
-#: fortran/resolve.c:8919
+#: fortran/resolve.c:9005
#, no-c-format
msgid ""
"Interface '%s', used by procedure '%s' at %L, is declared in a later "
"PROCEDURE statement"
msgstr ""
-#: fortran/resolve.c:8967
+#: fortran/resolve.c:9053
#, no-c-format
msgid "Interface '%s' of procedure '%s' at %L must be explicit"
msgstr ""
-#: fortran/resolve.c:9000
+#: fortran/resolve.c:9086
#, no-c-format
msgid "Type specified for intrinsic function '%s' at %L is ignored"
msgstr ""
-#: fortran/resolve.c:9007
+#: fortran/resolve.c:9093
#, no-c-format
msgid "Intrinsic subroutine '%s' at %L shall not have a type specifier"
msgstr ""
-#: fortran/resolve.c:9014
+#: fortran/resolve.c:9100
#, no-c-format
msgid "'%s' declared INTRINSIC at %L does not exist"
msgstr ""
-#: fortran/resolve.c:9023
+#: fortran/resolve.c:9109
#, no-c-format
msgid ""
"The intrinsic '%s' declared INTRINSIC at %L is not available in the current "
@@ -10254,229 +10036,229 @@ msgid ""
"intrinsics in order to use it."
msgstr ""
-#: fortran/resolve.c:9067
+#: fortran/resolve.c:9153
#, no-c-format
msgid "Assumed size array at %L must be a dummy argument"
msgstr ""
-#: fortran/resolve.c:9070
+#: fortran/resolve.c:9156
#, no-c-format
msgid "Assumed shape array at %L must be a dummy argument"
msgstr ""
-#: fortran/resolve.c:9082
+#: fortran/resolve.c:9168
#, no-c-format
msgid "Symbol at %L is not a DUMMY variable"
msgstr ""
-#: fortran/resolve.c:9088
+#: fortran/resolve.c:9174
#, no-c-format
msgid ""
"'%s' at %L cannot have the VALUE attribute because it is not a dummy argument"
msgstr ""
-#: fortran/resolve.c:9098
+#: fortran/resolve.c:9184
#, no-c-format
msgid ""
"Character dummy variable '%s' at %L with VALUE attribute must have constant "
"length"
msgstr ""
-#: fortran/resolve.c:9107
+#: fortran/resolve.c:9193
#, no-c-format
msgid ""
"C interoperable character dummy variable '%s' at %L with VALUE attribute "
"must have length one"
msgstr ""
-#: fortran/resolve.c:9133
+#: fortran/resolve.c:9219
#, no-c-format
msgid ""
"Variable '%s' at %L cannot be BIND(C) because it is neither a COMMON block "
"nor declared at the module level scope"
msgstr ""
-#: fortran/resolve.c:9186
+#: fortran/resolve.c:9272
#, no-c-format
msgid "The derived type '%s' at %L is of type '%s', which has not been defined"
msgstr ""
-#: fortran/resolve.c:9226
+#: fortran/resolve.c:9313
#, no-c-format
msgid "Fortran 2003: PUBLIC %s '%s' at %L of PRIVATE derived type '%s'"
msgstr ""
-#: fortran/resolve.c:9245
+#: fortran/resolve.c:9332
#, no-c-format
msgid ""
"The INTENT(OUT) dummy argument '%s' at %L is ASSUMED SIZE and so cannot have "
"a default initializer"
msgstr ""
-#: fortran/resolve.c:9304
+#: fortran/resolve.c:9391
#, no-c-format
msgid "Threadprivate at %L isn't SAVEd"
msgstr ""
-#: fortran/resolve.c:9389
+#: fortran/resolve.c:9476
#, no-c-format
msgid "BLOCK DATA element '%s' at %L must be in COMMON"
msgstr ""
-#: fortran/resolve.c:9395
+#: fortran/resolve.c:9482
#, no-c-format
msgid "DATA array '%s' at %L must be specified in a previous declaration"
msgstr ""
-#: fortran/resolve.c:9440
+#: fortran/resolve.c:9527
#, no-c-format
msgid "Nonconstant array section at %L in DATA statement"
msgstr ""
-#: fortran/resolve.c:9453
+#: fortran/resolve.c:9540
#, no-c-format
msgid "DATA statement at %L has more variables than values"
msgstr ""
-#: fortran/resolve.c:9547
+#: fortran/resolve.c:9634
#, no-c-format
msgid "iterator start at %L does not simplify"
msgstr ""
-#: fortran/resolve.c:9554
+#: fortran/resolve.c:9641
#, no-c-format
msgid "iterator end at %L does not simplify"
msgstr ""
-#: fortran/resolve.c:9561
+#: fortran/resolve.c:9648
#, no-c-format
msgid "iterator step at %L does not simplify"
msgstr ""
-#: fortran/resolve.c:9687
+#: fortran/resolve.c:9774
#, no-c-format
msgid "DATA statement at %L has more values than variables"
msgstr ""
-#: fortran/resolve.c:9778
+#: fortran/resolve.c:9865
#, no-c-format
msgid "Label %d at %L defined but not used"
msgstr ""
-#: fortran/resolve.c:9783
+#: fortran/resolve.c:9870
#, no-c-format
msgid "Label %d at %L defined but cannot be used"
msgstr ""
-#: fortran/resolve.c:9868
+#: fortran/resolve.c:9955
#, no-c-format
msgid ""
"Derived type variable '%s' at %L must have SEQUENCE attribute to be an "
"EQUIVALENCE object"
msgstr ""
-#: fortran/resolve.c:9877
+#: fortran/resolve.c:9964
#, no-c-format
msgid ""
"Derived type variable '%s' at %L cannot have ALLOCATABLE components to be an "
"EQUIVALENCE object"
msgstr ""
-#: fortran/resolve.c:9885
+#: fortran/resolve.c:9972
#, no-c-format
msgid ""
"Derived type variable '%s' at %L with default initialization cannot be in "
"EQUIVALENCE with a variable in COMMON"
msgstr ""
-#: fortran/resolve.c:9902
+#: fortran/resolve.c:9989
#, no-c-format
msgid ""
"Derived type variable '%s' at %L with pointer component(s) cannot be an "
"EQUIVALENCE object"
msgstr ""
-#: fortran/resolve.c:10007
+#: fortran/resolve.c:10094
#, no-c-format
msgid "Syntax error in EQUIVALENCE statement at %L"
msgstr ""
-#: fortran/resolve.c:10022
+#: fortran/resolve.c:10109
#, no-c-format
msgid ""
"Either all or none of the objects in the EQUIVALENCE set at %L shall have "
"the PROTECTED attribute"
msgstr ""
-#: fortran/resolve.c:10034
+#: fortran/resolve.c:10121
#, no-c-format
msgid ""
"Common block member '%s' at %L cannot be an EQUIVALENCE object in the pure "
"procedure '%s'"
msgstr ""
-#: fortran/resolve.c:10043
+#: fortran/resolve.c:10130
#, no-c-format
msgid "Named constant '%s' at %L cannot be an EQUIVALENCE object"
msgstr ""
-#: fortran/resolve.c:10122
+#: fortran/resolve.c:10209
#, no-c-format
msgid ""
"Array '%s' at %L with non-constant bounds cannot be an EQUIVALENCE object"
msgstr ""
-#: fortran/resolve.c:10133
+#: fortran/resolve.c:10220
#, no-c-format
msgid "Structure component '%s' at %L cannot be an EQUIVALENCE object"
msgstr ""
-#: fortran/resolve.c:10144
+#: fortran/resolve.c:10231
#, no-c-format
msgid "Substring at %L has length zero"
msgstr ""
-#: fortran/resolve.c:10188
+#: fortran/resolve.c:10275
#, no-c-format
msgid "Fortran 2003: PUBLIC function '%s' at %L of PRIVATE type '%s'"
msgstr ""
-#: fortran/resolve.c:10201
+#: fortran/resolve.c:10288
#, no-c-format
msgid "ENTRY '%s' at %L has no IMPLICIT type"
msgstr ""
-#: fortran/resolve.c:10227
+#: fortran/resolve.c:10314
#, no-c-format
msgid "User operator procedure '%s' at %L must be a FUNCTION"
msgstr ""
-#: fortran/resolve.c:10234
+#: fortran/resolve.c:10321
#, no-c-format
msgid "User operator procedure '%s' at %L cannot be assumed character length"
msgstr ""
-#: fortran/resolve.c:10240
+#: fortran/resolve.c:10327
#, no-c-format
msgid "User operator procedure '%s' at %L must have at least one argument"
msgstr ""
-#: fortran/resolve.c:10250
+#: fortran/resolve.c:10337
#, no-c-format
msgid "First argument of operator interface at %L cannot be optional"
msgstr ""
-#: fortran/resolve.c:10262
+#: fortran/resolve.c:10349
#, no-c-format
msgid "Second argument of operator interface at %L cannot be optional"
msgstr ""
-#: fortran/resolve.c:10266
+#: fortran/resolve.c:10353
#, no-c-format
msgid "Operator interface at %L must have, at most, two arguments"
msgstr ""
-#: fortran/resolve.c:10320
+#: fortran/resolve.c:10407
#, no-c-format
msgid "Contained procedure '%s' at %L of a PURE procedure must also be PURE"
msgstr ""
@@ -10513,17 +10295,17 @@ msgstr ""
msgid "Nonconforming tab character in column %d of line %d"
msgstr ""
-#: fortran/scanner.c:1644
+#: fortran/scanner.c:1647
#, no-c-format
msgid "%s:%d: file %s left but not entered"
msgstr ""
-#: fortran/scanner.c:1678
+#: fortran/scanner.c:1681
#, no-c-format
msgid "%s:%d: Illegal preprocessor directive"
msgstr ""
-#: fortran/scanner.c:1796
+#: fortran/scanner.c:1799
#, no-c-format
msgid "Can't open file '%s'"
msgstr ""
@@ -10706,34 +10488,34 @@ msgstr ""
msgid "Argument of KIND at %L is a DERIVED type"
msgstr ""
-#: fortran/simplify.c:2362
+#: fortran/simplify.c:2383
#, no-c-format
msgid "DIM argument at %L is out of bounds"
msgstr ""
-#: fortran/simplify.c:2534
+#: fortran/simplify.c:2555
#, no-c-format
msgid "Argument of LOG at %L cannot be less than or equal to zero"
msgstr ""
-#: fortran/simplify.c:2547
+#: fortran/simplify.c:2568
#, no-c-format
msgid "Complex argument of LOG at %L cannot be zero"
msgstr ""
-#: fortran/simplify.c:2588
+#: fortran/simplify.c:2609
#, no-c-format
msgid "Argument of LOG10 at %L cannot be less than or equal to zero"
msgstr ""
#. Result is processor-dependent.
-#: fortran/simplify.c:2869
+#: fortran/simplify.c:2902
#, no-c-format
msgid "Second argument MOD at %L is zero"
msgstr ""
#. Result is processor-dependent.
-#: fortran/simplify.c:2880
+#: fortran/simplify.c:2913
#, no-c-format
msgid "Second argument of MOD at %L is zero"
msgstr ""
@@ -10741,95 +10523,95 @@ msgstr ""
#. Result is processor-dependent. This processor just opts
#. to not handle it at all.
#. Result is processor-dependent.
-#: fortran/simplify.c:2922 fortran/simplify.c:2934
+#: fortran/simplify.c:2955 fortran/simplify.c:2967
#, no-c-format
msgid "Second argument of MODULO at %L is zero"
msgstr ""
-#: fortran/simplify.c:2980
+#: fortran/simplify.c:3013
#, no-c-format
msgid "Second argument of NEAREST at %L shall not be zero"
msgstr ""
-#: fortran/simplify.c:3015
+#: fortran/simplify.c:3049
#, no-c-format
msgid "Result of NEAREST is NaN at %L"
msgstr ""
-#: fortran/simplify.c:3296
+#: fortran/simplify.c:3330
#, no-c-format
msgid "Argument NCOPIES of REPEAT intrinsic is negative at %L"
msgstr ""
-#: fortran/simplify.c:3351
+#: fortran/simplify.c:3385
#, no-c-format
msgid "Argument NCOPIES of REPEAT intrinsic is too large at %L"
msgstr ""
-#: fortran/simplify.c:3465
+#: fortran/simplify.c:3496
#, no-c-format
msgid "Integer too large in shape specification at %L"
msgstr ""
-#: fortran/simplify.c:3473
+#: fortran/simplify.c:3504
#, no-c-format
msgid "Too many dimensions in shape specification for RESHAPE at %L"
msgstr ""
-#: fortran/simplify.c:3481
+#: fortran/simplify.c:3512
#, no-c-format
msgid "Shape specification at %L cannot be negative"
msgstr ""
-#: fortran/simplify.c:3493
+#: fortran/simplify.c:3524
#, no-c-format
msgid "Shape specification at %L cannot be the null array"
msgstr ""
-#: fortran/simplify.c:3514
+#: fortran/simplify.c:3545
#, no-c-format
msgid ""
"ORDER parameter of RESHAPE at %L is not the same size as SHAPE parameter"
msgstr ""
-#: fortran/simplify.c:3521
+#: fortran/simplify.c:3552
#, no-c-format
msgid "Error in ORDER parameter of RESHAPE at %L"
msgstr ""
-#: fortran/simplify.c:3529
+#: fortran/simplify.c:3560
#, no-c-format
msgid "ORDER parameter of RESHAPE at %L is out of range"
msgstr ""
-#: fortran/simplify.c:3539
+#: fortran/simplify.c:3570
#, no-c-format
msgid "Invalid permutation in ORDER parameter at %L"
msgstr ""
-#: fortran/simplify.c:3598
+#: fortran/simplify.c:3629
#, no-c-format
msgid "PAD parameter required for short SOURCE parameter at %L"
msgstr ""
-#: fortran/simplify.c:3717
+#: fortran/simplify.c:3748
#, no-c-format
msgid "Result of SCALE overflows its kind at %L"
msgstr ""
-#: fortran/simplify.c:4351
+#: fortran/simplify.c:4382
#, no-c-format
msgid "Argument of SQRT at %L has a negative value"
msgstr ""
-#: fortran/simplify.c:4506
+#: fortran/simplify.c:4537
#, no-c-format
msgid ""
"Intrinsic TRANSFER at %L has partly undefined result: source size %ld < "
"result size %ld"
msgstr ""
-#: fortran/simplify.c:4871
+#: fortran/simplify.c:4903
#, no-c-format
msgid ""
"Character '%s' in string at %L cannot be converted into character kind %d"
@@ -10896,233 +10678,233 @@ msgstr ""
msgid "BIND(C) applied to %s %s at %L"
msgstr ""
-#: fortran/symbol.c:711 fortran/symbol.c:1364
+#: fortran/symbol.c:716 fortran/symbol.c:1369
#, no-c-format
msgid "%s attribute conflicts with %s attribute at %L"
msgstr ""
-#: fortran/symbol.c:714
+#: fortran/symbol.c:719
#, no-c-format
msgid "%s attribute conflicts with %s attribute in '%s' at %L"
msgstr ""
-#: fortran/symbol.c:722
+#: fortran/symbol.c:727
#, no-c-format
msgid "Fortran 2003: %s attribute with %s attribute at %L"
msgstr ""
-#: fortran/symbol.c:728
+#: fortran/symbol.c:733
#, no-c-format
msgid "Fortran 2003: %s attribute with %s attribute in '%s' at %L"
msgstr ""
-#: fortran/symbol.c:772
+#: fortran/symbol.c:777
#, no-c-format
msgid "Cannot change attributes of USE-associated symbol at %L"
msgstr ""
-#: fortran/symbol.c:775
+#: fortran/symbol.c:780
#, no-c-format
msgid "Cannot change attributes of USE-associated symbol %s at %L"
msgstr ""
-#: fortran/symbol.c:791
+#: fortran/symbol.c:796
#, no-c-format
msgid "Duplicate %s attribute specified at %L"
msgstr ""
-#: fortran/symbol.c:824
+#: fortran/symbol.c:829
#, no-c-format
msgid "ALLOCATABLE specified outside of INTERFACE body at %L"
msgstr ""
-#: fortran/symbol.c:850
+#: fortran/symbol.c:855
#, no-c-format
msgid "DIMENSION specified for '%s' outside its INTERFACE body at %L"
msgstr ""
-#: fortran/symbol.c:968
+#: fortran/symbol.c:973
#, no-c-format
msgid "Cray Pointee at %L appears in multiple pointer() statements"
msgstr ""
-#: fortran/symbol.c:987
+#: fortran/symbol.c:992
#, no-c-format
msgid "Duplicate PROTECTED attribute specified at %L"
msgstr ""
-#: fortran/symbol.c:1020
+#: fortran/symbol.c:1025
#, no-c-format
msgid "SAVE attribute at %L cannot be specified in a PURE procedure"
msgstr ""
-#: fortran/symbol.c:1028
+#: fortran/symbol.c:1033
#, no-c-format
msgid "Duplicate SAVE attribute specified at %L"
msgstr ""
-#: fortran/symbol.c:1049
+#: fortran/symbol.c:1054
#, no-c-format
msgid "Duplicate VALUE attribute specified at %L"
msgstr ""
-#: fortran/symbol.c:1069
+#: fortran/symbol.c:1074
#, no-c-format
msgid "Duplicate VOLATILE attribute specified at %L"
msgstr ""
-#: fortran/symbol.c:1360
+#: fortran/symbol.c:1365
#, no-c-format
msgid "%s attribute of '%s' conflicts with %s attribute at %L"
msgstr ""
-#: fortran/symbol.c:1394
+#: fortran/symbol.c:1399
#, no-c-format
msgid "%s procedure at %L is already declared as %s procedure"
msgstr ""
-#: fortran/symbol.c:1429
+#: fortran/symbol.c:1434
#, no-c-format
msgid "INTENT (%s) conflicts with INTENT(%s) at %L"
msgstr ""
-#: fortran/symbol.c:1453
+#: fortran/symbol.c:1458
#, no-c-format
msgid "ACCESS specification at %L was already specified"
msgstr ""
-#: fortran/symbol.c:1470
+#: fortran/symbol.c:1475
#, no-c-format
msgid "Duplicate BIND attribute specified at %L"
msgstr ""
-#: fortran/symbol.c:1477
+#: fortran/symbol.c:1482
#, no-c-format
msgid "Fortran 2003: BIND(C) at %L"
msgstr ""
-#: fortran/symbol.c:1494
+#: fortran/symbol.c:1499
#, no-c-format
msgid "Duplicate EXTENDS attribute specified at %L"
msgstr ""
-#: fortran/symbol.c:1498
+#: fortran/symbol.c:1503
#, no-c-format
msgid "Fortran 2003: EXTENDS at %L"
msgstr ""
-#: fortran/symbol.c:1520
+#: fortran/symbol.c:1525
#, no-c-format
msgid "Symbol '%s' at %L already has an explicit interface"
msgstr ""
-#: fortran/symbol.c:1527
+#: fortran/symbol.c:1532
#, no-c-format
msgid "'%s' at %L has attributes specified outside its INTERFACE body"
msgstr ""
-#: fortran/symbol.c:1574
+#: fortran/symbol.c:1579
#, no-c-format
msgid "Symbol '%s' at %L cannot have a type"
msgstr ""
-#: fortran/symbol.c:1733
+#: fortran/symbol.c:1738
#, no-c-format
msgid "Component '%s' at %C already declared at %L"
msgstr ""
-#: fortran/symbol.c:1744
+#: fortran/symbol.c:1749
#, no-c-format
msgid "Component '%s' at %C already in the parent type at %L"
msgstr ""
-#: fortran/symbol.c:1819
+#: fortran/symbol.c:1824
#, no-c-format
msgid "Symbol '%s' at %C is ambiguous"
msgstr ""
-#: fortran/symbol.c:1851
+#: fortran/symbol.c:1856
#, no-c-format
msgid "Derived type '%s' at %C is being used before it is defined"
msgstr ""
-#: fortran/symbol.c:1892
+#: fortran/symbol.c:1897
#, no-c-format
msgid "'%s' at %C is not a member of the '%s' structure"
msgstr ""
-#: fortran/symbol.c:1900
+#: fortran/symbol.c:1905
#, no-c-format
msgid "Component '%s' at %C is a PRIVATE component of '%s'"
msgstr ""
-#: fortran/symbol.c:1910
+#: fortran/symbol.c:1915
#, no-c-format
msgid "All components of '%s' are PRIVATE in structure constructor at %C"
msgstr ""
-#: fortran/symbol.c:2039
+#: fortran/symbol.c:2044
#, no-c-format
msgid "Duplicate statement label %d at %L and %L"
msgstr ""
-#: fortran/symbol.c:2049
+#: fortran/symbol.c:2054
#, no-c-format
msgid "Label %d at %C already referenced as branch target"
msgstr ""
-#: fortran/symbol.c:2058
+#: fortran/symbol.c:2063
#, no-c-format
msgid "Label %d at %C already referenced as a format label"
msgstr ""
-#: fortran/symbol.c:2100
+#: fortran/symbol.c:2105
#, no-c-format
msgid "Label %d at %C previously used as a FORMAT label"
msgstr ""
-#: fortran/symbol.c:2108
+#: fortran/symbol.c:2113
#, no-c-format
msgid "Label %d at %C previously used as branch target"
msgstr ""
-#: fortran/symbol.c:2420
+#: fortran/symbol.c:2425
#, no-c-format
msgid "Name '%s' at %C is an ambiguous reference to '%s' from module '%s'"
msgstr ""
-#: fortran/symbol.c:2423
+#: fortran/symbol.c:2428
#, no-c-format
msgid ""
"Name '%s' at %C is an ambiguous reference to '%s' from current program unit"
msgstr ""
#. Symbol is from another namespace.
-#: fortran/symbol.c:2567
+#: fortran/symbol.c:2572
#, no-c-format
msgid "Symbol '%s' at %C has already been host associated"
msgstr ""
-#: fortran/symbol.c:3336
+#: fortran/symbol.c:3342
#, no-c-format
msgid ""
"Derived type '%s' declared at %L must have the BIND attribute to be C "
"interoperable"
msgstr ""
-#: fortran/symbol.c:3347
+#: fortran/symbol.c:3353
#, no-c-format
msgid "Derived type '%s' at %L is empty"
msgstr ""
-#: fortran/symbol.c:3364
+#: fortran/symbol.c:3370
#, no-c-format
msgid ""
"Component '%s' at %L cannot have the POINTER attribute because it is a "
"member of the BIND(C) derived type '%s' at %L"
msgstr ""
-#: fortran/symbol.c:3376
+#: fortran/symbol.c:3382
#, no-c-format
msgid ""
"Component '%s' at %L cannot have the ALLOCATABLE attribute because it is a "
@@ -11131,7 +10913,7 @@ msgstr ""
#. If the derived type is bind(c), all fields must be
#. interop.
-#: fortran/symbol.c:3415
+#: fortran/symbol.c:3420
#, no-c-format
msgid ""
"Component '%s' in derived type '%s' at %L may not be C interoperable, even "
@@ -11141,66 +10923,66 @@ msgstr ""
#. If derived type is param to bind(c) routine, or to one
#. of the iso_c_binding procs, it must be interoperable, so
#. all fields must interop too.
-#: fortran/symbol.c:3424
+#: fortran/symbol.c:3429
#, no-c-format
msgid "Component '%s' in derived type '%s' at %L may not be C interoperable"
msgstr ""
-#: fortran/symbol.c:3438
+#: fortran/symbol.c:3443
#, no-c-format
msgid ""
"Derived type '%s' at %L cannot be declared with both PRIVATE and BIND(C) "
"attributes"
msgstr ""
-#: fortran/symbol.c:3446
+#: fortran/symbol.c:3451
#, no-c-format
msgid ""
"Derived type '%s' at %L cannot have the SEQUENCE attribute because it is BIND"
"(C)"
msgstr ""
-#: fortran/symbol.c:4261
+#: fortran/symbol.c:4267
#, no-c-format
msgid "Symbol '%s' is used before it is typed at %L"
msgstr ""
-#: fortran/symbol.c:4267
+#: fortran/symbol.c:4273
#, no-c-format
msgid "Extension: Symbol '%s' is used before it is typed at %L"
msgstr ""
-#: fortran/symbol.c:4318
+#: fortran/symbol.c:4324
#, no-c-format
msgid "'%s' of '%s' is PRIVATE at %C"
msgstr ""
-#: fortran/target-memory.c:610
+#: fortran/target-memory.c:615
#, no-c-format
msgid "Overlapping unequal initializers in EQUIVALENCE at %L"
msgstr ""
-#: fortran/target-memory.c:697
+#: fortran/target-memory.c:702
#, no-c-format
msgid "BOZ constant at %L is too large (%ld vs %ld bits)"
msgstr ""
-#: fortran/trans-array.c:641 fortran/trans-array.c:4368
-#: fortran/trans-array.c:5299 fortran/trans-intrinsic.c:3635
+#: fortran/trans-array.c:641 fortran/trans-array.c:4384
+#: fortran/trans-array.c:5315 fortran/trans-intrinsic.c:3719
#, no-c-format
msgid "Creating array temporary at %L"
msgstr ""
#. Problems occur when we get something like
#. integer :: a(lots) = (/(i, i=1, lots)/)
-#: fortran/trans-array.c:3951
+#: fortran/trans-array.c:3954
#, no-c-format
msgid ""
"The number of elements in the array constructor at %L requires an increase "
"of the allowed %d upper limit. See -fmax-array-constructor option"
msgstr ""
-#: fortran/trans-array.c:5296
+#: fortran/trans-array.c:5312
#, no-c-format
msgid "Creating array temporary at %L for argument '%s'"
msgstr ""
@@ -11277,57 +11059,57 @@ msgid ""
"fno-align-commons"
msgstr ""
-#: fortran/trans-const.c:290
+#: fortran/trans-const.c:294
#, no-c-format
msgid "Assigning value other than 0 or 1 to LOGICAL has undefined result at %L"
msgstr ""
-#: fortran/trans-decl.c:2835 fortran/trans-decl.c:3858
+#: fortran/trans-decl.c:2868 fortran/trans-decl.c:3906
#, no-c-format
msgid "Return value of function '%s' at %L not set"
msgstr ""
-#: fortran/trans-decl.c:3493
+#: fortran/trans-decl.c:3527
#, no-c-format
msgid "Dummy argument '%s' at %L was declared INTENT(OUT) but was not set"
msgstr ""
-#: fortran/trans-decl.c:3497
+#: fortran/trans-decl.c:3531
#, no-c-format
msgid "Unused dummy argument '%s' at %L"
msgstr ""
-#: fortran/trans-decl.c:3503
+#: fortran/trans-decl.c:3537
#, no-c-format
msgid "Unused variable '%s' declared at %L"
msgstr ""
-#: fortran/trans-decl.c:3535
+#: fortran/trans-decl.c:3583
#, no-c-format
msgid "Unused parameter '%s' declared at %L"
msgstr ""
-#: fortran/trans-decl.c:3549
+#: fortran/trans-decl.c:3597
#, no-c-format
msgid "Return value '%s' of function '%s' declared at %L not set"
msgstr ""
-#: fortran/trans-expr.c:2391
+#: fortran/trans-expr.c:2399
#, no-c-format
msgid "Unknown argument list function at %L"
msgstr ""
-#: fortran/trans-intrinsic.c:853
+#: fortran/trans-intrinsic.c:882
#, no-c-format
msgid "'dim' argument of %s intrinsic at %L is not a valid dimension index"
msgstr ""
-#: fortran/trans-io.c:2006
+#: fortran/trans-io.c:2004
#, no-c-format
msgid "Derived type '%s' at %L has PRIVATE components"
msgstr ""
-#: fortran/trans-stmt.c:462
+#: fortran/trans-stmt.c:471
#, no-c-format
msgid "An alternate return at %L without a * dummy argument"
msgstr ""
@@ -11344,33 +11126,33 @@ msgstr ""
msgid "Incorrect function return value"
msgstr ""
-#: fortran/trans.c:515 fortran/trans.c:935
+#: fortran/trans.c:516 fortran/trans.c:936
msgid "Attempt to allocate a negative amount of memory."
msgstr ""
-#: fortran/trans.c:533
+#: fortran/trans.c:534
msgid "Memory allocation failed"
msgstr ""
-#: fortran/trans.c:615
+#: fortran/trans.c:616
msgid ""
"Attempt to allocate negative amount of memory. Possible integer overflow"
msgstr ""
-#: fortran/trans.c:646 fortran/trans.c:952
+#: fortran/trans.c:647 fortran/trans.c:953
msgid "Out of memory"
msgstr ""
-#: fortran/trans.c:737
+#: fortran/trans.c:738
#, c-format
msgid "Attempting to allocate already allocated array '%s'"
msgstr ""
-#: fortran/trans.c:743
+#: fortran/trans.c:744
msgid "Attempting to allocate already allocatedarray"
msgstr ""
-#: fortran/trans.c:852
+#: fortran/trans.c:853
#, c-format
msgid "Attempt to DEALLOCATE unallocated '%s'"
msgstr ""
@@ -11551,118 +11333,80 @@ msgstr ""
msgid "cannot specify 'main' class when not linking"
msgstr ""
-#: java/jvspec.c:80 gcc.c:828
-msgid "-pg and -fomit-frame-pointer are incompatible"
-msgstr ""
-
-#: config/linux.h:106 config/linux.h:108 config/rs6000/sysv4.h:902
-#: config/rs6000/sysv4.h:904 config/rs6000/linux64.h:345
-#: config/rs6000/linux64.h:347 config/alpha/linux-elf.h:33
-#: config/alpha/linux-elf.h:35
-msgid "-mglibc and -muclibc used together"
-msgstr ""
-
-#: config/lynx.h:70
-msgid "cannot use mthreads and mlegacy-threads together"
-msgstr ""
-
-#: config/lynx.h:95
-msgid "cannot use mshared and static together"
-msgstr ""
-
-#: config/sparc/linux64.h:165 config/sparc/linux64.h:176
-#: config/sparc/netbsd-elf.h:125 config/sparc/netbsd-elf.h:144
-#: config/sparc/sol2-bi.h:217 config/sparc/sol2-bi.h:227
-msgid "may not use both -m32 and -m64"
+#: config/i386/nwld.h:34
+msgid "Static linking is not supported.\n"
msgstr ""
-#: config/sparc/sol2-bi.h:189 config/sparc/sol2-bi.h:194
-#: config/sparc/sol2-gld-bi.h:17 config/sparc/sol2-gld-bi.h:22
-msgid "does not support multilib"
+#: fortran/lang-specs.h:55 fortran/lang-specs.h:69
+msgid "gfortran does not support -E without -cpp"
msgstr ""
-#: config/mips/mips.h:1171 config/arc/arc.h:61
-msgid "may not use both -EB and -EL"
+#: config/vxworks.h:71
+msgid "-Xbind-now and -Xbind-lazy are incompatible"
msgstr ""
-#: config/mips/r3900.h:34
-msgid "-mhard-float not supported"
+#: config/darwin.h:270
+msgid "-current_version only allowed with -dynamiclib"
msgstr ""
-#: config/mips/r3900.h:36
-msgid "-msingle-float and -msoft-float cannot both be specified"
+#: config/darwin.h:272
+msgid "-install_name only allowed with -dynamiclib"
msgstr ""
-#: config/i386/mingw32.h:85 config/i386/cygwin.h:74
-msgid "shared and mdll are not compatible"
+#: config/darwin.h:277
+msgid "-bundle not allowed with -dynamiclib"
msgstr ""
-#: gcc.c:800
-msgid "GCC does not support -C or -CC without -E"
+#: config/darwin.h:278
+msgid "-bundle_loader not allowed with -dynamiclib"
msgstr ""
-#: gcc.c:1013
-msgid "-E or -x required when input is from standard input"
+#: config/darwin.h:279
+msgid "-client_name not allowed with -dynamiclib"
msgstr ""
-#: fortran/lang-specs.h:45 fortran/lang-specs.h:58
-msgid "gfortran does not support -E without -cpp"
+#: config/darwin.h:284
+msgid "-force_flat_namespace not allowed with -dynamiclib"
msgstr ""
-#: config/bfin/elf.h:31
-msgid "no processor type specified for linking"
+#: config/darwin.h:286
+msgid "-keep_private_externs not allowed with -dynamiclib"
msgstr ""
-#: config/vxworks.h:71
-msgid "-Xbind-now and -Xbind-lazy are incompatible"
+#: config/darwin.h:287
+msgid "-private_bundle not allowed with -dynamiclib"
msgstr ""
#: config/vax/netbsd-elf.h:41
msgid "the -shared option is not currently supported for VAX ELF"
msgstr ""
-#: config/i386/cygwin.h:28
-msgid "mno-cygwin and mno-win32 are not compatible"
-msgstr ""
-
-#: config/i386/nwld.h:34
-msgid "Static linking is not supported.\n"
-msgstr ""
-
-#: config/darwin.h:269
-msgid "-current_version only allowed with -dynamiclib"
-msgstr ""
-
-#: config/darwin.h:271
-msgid "-install_name only allowed with -dynamiclib"
-msgstr ""
-
-#: config/darwin.h:276
-msgid "-bundle not allowed with -dynamiclib"
+#: config/vax/vax.h:50 config/vax/vax.h:51
+msgid "profiling not supported with -mg\n"
msgstr ""
-#: config/darwin.h:277
-msgid "-bundle_loader not allowed with -dynamiclib"
+#: config/bfin/elf.h:31
+msgid "no processor type specified for linking"
msgstr ""
-#: config/darwin.h:278
-msgid "-client_name not allowed with -dynamiclib"
+#: gcc.c:800
+msgid "GCC does not support -C or -CC without -E"
msgstr ""
-#: config/darwin.h:283
-msgid "-force_flat_namespace not allowed with -dynamiclib"
+#: gcc.c:828 java/jvspec.c:80
+msgid "-pg and -fomit-frame-pointer are incompatible"
msgstr ""
-#: config/darwin.h:285
-msgid "-keep_private_externs not allowed with -dynamiclib"
+#: gcc.c:1013
+msgid "-E or -x required when input is from standard input"
msgstr ""
-#: config/darwin.h:286
-msgid "-private_bundle not allowed with -dynamiclib"
+#: config/i386/cygwin.h:28
+msgid "mno-cygwin and mno-win32 are not compatible"
msgstr ""
-#: config/mcore/mcore.h:56
-msgid "the m210 does not have little endian support"
+#: config/i386/cygwin.h:91 config/i386/mingw32.h:85
+msgid "shared and mdll are not compatible"
msgstr ""
#: java/lang-specs.h:33
@@ -11677,10 +11421,20 @@ msgstr ""
msgid "-femit-class-file should used along with -fsyntax-only"
msgstr ""
+#: config/mcore/mcore.h:54
+msgid "the m210 does not have little endian support"
+msgstr ""
+
#: config/sh/sh.h:461
msgid "SH2a does not support little-endian"
msgstr ""
+#: config/rs6000/sysv4.h:902 config/rs6000/sysv4.h:904 config/linux.h:106
+#: config/linux.h:108 config/alpha/linux-elf.h:33 config/alpha/linux-elf.h:35
+#: config/rs6000/linux64.h:345 config/rs6000/linux64.h:347
+msgid "-mglibc and -muclibc used together"
+msgstr ""
+
#: config/arm/arm.h:148
msgid "-msoft-float and -mhard_float may not be used together"
msgstr ""
@@ -11693,8 +11447,18 @@ msgstr ""
msgid "Do not specify both -march=... and -mcpu=..."
msgstr ""
-#: config/vax/vax.h:49 config/vax/vax.h:50
-msgid "profiling not supported with -mg\n"
+#: config/lynx.h:70
+msgid "cannot use mthreads and mlegacy-threads together"
+msgstr ""
+
+#: config/lynx.h:95
+msgid "cannot use mshared and static together"
+msgstr ""
+
+#: config/sparc/linux64.h:165 config/sparc/linux64.h:176
+#: config/sparc/netbsd-elf.h:125 config/sparc/netbsd-elf.h:144
+#: config/sparc/sol2-bi.h:217 config/sparc/sol2-bi.h:227
+msgid "may not use both -m32 and -m64"
msgstr ""
#: config/s390/tpf.h:119
@@ -11705,8 +11469,21 @@ msgstr ""
msgid " conflicting code gen style switches are used"
msgstr ""
-#: java/lang.opt:65
-msgid "Warn if a deprecated compiler feature, class, method, or field is used"
+#: config/mips/mips.h:1182 config/arc/arc.h:61
+msgid "may not use both -EB and -EL"
+msgstr ""
+
+#: config/mips/r3900.h:34
+msgid "-mhard-float not supported"
+msgstr ""
+
+#: config/mips/r3900.h:36
+msgid "-msingle-float and -msoft-float cannot both be specified"
+msgstr ""
+
+#: config/sparc/sol2-bi.h:189 config/sparc/sol2-bi.h:194
+#: config/sparc/sol2-gld-bi.h:17 config/sparc/sol2-gld-bi.h:22
+msgid "does not support multilib"
msgstr ""
#: java/lang.opt:69
@@ -11819,10 +11596,6 @@ msgstr ""
msgid "Specify options to GNAT"
msgstr ""
-#: fortran/lang.opt:53
-msgid "Add a directory for INCLUDE and MODULE searching"
-msgstr ""
-
#: fortran/lang.opt:57
msgid "Put MODULE files in 'directory'"
msgstr ""
@@ -11847,10 +11620,6 @@ msgstr ""
msgid "Warn about truncated character expressions"
msgstr ""
-#: fortran/lang.opt:93
-msgid "Warn about implicit conversion"
-msgstr ""
-
#: fortran/lang.opt:97
msgid "Warn about calls with implicit interface"
msgstr ""
@@ -11887,10 +11656,6 @@ msgstr ""
msgid "Disable preprocessing"
msgstr ""
-#: fortran/lang.opt:137
-msgid "Dump details about macro names and definitions during preprocessing"
-msgstr ""
-
#: fortran/lang.opt:141
msgid "Enable alignment of COMMON blocks"
msgstr ""
@@ -12072,18 +11837,10 @@ msgstr ""
msgid "Set default accessibility of module entities to PRIVATE."
msgstr ""
-#: fortran/lang.opt:313
-msgid "Enable OpenMP (also sets frecursive)"
-msgstr ""
-
#: fortran/lang.opt:317
msgid "Try to lay out derived types as compactly as possible"
msgstr ""
-#: fortran/lang.opt:321
-msgid "Treat the input file as preprocessed"
-msgstr ""
-
#: fortran/lang.opt:325
msgid "Enable range checking during compilation"
msgstr ""
@@ -12108,7 +11865,7 @@ msgstr ""
msgid "Append a second underscore if the name already contains an underscore"
msgstr ""
-#: fortran/lang.opt:349 c.opt:729
+#: fortran/lang.opt:349 c.opt:737
msgid "Use the narrowest integer type possible for enumeration types"
msgstr ""
@@ -12120,27 +11877,27 @@ msgstr ""
msgid "Append underscores to externally visible names"
msgstr ""
-#: fortran/lang.opt:393
+#: fortran/lang.opt:397
msgid "Statically link the GNU Fortran helper library (libgfortran)"
msgstr ""
-#: fortran/lang.opt:397
+#: fortran/lang.opt:401
msgid "Conform to the ISO Fortran 2003 standard"
msgstr ""
-#: fortran/lang.opt:401
+#: fortran/lang.opt:405
msgid "Conform to the ISO Fortran 2008 standard"
msgstr ""
-#: fortran/lang.opt:405
+#: fortran/lang.opt:409
msgid "Conform to the ISO Fortran 95 standard"
msgstr ""
-#: fortran/lang.opt:409
+#: fortran/lang.opt:413
msgid "Conform to nothing in particular"
msgstr ""
-#: fortran/lang.opt:413
+#: fortran/lang.opt:417
msgid "Accept extensions to support legacy code"
msgstr ""
@@ -12507,7 +12264,7 @@ msgid ""
msgstr ""
#: config/s390/s390.opt:87 config/ia64/ia64.opt:97 config/sparc/sparc.opt:95
-#: config/i386/i386.opt:229 config/rs6000/rs6000.opt:226 config/spu/spu.opt:84
+#: config/i386/i386.opt:229 config/rs6000/rs6000.opt:230 config/spu/spu.opt:84
msgid "Schedule code for given CPU"
msgstr ""
@@ -12793,7 +12550,7 @@ msgstr ""
msgid "Optimize tail call instructions in assembler and linker"
msgstr ""
-#: config/sparc/sparc.opt:91 config/rs6000/rs6000.opt:222
+#: config/sparc/sparc.opt:91 config/rs6000/rs6000.opt:226
msgid "Use features of and schedule code for given CPU"
msgstr ""
@@ -13174,123 +12931,127 @@ msgstr ""
msgid "Use direct references against %gs when accessing tls data"
msgstr ""
-#: config/i386/i386.opt:233
-msgid "Vector library ABI to use"
+#: config/i386/i386.opt:233 config/mips/mips.opt:23
+msgid "Generate code that conforms to the given ABI"
msgstr ""
#: config/i386/i386.opt:237
-msgid "Generate reciprocals instead of divss and sqrtss."
+msgid "Vector library ABI to use"
msgstr ""
#: config/i386/i386.opt:241
+msgid "Generate reciprocals instead of divss and sqrtss."
+msgstr ""
+
+#: config/i386/i386.opt:245
msgid "Generate cld instruction in the function prologue."
msgstr ""
-#: config/i386/i386.opt:248
+#: config/i386/i386.opt:252
msgid ""
"Enable automatic generation of fused floating point multiply-add instructions"
msgstr ""
-#: config/i386/i386.opt:256
+#: config/i386/i386.opt:260
msgid "Generate 32bit i386 code"
msgstr ""
-#: config/i386/i386.opt:260
+#: config/i386/i386.opt:264
msgid "Generate 64bit x86-64 code"
msgstr ""
-#: config/i386/i386.opt:264
+#: config/i386/i386.opt:268
msgid "Support MMX built-in functions"
msgstr ""
-#: config/i386/i386.opt:268
+#: config/i386/i386.opt:272
msgid "Support 3DNow! built-in functions"
msgstr ""
-#: config/i386/i386.opt:272
+#: config/i386/i386.opt:276
msgid "Support Athlon 3Dnow! built-in functions"
msgstr ""
-#: config/i386/i386.opt:276
+#: config/i386/i386.opt:280
msgid "Support MMX and SSE built-in functions and code generation"
msgstr ""
-#: config/i386/i386.opt:280
+#: config/i386/i386.opt:284
msgid "Support MMX, SSE and SSE2 built-in functions and code generation"
msgstr ""
-#: config/i386/i386.opt:284
+#: config/i386/i386.opt:288
msgid "Support MMX, SSE, SSE2 and SSE3 built-in functions and code generation"
msgstr ""
-#: config/i386/i386.opt:288
+#: config/i386/i386.opt:292
msgid ""
"Support MMX, SSE, SSE2, SSE3 and SSSE3 built-in functions and code generation"
msgstr ""
-#: config/i386/i386.opt:292
+#: config/i386/i386.opt:296
msgid ""
"Support MMX, SSE, SSE2, SSE3, SSSE3 and SSE4.1 built-in functions and code "
"generation"
msgstr ""
-#: config/i386/i386.opt:296 config/i386/i386.opt:300
+#: config/i386/i386.opt:300 config/i386/i386.opt:304
msgid ""
"Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 and SSE4.2 built-in functions "
"and code generation"
msgstr ""
-#: config/i386/i386.opt:304
+#: config/i386/i386.opt:308
msgid "Do not support SSE4.1 and SSE4.2 built-in functions and code generation"
msgstr ""
-#: config/i386/i386.opt:308
+#: config/i386/i386.opt:312
msgid ""
"Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in "
"functions and code generation"
msgstr ""
-#: config/i386/i386.opt:312
+#: config/i386/i386.opt:316
msgid ""
"Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and FMA built-in "
"functions and code generation"
msgstr ""
-#: config/i386/i386.opt:316
+#: config/i386/i386.opt:320
msgid ""
"Support MMX, SSE, SSE2, SSE3 and SSE4A built-in functions and code generation"
msgstr ""
-#: config/i386/i386.opt:320
+#: config/i386/i386.opt:324
msgid "Support SSE5 built-in functions and code generation"
msgstr ""
-#: config/i386/i386.opt:324
+#: config/i386/i386.opt:328
msgid ""
"Support code generation of Advanced Bit Manipulation (ABM) instructions."
msgstr ""
-#: config/i386/i386.opt:328
+#: config/i386/i386.opt:332
msgid "Support code generation of popcnt instruction."
msgstr ""
-#: config/i386/i386.opt:332
+#: config/i386/i386.opt:336
msgid "Support code generation of cmpxchg16b instruction."
msgstr ""
-#: config/i386/i386.opt:336
+#: config/i386/i386.opt:340
msgid "Support code generation of sahf instruction in 64bit x86-64 code."
msgstr ""
-#: config/i386/i386.opt:340
+#: config/i386/i386.opt:344
msgid "Support AES built-in functions and code generation"
msgstr ""
-#: config/i386/i386.opt:344
+#: config/i386/i386.opt:348
msgid "Support PCLMUL built-in functions and code generation"
msgstr ""
-#: config/i386/i386.opt:348
+#: config/i386/i386.opt:352
msgid "Encode SSE instructions with VEX prefix"
msgstr ""
@@ -13322,11 +13083,7 @@ msgstr ""
msgid "Create GUI application"
msgstr ""
-#: config/rs6000/aix41.opt:24 config/rs6000/aix64.opt:32
-msgid "Support message passing with the Parallel Environment"
-msgstr ""
-
-#: config/rs6000/aix.opt:24 config/rs6000/rs6000.opt:147
+#: config/rs6000/aix.opt:24 config/rs6000/rs6000.opt:151
msgid "Conform more closely to IBM XLC semantics"
msgstr ""
@@ -13439,150 +13196,154 @@ msgid "Generate load/store with update instructions"
msgstr ""
#: config/rs6000/rs6000.opt:124
-msgid "Do not generate fused multiply/add instructions"
+msgid "Avoid generation of indexed load/store instructions when possible"
msgstr ""
#: config/rs6000/rs6000.opt:128
-msgid "Generate fused multiply/add instructions"
+msgid "Do not generate fused multiply/add instructions"
msgstr ""
#: config/rs6000/rs6000.opt:132
+msgid "Generate fused multiply/add instructions"
+msgstr ""
+
+#: config/rs6000/rs6000.opt:136
msgid "Schedule the start and end of the procedure"
msgstr ""
-#: config/rs6000/rs6000.opt:139
+#: config/rs6000/rs6000.opt:143
msgid "Return all structures in memory (AIX default)"
msgstr ""
-#: config/rs6000/rs6000.opt:143
+#: config/rs6000/rs6000.opt:147
msgid "Return small structures in registers (SVR4 default)"
msgstr ""
-#: config/rs6000/rs6000.opt:151
+#: config/rs6000/rs6000.opt:155
msgid "Generate software reciprocal sqrt for better throughput"
msgstr ""
-#: config/rs6000/rs6000.opt:155
+#: config/rs6000/rs6000.opt:159
msgid "Do not place floating point constants in TOC"
msgstr ""
-#: config/rs6000/rs6000.opt:159
+#: config/rs6000/rs6000.opt:163
msgid "Place floating point constants in TOC"
msgstr ""
-#: config/rs6000/rs6000.opt:163
+#: config/rs6000/rs6000.opt:167
msgid "Do not place symbol+offset constants in TOC"
msgstr ""
-#: config/rs6000/rs6000.opt:167
+#: config/rs6000/rs6000.opt:171
msgid "Place symbol+offset constants in TOC"
msgstr ""
-#: config/rs6000/rs6000.opt:178
+#: config/rs6000/rs6000.opt:182
msgid "Use only one TOC entry per procedure"
msgstr ""
-#: config/rs6000/rs6000.opt:182
+#: config/rs6000/rs6000.opt:186
msgid "Put everything in the regular TOC"
msgstr ""
-#: config/rs6000/rs6000.opt:186
+#: config/rs6000/rs6000.opt:190
msgid "Generate VRSAVE instructions when generating AltiVec code"
msgstr ""
-#: config/rs6000/rs6000.opt:190
+#: config/rs6000/rs6000.opt:194
msgid "Deprecated option. Use -mvrsave/-mno-vrsave instead"
msgstr ""
-#: config/rs6000/rs6000.opt:194
+#: config/rs6000/rs6000.opt:198
msgid "Generate isel instructions"
msgstr ""
-#: config/rs6000/rs6000.opt:198
+#: config/rs6000/rs6000.opt:202
msgid "Deprecated option. Use -misel/-mno-isel instead"
msgstr ""
-#: config/rs6000/rs6000.opt:202
+#: config/rs6000/rs6000.opt:206
msgid "Generate SPE SIMD instructions on E500"
msgstr ""
-#: config/rs6000/rs6000.opt:206
+#: config/rs6000/rs6000.opt:210
msgid "Generate PPC750CL paired-single instructions"
msgstr ""
-#: config/rs6000/rs6000.opt:210
+#: config/rs6000/rs6000.opt:214
msgid "Deprecated option. Use -mspe/-mno-spe instead"
msgstr ""
-#: config/rs6000/rs6000.opt:214
+#: config/rs6000/rs6000.opt:218
msgid "Enable debug output"
msgstr ""
-#: config/rs6000/rs6000.opt:218
+#: config/rs6000/rs6000.opt:222
msgid "Specify ABI to use"
msgstr ""
-#: config/rs6000/rs6000.opt:230
+#: config/rs6000/rs6000.opt:234
msgid "Select full, part, or no traceback table"
msgstr ""
-#: config/rs6000/rs6000.opt:234
+#: config/rs6000/rs6000.opt:238
msgid "Avoid all range limits on call instructions"
msgstr ""
-#: config/rs6000/rs6000.opt:238
+#: config/rs6000/rs6000.opt:242
msgid "Generate Cell microcode"
msgstr ""
-#: config/rs6000/rs6000.opt:242
+#: config/rs6000/rs6000.opt:246
msgid "Warn when a Cell microcoded instruction is emitted"
msgstr ""
-#: config/rs6000/rs6000.opt:246
+#: config/rs6000/rs6000.opt:250
msgid "Warn about deprecated 'vector long ...' AltiVec type usage"
msgstr ""
-#: config/rs6000/rs6000.opt:250
+#: config/rs6000/rs6000.opt:254
msgid "Select GPR floating point method"
msgstr ""
-#: config/rs6000/rs6000.opt:254
+#: config/rs6000/rs6000.opt:258
msgid "Specify size of long double (64 or 128 bits)"
msgstr ""
-#: config/rs6000/rs6000.opt:258
+#: config/rs6000/rs6000.opt:262
msgid "Determine which dependences between insns are considered costly"
msgstr ""
-#: config/rs6000/rs6000.opt:262
+#: config/rs6000/rs6000.opt:266
msgid "Specify which post scheduling nop insertion scheme to apply"
msgstr ""
-#: config/rs6000/rs6000.opt:266
+#: config/rs6000/rs6000.opt:270
msgid "Specify alignment of structure fields default/natural"
msgstr ""
-#: config/rs6000/rs6000.opt:270
+#: config/rs6000/rs6000.opt:274
msgid "Specify scheduling priority for dispatch slot restricted insns"
msgstr ""
-#: config/rs6000/rs6000.opt:274
+#: config/rs6000/rs6000.opt:278
msgid "Single-precision floating point unit"
msgstr ""
-#: config/rs6000/rs6000.opt:278
+#: config/rs6000/rs6000.opt:282
msgid "Double-precision floating point unit"
msgstr ""
-#: config/rs6000/rs6000.opt:282
+#: config/rs6000/rs6000.opt:286
msgid "Floating point unit does not support divide & sqrt"
msgstr ""
-#: config/rs6000/rs6000.opt:286
+#: config/rs6000/rs6000.opt:290
msgid "Specify FP (sp, dp, sp-lite, dp-lite) (implies -mxilinx-fpu)"
msgstr ""
-#: config/rs6000/rs6000.opt:290
+#: config/rs6000/rs6000.opt:294
msgid "Specify Xilinx FPU."
msgstr ""
@@ -13594,6 +13355,10 @@ msgstr ""
msgid "Compile for 32-bit pointers"
msgstr ""
+#: config/rs6000/aix64.opt:32
+msgid "Support message passing with the Parallel Environment"
+msgstr ""
+
#: config/rs6000/linux64.opt:24
msgid "Call mcount for profiling before a function prologue"
msgstr ""
@@ -13739,50 +13504,48 @@ msgid "Generate code for the M*Core M340"
msgstr ""
#: config/mcore/mcore.opt:31
-msgid "Set maximum alignment to 4"
-msgstr ""
-
-#: config/mcore/mcore.opt:35
msgid "Force functions to be aligned to a 4 byte boundary"
msgstr ""
-#: config/mcore/mcore.opt:39
-msgid "Set maximum alignment to 8"
-msgstr ""
-
-#: config/mcore/mcore.opt:43 config/score/score.opt:23
+#: config/mcore/mcore.opt:35 config/score/score.opt:23
msgid "Generate big-endian code"
msgstr ""
-#: config/mcore/mcore.opt:47
+#: config/mcore/mcore.opt:39
msgid "Emit call graph information"
msgstr ""
-#: config/mcore/mcore.opt:51
+#: config/mcore/mcore.opt:43
msgid "Use the divide instruction"
msgstr ""
-#: config/mcore/mcore.opt:55
+#: config/mcore/mcore.opt:47
msgid "Inline constants if it can be done in 2 insns or less"
msgstr ""
-#: config/mcore/mcore.opt:59 config/score/score.opt:27
+#: config/mcore/mcore.opt:51 config/score/score.opt:27
msgid "Generate little-endian code"
msgstr ""
-#: config/mcore/mcore.opt:67
+#: config/mcore/mcore.opt:56 config/fr30/fr30.opt:27
+msgid ""
+"Assume that run-time support has been provided, so omit -lsim from the "
+"linker command line"
+msgstr ""
+
+#: config/mcore/mcore.opt:60
msgid "Use arbitrary sized immediates in bit operations"
msgstr ""
-#: config/mcore/mcore.opt:71
+#: config/mcore/mcore.opt:64
msgid "Prefer word accesses over byte accesses"
msgstr ""
-#: config/mcore/mcore.opt:75
+#: config/mcore/mcore.opt:68
msgid "Set the maximum amount for a single stack increment operation"
msgstr ""
-#: config/mcore/mcore.opt:79
+#: config/mcore/mcore.opt:72
msgid "Always treat bitfields as int-sized"
msgstr ""
@@ -14468,10 +14231,6 @@ msgstr ""
msgid "Provide libraries for the simulator"
msgstr ""
-#: config/mips/mips.opt:23
-msgid "Generate code that conforms to the given ABI"
-msgstr ""
-
#: config/mips/mips.opt:27
msgid "Generate code that can be used in SVR4-style dynamic objects"
msgstr ""
@@ -15142,29 +14901,36 @@ msgstr ""
msgid "Build for SDRAM"
msgstr ""
+#: config/bfin/bfin.opt:101
+msgid "Assume ICPLBs are enabled at runtime."
+msgstr ""
+
#: config/picochip/picochip.opt:23
-msgid "Specify which type of AE to target. This option sets the mul-type"
+msgid ""
+"Specify which type of AE to target. This option sets the mul-type and byte-"
+"access."
msgstr ""
-#: config/picochip/picochip.opt:28
+#: config/picochip/picochip.opt:27
msgid "Specify which type of multiplication to use. Can be mem, mac or none."
msgstr ""
-#: config/picochip/picochip.opt:32
+#: config/picochip/picochip.opt:31
msgid ""
"Specify whether the byte access instructions should be used. Enabled by "
"default."
msgstr ""
-#: config/picochip/picochip.opt:36
+#: config/picochip/picochip.opt:35
msgid "Enable debug output to be generated."
msgstr ""
-#: config/picochip/picochip.opt:40
-msgid "Allow a symbol value to be used as an immediate value in an"
+#: config/picochip/picochip.opt:39
+msgid ""
+"Allow a symbol value to be used as an immediate value in an instruction."
msgstr ""
-#: config/picochip/picochip.opt:45
+#: config/picochip/picochip.opt:43
msgid "Generate warnings when inefficient code is known to be generated."
msgstr ""
@@ -15252,877 +15018,877 @@ msgstr ""
msgid "Use GNU libc instead of uClibc"
msgstr ""
-#: c.opt:41
+#: c.opt:42
msgid ""
"Assert the <answer> to <question>. Putting '-' before <question> disables "
"the <answer> to <question>"
msgstr ""
-#: c.opt:45
+#: c.opt:46
msgid "Do not discard comments"
msgstr ""
-#: c.opt:49
+#: c.opt:50
msgid "Do not discard comments in macro expansions"
msgstr ""
-#: c.opt:53
+#: c.opt:54
msgid ""
"Define a <macro> with <val> as its value. If just <macro> is given, <val> "
"is taken to be 1"
msgstr ""
-#: c.opt:60
+#: c.opt:61
msgid "Add <dir> to the end of the main framework include path"
msgstr ""
-#: c.opt:64
+#: c.opt:65
msgid "Print the name of header files as they are used"
msgstr ""
-#: c.opt:68 c.opt:874
+#: c.opt:69 c.opt:882
msgid "Add <dir> to the end of the main include path"
msgstr ""
-#: c.opt:72
+#: c.opt:73
msgid "Generate make dependencies"
msgstr ""
-#: c.opt:76
+#: c.opt:77
msgid "Generate make dependencies and compile"
msgstr ""
-#: c.opt:80
+#: c.opt:81
msgid "Write dependency output to the given file"
msgstr ""
-#: c.opt:84
+#: c.opt:85
msgid "Treat missing header files as generated files"
msgstr ""
-#: c.opt:88
+#: c.opt:89
msgid "Like -M but ignore system header files"
msgstr ""
-#: c.opt:92
+#: c.opt:93
msgid "Like -MD but ignore system header files"
msgstr ""
-#: c.opt:96
+#: c.opt:97
msgid "Generate phony targets for all headers"
msgstr ""
-#: c.opt:100
+#: c.opt:101
msgid "Add a MAKE-quoted target"
msgstr ""
-#: c.opt:104
+#: c.opt:105
msgid "Add an unquoted target"
msgstr ""
-#: c.opt:108
+#: c.opt:109
msgid "Do not generate #line directives"
msgstr ""
-#: c.opt:112
+#: c.opt:113
msgid "Undefine <macro>"
msgstr ""
-#: c.opt:116
+#: c.opt:117
msgid ""
"Warn about things that will change when compiling with an ABI-compliant "
"compiler"
msgstr ""
-#: c.opt:120
+#: c.opt:124
msgid "Warn about suspicious uses of memory addresses"
msgstr ""
-#: c.opt:124
+#: c.opt:128
msgid "Enable most warning messages"
msgstr ""
-#: c.opt:128
+#: c.opt:132
msgid ""
"Warn whenever an Objective-C assignment is being intercepted by the garbage "
"collector"
msgstr ""
-#: c.opt:132
+#: c.opt:136
msgid "Warn about casting functions to incompatible types"
msgstr ""
-#: c.opt:136
+#: c.opt:140
msgid "Warn when a built-in preprocessor macro is undefined or redefined"
msgstr ""
-#: c.opt:140
+#: c.opt:144
msgid "Warn about C constructs that are not in the common subset of C and C++"
msgstr ""
-#: c.opt:144
+#: c.opt:148
msgid ""
"Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO "
"C++ 200x"
msgstr ""
-#: c.opt:148
+#: c.opt:152
msgid "Warn about casts which discard qualifiers"
msgstr ""
-#: c.opt:152
+#: c.opt:156
msgid "Warn about subscripts whose type is \"char\""
msgstr ""
-#: c.opt:156
+#: c.opt:160
msgid "Warn about variables that might be changed by \"longjmp\" or \"vfork\""
msgstr ""
-#: c.opt:160
+#: c.opt:164
msgid ""
"Warn about possibly nested block comments, and C++ comments spanning more "
"than one physical line"
msgstr ""
-#: c.opt:164
+#: c.opt:168
msgid "Synonym for -Wcomment"
msgstr ""
-#: c.opt:168
+#: c.opt:172
msgid "Warn for implicit type conversions that may change a value"
msgstr ""
-#: c.opt:172
+#: c.opt:176
msgid "Warn for implicit type conversions between signed and unsigned integers"
msgstr ""
-#: c.opt:176
+#: c.opt:180
msgid "Warn when all constructors and destructors are private"
msgstr ""
-#: c.opt:180
+#: c.opt:184
msgid "Warn when a declaration is found after a statement"
msgstr ""
-#: c.opt:184
-msgid "Warn about deprecated compiler features"
+#: c.opt:188
+msgid "Warn if a deprecated compiler feature, class, method, or field is used"
msgstr ""
-#: c.opt:188
+#: c.opt:192
msgid "Warn about compile-time integer division by zero"
msgstr ""
-#: c.opt:192
+#: c.opt:196
msgid "Warn about violations of Effective C++ style rules"
msgstr ""
-#: c.opt:196
+#: c.opt:200
msgid "Warn about an empty body in an if or else statement"
msgstr ""
-#: c.opt:200
+#: c.opt:204
msgid "Warn about stray tokens after #elif and #endif"
msgstr ""
-#: c.opt:204
+#: c.opt:208
msgid "Warn about comparison of different enum types"
msgstr ""
-#: c.opt:212
+#: c.opt:216
msgid ""
"This switch is deprecated; use -Werror=implicit-function-declaration instead"
msgstr ""
-#: c.opt:216
+#: c.opt:220
msgid "Warn if testing floating point numbers for equality"
msgstr ""
-#: c.opt:220
+#: c.opt:224
msgid "Warn about printf/scanf/strftime/strfmon format string anomalies"
msgstr ""
-#: c.opt:224
+#: c.opt:228
msgid "Warn if passing too many arguments to a function for its format string"
msgstr ""
-#: c.opt:228
+#: c.opt:232
msgid "Warn about format strings that are not literals"
msgstr ""
-#: c.opt:232
+#: c.opt:236
msgid "Warn about format strings that contain NUL bytes"
msgstr ""
-#: c.opt:236
+#: c.opt:240
msgid "Warn about possible security problems with format functions"
msgstr ""
-#: c.opt:240
+#: c.opt:244
msgid "Warn about strftime formats yielding 2-digit years"
msgstr ""
-#: c.opt:244
+#: c.opt:248
msgid "Warn about zero-length formats"
msgstr ""
-#: c.opt:251
+#: c.opt:255
msgid "Warn whenever type qualifiers are ignored."
msgstr ""
-#: c.opt:255
+#: c.opt:259
msgid "Warn about variables which are initialized to themselves"
msgstr ""
-#: c.opt:262
+#: c.opt:266
msgid "Warn about implicit function declarations"
msgstr ""
-#: c.opt:266
+#: c.opt:270
msgid "Warn when a declaration does not specify a type"
msgstr ""
-#: c.opt:273
+#: c.opt:277
msgid ""
"Warn when there is a cast to a pointer from an integer of a different size"
msgstr ""
-#: c.opt:277
+#: c.opt:281
msgid "Warn about invalid uses of the \"offsetof\" macro"
msgstr ""
-#: c.opt:281
+#: c.opt:285
msgid "Warn about PCH files that are found but not used"
msgstr ""
-#: c.opt:285
+#: c.opt:289
msgid "Do not warn about using \"long long\" when -pedantic"
msgstr ""
-#: c.opt:289
+#: c.opt:293
msgid "Warn about suspicious declarations of \"main\""
msgstr ""
-#: c.opt:293
+#: c.opt:297
msgid "Warn about possibly missing braces around initializers"
msgstr ""
-#: c.opt:297
+#: c.opt:301
msgid "Warn about global functions without previous declarations"
msgstr ""
-#: c.opt:301
+#: c.opt:305
msgid "Warn about missing fields in struct initializers"
msgstr ""
-#: c.opt:305
+#: c.opt:309
msgid "Warn about functions which might be candidates for format attributes"
msgstr ""
-#: c.opt:309
+#: c.opt:313
msgid "Warn about user-specified include directories that do not exist"
msgstr ""
-#: c.opt:313
+#: c.opt:317
msgid ""
"Warn about function parameters declared without a type specifier in K&R-"
"style functions"
msgstr ""
-#: c.opt:317
+#: c.opt:321
msgid "Warn about global functions without prototypes"
msgstr ""
-#: c.opt:321
+#: c.opt:325
msgid "Warn about use of multi-character character constants"
msgstr ""
-#: c.opt:325
+#: c.opt:329
msgid "Warn about \"extern\" declarations not at file scope"
msgstr ""
-#: c.opt:329
+#: c.opt:333
msgid ""
"Warn when non-templatized friend functions are declared within a template"
msgstr ""
-#: c.opt:333
+#: c.opt:337
msgid "Warn about non-virtual destructors"
msgstr ""
-#: c.opt:337
+#: c.opt:341
msgid ""
"Warn about NULL being passed to argument slots marked as requiring non-NULL"
msgstr ""
-#: c.opt:341
+#: c.opt:345
msgid "Warn about non-normalised Unicode strings"
msgstr ""
-#: c.opt:345
+#: c.opt:349
msgid "Warn if a C-style cast is used in a program"
msgstr ""
-#: c.opt:349
+#: c.opt:353
msgid "Warn for obsolescent usage in a declaration"
msgstr ""
-#: c.opt:353
+#: c.opt:357
msgid "Warn if an old-style parameter definition is used"
msgstr ""
-#: c.opt:357
+#: c.opt:361
msgid ""
"Warn if a string is longer than the maximum portable length specified by the "
"standard"
msgstr ""
-#: c.opt:361
+#: c.opt:365
msgid "Warn about overloaded virtual function names"
msgstr ""
-#: c.opt:365
+#: c.opt:369
msgid "Warn about overriding initializers without side effects"
msgstr ""
-#: c.opt:369
+#: c.opt:373
+msgid "Warn about packed bit-fields whose offset changed in GCC 4.4"
+msgstr ""
+
+#: c.opt:377
msgid "Warn about possibly missing parentheses"
msgstr ""
-#: c.opt:373
+#: c.opt:381
msgid "Warn when converting the type of pointers to member functions"
msgstr ""
-#: c.opt:377
+#: c.opt:385
msgid "Warn about function pointer arithmetic"
msgstr ""
-#: c.opt:381
+#: c.opt:389
msgid "Warn when a pointer is cast to an integer of a different size"
msgstr ""
-#: c.opt:385
+#: c.opt:393
msgid "Warn about misuses of pragmas"
msgstr ""
-#: c.opt:389
+#: c.opt:397
msgid "Warn if inherited methods are unimplemented"
msgstr ""
-#: c.opt:393
+#: c.opt:401
msgid "Warn about multiple declarations of the same object"
msgstr ""
-#: c.opt:397
+#: c.opt:405
msgid "Warn when the compiler reorders code"
msgstr ""
-#: c.opt:401
+#: c.opt:409
msgid ""
"Warn whenever a function's return type defaults to \"int\" (C), or about "
"inconsistent return types (C++)"
msgstr ""
-#: c.opt:405
+#: c.opt:413
msgid "Warn if a selector has multiple methods"
msgstr ""
-#: c.opt:409
+#: c.opt:417
msgid "Warn about possible violations of sequence point rules"
msgstr ""
-#: c.opt:413
+#: c.opt:421
msgid "Warn about signed-unsigned comparisons"
msgstr ""
-#: c.opt:417
+#: c.opt:425
msgid "Warn when overload promotes from unsigned to signed"
msgstr ""
-#: c.opt:421
+#: c.opt:429
msgid "Warn about uncasted NULL used as sentinel"
msgstr ""
-#: c.opt:425
+#: c.opt:433
msgid "Warn about unprototyped function declarations"
msgstr ""
-#: c.opt:429
+#: c.opt:437
msgid "Warn if type signatures of candidate methods do not match exactly"
msgstr ""
-#: c.opt:433
+#: c.opt:441
msgid ""
"Warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions "
"are used"
msgstr ""
-#: c.opt:437
+#: c.opt:445
msgid "Deprecated. This switch has no effect"
msgstr ""
-#: c.opt:441 common.opt:198
-msgid "Do not suppress warnings from system headers"
-msgstr ""
-
-#: c.opt:445
+#: c.opt:453
msgid "Warn about features not present in traditional C"
msgstr ""
-#: c.opt:449
+#: c.opt:457
msgid ""
"Warn of prototypes causing type conversions different from what would happen "
"in the absence of prototype"
msgstr ""
-#: c.opt:453
+#: c.opt:461
msgid ""
"Warn if trigraphs are encountered that might affect the meaning of the "
"program"
msgstr ""
-#: c.opt:457
+#: c.opt:465
msgid "Warn about @selector()s without previously declared methods"
msgstr ""
-#: c.opt:461
+#: c.opt:469
msgid "Warn if an undefined macro is used in an #if directive"
msgstr ""
-#: c.opt:465
+#: c.opt:473
msgid "Warn about unrecognized pragmas"
msgstr ""
-#: c.opt:469
+#: c.opt:477
msgid "Warn about macros defined in the main file that are not used"
msgstr ""
-#: c.opt:473
+#: c.opt:481
msgid "Do not warn about using variadic macros when -pedantic"
msgstr ""
-#: c.opt:477
+#: c.opt:485
msgid "Warn if a variable length array is used"
msgstr ""
-#: c.opt:481
+#: c.opt:489
msgid "Warn when a register variable is declared volatile"
msgstr ""
-#: c.opt:485
+#: c.opt:493
msgid ""
"In C++, nonzero means warn about deprecated conversion from string literals "
"to `char *'. In C, similar warning, except that the conversion is of course "
"not deprecated by the ISO C standard."
msgstr ""
-#: c.opt:489
+#: c.opt:497
msgid "Warn when a pointer differs in signedness in an assignment"
msgstr ""
-#: c.opt:493
+#: c.opt:501
msgid "A synonym for -std=c89 (for C) or -std=c++98 (for C++)"
msgstr ""
-#: c.opt:501
+#: c.opt:509
msgid "Enforce class member access control semantics"
msgstr ""
-#: c.opt:508
+#: c.opt:516
msgid "Change when template instances are emitted"
msgstr ""
-#: c.opt:512
+#: c.opt:520
msgid "Recognize the \"asm\" keyword"
msgstr ""
-#: c.opt:516
+#: c.opt:524
msgid "Recognize built-in functions"
msgstr ""
-#: c.opt:523
+#: c.opt:531
msgid "Check the return value of new"
msgstr ""
-#: c.opt:527
+#: c.opt:535
msgid "Allow the arguments of the '?' operator to have different types"
msgstr ""
-#: c.opt:531
+#: c.opt:539
msgid "Reduce the size of object files"
msgstr ""
-#: c.opt:535
+#: c.opt:543
msgid "Use class <name> for constant strings"
msgstr ""
-#: c.opt:539
+#: c.opt:547
msgid "Inline member functions by default"
msgstr ""
-#: c.opt:543
+#: c.opt:551
msgid "Preprocess directives only."
msgstr ""
-#: c.opt:547
+#: c.opt:555
msgid "Permit '$' as an identifier character"
msgstr ""
-#: c.opt:554
+#: c.opt:562
msgid "Generate code to check exception specifications"
msgstr ""
-#: c.opt:561
+#: c.opt:569
msgid "Convert all strings and character constants to character set <cset>"
msgstr ""
-#: c.opt:565
+#: c.opt:573
msgid "Permit universal character names (\\u and \\U) in identifiers"
msgstr ""
-#: c.opt:569
+#: c.opt:577
msgid "Specify the default character set for source files"
msgstr ""
-#: c.opt:577
+#: c.opt:585
msgid "Scope of for-init-statement variables is local to the loop"
msgstr ""
-#: c.opt:581
+#: c.opt:589
msgid "Do not assume that standard C libraries and \"main\" exist"
msgstr ""
-#: c.opt:585
+#: c.opt:593
msgid "Recognize GNU-defined keywords"
msgstr ""
-#: c.opt:589
+#: c.opt:597
msgid "Generate code for GNU runtime environment"
msgstr ""
-#: c.opt:593
+#: c.opt:601
msgid "Use traditional GNU semantics for inline functions"
msgstr ""
-#: c.opt:606
+#: c.opt:614
msgid "Assume normal C execution environment"
msgstr ""
-#: c.opt:610
+#: c.opt:618
msgid "Enable support for huge objects"
msgstr ""
-#: c.opt:614
+#: c.opt:622
msgid "Export functions even if they can be inlined"
msgstr ""
-#: c.opt:618
+#: c.opt:626
msgid "Emit implicit instantiations of inline templates"
msgstr ""
-#: c.opt:622
+#: c.opt:630
msgid "Emit implicit instantiations of templates"
msgstr ""
-#: c.opt:626
+#: c.opt:634
msgid "Inject friend functions into enclosing namespace"
msgstr ""
-#: c.opt:633
+#: c.opt:641
msgid ""
"Allow implicit conversions between vectors with differing numbers of "
"subparts and/or differing element types."
msgstr ""
-#: c.opt:637
+#: c.opt:645
msgid "Don't warn about uses of Microsoft extensions"
msgstr ""
-#: c.opt:647
+#: c.opt:655
msgid "Generate code for NeXT (Apple Mac OS X) runtime environment"
msgstr ""
-#: c.opt:651
+#: c.opt:659
msgid "Assume that receivers of Objective-C messages may be nil"
msgstr ""
-#: c.opt:663
+#: c.opt:671
msgid ""
"Generate special Objective-C methods to initialize/destroy non-POD C++ "
"ivars, if needed"
msgstr ""
-#: c.opt:667
+#: c.opt:675
msgid "Allow fast jumps to the message dispatcher"
msgstr ""
-#: c.opt:673
+#: c.opt:681
msgid "Enable Objective-C exception and synchronization syntax"
msgstr ""
-#: c.opt:677
+#: c.opt:685
msgid "Enable garbage collection (GC) in Objective-C/Objective-C++ programs"
msgstr ""
-#: c.opt:682
+#: c.opt:690
msgid "Enable Objective-C setjmp exception handling runtime"
msgstr ""
-#: c.opt:686
-msgid "Enable OpenMP"
+#: c.opt:694
+msgid "Enable OpenMP (implies -frecursive in Fortran)"
msgstr ""
-#: c.opt:690
+#: c.opt:698
msgid "Recognize C++ keywords like \"compl\" and \"xor\""
msgstr ""
-#: c.opt:694
+#: c.opt:702
msgid "Enable optional diagnostics"
msgstr ""
-#: c.opt:701
+#: c.opt:709
msgid "Look for and use PCH files even when preprocessing"
msgstr ""
-#: c.opt:705
+#: c.opt:713
msgid "Downgrade conformance errors to warnings"
msgstr ""
-#: c.opt:709
+#: c.opt:717
msgid "Treat the input file as already preprocessed"
msgstr ""
-#: c.opt:713
+#: c.opt:721
msgid ""
"Used in Fix-and-Continue mode to indicate that object files may be swapped "
"in at runtime"
msgstr ""
-#: c.opt:717
+#: c.opt:725
msgid "Enable automatic template instantiation"
msgstr ""
-#: c.opt:721
+#: c.opt:729
msgid "Generate run time type descriptor information"
msgstr ""
-#: c.opt:725
+#: c.opt:733
msgid "Use the same size for double as for float"
msgstr ""
-#: c.opt:733
+#: c.opt:741
msgid "Force the underlying type for \"wchar_t\" to be \"unsigned short\""
msgstr ""
-#: c.opt:737
+#: c.opt:745
msgid "When \"signed\" or \"unsigned\" is not given make the bitfield signed"
msgstr ""
-#: c.opt:741
+#: c.opt:749
msgid "Make \"char\" signed by default"
msgstr ""
-#: c.opt:748
+#: c.opt:756
msgid "Display statistics accumulated during compilation"
msgstr ""
-#: c.opt:755
+#: c.opt:763
msgid "Distance between tab stops for column reporting"
msgstr ""
-#: c.opt:759
+#: c.opt:767
msgid "Specify maximum template instantiation depth"
msgstr ""
-#: c.opt:766
+#: c.opt:774
msgid "Do not generate thread-safe code for initializing local statics"
msgstr ""
-#: c.opt:770
+#: c.opt:778
msgid "When \"signed\" or \"unsigned\" is not given make the bitfield unsigned"
msgstr ""
-#: c.opt:774
+#: c.opt:782
msgid "Make \"char\" unsigned by default"
msgstr ""
-#: c.opt:778
+#: c.opt:786
msgid "Use __cxa_atexit to register destructors"
msgstr ""
-#: c.opt:782
+#: c.opt:790
msgid "Use __cxa_get_exception_ptr in exception handling"
msgstr ""
-#: c.opt:786
+#: c.opt:794
msgid "Marks all inlined methods as having hidden visibility"
msgstr ""
-#: c.opt:790
+#: c.opt:798
msgid "Changes visibility to match Microsoft Visual Studio by default"
msgstr ""
-#: c.opt:794
+#: c.opt:802
msgid "Discard unused virtual functions"
msgstr ""
-#: c.opt:798
+#: c.opt:806
msgid "Implement vtables using thunks"
msgstr ""
-#: c.opt:802
+#: c.opt:810
msgid "Emit common-like symbols as weak symbols"
msgstr ""
-#: c.opt:806
+#: c.opt:814
msgid ""
"Convert all wide strings and character constants to character set <cset>"
msgstr ""
-#: c.opt:810
+#: c.opt:818
msgid "Generate a #line directive pointing at the current working directory"
msgstr ""
-#: c.opt:814
+#: c.opt:822
msgid "Emit cross referencing information"
msgstr ""
-#: c.opt:818
+#: c.opt:826
msgid ""
"Generate lazy class lookup (via objc_getClass()) for use in Zero-Link mode"
msgstr ""
-#: c.opt:822
+#: c.opt:830
msgid "Dump declarations to a .decl file"
msgstr ""
-#: c.opt:826
+#: c.opt:834
msgid "Aggressive reduced debug info for structs"
msgstr ""
-#: c.opt:830
+#: c.opt:838
msgid "Conservative reduced debug info for structs"
msgstr ""
-#: c.opt:834
+#: c.opt:842
msgid "Detailed reduced debug info for structs"
msgstr ""
-#: c.opt:838 c.opt:870
+#: c.opt:846 c.opt:878
msgid "Add <dir> to the end of the system include path"
msgstr ""
-#: c.opt:842
+#: c.opt:850
msgid "Accept definition of macros in <file>"
msgstr ""
-#: c.opt:846
+#: c.opt:854
msgid "-imultilib <dir> Set <dir> to be the multilib include subdirectory"
msgstr ""
-#: c.opt:850
+#: c.opt:858
msgid "Include the contents of <file> before other files"
msgstr ""
-#: c.opt:854
+#: c.opt:862
msgid "Specify <path> as a prefix for next two options"
msgstr ""
-#: c.opt:858
+#: c.opt:866
msgid "Set <dir> to be the system root directory"
msgstr ""
-#: c.opt:862
+#: c.opt:870
msgid "Add <dir> to the start of the system include path"
msgstr ""
-#: c.opt:866
+#: c.opt:874
msgid "Add <dir> to the end of the quote include path"
msgstr ""
-#: c.opt:884
+#: c.opt:892
msgid ""
"Do not search standard system include directories (those specified with -"
"isystem will still be used)"
msgstr ""
-#: c.opt:888
+#: c.opt:896
msgid "Do not search standard system include directories for C++"
msgstr ""
-#: c.opt:904
+#: c.opt:912
msgid "Generate C header of platform-specific features"
msgstr ""
-#: c.opt:908
+#: c.opt:916
msgid "Print a checksum of the executable for PCH validity checking, and stop"
msgstr ""
-#: c.opt:912
+#: c.opt:920
msgid "Remap file names when including files"
msgstr ""
-#: c.opt:916
+#: c.opt:924
msgid "Conform to the ISO 1998 C++ standard"
msgstr ""
-#: c.opt:920
+#: c.opt:928
msgid ""
"Conform to the ISO 1998 C++ standard, with extensions that are likely to"
msgstr ""
-#: c.opt:927 c.opt:962
+#: c.opt:935 c.opt:970
msgid "Conform to the ISO 1990 C standard"
msgstr ""
-#: c.opt:931 c.opt:970
+#: c.opt:939 c.opt:978
msgid "Conform to the ISO 1999 C standard"
msgstr ""
-#: c.opt:935
+#: c.opt:943
msgid "Deprecated in favor of -std=c99"
msgstr ""
-#: c.opt:939
+#: c.opt:947
msgid "Conform to the ISO 1998 C++ standard with GNU extensions"
msgstr ""
-#: c.opt:943
+#: c.opt:951
msgid "Conform to the ISO 1998 C++ standard, with GNU extensions and"
msgstr ""
-#: c.opt:950
+#: c.opt:958
msgid "Conform to the ISO 1990 C standard with GNU extensions"
msgstr ""
-#: c.opt:954
+#: c.opt:962
msgid "Conform to the ISO 1999 C standard with GNU extensions"
msgstr ""
-#: c.opt:958
+#: c.opt:966
msgid "Deprecated in favor of -std=gnu99"
msgstr ""
-#: c.opt:966
+#: c.opt:974
msgid "Conform to the ISO 1990 C standard as amended in 1994"
msgstr ""
-#: c.opt:974
+#: c.opt:982
msgid "Deprecated in favor of -std=iso9899:1999"
msgstr ""
-#: c.opt:978
+#: c.opt:986
msgid "Enable traditional preprocessing"
msgstr ""
-#: c.opt:982
+#: c.opt:990
msgid "Support ISO C trigraphs"
msgstr ""
-#: c.opt:986
+#: c.opt:994
msgid "Do not predefine system-specific and GCC-specific macros"
msgstr ""
-#: c.opt:990
+#: c.opt:998
msgid "Enable verbose output"
msgstr ""
@@ -16280,6 +16046,10 @@ msgstr ""
msgid "Warn about all enumerated switches missing a specific case"
msgstr ""
+#: common.opt:198
+msgid "Do not suppress warnings from system headers"
+msgstr ""
+
#: common.opt:202
msgid ""
"Warn if a comparison is always true or always false due to the limited range "
@@ -16545,8 +16315,8 @@ msgstr ""
msgid "Don't allocate floats and doubles in extended-precision registers"
msgstr ""
-#: common.opt:515 common.opt:726 common.opt:947 common.opt:1103
-#: common.opt:1162 common.opt:1178 common.opt:1238
+#: common.opt:515 common.opt:728 common.opt:949 common.opt:1105
+#: common.opt:1164 common.opt:1180 common.opt:1240
msgid "Does nothing. Preserved for backward compatibility."
msgstr ""
@@ -16585,817 +16355,817 @@ msgid ""
"Perform global common subexpression elimination after register allocation"
msgstr ""
-#: common.opt:556
+#: common.opt:557
msgid "Enable in and out of Graphite representation"
msgstr ""
-#: common.opt:560
+#: common.opt:561
msgid "Enable Loop Strip Mining transformation"
msgstr ""
-#: common.opt:564
+#: common.opt:565
msgid "Enable Loop Interchange transformation"
msgstr ""
-#: common.opt:568
+#: common.opt:569
msgid "Enable Loop Blocking transformation"
msgstr ""
-#: common.opt:572
+#: common.opt:574
msgid "Enable Graphite Identity transformation"
msgstr ""
-#: common.opt:576
+#: common.opt:578
msgid "Enable guessing of branch probabilities"
msgstr ""
-#: common.opt:584
+#: common.opt:586
msgid "Process #ident directives"
msgstr ""
-#: common.opt:588
+#: common.opt:590
msgid "Perform conversion of conditional jumps to branchless equivalents"
msgstr ""
-#: common.opt:592
+#: common.opt:594
msgid "Perform conversion of conditional jumps to conditional execution"
msgstr ""
-#: common.opt:600
+#: common.opt:602
msgid "Do not generate .size directives"
msgstr ""
-#: common.opt:604
+#: common.opt:606
msgid "Perform indirect inlining"
msgstr ""
-#: common.opt:613
+#: common.opt:615
msgid "Pay attention to the \"inline\" keyword"
msgstr ""
-#: common.opt:617
+#: common.opt:619
msgid ""
"Integrate simple functions into their callers when code size is known to not "
"growth"
msgstr ""
-#: common.opt:621
+#: common.opt:623
msgid "Integrate simple functions into their callers"
msgstr ""
-#: common.opt:625
+#: common.opt:627
msgid "Integrate functions called once into their callers"
msgstr ""
-#: common.opt:632
+#: common.opt:634
msgid "Limit the size of inlined functions to <number>"
msgstr ""
-#: common.opt:636
+#: common.opt:638
msgid "Instrument function entry and exit with profiling calls"
msgstr ""
-#: common.opt:640
+#: common.opt:642
msgid ""
"-finstrument-functions-exclude-function-list=name,... Do not instrument "
"listed functions"
msgstr ""
-#: common.opt:644
+#: common.opt:646
msgid ""
"-finstrument-functions-exclude-file-list=filename,... Do not instrument "
"functions listed in files"
msgstr ""
-#: common.opt:648
+#: common.opt:650
msgid "Perform Interprocedural constant propagation"
msgstr ""
-#: common.opt:652
+#: common.opt:654
msgid "Perform cloning to make Interprocedural constant propagation stronger"
msgstr ""
-#: common.opt:656
+#: common.opt:658
msgid "Discover pure and const functions"
msgstr ""
-#: common.opt:660
+#: common.opt:662
msgid "Perform interprocedural points-to analysis"
msgstr ""
-#: common.opt:664
+#: common.opt:666
msgid "Discover readonly and non addressable static variables"
msgstr ""
-#: common.opt:668
+#: common.opt:670
msgid "Type based escape and alias analysis"
msgstr ""
-#: common.opt:672
+#: common.opt:674
msgid "Perform matrix layout flattening and transposing based"
msgstr ""
-#: common.opt:677
+#: common.opt:679
msgid "Perform structure layout optimizations based"
msgstr ""
-#: common.opt:682
-msgid "Use integrated register allocator."
+#: common.opt:684
+msgid "-fira-algorithm=[CB|priority] Set the used IRA algorithm"
msgstr ""
-#: common.opt:686
-msgid "-fira-algorithm=[regional|CB|mixed] Set the used IRA algorithm"
+#: common.opt:688
+msgid "-fira-region=[one|all|mixed] Set regions for IRA"
msgstr ""
-#: common.opt:690
+#: common.opt:692
msgid "Do optimistic coalescing."
msgstr ""
-#: common.opt:694
+#: common.opt:696
msgid "Share slots for saving different hard registers."
msgstr ""
-#: common.opt:698
+#: common.opt:700
msgid "Share stack slots for spilled pseudo-registers."
msgstr ""
-#: common.opt:702
+#: common.opt:704
msgid "-fira-verbose=<number> Control IRA's level of diagnostic messages."
msgstr ""
-#: common.opt:706
+#: common.opt:708
msgid "Optimize induction variables on trees"
msgstr ""
-#: common.opt:710
+#: common.opt:712
msgid "Use jump tables for sufficiently large switch statements"
msgstr ""
-#: common.opt:714
+#: common.opt:716
msgid "Generate code for functions even if they are fully inlined"
msgstr ""
-#: common.opt:718
+#: common.opt:720
msgid "Emit static const variables even if they are not used"
msgstr ""
-#: common.opt:722
+#: common.opt:724
msgid "Give external symbols a leading underscore"
msgstr ""
-#: common.opt:730
+#: common.opt:732
msgid "Set errno after built-in math functions"
msgstr ""
-#: common.opt:734
+#: common.opt:736
msgid "Report on permanent memory allocation"
msgstr ""
-#: common.opt:741
+#: common.opt:743
msgid "Attempt to merge identical constants and constant variables"
msgstr ""
-#: common.opt:745
+#: common.opt:747
msgid "Attempt to merge identical constants across compilation units"
msgstr ""
-#: common.opt:749
+#: common.opt:751
msgid "Attempt to merge identical debug strings across compilation units"
msgstr ""
-#: common.opt:753
+#: common.opt:755
msgid ""
"Limit diagnostics to <number> characters per line. 0 suppresses line-"
"wrapping"
msgstr ""
-#: common.opt:757
+#: common.opt:759
msgid "Perform SMS based modulo scheduling before the first scheduling pass"
msgstr ""
-#: common.opt:761
+#: common.opt:763
msgid "Perform SMS based modulo scheduling with register moves allowed"
msgstr ""
-#: common.opt:765
+#: common.opt:767
msgid "Move loop invariant computations out of loops"
msgstr ""
-#: common.opt:769
+#: common.opt:771
msgid "Add mudflap bounds-checking instrumentation for single-threaded program"
msgstr ""
-#: common.opt:773
+#: common.opt:775
msgid "Add mudflap bounds-checking instrumentation for multi-threaded program"
msgstr ""
-#: common.opt:777
+#: common.opt:779
msgid "Ignore read operations when inserting mudflap instrumentation"
msgstr ""
-#: common.opt:781
+#: common.opt:783
msgid "Use the RTL dead code elimination pass"
msgstr ""
-#: common.opt:785
+#: common.opt:787
msgid "Use the RTL dead store elimination pass"
msgstr ""
-#: common.opt:789
+#: common.opt:791
msgid ""
"Enable/Disable the traditional scheduling in loops that already passed "
"modulo scheduling"
msgstr ""
-#: common.opt:793
+#: common.opt:795
msgid "Support synchronous non-call exceptions"
msgstr ""
-#: common.opt:797
+#: common.opt:799
msgid "When possible do not generate stack frames"
msgstr ""
-#: common.opt:801
+#: common.opt:803
msgid "Do the full register move optimization pass"
msgstr ""
-#: common.opt:805
+#: common.opt:807
msgid "Optimize sibling and tail recursive calls"
msgstr ""
-#: common.opt:809 common.opt:813
+#: common.opt:811 common.opt:815
msgid "Report on memory allocation before interprocedural optimization"
msgstr ""
-#: common.opt:817
+#: common.opt:819
msgid "Pack structure members together without holes"
msgstr ""
-#: common.opt:821
+#: common.opt:823
msgid "Set initial maximum structure member alignment"
msgstr ""
-#: common.opt:825
+#: common.opt:827
msgid "Return small aggregates in memory, not registers"
msgstr ""
-#: common.opt:829
+#: common.opt:831
msgid "Perform loop peeling"
msgstr ""
-#: common.opt:833
+#: common.opt:835
msgid "Enable machine specific peephole optimizations"
msgstr ""
-#: common.opt:837
+#: common.opt:839
msgid "Enable an RTL peephole pass before sched2"
msgstr ""
-#: common.opt:841
+#: common.opt:843
msgid "Generate position-independent code if possible (large mode)"
msgstr ""
-#: common.opt:845
+#: common.opt:847
msgid ""
"Generate position-independent code for executables if possible (large mode)"
msgstr ""
-#: common.opt:849
+#: common.opt:851
msgid "Generate position-independent code if possible (small mode)"
msgstr ""
-#: common.opt:853
+#: common.opt:855
msgid ""
"Generate position-independent code for executables if possible (small mode)"
msgstr ""
-#: common.opt:857
+#: common.opt:859
msgid "Run predictive commoning optimization."
msgstr ""
-#: common.opt:861
+#: common.opt:863
msgid "Generate prefetch instructions, if available, for arrays in loops"
msgstr ""
-#: common.opt:865
+#: common.opt:867
msgid "Enable basic program profiling code"
msgstr ""
-#: common.opt:869
+#: common.opt:871
msgid "Insert arc-based program profiling code"
msgstr ""
-#: common.opt:873
+#: common.opt:875
msgid "Set the top-level directory for storing the profile data."
msgstr ""
-#: common.opt:878
+#: common.opt:880
msgid "Enable correction of flow inconsistent profile data input"
msgstr ""
-#: common.opt:882
+#: common.opt:884
msgid ""
"Enable common options for generating profile info for profile feedback "
"directed optimizations"
msgstr ""
-#: common.opt:886
+#: common.opt:888
msgid ""
"Enable common options for generating profile info for profile feedback "
"directed optimizations, and set -fprofile-dir="
msgstr ""
-#: common.opt:890
+#: common.opt:892
msgid ""
"Enable common options for performing profile feedback directed optimizations"
msgstr ""
-#: common.opt:894
+#: common.opt:896
msgid ""
"Enable common options for performing profile feedback directed "
"optimizations, and set -fprofile-dir="
msgstr ""
-#: common.opt:898
+#: common.opt:900
msgid "Insert code to profile values of expressions"
msgstr ""
-#: common.opt:905
+#: common.opt:907
msgid "Make compile reproducible using <string>"
msgstr ""
-#: common.opt:915
+#: common.opt:917
msgid "Record gcc command line switches in the object file."
msgstr ""
-#: common.opt:919
+#: common.opt:921
msgid "Return small aggregates in registers"
msgstr ""
-#: common.opt:923
+#: common.opt:925
msgid "Enables a register move optimization"
msgstr ""
-#: common.opt:927
+#: common.opt:929
msgid "Perform a register renaming optimization pass"
msgstr ""
-#: common.opt:931
+#: common.opt:933
msgid "Reorder basic blocks to improve code placement"
msgstr ""
-#: common.opt:935
+#: common.opt:937
msgid "Reorder basic blocks and partition into hot and cold sections"
msgstr ""
-#: common.opt:939
+#: common.opt:941
msgid "Reorder functions to improve code placement"
msgstr ""
-#: common.opt:943
+#: common.opt:945
msgid "Add a common subexpression elimination pass after loop optimizations"
msgstr ""
-#: common.opt:951
+#: common.opt:953
msgid "Disable optimizations that assume default FP rounding behavior"
msgstr ""
-#: common.opt:955
+#: common.opt:957
msgid "Enable scheduling across basic blocks"
msgstr ""
-#: common.opt:959
+#: common.opt:961
msgid "Allow speculative motion of non-loads"
msgstr ""
-#: common.opt:963
+#: common.opt:965
msgid "Allow speculative motion of some loads"
msgstr ""
-#: common.opt:967
+#: common.opt:969
msgid "Allow speculative motion of more loads"
msgstr ""
-#: common.opt:971
+#: common.opt:973
msgid "Set the verbosity level of the scheduler"
msgstr ""
-#: common.opt:975
+#: common.opt:977
msgid "If scheduling post reload, do superblock scheduling"
msgstr ""
-#: common.opt:979
+#: common.opt:981
msgid "If scheduling post reload, do trace scheduling"
msgstr ""
-#: common.opt:983
+#: common.opt:985
msgid "Reschedule instructions before register allocation"
msgstr ""
-#: common.opt:987
+#: common.opt:989
msgid "Reschedule instructions after register allocation"
msgstr ""
-#: common.opt:994
+#: common.opt:996
msgid "Schedule instructions using selective scheduling algorithm"
msgstr ""
-#: common.opt:998
+#: common.opt:1000
msgid "Run selective scheduling after reload"
msgstr ""
-#: common.opt:1002
+#: common.opt:1004
msgid "Perform software pipelining of inner loops during selective scheduling"
msgstr ""
-#: common.opt:1006
+#: common.opt:1008
msgid "Perform software pipelining of outer loops during selective scheduling"
msgstr ""
-#: common.opt:1010
+#: common.opt:1012
msgid "Reschedule pipelined regions without pipelining"
msgstr ""
-#: common.opt:1016
+#: common.opt:1018
msgid "Allow premature scheduling of queued insns"
msgstr ""
-#: common.opt:1020
+#: common.opt:1022
msgid "Set number of queued insns that can be prematurely scheduled"
msgstr ""
-#: common.opt:1028 common.opt:1032
+#: common.opt:1030 common.opt:1034
msgid ""
"Set dependence distance checking in premature scheduling of queued insns"
msgstr ""
-#: common.opt:1036
+#: common.opt:1038
msgid "Access data in the same section from shared anchor points"
msgstr ""
-#: common.opt:1040
+#: common.opt:1042
msgid "Perform sequence abstraction optimization on RTL"
msgstr ""
-#: common.opt:1044
+#: common.opt:1046
msgid "Eliminate redundant sign extensions using LCM."
msgstr ""
-#: common.opt:1048
+#: common.opt:1050
msgid "Show column numbers in diagnostics, when available. Default off"
msgstr ""
-#: common.opt:1052
+#: common.opt:1054
msgid "Disable optimizations observable by IEEE signaling NaNs"
msgstr ""
-#: common.opt:1056
+#: common.opt:1058
msgid ""
"Disable floating point optimizations that ignore the IEEE signedness of zero"
msgstr ""
-#: common.opt:1060
+#: common.opt:1062
msgid "Convert floating point constants to single precision constants"
msgstr ""
-#: common.opt:1064
+#: common.opt:1066
msgid "Split lifetimes of induction variables when loops are unrolled"
msgstr ""
-#: common.opt:1068
+#: common.opt:1070
msgid "Split wide types into independent registers"
msgstr ""
-#: common.opt:1072
+#: common.opt:1074
msgid "Apply variable expansion when loops are unrolled"
msgstr ""
-#: common.opt:1076
+#: common.opt:1078
msgid "Insert stack checking code into the program"
msgstr ""
-#: common.opt:1080
+#: common.opt:1082
msgid ""
"Insert stack checking code into the program. Same as -fstack-check=specific"
msgstr ""
-#: common.opt:1087
+#: common.opt:1089
msgid "Trap if the stack goes past <register>"
msgstr ""
-#: common.opt:1091
+#: common.opt:1093
msgid "Trap if the stack goes past symbol <name>"
msgstr ""
-#: common.opt:1095
+#: common.opt:1097
msgid "Use propolice as a stack protection method"
msgstr ""
-#: common.opt:1099
+#: common.opt:1101
msgid "Use a stack protection method for every function"
msgstr ""
-#: common.opt:1111
+#: common.opt:1113
msgid "Assume strict aliasing rules apply"
msgstr ""
-#: common.opt:1115
+#: common.opt:1117
msgid "Treat signed overflow as undefined"
msgstr ""
-#: common.opt:1119
+#: common.opt:1121
msgid "Check for syntax errors, then stop"
msgstr ""
-#: common.opt:1123
+#: common.opt:1125
msgid "Create data files needed by \"gcov\""
msgstr ""
-#: common.opt:1127
+#: common.opt:1129
msgid "Perform jump threading optimizations"
msgstr ""
-#: common.opt:1131
+#: common.opt:1133
msgid "Report the time taken by each compiler pass"
msgstr ""
-#: common.opt:1135
+#: common.opt:1137
msgid "Set the default thread-local storage code generation model"
msgstr ""
-#: common.opt:1139
+#: common.opt:1141
msgid "Reorder top level functions, variables, and asms"
msgstr ""
-#: common.opt:1143
+#: common.opt:1145
msgid "Perform superblock formation via tail duplication"
msgstr ""
-#: common.opt:1150
+#: common.opt:1152
msgid "Assume floating-point operations can trap"
msgstr ""
-#: common.opt:1154
+#: common.opt:1156
msgid "Trap for signed overflow in addition, subtraction and multiplication"
msgstr ""
-#: common.opt:1158
+#: common.opt:1160
msgid "Enable SSA-CCP optimization on trees"
msgstr ""
-#: common.opt:1166
+#: common.opt:1168
msgid "Enable loop header copying on trees"
msgstr ""
-#: common.opt:1170
+#: common.opt:1172
msgid "Replace SSA temporaries with better names in copies"
msgstr ""
-#: common.opt:1174
+#: common.opt:1176
msgid "Enable copy propagation on trees"
msgstr ""
-#: common.opt:1182
+#: common.opt:1184
msgid "Transform condition stores into unconditional ones"
msgstr ""
-#: common.opt:1186
+#: common.opt:1188
msgid "Perform conversions of switch initializations."
msgstr ""
-#: common.opt:1190
+#: common.opt:1192
msgid "Enable SSA dead code elimination optimization on trees"
msgstr ""
-#: common.opt:1194
+#: common.opt:1196
msgid "Enable dominator optimizations"
msgstr ""
-#: common.opt:1198
+#: common.opt:1200
msgid "Enable dead store elimination"
msgstr ""
-#: common.opt:1202
+#: common.opt:1204
msgid "Enable Full Redundancy Elimination (FRE) on trees"
msgstr ""
-#: common.opt:1206
+#: common.opt:1208
msgid "Enable loop distribution on trees"
msgstr ""
-#: common.opt:1210
+#: common.opt:1212
msgid "Enable loop invariant motion on trees"
msgstr ""
-#: common.opt:1214
+#: common.opt:1216
msgid "Enable linear loop transforms on trees"
msgstr ""
-#: common.opt:1218
+#: common.opt:1220
msgid "Create canonical induction variables in loops"
msgstr ""
-#: common.opt:1222
+#: common.opt:1224
msgid "Enable loop optimizations on tree level"
msgstr ""
-#: common.opt:1226
+#: common.opt:1228
msgid "Enable automatic parallelization of loops"
msgstr ""
-#: common.opt:1230
+#: common.opt:1232
msgid "Enable SSA-PRE optimization on trees"
msgstr ""
-#: common.opt:1234
+#: common.opt:1236
msgid "Enable reassociation on tree level"
msgstr ""
-#: common.opt:1242
+#: common.opt:1244
msgid "Enable SSA code sinking on trees"
msgstr ""
-#: common.opt:1246
+#: common.opt:1248
msgid "Perform scalar replacement of aggregates"
msgstr ""
-#: common.opt:1250
+#: common.opt:1252
msgid "Replace temporary expressions in the SSA->normal pass"
msgstr ""
-#: common.opt:1254
+#: common.opt:1256
msgid "Perform live range splitting during the SSA->normal pass"
msgstr ""
-#: common.opt:1258
+#: common.opt:1260
msgid "Perform Value Range Propagation on trees"
msgstr ""
-#: common.opt:1262
+#: common.opt:1264
msgid "Compile whole compilation unit at a time"
msgstr ""
-#: common.opt:1266
+#: common.opt:1268
msgid "Perform loop unrolling when iteration count is known"
msgstr ""
-#: common.opt:1270
+#: common.opt:1272
msgid "Perform loop unrolling for all loops"
msgstr ""
-#: common.opt:1277
+#: common.opt:1279
msgid "Allow loop optimizations to assume that the loops behave in normal way"
msgstr ""
-#: common.opt:1281
+#: common.opt:1283
msgid "Allow optimization for floating-point arithmetic which may change the"
msgstr ""
-#: common.opt:1286
+#: common.opt:1288
msgid "Same as -fassociative-math for expressions which include division."
msgstr ""
-#: common.opt:1294
+#: common.opt:1296
msgid "Allow math optimizations that may violate IEEE or ISO standards"
msgstr ""
-#: common.opt:1298
+#: common.opt:1300
msgid "Perform loop unswitching"
msgstr ""
-#: common.opt:1302
+#: common.opt:1304
msgid "Just generate unwind tables for exception handling"
msgstr ""
-#: common.opt:1306
+#: common.opt:1308
msgid "Perform variable tracking"
msgstr ""
-#: common.opt:1310
+#: common.opt:1312
msgid "Perform variable tracking and also tag variables that are uninitialized"
msgstr ""
-#: common.opt:1314
+#: common.opt:1316
msgid "Enable loop vectorization on trees"
msgstr ""
-#: common.opt:1318
+#: common.opt:1320
msgid "Enable use of cost model in vectorization"
msgstr ""
-#: common.opt:1322
+#: common.opt:1324
msgid "Enable loop versioning when doing loop vectorization on trees"
msgstr ""
-#: common.opt:1326
+#: common.opt:1328
msgid "Set the verbosity level of the vectorizer"
msgstr ""
-#: common.opt:1330
+#: common.opt:1332
msgid "Enable copy propagation of scalar-evolution information."
msgstr ""
-#: common.opt:1340
+#: common.opt:1342
msgid "Add extra commentary to assembler output"
msgstr ""
-#: common.opt:1344
+#: common.opt:1346
msgid "Set the default symbol visibility"
msgstr ""
-#: common.opt:1349
+#: common.opt:1351
msgid "Use expression value profiles in optimizations"
msgstr ""
-#: common.opt:1353
+#: common.opt:1355
msgid "Construct webs and split unrelated uses of single variable"
msgstr ""
-#: common.opt:1357
+#: common.opt:1359
msgid "Enable conditional dead code elimination for builtin calls"
msgstr ""
-#: common.opt:1361
+#: common.opt:1363
msgid "Perform whole program optimizations"
msgstr ""
-#: common.opt:1365
+#: common.opt:1367
msgid "Assume signed arithmetic overflow wraps around"
msgstr ""
-#: common.opt:1369
+#: common.opt:1371
msgid "Put zero initialized data in the bss section"
msgstr ""
-#: common.opt:1373
+#: common.opt:1375
msgid "Generate debug information in default format"
msgstr ""
-#: common.opt:1377
+#: common.opt:1379
msgid "Generate debug information in COFF format"
msgstr ""
-#: common.opt:1381
+#: common.opt:1383
msgid "Generate debug information in DWARF v2 format"
msgstr ""
-#: common.opt:1385
+#: common.opt:1387
msgid "Generate debug information in default extended format"
msgstr ""
-#: common.opt:1389
+#: common.opt:1391
msgid "Generate debug information in STABS format"
msgstr ""
-#: common.opt:1393
+#: common.opt:1395
msgid "Generate debug information in extended STABS format"
msgstr ""
-#: common.opt:1397
+#: common.opt:1399
msgid "Generate debug information in VMS format"
msgstr ""
-#: common.opt:1401
+#: common.opt:1403
msgid "Generate debug information in XCOFF format"
msgstr ""
-#: common.opt:1405
+#: common.opt:1407
msgid "Generate debug information in extended XCOFF format"
msgstr ""
-#: common.opt:1409
+#: common.opt:1411
msgid "Place output into <file>"
msgstr ""
-#: common.opt:1413
+#: common.opt:1415
msgid "Enable function profiling"
msgstr ""
-#: common.opt:1417
+#: common.opt:1419
msgid "Issue warnings needed for strict compliance to the standard"
msgstr ""
-#: common.opt:1421
+#: common.opt:1423
msgid "Like -pedantic but issue them as errors"
msgstr ""
-#: common.opt:1425
+#: common.opt:1427
msgid "Do not display functions compiled or elapsed time"
msgstr ""
-#: common.opt:1429
+#: common.opt:1431
msgid "Display the compiler's version"
msgstr ""
-#: common.opt:1433
+#: common.opt:1435
msgid "Suppress warnings"
msgstr ""
-#: common.opt:1437
+#: common.opt:1439
msgid "Create a shared library"
msgstr ""
-#: common.opt:1441
+#: common.opt:1443
msgid "Create a position independent executable"
msgstr ""
@@ -17435,52 +17205,47 @@ msgid ""
"branch target register load optimization is not intended to be run twice"
msgstr ""
-#: builtins.c:475
-#, gcc-internal-format
-msgid "offset outside bounds of constant string"
-msgstr ""
-
-#: builtins.c:1038
+#: builtins.c:1039
#, gcc-internal-format
msgid "second argument to %<__builtin_prefetch%> must be a constant"
msgstr ""
-#: builtins.c:1045
+#: builtins.c:1046
#, gcc-internal-format
msgid "invalid second argument to %<__builtin_prefetch%>; using zero"
msgstr ""
-#: builtins.c:1053
+#: builtins.c:1054
#, gcc-internal-format
msgid "third argument to %<__builtin_prefetch%> must be a constant"
msgstr ""
-#: builtins.c:1060
+#: builtins.c:1061
#, gcc-internal-format
msgid "invalid third argument to %<__builtin_prefetch%>; using zero"
msgstr ""
-#: builtins.c:4632
+#: builtins.c:4665
#, gcc-internal-format
msgid "argument of %<__builtin_args_info%> must be constant"
msgstr ""
-#: builtins.c:4638
+#: builtins.c:4671
#, gcc-internal-format
msgid "argument of %<__builtin_args_info%> out of range"
msgstr ""
-#: builtins.c:4644
+#: builtins.c:4677
#, gcc-internal-format
msgid "missing argument in %<__builtin_args_info%>"
msgstr ""
-#: builtins.c:4780 gimplify.c:2326
+#: builtins.c:4813 gimplify.c:2326
#, gcc-internal-format
msgid "too few arguments to function %<va_start%>"
msgstr ""
-#: builtins.c:4938
+#: builtins.c:4971
#, gcc-internal-format
msgid "first argument to %<va_arg%> not of type %<va_list%>"
msgstr ""
@@ -17488,93 +17253,93 @@ msgstr ""
#. Unfortunately, this is merely undefined, rather than a constraint
#. violation, so we cannot make this an error. If this call is never
#. executed, the program is still strictly conforming.
-#: builtins.c:4953
+#: builtins.c:4986
#, gcc-internal-format
msgid "%qT is promoted to %qT when passed through %<...%>"
msgstr ""
-#: builtins.c:4958
+#: builtins.c:4991
#, gcc-internal-format
msgid "(so you should pass %qT not %qT to %<va_arg%>)"
msgstr ""
#. We can, however, treat "undefined" any way we please.
#. Call abort to encourage the user to fix the program.
-#: builtins.c:4965 c-typeck.c:2427
+#: builtins.c:4998 c-typeck.c:2451
#, gcc-internal-format
msgid "if this code is reached, the program will abort"
msgstr ""
-#: builtins.c:5086
+#: builtins.c:5122
#, gcc-internal-format
msgid "invalid argument to %<__builtin_frame_address%>"
msgstr ""
-#: builtins.c:5088
+#: builtins.c:5124
#, gcc-internal-format
msgid "invalid argument to %<__builtin_return_address%>"
msgstr ""
-#: builtins.c:5101
+#: builtins.c:5137
#, gcc-internal-format
msgid "unsupported argument to %<__builtin_frame_address%>"
msgstr ""
-#: builtins.c:5103
+#: builtins.c:5139
#, gcc-internal-format
msgid "unsupported argument to %<__builtin_return_address%>"
msgstr ""
-#: builtins.c:5649
+#: builtins.c:5685
#, gcc-internal-format
msgid "both arguments to %<__builtin___clear_cache%> must be pointers"
msgstr ""
-#: builtins.c:6011 builtins.c:6026
+#: builtins.c:6047 builtins.c:6062
#, gcc-internal-format
msgid "%qD changed semantics in GCC 4.4"
msgstr ""
#. All valid uses of __builtin_va_arg_pack () are removed during
#. inlining.
-#: builtins.c:6412 expr.c:8051
+#: builtins.c:6448 expr.c:8051
msgid "%Kinvalid use of %<__builtin_va_arg_pack ()%>"
msgstr ""
#. All valid uses of __builtin_va_arg_pack_len () are removed during
#. inlining.
-#: builtins.c:6418
+#: builtins.c:6454
msgid "%Kinvalid use of %<__builtin_va_arg_pack_len ()%>"
msgstr ""
-#: builtins.c:6714
+#: builtins.c:6750
#, gcc-internal-format
msgid "%<__builtin_longjmp%> second argument must be 1"
msgstr ""
-#: builtins.c:7348
+#: builtins.c:7386
#, gcc-internal-format
msgid "target format does not support infinity"
msgstr ""
-#: builtins.c:11598
+#: builtins.c:11763
#, gcc-internal-format
msgid "%<va_start%> used in function with fixed args"
msgstr ""
-#: builtins.c:11606
+#: builtins.c:11771
#, gcc-internal-format
msgid "wrong number of arguments to function %<va_start%>"
msgstr ""
#. Evidently an out of date version of <stdarg.h>; can't validate
#. va_start's second argument, but can still work as intended.
-#: builtins.c:11619
+#: builtins.c:11784
#, gcc-internal-format
msgid "%<__builtin_next_arg%> called without an argument"
msgstr ""
-#: builtins.c:11624
+#: builtins.c:11789
#, gcc-internal-format
msgid "wrong number of arguments to function %<__builtin_next_arg%>"
msgstr ""
@@ -17584,931 +17349,936 @@ msgstr ""
#. argument. We just warn and set the arg to be the last
#. argument so that we will get wrong-code because of
#. it.
-#: builtins.c:11651
+#: builtins.c:11816
#, gcc-internal-format
msgid "second parameter of %<va_start%> not last named argument"
msgstr ""
-#: builtins.c:11661
+#: builtins.c:11826
#, gcc-internal-format
msgid ""
"undefined behaviour when second parameter of %<va_start%> is declared with %"
"<register%> storage"
msgstr ""
-#: builtins.c:11776
+#: builtins.c:11941
msgid "%Kfirst argument of %D must be a pointer, second integer constant"
msgstr ""
-#: builtins.c:11789
+#: builtins.c:11954
msgid "%Klast argument of %D is not integer constant between 0 and 3"
msgstr ""
-#: builtins.c:11833 builtins.c:11997 builtins.c:12056
+#: builtins.c:11999 builtins.c:12164 builtins.c:12223
msgid "%Kcall to %D will always overflow destination buffer"
msgstr ""
-#: builtins.c:11987
+#: builtins.c:12154
msgid "%Kcall to %D might overflow destination buffer"
msgstr ""
-#: builtins.c:12077
+#: builtins.c:12244
msgid "%Kattempt to free a non-heap object %qD"
msgstr ""
-#: builtins.c:12079
+#: builtins.c:12247
msgid "%Kattempt to free a non-heap object"
msgstr ""
-#: c-common.c:1026
+#: c-common.c:1028
#, gcc-internal-format
msgid "%qD is not defined outside of function scope"
msgstr ""
-#: c-common.c:1076
+#: c-common.c:1078
#, gcc-internal-format
msgid ""
"string length %qd is greater than the length %qd ISO C%d compilers are "
"required to support"
msgstr ""
-#: c-common.c:1123 c-common.c:1135
+#: c-common.c:1125 c-common.c:1137
#, gcc-internal-format
msgid "overflow in constant expression"
msgstr ""
-#: c-common.c:1157
+#: c-common.c:1159
#, gcc-internal-format
msgid "integer overflow in expression"
msgstr ""
-#: c-common.c:1161
+#: c-common.c:1163
#, gcc-internal-format
msgid "floating point overflow in expression"
msgstr ""
-#: c-common.c:1165
+#: c-common.c:1167
#, gcc-internal-format
msgid "fixed-point overflow in expression"
msgstr ""
-#: c-common.c:1169
+#: c-common.c:1171
#, gcc-internal-format
msgid "vector overflow in expression"
msgstr ""
-#: c-common.c:1174
+#: c-common.c:1176
#, gcc-internal-format
msgid "complex integer overflow in expression"
msgstr ""
-#: c-common.c:1176
+#: c-common.c:1178
#, gcc-internal-format
msgid "complex floating point overflow in expression"
msgstr ""
-#: c-common.c:1207
+#: c-common.c:1209
#, gcc-internal-format
msgid "logical %<%s%> with non-zero constant will always evaluate as true"
msgstr ""
-#: c-common.c:1245
+#: c-common.c:1247
#, gcc-internal-format
msgid "type-punning to incomplete type might break strict-aliasing rules"
msgstr ""
-#: c-common.c:1260
+#: c-common.c:1262
#, gcc-internal-format
msgid "dereferencing type-punned pointer will break strict-aliasing rules"
msgstr ""
-#: c-common.c:1267 c-common.c:1285
+#: c-common.c:1269 c-common.c:1287
#, gcc-internal-format
msgid "dereferencing type-punned pointer might break strict-aliasing rules"
msgstr ""
-#: c-common.c:1316
+#: c-common.c:1318
#, gcc-internal-format
msgid "first argument of %q+D should be %<int%>"
msgstr ""
-#: c-common.c:1325
+#: c-common.c:1327
#, gcc-internal-format
msgid "second argument of %q+D should be %<char **%>"
msgstr ""
-#: c-common.c:1334
+#: c-common.c:1336
#, gcc-internal-format
msgid "third argument of %q+D should probably be %<char **%>"
msgstr ""
-#: c-common.c:1344
+#: c-common.c:1346
#, gcc-internal-format
msgid "%q+D takes only zero or two arguments"
msgstr ""
-#: c-common.c:1393
+#: c-common.c:1395
#, gcc-internal-format
msgid ""
"use -flax-vector-conversions to permit conversions between vectors with "
"differing element types or numbers of subparts"
msgstr ""
-#: c-common.c:1548
+#: c-common.c:1550
#, gcc-internal-format
msgid "conversion to %qT from boolean expression"
msgstr ""
-#: c-common.c:1570
+#: c-common.c:1572
#, gcc-internal-format
msgid "negative integer implicitly converted to unsigned type"
msgstr ""
-#: c-common.c:1572
+#: c-common.c:1574
#, gcc-internal-format
msgid "conversion of unsigned constant value to negative integer"
msgstr ""
-#: c-common.c:1599
+#: c-common.c:1601
#, gcc-internal-format
msgid "conversion to %qT alters %qT constant value"
msgstr ""
-#: c-common.c:1691
+#: c-common.c:1693
#, gcc-internal-format
msgid "conversion to %qT from %qT may change the sign of the result"
msgstr ""
-#: c-common.c:1723
+#: c-common.c:1725
#, gcc-internal-format
msgid "conversion to %qT from %qT may alter its value"
msgstr ""
-#: c-common.c:1751
+#: c-common.c:1753
#, gcc-internal-format
msgid "large integer implicitly truncated to unsigned type"
msgstr ""
-#: c-common.c:1757 c-common.c:1764 c-common.c:1772
+#: c-common.c:1759 c-common.c:1766 c-common.c:1774
#, gcc-internal-format
msgid "overflow in implicit constant conversion"
msgstr ""
-#: c-common.c:1928
+#: c-common.c:1930
#, gcc-internal-format
msgid "operation on %qE may be undefined"
msgstr ""
-#: c-common.c:2229
+#: c-common.c:2231
#, gcc-internal-format
msgid "case label does not reduce to an integer constant"
msgstr ""
-#: c-common.c:2269
+#: c-common.c:2271
#, gcc-internal-format
msgid "case label value is less than minimum value for type"
msgstr ""
-#: c-common.c:2277
+#: c-common.c:2279
#, gcc-internal-format
msgid "case label value exceeds maximum value for type"
msgstr ""
-#: c-common.c:2285
+#: c-common.c:2287
#, gcc-internal-format
msgid "lower value in case label range less than minimum value for type"
msgstr ""
-#: c-common.c:2294
+#: c-common.c:2296
#, gcc-internal-format
msgid "upper value in case label range exceeds maximum value for type"
msgstr ""
-#: c-common.c:2368
+#: c-common.c:2370
#, gcc-internal-format
msgid ""
"GCC cannot support operators with integer types and fixed-point types that "
"have too many integral and fractional bits together"
msgstr ""
-#: c-common.c:2854
+#: c-common.c:2856
#, gcc-internal-format
msgid "invalid operands to binary %s (have %qT and %qT)"
msgstr ""
-#: c-common.c:3090
+#: c-common.c:3092
#, gcc-internal-format
msgid "comparison is always false due to limited range of data type"
msgstr ""
-#: c-common.c:3092
+#: c-common.c:3094
#, gcc-internal-format
msgid "comparison is always true due to limited range of data type"
msgstr ""
-#: c-common.c:3171
+#: c-common.c:3173
#, gcc-internal-format
msgid "comparison of unsigned expression >= 0 is always true"
msgstr ""
-#: c-common.c:3181
+#: c-common.c:3183
#, gcc-internal-format
msgid "comparison of unsigned expression < 0 is always false"
msgstr ""
-#: c-common.c:3222
+#: c-common.c:3225
#, gcc-internal-format
msgid "pointer of type %<void *%> used in arithmetic"
msgstr ""
-#: c-common.c:3228
+#: c-common.c:3231
#, gcc-internal-format
msgid "pointer to a function used in arithmetic"
msgstr ""
-#: c-common.c:3234
+#: c-common.c:3237
#, gcc-internal-format
msgid "pointer to member function used in arithmetic"
msgstr ""
-#: c-common.c:3394
+#: c-common.c:3319
+#, gcc-internal-format
+msgid "offset %<%wd%> outside bounds of constant string"
+msgstr ""
+
+#: c-common.c:3422
#, gcc-internal-format
msgid "the address of %qD will always evaluate as %<true%>"
msgstr ""
-#: c-common.c:3470 cp/semantics.c:589 cp/typeck.c:6575
+#: c-common.c:3498 cp/semantics.c:594 cp/typeck.c:6638
#, gcc-internal-format
msgid "suggest parentheses around assignment used as truth value"
msgstr ""
-#: c-common.c:3549 c-typeck.c:8925
+#: c-common.c:3577 c-typeck.c:8970
#, gcc-internal-format
msgid "invalid use of %<restrict%>"
msgstr ""
-#: c-common.c:3766
+#: c-common.c:3794
#, gcc-internal-format
msgid "invalid application of %<sizeof%> to a function type"
msgstr ""
-#: c-common.c:3779
+#: c-common.c:3807
#, gcc-internal-format
msgid "invalid application of %qs to a void type"
msgstr ""
-#: c-common.c:3787
+#: c-common.c:3815
#, gcc-internal-format
msgid "invalid application of %qs to incomplete type %qT "
msgstr ""
-#: c-common.c:3828
+#: c-common.c:3856
#, gcc-internal-format
msgid "%<__alignof%> applied to a bit-field"
msgstr ""
-#: c-common.c:4449
+#: c-common.c:4495
#, gcc-internal-format
msgid "cannot disable built-in function %qs"
msgstr ""
-#: c-common.c:4640
+#: c-common.c:4686
#, gcc-internal-format
msgid "pointers are not permitted as case values"
msgstr ""
-#: c-common.c:4647
+#: c-common.c:4693
#, gcc-internal-format
msgid "range expressions in switch statements are non-standard"
msgstr ""
-#: c-common.c:4673
+#: c-common.c:4719
#, gcc-internal-format
msgid "empty range specified"
msgstr ""
-#: c-common.c:4733
+#: c-common.c:4779
#, gcc-internal-format
msgid "duplicate (or overlapping) case value"
msgstr ""
-#: c-common.c:4734
+#: c-common.c:4780
#, gcc-internal-format
msgid "%Jthis is the first entry overlapping that value"
msgstr ""
-#: c-common.c:4738
+#: c-common.c:4784
#, gcc-internal-format
msgid "duplicate case value"
msgstr ""
-#: c-common.c:4739
+#: c-common.c:4785
#, gcc-internal-format
msgid "%Jpreviously used here"
msgstr ""
-#: c-common.c:4743
+#: c-common.c:4789
#, gcc-internal-format
msgid "multiple default labels in one switch"
msgstr ""
-#: c-common.c:4744
+#: c-common.c:4790
#, gcc-internal-format
msgid "%Jthis is the first default label"
msgstr ""
-#: c-common.c:4795
+#: c-common.c:4841
#, gcc-internal-format
msgid "%Jcase value %qs not in enumerated type"
msgstr ""
-#: c-common.c:4799
+#: c-common.c:4845
#, gcc-internal-format
msgid "%Jcase value %qs not in enumerated type %qT"
msgstr ""
-#: c-common.c:4858
+#: c-common.c:4904
#, gcc-internal-format
msgid "%Hswitch missing default case"
msgstr ""
-#: c-common.c:4929
+#: c-common.c:4975
#, gcc-internal-format
msgid "%Henumeration value %qE not handled in switch"
msgstr ""
-#: c-common.c:4964
+#: c-common.c:5010
#, gcc-internal-format
msgid "taking the address of a label is non-standard"
msgstr ""
-#: c-common.c:5118
+#: c-common.c:5166
#, gcc-internal-format
msgid "%qE attribute ignored for field of type %qT"
msgstr ""
-#: c-common.c:5129 c-common.c:5148 c-common.c:5166 c-common.c:5193
-#: c-common.c:5220 c-common.c:5246 c-common.c:5265 c-common.c:5289
-#: c-common.c:5312 c-common.c:5335 c-common.c:5356 c-common.c:5377
-#: c-common.c:5401 c-common.c:5427 c-common.c:5464 c-common.c:5491
-#: c-common.c:5534 c-common.c:5618 c-common.c:5648 c-common.c:5667
-#: c-common.c:6002 c-common.c:6061 c-common.c:6084 c-common.c:6148
-#: c-common.c:6266 c-common.c:6332 c-common.c:6376 c-common.c:6422
-#: c-common.c:6492 c-common.c:6516 c-common.c:6801 c-common.c:6824
-#: c-common.c:6863 c-common.c:6952 c-common.c:7092
+#: c-common.c:5177 c-common.c:5196 c-common.c:5214 c-common.c:5241
+#: c-common.c:5268 c-common.c:5294 c-common.c:5313 c-common.c:5337
+#: c-common.c:5360 c-common.c:5383 c-common.c:5404 c-common.c:5425
+#: c-common.c:5449 c-common.c:5475 c-common.c:5512 c-common.c:5539
+#: c-common.c:5582 c-common.c:5666 c-common.c:5696 c-common.c:5715
+#: c-common.c:6050 c-common.c:6066 c-common.c:6114 c-common.c:6137
+#: c-common.c:6201 c-common.c:6329 c-common.c:6395 c-common.c:6439
+#: c-common.c:6485 c-common.c:6555 c-common.c:6579 c-common.c:6865
+#: c-common.c:6888 c-common.c:6927 c-common.c:7016 c-common.c:7156
#, gcc-internal-format
msgid "%qE attribute ignored"
msgstr ""
-#: c-common.c:5211 c-common.c:5237
+#: c-common.c:5259 c-common.c:5285
#, gcc-internal-format
msgid "%qE attribute conflicts with attribute %s"
msgstr ""
-#: c-common.c:5458
+#: c-common.c:5506
#, gcc-internal-format
msgid "%qE attribute have effect only on public objects"
msgstr ""
-#: c-common.c:5555
+#: c-common.c:5603
#, gcc-internal-format
msgid "destructor priorities are not supported"
msgstr ""
-#: c-common.c:5557
+#: c-common.c:5605
#, gcc-internal-format
msgid "constructor priorities are not supported"
msgstr ""
-#: c-common.c:5574
+#: c-common.c:5622
#, gcc-internal-format
msgid "destructor priorities from 0 to %d are reserved for the implementation"
msgstr ""
-#: c-common.c:5579
+#: c-common.c:5627
#, gcc-internal-format
msgid "constructor priorities from 0 to %d are reserved for the implementation"
msgstr ""
-#: c-common.c:5587
+#: c-common.c:5635
#, gcc-internal-format
msgid "destructor priorities must be integers from 0 to %d inclusive"
msgstr ""
-#: c-common.c:5590
+#: c-common.c:5638
#, gcc-internal-format
msgid "constructor priorities must be integers from 0 to %d inclusive"
msgstr ""
-#: c-common.c:5711
+#: c-common.c:5759
#, gcc-internal-format
msgid "unknown machine mode %qs"
msgstr ""
-#: c-common.c:5740
+#: c-common.c:5788
#, gcc-internal-format
msgid "specifying vector types with __attribute__ ((mode)) is deprecated"
msgstr ""
-#: c-common.c:5743
+#: c-common.c:5791
#, gcc-internal-format
msgid "use __attribute__ ((vector_size)) instead"
msgstr ""
-#: c-common.c:5752
+#: c-common.c:5800
#, gcc-internal-format
msgid "unable to emulate %qs"
msgstr ""
-#: c-common.c:5762
+#: c-common.c:5810
#, gcc-internal-format
msgid "invalid pointer mode %qs"
msgstr ""
-#: c-common.c:5779
+#: c-common.c:5827
#, gcc-internal-format
msgid "signness of type and machine mode %qs don't match"
msgstr ""
-#: c-common.c:5790
+#: c-common.c:5838
#, gcc-internal-format
msgid "no data type for mode %qs"
msgstr ""
-#: c-common.c:5800
+#: c-common.c:5848
#, gcc-internal-format
msgid "cannot use mode %qs for enumeral types"
msgstr ""
-#: c-common.c:5827
+#: c-common.c:5875
#, gcc-internal-format
msgid "mode %qs applied to inappropriate type"
msgstr ""
-#: c-common.c:5858
+#: c-common.c:5906
#, gcc-internal-format
msgid "%Jsection attribute cannot be specified for local variables"
msgstr ""
-#: c-common.c:5869 config/bfin/bfin.c:5274 config/bfin/bfin.c:5325
+#: c-common.c:5917 config/bfin/bfin.c:5329 config/bfin/bfin.c:5380
#, gcc-internal-format
msgid "section of %q+D conflicts with previous declaration"
msgstr ""
-#: c-common.c:5877
+#: c-common.c:5925
#, gcc-internal-format
msgid "section of %q+D cannot be overridden"
msgstr ""
-#: c-common.c:5885
+#: c-common.c:5933
#, gcc-internal-format
msgid "section attribute not allowed for %q+D"
msgstr ""
-#: c-common.c:5891
+#: c-common.c:5939
#, gcc-internal-format
msgid "%Jsection attributes are not supported for this target"
msgstr ""
-#: c-common.c:5923
+#: c-common.c:5971
#, gcc-internal-format
msgid "requested alignment is not a constant"
msgstr ""
-#: c-common.c:5928
+#: c-common.c:5976
#, gcc-internal-format
msgid "requested alignment is not a power of 2"
msgstr ""
-#: c-common.c:5933
+#: c-common.c:5981
#, gcc-internal-format
msgid "requested alignment is too large"
msgstr ""
-#: c-common.c:5959
+#: c-common.c:6007
#, gcc-internal-format
msgid "alignment may not be specified for %q+D"
msgstr ""
-#: c-common.c:5966
+#: c-common.c:6014
#, gcc-internal-format
msgid ""
"alignment for %q+D was previously specified as %d and may not be decreased"
msgstr ""
-#: c-common.c:5970
+#: c-common.c:6018
#, gcc-internal-format
msgid "alignment for %q+D must be at least %d"
msgstr ""
-#: c-common.c:5995
+#: c-common.c:6043
#, gcc-internal-format
msgid "inline function %q+D cannot be declared weak"
msgstr ""
-#: c-common.c:6024
+#: c-common.c:6077
#, gcc-internal-format
msgid "%q+D defined both normally and as an alias"
msgstr ""
-#: c-common.c:6040
+#: c-common.c:6093
#, gcc-internal-format
msgid "alias argument not a string"
msgstr ""
-#: c-common.c:6105
+#: c-common.c:6158
#, gcc-internal-format
msgid "%Jweakref attribute must appear before alias attribute"
msgstr ""
-#: c-common.c:6135
+#: c-common.c:6188
#, gcc-internal-format
msgid "%qE attribute ignored on non-class types"
msgstr ""
-#: c-common.c:6141
+#: c-common.c:6194
#, gcc-internal-format
msgid "%qE attribute ignored because %qT is already defined"
msgstr ""
-#: c-common.c:6154
+#: c-common.c:6207
#, gcc-internal-format
msgid "visibility argument not a string"
msgstr ""
-#: c-common.c:6166
+#: c-common.c:6219
#, gcc-internal-format
msgid "%qE attribute ignored on types"
msgstr ""
-#: c-common.c:6182
+#: c-common.c:6235
#, gcc-internal-format
msgid ""
"visibility argument must be one of \"default\", \"hidden\", \"protected\" or "
"\"internal\""
msgstr ""
-#: c-common.c:6193
+#: c-common.c:6246
#, gcc-internal-format
msgid "%qD redeclared with different visibility"
msgstr ""
-#: c-common.c:6196 c-common.c:6200
+#: c-common.c:6249 c-common.c:6253
#, gcc-internal-format
msgid "%qD was declared %qs which implies default visibility"
msgstr ""
-#: c-common.c:6274
+#: c-common.c:6337
#, gcc-internal-format
msgid "tls_model argument not a string"
msgstr ""
-#: c-common.c:6287
+#: c-common.c:6350
#, gcc-internal-format
msgid ""
"tls_model argument must be one of \"local-exec\", \"initial-exec\", \"local-"
"dynamic\" or \"global-dynamic\""
msgstr ""
-#: c-common.c:6306 c-common.c:6396
+#: c-common.c:6369 c-common.c:6459
#, gcc-internal-format
msgid "%J%qE attribute applies only to functions"
msgstr ""
-#: c-common.c:6311 c-common.c:6401
+#: c-common.c:6374 c-common.c:6464
#, gcc-internal-format
msgid "%Jcan%'t set %qE attribute after definition"
msgstr ""
-#: c-common.c:6357
+#: c-common.c:6420
#, gcc-internal-format
msgid "alloc_size parameter outside range"
msgstr ""
-#: c-common.c:6490
+#: c-common.c:6553
#, gcc-internal-format
msgid "%qE attribute ignored for %qE"
msgstr ""
-#: c-common.c:6549
+#: c-common.c:6613
#, gcc-internal-format
msgid "invalid vector type for attribute %qE"
msgstr ""
-#: c-common.c:6555
+#: c-common.c:6619
#, gcc-internal-format
msgid "vector size not an integral multiple of component size"
msgstr ""
-#: c-common.c:6561
+#: c-common.c:6625
#, gcc-internal-format
msgid "zero vector size"
msgstr ""
-#: c-common.c:6569
+#: c-common.c:6633
#, gcc-internal-format
msgid "number of components of the vector not a power of two"
msgstr ""
-#: c-common.c:6597
+#: c-common.c:6661
#, gcc-internal-format
msgid "nonnull attribute without arguments on a non-prototype"
msgstr ""
-#: c-common.c:6612
+#: c-common.c:6676
#, gcc-internal-format
msgid "nonnull argument has invalid operand number (argument %lu)"
msgstr ""
-#: c-common.c:6631
+#: c-common.c:6695
#, gcc-internal-format
msgid ""
"nonnull argument with out-of-range operand number (argument %lu, operand %lu)"
msgstr ""
-#: c-common.c:6639
+#: c-common.c:6703
#, gcc-internal-format
msgid ""
"nonnull argument references non-pointer operand (argument %lu, operand %lu)"
msgstr ""
-#: c-common.c:6715
+#: c-common.c:6779
#, gcc-internal-format
msgid "not enough variable arguments to fit a sentinel"
msgstr ""
-#: c-common.c:6729
+#: c-common.c:6793
#, gcc-internal-format
msgid "missing sentinel in function call"
msgstr ""
-#: c-common.c:6770
+#: c-common.c:6834
#, gcc-internal-format
msgid "null argument where non-null required (argument %lu)"
msgstr ""
-#: c-common.c:6835
+#: c-common.c:6899
#, gcc-internal-format
msgid "cleanup argument not an identifier"
msgstr ""
-#: c-common.c:6842
+#: c-common.c:6906
#, gcc-internal-format
msgid "cleanup argument not a function"
msgstr ""
-#: c-common.c:6881
+#: c-common.c:6945
#, gcc-internal-format
msgid "%qE attribute requires prototypes with named arguments"
msgstr ""
-#: c-common.c:6892
+#: c-common.c:6956
#, gcc-internal-format
msgid "%qE attribute only applies to variadic functions"
msgstr ""
-#: c-common.c:6904
+#: c-common.c:6968
#, gcc-internal-format
msgid "requested position is not an integer constant"
msgstr ""
-#: c-common.c:6912
+#: c-common.c:6976
#, gcc-internal-format
msgid "requested position is less than zero"
msgstr ""
-#: c-common.c:7036
+#: c-common.c:7100
#, gcc-internal-format
msgid "Bad option %s to optimize attribute."
msgstr ""
-#: c-common.c:7039
+#: c-common.c:7103
#, gcc-internal-format
msgid "Bad option %s to pragma attribute"
msgstr ""
-#: c-common.c:7232
+#: c-common.c:7296
#, gcc-internal-format
msgid "not enough arguments to function %qE"
msgstr ""
-#: c-common.c:7237 c-typeck.c:2540
+#: c-common.c:7301 c-typeck.c:2558
#, gcc-internal-format
msgid "too many arguments to function %qE"
msgstr ""
-#: c-common.c:7267 c-common.c:7313
+#: c-common.c:7331 c-common.c:7377
#, gcc-internal-format
msgid "non-floating-point argument in call to function %qE"
msgstr ""
-#: c-common.c:7290
+#: c-common.c:7354
#, gcc-internal-format
msgid "non-floating-point arguments in call to function %qE"
msgstr ""
-#: c-common.c:7306
+#: c-common.c:7370
#, gcc-internal-format
msgid "non-const integer argument %u in call to function %qE"
msgstr ""
-#: c-common.c:7532
+#: c-common.c:7596
#, gcc-internal-format
msgid ""
"%Hignoring return value of %qD, declared with attribute warn_unused_result"
msgstr ""
-#: c-common.c:7536
+#: c-common.c:7600
#, gcc-internal-format
msgid ""
"%Hignoring return value of function declared with attribute "
"warn_unused_result"
msgstr ""
-#: c-common.c:7590
+#: c-common.c:7654
#, gcc-internal-format
msgid "cannot apply %<offsetof%> to static data member %qD"
msgstr ""
-#: c-common.c:7595
+#: c-common.c:7659
#, gcc-internal-format
msgid "cannot apply %<offsetof%> when %<operator[]%> is overloaded"
msgstr ""
-#: c-common.c:7616 cp/typeck.c:4622
+#: c-common.c:7680 cp/typeck.c:4685
#, gcc-internal-format
msgid "attempt to take address of bit-field structure member %qD"
msgstr ""
-#: c-common.c:7669
+#: c-common.c:7733
#, gcc-internal-format
msgid "lvalue required as left operand of assignment"
msgstr ""
-#: c-common.c:7672
+#: c-common.c:7736
#, gcc-internal-format
msgid "lvalue required as increment operand"
msgstr ""
-#: c-common.c:7675
+#: c-common.c:7739
#, gcc-internal-format
msgid "lvalue required as decrement operand"
msgstr ""
-#: c-common.c:7678
+#: c-common.c:7742
#, gcc-internal-format
msgid "lvalue required as unary %<&%> operand"
msgstr ""
-#: c-common.c:7681
+#: c-common.c:7745
#, gcc-internal-format
msgid "lvalue required in asm statement"
msgstr ""
-#: c-common.c:7803
+#: c-common.c:7874
#, gcc-internal-format
msgid "size of array is too large"
msgstr ""
-#: c-common.c:7839 c-common.c:7888 c-typeck.c:2730
+#: c-common.c:7910 c-common.c:7959 c-typeck.c:2748
#, gcc-internal-format
msgid "too few arguments to function %qE"
msgstr ""
-#: c-common.c:7856 c-typeck.c:4443
+#: c-common.c:7927 c-typeck.c:4461
#, gcc-internal-format
msgid "incompatible type for argument %d of %qE"
msgstr ""
-#: c-common.c:8048
+#: c-common.c:8119
#, gcc-internal-format
msgid "array subscript has type %<char%>"
msgstr ""
-#: c-common.c:8083
+#: c-common.c:8154
#, gcc-internal-format
msgid "suggest parentheses around %<+%> inside %<<<%>"
msgstr ""
-#: c-common.c:8086
+#: c-common.c:8157
#, gcc-internal-format
msgid "suggest parentheses around %<-%> inside %<<<%>"
msgstr ""
-#: c-common.c:8092
+#: c-common.c:8163
#, gcc-internal-format
msgid "suggest parentheses around %<+%> inside %<>>%>"
msgstr ""
-#: c-common.c:8095
+#: c-common.c:8166
#, gcc-internal-format
msgid "suggest parentheses around %<-%> inside %<>>%>"
msgstr ""
-#: c-common.c:8101
+#: c-common.c:8172
#, gcc-internal-format
msgid "suggest parentheses around %<&&%> within %<||%>"
msgstr ""
-#: c-common.c:8110
+#: c-common.c:8181
#, gcc-internal-format
msgid "suggest parentheses around arithmetic in operand of %<|%>"
msgstr ""
-#: c-common.c:8115
+#: c-common.c:8186
#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<|%>"
msgstr ""
-#: c-common.c:8119
+#: c-common.c:8190
#, gcc-internal-format
msgid ""
"suggest parentheses around operand of %<!%> or change %<|%> to %<||%> or %<!%"
"> to %<~%>"
msgstr ""
-#: c-common.c:8129
+#: c-common.c:8200
#, gcc-internal-format
msgid "suggest parentheses around arithmetic in operand of %<^%>"
msgstr ""
-#: c-common.c:8134
+#: c-common.c:8205
#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<^%>"
msgstr ""
-#: c-common.c:8140
+#: c-common.c:8211
#, gcc-internal-format
msgid "suggest parentheses around %<+%> in operand of %<&%>"
msgstr ""
-#: c-common.c:8143
+#: c-common.c:8214
#, gcc-internal-format
msgid "suggest parentheses around %<-%> in operand of %<&%>"
msgstr ""
-#: c-common.c:8148
+#: c-common.c:8219
#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<&%>"
msgstr ""
-#: c-common.c:8152
+#: c-common.c:8223
#, gcc-internal-format
msgid ""
"suggest parentheses around operand of %<!%> or change %<&%> to %<&&%> or %<!%"
"> to %<~%>"
msgstr ""
-#: c-common.c:8160
+#: c-common.c:8231
#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<==%>"
msgstr ""
-#: c-common.c:8166
+#: c-common.c:8237
#, gcc-internal-format
msgid "suggest parentheses around comparison in operand of %<!=%>"
msgstr ""
-#: c-common.c:8175
+#: c-common.c:8248
#, gcc-internal-format
msgid "comparisons like %<X<=Y<=Z%> do not have their mathematical meaning"
msgstr ""
-#: c-common.c:8190
+#: c-common.c:8263
#, gcc-internal-format
msgid "label %q+D defined but not used"
msgstr ""
-#: c-common.c:8192
+#: c-common.c:8265
#, gcc-internal-format
msgid "label %q+D declared but not defined"
msgstr ""
-#: c-common.c:8212
+#: c-common.c:8285
#, gcc-internal-format
msgid "division by zero"
msgstr ""
-#: c-common.c:8244
+#: c-common.c:8317
#, gcc-internal-format
msgid "comparison between types %qT and %qT"
msgstr ""
-#: c-common.c:8295
+#: c-common.c:8368
#, gcc-internal-format
msgid "comparison between signed and unsigned integer expressions"
msgstr ""
-#: c-common.c:8346
+#: c-common.c:8419
#, gcc-internal-format
msgid "promoted ~unsigned is always non-zero"
msgstr ""
-#: c-common.c:8349
+#: c-common.c:8422
#, gcc-internal-format
msgid "comparison of promoted ~unsigned with constant"
msgstr ""
-#: c-common.c:8359
+#: c-common.c:8432
#, gcc-internal-format
msgid "comparison of promoted ~unsigned with unsigned"
msgstr ""
@@ -18518,8 +18288,8 @@ msgstr ""
#. an unprototyped function, it is compile-time undefined;
#. making it a constraint in that case was rejected in
#. DR#252.
-#: c-convert.c:95 c-typeck.c:1783 c-typeck.c:4078 cp/typeck.c:1605
-#: cp/typeck.c:5873 cp/typeck.c:6483 fortran/convert.c:88
+#: c-convert.c:95 c-typeck.c:1796 c-typeck.c:4096 cp/typeck.c:1619
+#: cp/typeck.c:5936 cp/typeck.c:6546 fortran/convert.c:88
#, gcc-internal-format
msgid "void value not ignored as it ought to be"
msgstr ""
@@ -18539,7 +18309,7 @@ msgstr ""
msgid "GCC supports only %u nested scopes"
msgstr ""
-#: c-decl.c:740 cp/decl.c:358
+#: c-decl.c:740 cp/decl.c:357
#, gcc-internal-format
msgid "label %q+D used but not defined"
msgstr ""
@@ -18549,91 +18319,91 @@ msgstr ""
msgid "nested function %q+D declared but never defined"
msgstr ""
-#: c-decl.c:791
+#: c-decl.c:793
#, gcc-internal-format
msgid "inline function %q+D declared but never defined"
msgstr ""
-#: c-decl.c:804 cp/decl.c:603
+#: c-decl.c:808 cp/decl.c:602
#, gcc-internal-format
msgid "unused variable %q+D"
msgstr ""
-#: c-decl.c:808
+#: c-decl.c:812
#, gcc-internal-format
msgid "type of array %q+D completed incompatibly with implicit initialization"
msgstr ""
-#: c-decl.c:1032
+#: c-decl.c:1036
#, gcc-internal-format
msgid ""
"a parameter list with an ellipsis can%'t match an empty parameter name list "
"declaration"
msgstr ""
-#: c-decl.c:1039
+#: c-decl.c:1043
#, gcc-internal-format
msgid ""
"an argument type that has a default promotion can%'t match an empty "
"parameter name list declaration"
msgstr ""
-#: c-decl.c:1080
+#: c-decl.c:1084
#, gcc-internal-format
msgid ""
"prototype for %q+D declares more arguments than previous old-style definition"
msgstr ""
-#: c-decl.c:1086
+#: c-decl.c:1090
#, gcc-internal-format
msgid ""
"prototype for %q+D declares fewer arguments than previous old-style "
"definition"
msgstr ""
-#: c-decl.c:1095
+#: c-decl.c:1099
#, gcc-internal-format
msgid "prototype for %q+D declares argument %d with incompatible type"
msgstr ""
#. If we get here, no errors were found, but do issue a warning
#. for this poor-style construct.
-#: c-decl.c:1108
+#: c-decl.c:1112
#, gcc-internal-format
msgid "prototype for %q+D follows non-prototype definition"
msgstr ""
-#: c-decl.c:1123
+#: c-decl.c:1127
#, gcc-internal-format
msgid "previous definition of %q+D was here"
msgstr ""
-#: c-decl.c:1125
+#: c-decl.c:1129
#, gcc-internal-format
msgid "previous implicit declaration of %q+D was here"
msgstr ""
-#: c-decl.c:1127
+#: c-decl.c:1131
#, gcc-internal-format
msgid "previous declaration of %q+D was here"
msgstr ""
-#: c-decl.c:1167
+#: c-decl.c:1171
#, gcc-internal-format
msgid "%q+D redeclared as different kind of symbol"
msgstr ""
-#: c-decl.c:1171
+#: c-decl.c:1175
#, gcc-internal-format
msgid "built-in function %q+D declared as non-function"
msgstr ""
-#: c-decl.c:1174 c-decl.c:1294 c-decl.c:1960
+#: c-decl.c:1178 c-decl.c:1298 c-decl.c:1964
#, gcc-internal-format
msgid "declaration of %q+D shadows a built-in function"
msgstr ""
-#: c-decl.c:1183
+#: c-decl.c:1187
#, gcc-internal-format
msgid "redeclaration of enumerator %q+D"
msgstr ""
@@ -18641,269 +18411,269 @@ msgstr ""
#. If types don't match for a built-in, throw away the
#. built-in. No point in calling locate_old_decl here, it
#. won't print anything.
-#: c-decl.c:1204
+#: c-decl.c:1208
#, gcc-internal-format
msgid "conflicting types for built-in function %q+D"
msgstr ""
-#: c-decl.c:1229 c-decl.c:1242 c-decl.c:1251
+#: c-decl.c:1233 c-decl.c:1246 c-decl.c:1255
#, gcc-internal-format
msgid "conflicting types for %q+D"
msgstr ""
-#: c-decl.c:1249
+#: c-decl.c:1253
#, gcc-internal-format
msgid "conflicting type qualifiers for %q+D"
msgstr ""
#. Allow OLDDECL to continue in use.
-#: c-decl.c:1269
+#: c-decl.c:1273
#, gcc-internal-format
msgid "redefinition of typedef %q+D"
msgstr ""
-#: c-decl.c:1320 c-decl.c:1422
+#: c-decl.c:1324 c-decl.c:1426
#, gcc-internal-format
msgid "redefinition of %q+D"
msgstr ""
-#: c-decl.c:1355 c-decl.c:1460
+#: c-decl.c:1359 c-decl.c:1464
#, gcc-internal-format
msgid "static declaration of %q+D follows non-static declaration"
msgstr ""
-#: c-decl.c:1365 c-decl.c:1373 c-decl.c:1450 c-decl.c:1457
+#: c-decl.c:1369 c-decl.c:1377 c-decl.c:1454 c-decl.c:1461
#, gcc-internal-format
msgid "non-static declaration of %q+D follows static declaration"
msgstr ""
-#: c-decl.c:1389
+#: c-decl.c:1393
#, gcc-internal-format
msgid "%<gnu_inline%> attribute present on %q+D"
msgstr ""
-#: c-decl.c:1391
+#: c-decl.c:1395
#, gcc-internal-format
msgid "%Jbut not here"
msgstr ""
-#: c-decl.c:1409
+#: c-decl.c:1413
#, gcc-internal-format
msgid "thread-local declaration of %q+D follows non-thread-local declaration"
msgstr ""
-#: c-decl.c:1412
+#: c-decl.c:1416
#, gcc-internal-format
msgid "non-thread-local declaration of %q+D follows thread-local declaration"
msgstr ""
-#: c-decl.c:1442
+#: c-decl.c:1446
#, gcc-internal-format
msgid "extern declaration of %q+D follows declaration with no linkage"
msgstr ""
-#: c-decl.c:1478
+#: c-decl.c:1482
#, gcc-internal-format
msgid "declaration of %q+D with no linkage follows extern declaration"
msgstr ""
-#: c-decl.c:1484
+#: c-decl.c:1488
#, gcc-internal-format
msgid "redeclaration of %q+D with no linkage"
msgstr ""
-#: c-decl.c:1498
+#: c-decl.c:1502
#, gcc-internal-format
msgid ""
"redeclaration of %q+D with different visibility (old visibility preserved)"
msgstr ""
-#: c-decl.c:1509
+#: c-decl.c:1513
#, gcc-internal-format
msgid "inline declaration of %qD follows declaration with attribute noinline"
msgstr ""
-#: c-decl.c:1516
+#: c-decl.c:1520
#, gcc-internal-format
msgid "declaration of %q+D with attribute noinline follows inline declaration "
msgstr ""
-#: c-decl.c:1534
+#: c-decl.c:1538
#, gcc-internal-format
msgid "redefinition of parameter %q+D"
msgstr ""
-#: c-decl.c:1561
+#: c-decl.c:1565
#, gcc-internal-format
msgid "redundant redeclaration of %q+D"
msgstr ""
-#: c-decl.c:1947
+#: c-decl.c:1951
#, gcc-internal-format
msgid "declaration of %q+D shadows previous non-variable"
msgstr ""
-#: c-decl.c:1952
+#: c-decl.c:1956
#, gcc-internal-format
msgid "declaration of %q+D shadows a parameter"
msgstr ""
-#: c-decl.c:1955
+#: c-decl.c:1959
#, gcc-internal-format
msgid "declaration of %q+D shadows a global declaration"
msgstr ""
-#: c-decl.c:1965
+#: c-decl.c:1969
#, gcc-internal-format
msgid "declaration of %q+D shadows a previous local"
msgstr ""
-#: c-decl.c:1968 cp/name-lookup.c:1037 cp/name-lookup.c:1068
-#: cp/name-lookup.c:1076
+#: c-decl.c:1972 cp/name-lookup.c:1041 cp/name-lookup.c:1072
+#: cp/name-lookup.c:1080
#, gcc-internal-format
msgid "%Jshadowed declaration is here"
msgstr ""
-#: c-decl.c:2160
+#: c-decl.c:2164
#, gcc-internal-format
msgid "nested extern declaration of %qD"
msgstr ""
-#: c-decl.c:2326 c-decl.c:2329
+#: c-decl.c:2330 c-decl.c:2333
#, gcc-internal-format
msgid "implicit declaration of function %qE"
msgstr ""
-#: c-decl.c:2391
+#: c-decl.c:2395
#, gcc-internal-format
msgid "incompatible implicit declaration of built-in function %qD"
msgstr ""
-#: c-decl.c:2400
+#: c-decl.c:2404
#, gcc-internal-format
msgid "incompatible implicit declaration of function %qD"
msgstr ""
-#: c-decl.c:2453
+#: c-decl.c:2457
#, gcc-internal-format
msgid "%H%qE undeclared here (not in a function)"
msgstr ""
-#: c-decl.c:2458
+#: c-decl.c:2462
#, gcc-internal-format
msgid "%H%qE undeclared (first use in this function)"
msgstr ""
-#: c-decl.c:2462
+#: c-decl.c:2466
#, gcc-internal-format
msgid "%H(Each undeclared identifier is reported only once"
msgstr ""
-#: c-decl.c:2463
+#: c-decl.c:2467
#, gcc-internal-format
msgid "%Hfor each function it appears in.)"
msgstr ""
-#: c-decl.c:2501 cp/decl.c:2404
+#: c-decl.c:2505 cp/decl.c:2417
#, gcc-internal-format
msgid "label %qE referenced outside of any function"
msgstr ""
-#: c-decl.c:2543
+#: c-decl.c:2547
#, gcc-internal-format
msgid "duplicate label declaration %qE"
msgstr ""
-#: c-decl.c:2579
+#: c-decl.c:2583
#, gcc-internal-format
msgid "%Hduplicate label %qD"
msgstr ""
-#: c-decl.c:2589
+#: c-decl.c:2593
#, gcc-internal-format
msgid "%Jjump into statement expression"
msgstr ""
-#: c-decl.c:2591
+#: c-decl.c:2595
#, gcc-internal-format
msgid "%Jjump into scope of identifier with variably modified type"
msgstr ""
-#: c-decl.c:2606
+#: c-decl.c:2610
#, gcc-internal-format
msgid ""
"%Htraditional C lacks a separate namespace for labels, identifier %qE "
"conflicts"
msgstr ""
-#: c-decl.c:2681
+#: c-decl.c:2685
#, gcc-internal-format
msgid "%H%qE defined as wrong kind of tag"
msgstr ""
-#: c-decl.c:2904
+#: c-decl.c:2908
#, gcc-internal-format
msgid "unnamed struct/union that defines no instances"
msgstr ""
-#: c-decl.c:2913
+#: c-decl.c:2917
#, gcc-internal-format
msgid "empty declaration with storage class specifier does not redeclare tag"
msgstr ""
-#: c-decl.c:2925
+#: c-decl.c:2929
#, gcc-internal-format
msgid "empty declaration with type qualifier does not redeclare tag"
msgstr ""
-#: c-decl.c:2947 c-decl.c:2954
+#: c-decl.c:2951 c-decl.c:2958
#, gcc-internal-format
msgid "useless type name in empty declaration"
msgstr ""
-#: c-decl.c:2962
+#: c-decl.c:2966
#, gcc-internal-format
msgid "%<inline%> in empty declaration"
msgstr ""
-#: c-decl.c:2968
+#: c-decl.c:2972
#, gcc-internal-format
msgid "%<auto%> in file-scope empty declaration"
msgstr ""
-#: c-decl.c:2974
+#: c-decl.c:2978
#, gcc-internal-format
msgid "%<register%> in file-scope empty declaration"
msgstr ""
-#: c-decl.c:2980
+#: c-decl.c:2984
#, gcc-internal-format
msgid "useless storage class specifier in empty declaration"
msgstr ""
-#: c-decl.c:2986
+#: c-decl.c:2990
#, gcc-internal-format
msgid "useless %<__thread%> in empty declaration"
msgstr ""
-#: c-decl.c:2994
+#: c-decl.c:2998
#, gcc-internal-format
msgid "useless type qualifier in empty declaration"
msgstr ""
-#: c-decl.c:3001 c-parser.c:1170
+#: c-decl.c:3005 c-parser.c:1170
#, gcc-internal-format
msgid "empty declaration"
msgstr ""
-#: c-decl.c:3068
+#: c-decl.c:3072
#, gcc-internal-format
msgid ""
"ISO C90 does not support %<static%> or type qualifiers in parameter array "
"declarators"
msgstr ""
-#: c-decl.c:3072
+#: c-decl.c:3076
#, gcc-internal-format
msgid "ISO C90 does not support %<[*]%> array declarators"
msgstr ""
@@ -18911,248 +18681,248 @@ msgstr ""
#. C99 6.7.5.2p4
#. A function definition isn't function prototype scope C99 6.2.1p4.
#. C99 6.7.5.2p4
-#: c-decl.c:3079 c-decl.c:5006
+#: c-decl.c:3083 c-decl.c:5024
#, gcc-internal-format
msgid "%<[*]%> not allowed in other than function prototype scope"
msgstr ""
-#: c-decl.c:3181
+#: c-decl.c:3185
#, gcc-internal-format
msgid "%q+D is usually a function"
msgstr ""
-#: c-decl.c:3190 cp/decl2.c:776
+#: c-decl.c:3194 cp/decl2.c:781
#, gcc-internal-format
msgid "typedef %qD is initialized (use __typeof__ instead)"
msgstr ""
-#: c-decl.c:3195
+#: c-decl.c:3199
#, gcc-internal-format
msgid "function %qD is initialized like a variable"
msgstr ""
#. DECL_INITIAL in a PARM_DECL is really DECL_ARG_TYPE.
-#: c-decl.c:3201
+#: c-decl.c:3205
#, gcc-internal-format
msgid "parameter %qD is initialized"
msgstr ""
-#: c-decl.c:3226
+#: c-decl.c:3230
#, gcc-internal-format
msgid "variable %qD has initializer but incomplete type"
msgstr ""
-#: c-decl.c:3315 c-decl.c:6116 cp/decl.c:4086 cp/decl.c:11420
+#: c-decl.c:3319 c-decl.c:6138 cp/decl.c:4114 cp/decl.c:11484
#, gcc-internal-format
msgid "inline function %q+D given attribute noinline"
msgstr ""
-#: c-decl.c:3328
+#: c-decl.c:3332
#, gcc-internal-format
msgid "%q+D is static but declared in inline function %qD which is not static"
msgstr ""
-#: c-decl.c:3419
+#: c-decl.c:3423
#, gcc-internal-format
msgid "initializer fails to determine size of %q+D"
msgstr ""
-#: c-decl.c:3424
+#: c-decl.c:3428
#, gcc-internal-format
msgid "array size missing in %q+D"
msgstr ""
-#: c-decl.c:3436
+#: c-decl.c:3440
#, gcc-internal-format
msgid "zero or negative size array %q+D"
msgstr ""
-#: c-decl.c:3491 varasm.c:2111
+#: c-decl.c:3495 varasm.c:2111
#, gcc-internal-format
msgid "storage size of %q+D isn%'t known"
msgstr ""
-#: c-decl.c:3502
+#: c-decl.c:3506
#, gcc-internal-format
msgid "storage size of %q+D isn%'t constant"
msgstr ""
-#: c-decl.c:3549
+#: c-decl.c:3553
#, gcc-internal-format
msgid "ignoring asm-specifier for non-static local variable %q+D"
msgstr ""
-#: c-decl.c:3577 fortran/f95-lang.c:624
+#: c-decl.c:3581 fortran/f95-lang.c:624
#, gcc-internal-format
msgid "cannot put object with volatile field into register"
msgstr ""
-#: c-decl.c:3703
+#: c-decl.c:3707
#, gcc-internal-format
msgid "ISO C forbids forward parameter declarations"
msgstr ""
-#: c-decl.c:3822
+#: c-decl.c:3826
#, gcc-internal-format
msgid "bit-field %qs width not an integer constant"
msgstr ""
-#: c-decl.c:3830
+#: c-decl.c:3834
#, gcc-internal-format
msgid "negative width in bit-field %qs"
msgstr ""
-#: c-decl.c:3835
+#: c-decl.c:3839
#, gcc-internal-format
msgid "zero width for bit-field %qs"
msgstr ""
-#: c-decl.c:3845
+#: c-decl.c:3849
#, gcc-internal-format
msgid "bit-field %qs has invalid type"
msgstr ""
-#: c-decl.c:3855
+#: c-decl.c:3859
#, gcc-internal-format
msgid "type of bit-field %qs is a GCC extension"
msgstr ""
-#: c-decl.c:3861
+#: c-decl.c:3865
#, gcc-internal-format
msgid "width of %qs exceeds its type"
msgstr ""
-#: c-decl.c:3874
+#: c-decl.c:3878
#, gcc-internal-format
msgid "%qs is narrower than values of its type"
msgstr ""
-#: c-decl.c:3892
+#: c-decl.c:3896
#, gcc-internal-format
msgid "ISO C90 forbids array %qs whose size can%'t be evaluated"
msgstr ""
-#: c-decl.c:3896
+#: c-decl.c:3900
#, gcc-internal-format
msgid "ISO C90 forbids array whose size can%'t be evaluated"
msgstr ""
-#: c-decl.c:3902
+#: c-decl.c:3906
#, gcc-internal-format
msgid "ISO C90 forbids variable length array %qs"
msgstr ""
-#: c-decl.c:3905
+#: c-decl.c:3909
#, gcc-internal-format
msgid "ISO C90 forbids variable length array"
msgstr ""
-#: c-decl.c:3914
+#: c-decl.c:3918
#, gcc-internal-format
msgid "the size of array %qs can%'t be evaluated"
msgstr ""
-#: c-decl.c:3918
+#: c-decl.c:3922
#, gcc-internal-format
msgid "the size of array can %'t be evaluated"
msgstr ""
-#: c-decl.c:3924
+#: c-decl.c:3928
#, gcc-internal-format
msgid "variable length array %qs is used"
msgstr ""
-#: c-decl.c:3928 cp/decl.c:7220
+#: c-decl.c:3932 cp/decl.c:7274
#, gcc-internal-format
msgid "variable length array is used"
msgstr ""
-#: c-decl.c:4050 c-decl.c:4331
+#: c-decl.c:4054 c-decl.c:4335
#, gcc-internal-format
msgid "variably modified %qs at file scope"
msgstr ""
-#: c-decl.c:4068
+#: c-decl.c:4072
#, gcc-internal-format
msgid "type defaults to %<int%> in declaration of %qs"
msgstr ""
-#: c-decl.c:4096
+#: c-decl.c:4100
#, gcc-internal-format
msgid "duplicate %<const%>"
msgstr ""
-#: c-decl.c:4098
+#: c-decl.c:4102
#, gcc-internal-format
msgid "duplicate %<restrict%>"
msgstr ""
-#: c-decl.c:4100
+#: c-decl.c:4104
#, gcc-internal-format
msgid "duplicate %<volatile%>"
msgstr ""
-#: c-decl.c:4120
+#: c-decl.c:4124
#, gcc-internal-format
msgid "function definition declared %<auto%>"
msgstr ""
-#: c-decl.c:4122
+#: c-decl.c:4126
#, gcc-internal-format
msgid "function definition declared %<register%>"
msgstr ""
-#: c-decl.c:4124
+#: c-decl.c:4128
#, gcc-internal-format
msgid "function definition declared %<typedef%>"
msgstr ""
-#: c-decl.c:4126
+#: c-decl.c:4130
#, gcc-internal-format
msgid "function definition declared %<__thread%>"
msgstr ""
-#: c-decl.c:4142
+#: c-decl.c:4146
#, gcc-internal-format
msgid "storage class specified for structure field %qs"
msgstr ""
-#: c-decl.c:4146 cp/decl.c:8113
+#: c-decl.c:4150 cp/decl.c:8169
#, gcc-internal-format
msgid "storage class specified for parameter %qs"
msgstr ""
-#: c-decl.c:4149 cp/decl.c:8115
+#: c-decl.c:4153 cp/decl.c:8171
#, gcc-internal-format
msgid "storage class specified for typename"
msgstr ""
-#: c-decl.c:4166 cp/decl.c:9393
+#: c-decl.c:4170 cp/decl.c:9450
#, gcc-internal-format
msgid "%qs initialized and declared %<extern%>"
msgstr ""
-#: c-decl.c:4169 cp/decl.c:9397
+#: c-decl.c:4173 cp/decl.c:9454
#, gcc-internal-format
msgid "%qs has both %<extern%> and initializer"
msgstr ""
-#: c-decl.c:4174
+#: c-decl.c:4178
#, gcc-internal-format
msgid "file-scope declaration of %qs specifies %<auto%>"
msgstr ""
-#: c-decl.c:4177
+#: c-decl.c:4181
#, gcc-internal-format
msgid "file-scope declaration of %qs specifies %<register%>"
msgstr ""
-#: c-decl.c:4182 cp/decl.c:8126
+#: c-decl.c:4186 cp/decl.c:8182
#, gcc-internal-format
msgid "nested function %qs declared %<extern%>"
msgstr ""
-#: c-decl.c:4185 cp/decl.c:8136
+#: c-decl.c:4189 cp/decl.c:8192
#, gcc-internal-format
msgid "function-scope %qs implicitly auto and declared %<__thread%>"
msgstr ""
@@ -19160,474 +18930,474 @@ msgstr ""
#. Only the innermost declarator (making a parameter be of
#. array type which is converted to pointer type)
#. may have static or type qualifiers.
-#: c-decl.c:4232 c-decl.c:4476
+#: c-decl.c:4236 c-decl.c:4494
#, gcc-internal-format
msgid "static or type qualifiers in non-parameter array declarator"
msgstr ""
-#: c-decl.c:4279
+#: c-decl.c:4283
#, gcc-internal-format
msgid "declaration of %qs as array of voids"
msgstr ""
-#: c-decl.c:4285
+#: c-decl.c:4289
#, gcc-internal-format
msgid "declaration of %qs as array of functions"
msgstr ""
-#: c-decl.c:4291
+#: c-decl.c:4295
#, gcc-internal-format
msgid "invalid use of structure with flexible array member"
msgstr ""
-#: c-decl.c:4311
+#: c-decl.c:4315
#, gcc-internal-format
msgid "size of array %qs has non-integer type"
msgstr ""
-#: c-decl.c:4317
+#: c-decl.c:4321
#, gcc-internal-format
msgid "ISO C forbids zero-size array %qs"
msgstr ""
-#: c-decl.c:4324
+#: c-decl.c:4328
#, gcc-internal-format
msgid "size of array %qs is negative"
msgstr ""
-#: c-decl.c:4378 c-decl.c:4637 cp/decl.c:8642
+#: c-decl.c:4382 c-decl.c:4655 cp/decl.c:8694
#, gcc-internal-format
msgid "size of array %qs is too large"
msgstr ""
-#: c-decl.c:4390
+#: c-decl.c:4410
#, gcc-internal-format
msgid "ISO C90 does not support flexible array members"
msgstr ""
#. C99 6.7.5.2p4
-#: c-decl.c:4403 c-parser.c:4957
+#: c-decl.c:4431
#, gcc-internal-format
-msgid "%<[*]%> not allowed in other than a declaration"
+msgid "%<[*]%> not in a declaration"
msgstr ""
-#: c-decl.c:4426
+#: c-decl.c:4444
#, gcc-internal-format
msgid "array type has incomplete element type"
msgstr ""
-#: c-decl.c:4508 cp/decl.c:8231
+#: c-decl.c:4526 cp/decl.c:8288
#, gcc-internal-format
msgid "%qs declared as function returning a function"
msgstr ""
-#: c-decl.c:4513 cp/decl.c:8236
+#: c-decl.c:4531 cp/decl.c:8293
#, gcc-internal-format
msgid "%qs declared as function returning an array"
msgstr ""
-#: c-decl.c:4536
+#: c-decl.c:4554
#, gcc-internal-format
msgid "function definition has qualified void return type"
msgstr ""
-#: c-decl.c:4539 cp/decl.c:8220
+#: c-decl.c:4557 cp/decl.c:8277
#, gcc-internal-format
msgid "type qualifiers ignored on function return type"
msgstr ""
-#: c-decl.c:4569 c-decl.c:4651 c-decl.c:4741 c-decl.c:4830
+#: c-decl.c:4587 c-decl.c:4669 c-decl.c:4759 c-decl.c:4848
#, gcc-internal-format
msgid "ISO C forbids qualified function types"
msgstr ""
-#: c-decl.c:4659
+#: c-decl.c:4677
#, gcc-internal-format
msgid "typedef %q+D declared %<inline%>"
msgstr ""
-#: c-decl.c:4675
+#: c-decl.c:4693
#, gcc-internal-format
msgid "ISO C forbids const or volatile function types"
msgstr ""
-#: c-decl.c:4686
+#: c-decl.c:4704
#, gcc-internal-format
msgid "a member of a structure or union cannot have a variably modified type"
msgstr ""
-#: c-decl.c:4702
+#: c-decl.c:4720
#, gcc-internal-format
msgid "variable or field %qs declared void"
msgstr ""
-#: c-decl.c:4733
+#: c-decl.c:4751
#, gcc-internal-format
msgid "attributes in parameter array declarator ignored"
msgstr ""
-#: c-decl.c:4767
+#: c-decl.c:4785
#, gcc-internal-format
msgid "parameter %q+D declared %<inline%>"
msgstr ""
-#: c-decl.c:4780
+#: c-decl.c:4798
#, gcc-internal-format
msgid "field %qs declared as a function"
msgstr ""
-#: c-decl.c:4786
+#: c-decl.c:4804
#, gcc-internal-format
msgid "field %qs has incomplete type"
msgstr ""
-#: c-decl.c:4803 c-decl.c:4813 c-decl.c:4816
+#: c-decl.c:4821 c-decl.c:4831 c-decl.c:4834
#, gcc-internal-format
msgid "invalid storage class for function %qs"
msgstr ""
-#: c-decl.c:4836
+#: c-decl.c:4854
#, gcc-internal-format
msgid "%<noreturn%> function returns non-void value"
msgstr ""
-#: c-decl.c:4872
+#: c-decl.c:4890
#, gcc-internal-format
msgid "cannot inline function %<main%>"
msgstr ""
-#: c-decl.c:4901
+#: c-decl.c:4919
#, gcc-internal-format
msgid "variable previously declared %<static%> redeclared %<extern%>"
msgstr ""
-#: c-decl.c:4911
+#: c-decl.c:4929
#, gcc-internal-format
msgid "variable %q+D declared %<inline%>"
msgstr ""
#. C99 6.7.5.2p2
-#: c-decl.c:4942
+#: c-decl.c:4960
#, gcc-internal-format
msgid "object with variably modified type must have no linkage"
msgstr ""
-#: c-decl.c:5011 c-decl.c:6210
+#: c-decl.c:5029 c-decl.c:6232
#, gcc-internal-format
msgid "function declaration isn%'t a prototype"
msgstr ""
-#: c-decl.c:5019
+#: c-decl.c:5037
#, gcc-internal-format
msgid "parameter names (without types) in function declaration"
msgstr ""
-#: c-decl.c:5052
+#: c-decl.c:5070
#, gcc-internal-format
msgid "parameter %u (%q+D) has incomplete type"
msgstr ""
-#: c-decl.c:5055
+#: c-decl.c:5073
#, gcc-internal-format
msgid "%Jparameter %u has incomplete type"
msgstr ""
-#: c-decl.c:5064
+#: c-decl.c:5082
#, gcc-internal-format
msgid "parameter %u (%q+D) has void type"
msgstr ""
-#: c-decl.c:5067
+#: c-decl.c:5085
#, gcc-internal-format
msgid "%Jparameter %u has void type"
msgstr ""
-#: c-decl.c:5129
+#: c-decl.c:5147
#, gcc-internal-format
msgid "%<void%> as only parameter may not be qualified"
msgstr ""
-#: c-decl.c:5133 c-decl.c:5167
+#: c-decl.c:5151 c-decl.c:5185
#, gcc-internal-format
msgid "%<void%> must be the only parameter"
msgstr ""
-#: c-decl.c:5161
+#: c-decl.c:5179
#, gcc-internal-format
msgid "parameter %q+D has just a forward declaration"
msgstr ""
#. The %s will be one of 'struct', 'union', or 'enum'.
-#: c-decl.c:5206
+#: c-decl.c:5224
#, gcc-internal-format
msgid "%<%s %E%> declared inside parameter list"
msgstr ""
#. The %s will be one of 'struct', 'union', or 'enum'.
-#: c-decl.c:5210
+#: c-decl.c:5228
#, gcc-internal-format
msgid "anonymous %s declared inside parameter list"
msgstr ""
-#: c-decl.c:5215
+#: c-decl.c:5233
#, gcc-internal-format
msgid ""
"its scope is only this definition or declaration, which is probably not what "
"you want"
msgstr ""
-#: c-decl.c:5349
+#: c-decl.c:5367
#, gcc-internal-format
msgid "redefinition of %<union %E%>"
msgstr ""
-#: c-decl.c:5351
+#: c-decl.c:5369
#, gcc-internal-format
msgid "redefinition of %<struct %E%>"
msgstr ""
-#: c-decl.c:5356
+#: c-decl.c:5376
#, gcc-internal-format
msgid "nested redefinition of %<union %E%>"
msgstr ""
-#: c-decl.c:5358
+#: c-decl.c:5378
#, gcc-internal-format
msgid "nested redefinition of %<struct %E%>"
msgstr ""
-#: c-decl.c:5436 cp/decl.c:3824
+#: c-decl.c:5456 cp/decl.c:3852
#, gcc-internal-format
msgid "declaration does not declare anything"
msgstr ""
-#: c-decl.c:5439
+#: c-decl.c:5459
#, gcc-internal-format
msgid "ISO C doesn%'t support unnamed structs/unions"
msgstr ""
-#: c-decl.c:5483 c-decl.c:5499
+#: c-decl.c:5503 c-decl.c:5519
#, gcc-internal-format
msgid "duplicate member %q+D"
msgstr ""
-#: c-decl.c:5538
+#: c-decl.c:5558
#, gcc-internal-format
msgid "union has no named members"
msgstr ""
-#: c-decl.c:5540
+#: c-decl.c:5560
#, gcc-internal-format
msgid "union has no members"
msgstr ""
-#: c-decl.c:5545
+#: c-decl.c:5565
#, gcc-internal-format
msgid "struct has no named members"
msgstr ""
-#: c-decl.c:5547
+#: c-decl.c:5567
#, gcc-internal-format
msgid "struct has no members"
msgstr ""
-#: c-decl.c:5609
+#: c-decl.c:5631
#, gcc-internal-format
msgid "%Jflexible array member in union"
msgstr ""
-#: c-decl.c:5614
+#: c-decl.c:5636
#, gcc-internal-format
msgid "%Jflexible array member not at end of struct"
msgstr ""
-#: c-decl.c:5619
+#: c-decl.c:5641
#, gcc-internal-format
msgid "%Jflexible array member in otherwise empty struct"
msgstr ""
-#: c-decl.c:5627
+#: c-decl.c:5649
#, gcc-internal-format
msgid "%Jinvalid use of structure with flexible array member"
msgstr ""
-#: c-decl.c:5736
+#: c-decl.c:5758
#, gcc-internal-format
msgid "union cannot be made transparent"
msgstr ""
-#: c-decl.c:5807
+#: c-decl.c:5829
#, gcc-internal-format
msgid "nested redefinition of %<enum %E%>"
msgstr ""
#. This enum is a named one that has been declared already.
-#: c-decl.c:5814
+#: c-decl.c:5836
#, gcc-internal-format
msgid "redeclaration of %<enum %E%>"
msgstr ""
-#: c-decl.c:5877
+#: c-decl.c:5899
#, gcc-internal-format
msgid "enumeration values exceed range of largest integer"
msgstr ""
-#: c-decl.c:5894
+#: c-decl.c:5916
#, gcc-internal-format
msgid "specified mode too small for enumeral values"
msgstr ""
-#: c-decl.c:5991
+#: c-decl.c:6013
#, gcc-internal-format
msgid "enumerator value for %qE is not an integer constant"
msgstr ""
-#: c-decl.c:6008
+#: c-decl.c:6030
#, gcc-internal-format
msgid "overflow in enumeration values"
msgstr ""
-#: c-decl.c:6016
+#: c-decl.c:6038
#, gcc-internal-format
msgid "ISO C restricts enumerator values to range of %<int%>"
msgstr ""
-#: c-decl.c:6134
+#: c-decl.c:6156
#, gcc-internal-format
msgid "return type is an incomplete type"
msgstr ""
-#: c-decl.c:6144
+#: c-decl.c:6166
#, gcc-internal-format
msgid "return type defaults to %<int%>"
msgstr ""
-#: c-decl.c:6217
+#: c-decl.c:6239
#, gcc-internal-format
msgid "no previous prototype for %q+D"
msgstr ""
-#: c-decl.c:6226
+#: c-decl.c:6248
#, gcc-internal-format
msgid "%q+D was used with no prototype before its definition"
msgstr ""
-#: c-decl.c:6232 cp/decl.c:11561
+#: c-decl.c:6254 cp/decl.c:11625
#, gcc-internal-format
msgid "no previous declaration for %q+D"
msgstr ""
-#: c-decl.c:6242
+#: c-decl.c:6264
#, gcc-internal-format
msgid "%q+D was used with no declaration before its definition"
msgstr ""
-#: c-decl.c:6265
+#: c-decl.c:6287
#, gcc-internal-format
msgid "return type of %q+D is not %<int%>"
msgstr ""
-#: c-decl.c:6270
+#: c-decl.c:6292
#, gcc-internal-format
msgid "%q+D is normally a non-static function"
msgstr ""
-#: c-decl.c:6304
+#: c-decl.c:6326
#, gcc-internal-format
msgid "%Jold-style parameter declarations in prototyped function definition"
msgstr ""
-#: c-decl.c:6318
+#: c-decl.c:6340
#, gcc-internal-format
msgid "%Jtraditional C rejects ISO C style function definitions"
msgstr ""
-#: c-decl.c:6334
+#: c-decl.c:6356
#, gcc-internal-format
msgid "%Jparameter name omitted"
msgstr ""
-#: c-decl.c:6368
+#: c-decl.c:6390
#, gcc-internal-format
msgid "%Jold-style function definition"
msgstr ""
-#: c-decl.c:6377
+#: c-decl.c:6399
#, gcc-internal-format
msgid "%Jparameter name missing from parameter list"
msgstr ""
-#: c-decl.c:6388
+#: c-decl.c:6410
#, gcc-internal-format
msgid "%q+D declared as a non-parameter"
msgstr ""
-#: c-decl.c:6393
+#: c-decl.c:6415
#, gcc-internal-format
msgid "multiple parameters named %q+D"
msgstr ""
-#: c-decl.c:6401
+#: c-decl.c:6423
#, gcc-internal-format
msgid "parameter %q+D declared with void type"
msgstr ""
-#: c-decl.c:6418 c-decl.c:6420
+#: c-decl.c:6440 c-decl.c:6442
#, gcc-internal-format
msgid "type of %q+D defaults to %<int%>"
msgstr ""
-#: c-decl.c:6439
+#: c-decl.c:6461
#, gcc-internal-format
msgid "parameter %q+D has incomplete type"
msgstr ""
-#: c-decl.c:6445
+#: c-decl.c:6467
#, gcc-internal-format
msgid "declaration for parameter %q+D but no such parameter"
msgstr ""
-#: c-decl.c:6495
+#: c-decl.c:6517
#, gcc-internal-format
msgid "number of arguments doesn%'t match built-in prototype"
msgstr ""
-#: c-decl.c:6499
+#: c-decl.c:6521
#, gcc-internal-format
msgid "number of arguments doesn%'t match prototype"
msgstr ""
-#: c-decl.c:6500 c-decl.c:6552
+#: c-decl.c:6522 c-decl.c:6574
#, gcc-internal-format
msgid "%Hprototype declaration"
msgstr ""
-#: c-decl.c:6534
+#: c-decl.c:6556
#, gcc-internal-format
msgid "promoted argument %qD doesn%'t match built-in prototype"
msgstr ""
-#: c-decl.c:6538
+#: c-decl.c:6560
#, gcc-internal-format
msgid "promoted argument %qD doesn%'t match prototype"
msgstr ""
-#: c-decl.c:6541
+#: c-decl.c:6563
#, gcc-internal-format
msgid "prototype declaration"
msgstr ""
-#: c-decl.c:6547
+#: c-decl.c:6569
#, gcc-internal-format
msgid "argument %qD doesn%'t match built-in prototype"
msgstr ""
-#: c-decl.c:6551
+#: c-decl.c:6573
#, gcc-internal-format
msgid "argument %qD doesn%'t match prototype"
msgstr ""
-#: c-decl.c:6760 cp/decl.c:12260
+#: c-decl.c:6782 cp/decl.c:12329
#, gcc-internal-format
msgid "no return statement in function returning non-void"
msgstr ""
@@ -19635,443 +19405,443 @@ msgstr ""
#. If we get here, declarations have been used in a for loop without
#. the C99 for loop scope. This doesn't make much sense, so don't
#. allow it.
-#: c-decl.c:6833
+#: c-decl.c:6855
#, gcc-internal-format
msgid "%<for%> loop initial declarations are only allowed in C99 mode"
msgstr ""
-#: c-decl.c:6837
+#: c-decl.c:6859
#, gcc-internal-format
msgid "use option -std=c99 or -std=gnu99 to compile your code"
msgstr ""
-#: c-decl.c:6868
+#: c-decl.c:6890
#, gcc-internal-format
msgid "declaration of static variable %q+D in %<for%> loop initial declaration"
msgstr ""
-#: c-decl.c:6871
+#: c-decl.c:6893
#, gcc-internal-format
msgid ""
"declaration of %<extern%> variable %q+D in %<for%> loop initial declaration"
msgstr ""
-#: c-decl.c:6876
+#: c-decl.c:6898
#, gcc-internal-format
msgid "%<struct %E%> declared in %<for%> loop initial declaration"
msgstr ""
-#: c-decl.c:6880
+#: c-decl.c:6902
#, gcc-internal-format
msgid "%<union %E%> declared in %<for%> loop initial declaration"
msgstr ""
-#: c-decl.c:6884
+#: c-decl.c:6906
#, gcc-internal-format
msgid "%<enum %E%> declared in %<for%> loop initial declaration"
msgstr ""
-#: c-decl.c:6888
+#: c-decl.c:6910
#, gcc-internal-format
msgid "declaration of non-variable %q+D in %<for%> loop initial declaration"
msgstr ""
-#: c-decl.c:7171 c-decl.c:7413 c-decl.c:7709
+#: c-decl.c:7193 c-decl.c:7435 c-decl.c:7731
#, gcc-internal-format
msgid "duplicate %qE"
msgstr ""
-#: c-decl.c:7196 c-decl.c:7423 c-decl.c:7610
+#: c-decl.c:7218 c-decl.c:7445 c-decl.c:7632
#, gcc-internal-format
msgid "two or more data types in declaration specifiers"
msgstr ""
-#: c-decl.c:7208
+#: c-decl.c:7230
#, gcc-internal-format
msgid "%<long long long%> is too long for GCC"
msgstr ""
-#: c-decl.c:7215 c-decl.c:7513
+#: c-decl.c:7237 c-decl.c:7535
#, gcc-internal-format
msgid "both %<long long%> and %<double%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7220
+#: c-decl.c:7242
#, gcc-internal-format
msgid "ISO C90 does not support %<long long%>"
msgstr ""
-#: c-decl.c:7225 c-decl.c:7254
+#: c-decl.c:7247 c-decl.c:7276
#, gcc-internal-format
msgid "both %<long%> and %<short%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7228 c-decl.c:7430
+#: c-decl.c:7250 c-decl.c:7452
#, gcc-internal-format
msgid "both %<long%> and %<void%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7231 c-decl.c:7452
+#: c-decl.c:7253 c-decl.c:7474
#, gcc-internal-format
msgid "both %<long%> and %<_Bool%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7234 c-decl.c:7474
+#: c-decl.c:7256 c-decl.c:7496
#, gcc-internal-format
msgid "both %<long%> and %<char%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7237 c-decl.c:7494
+#: c-decl.c:7259 c-decl.c:7516
#, gcc-internal-format
msgid "both %<long%> and %<float%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7240
+#: c-decl.c:7262
#, gcc-internal-format
msgid "both %<long%> and %<_Decimal32%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7243
+#: c-decl.c:7265
#, gcc-internal-format
msgid "both %<long%> and %<_Decimal64%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7246
+#: c-decl.c:7268
#, gcc-internal-format
msgid "both %<long%> and %<_Decimal128%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7257 c-decl.c:7433
+#: c-decl.c:7279 c-decl.c:7455
#, gcc-internal-format
msgid "both %<short%> and %<void%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7260 c-decl.c:7455
+#: c-decl.c:7282 c-decl.c:7477
#, gcc-internal-format
msgid "both %<short%> and %<_Bool%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7263 c-decl.c:7477
+#: c-decl.c:7285 c-decl.c:7499
#, gcc-internal-format
msgid "both %<short%> and %<char%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7266 c-decl.c:7497
+#: c-decl.c:7288 c-decl.c:7519
#, gcc-internal-format
msgid "both %<short%> and %<float%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7269 c-decl.c:7516
+#: c-decl.c:7291 c-decl.c:7538
#, gcc-internal-format
msgid "both %<short%> and %<double%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7272
+#: c-decl.c:7294
#, gcc-internal-format
msgid "both %<short%> and %<_Decimal32%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7275
+#: c-decl.c:7297
#, gcc-internal-format
msgid "both %<short%> and %<_Decimal64%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7278
+#: c-decl.c:7300
#, gcc-internal-format
msgid "both %<short%> and %<_Decimal128%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7286 c-decl.c:7315
+#: c-decl.c:7308 c-decl.c:7337
#, gcc-internal-format
msgid "both %<signed%> and %<unsigned%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7289 c-decl.c:7436
+#: c-decl.c:7311 c-decl.c:7458
#, gcc-internal-format
msgid "both %<signed%> and %<void%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7292 c-decl.c:7458
+#: c-decl.c:7314 c-decl.c:7480
#, gcc-internal-format
msgid "both %<signed%> and %<_Bool%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7295 c-decl.c:7500
+#: c-decl.c:7317 c-decl.c:7522
#, gcc-internal-format
msgid "both %<signed%> and %<float%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7298 c-decl.c:7519
+#: c-decl.c:7320 c-decl.c:7541
#, gcc-internal-format
msgid "both %<signed%> and %<double%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7301
+#: c-decl.c:7323
#, gcc-internal-format
msgid "both %<signed%> and %<_Decimal32%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7304
+#: c-decl.c:7326
#, gcc-internal-format
msgid "both %<signed%> and %<_Decimal64%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7307
+#: c-decl.c:7329
#, gcc-internal-format
msgid "both %<signed%> and %<_Decimal128%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7318 c-decl.c:7439
+#: c-decl.c:7340 c-decl.c:7461
#, gcc-internal-format
msgid "both %<unsigned%> and %<void%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7321 c-decl.c:7461
+#: c-decl.c:7343 c-decl.c:7483
#, gcc-internal-format
msgid "both %<unsigned%> and %<_Bool%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7324 c-decl.c:7503
+#: c-decl.c:7346 c-decl.c:7525
#, gcc-internal-format
msgid "both %<unsigned%> and %<float%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7327 c-decl.c:7522
+#: c-decl.c:7349 c-decl.c:7544
#, gcc-internal-format
msgid "both %<unsigned%> and %<double%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7330
+#: c-decl.c:7352
#, gcc-internal-format
msgid "both %<unsigned%> and %<_Decimal32%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7333
+#: c-decl.c:7355
#, gcc-internal-format
msgid "both %<unsigned%> and %<_Decimal64%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7336
+#: c-decl.c:7358
#, gcc-internal-format
msgid "both %<unsigned%> and %<_Decimal128%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7344
+#: c-decl.c:7366
#, gcc-internal-format
msgid "ISO C90 does not support complex types"
msgstr ""
-#: c-decl.c:7346 c-decl.c:7442
+#: c-decl.c:7368 c-decl.c:7464
#, gcc-internal-format
msgid "both %<complex%> and %<void%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7349 c-decl.c:7464
+#: c-decl.c:7371 c-decl.c:7486
#, gcc-internal-format
msgid "both %<complex%> and %<_Bool%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7352
+#: c-decl.c:7374
#, gcc-internal-format
msgid "both %<complex%> and %<_Decimal32%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7355
+#: c-decl.c:7377
#, gcc-internal-format
msgid "both %<complex%> and %<_Decimal64%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7358
+#: c-decl.c:7380
#, gcc-internal-format
msgid "both %<complex%> and %<_Decimal128%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7361
+#: c-decl.c:7383
#, gcc-internal-format
msgid "both %<complex%> and %<_Fract%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7364
+#: c-decl.c:7386
#, gcc-internal-format
msgid "both %<complex%> and %<_Accum%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7367
+#: c-decl.c:7389
#, gcc-internal-format
msgid "both %<complex%> and %<_Sat%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7374
+#: c-decl.c:7396
#, gcc-internal-format
msgid "ISO C does not support saturating types"
msgstr ""
-#: c-decl.c:7376 c-decl.c:7445
+#: c-decl.c:7398 c-decl.c:7467
#, gcc-internal-format
msgid "both %<_Sat%> and %<void%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7379 c-decl.c:7467
+#: c-decl.c:7401 c-decl.c:7489
#, gcc-internal-format
msgid "both %<_Sat%> and %<_Bool%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7382 c-decl.c:7480
+#: c-decl.c:7404 c-decl.c:7502
#, gcc-internal-format
msgid "both %<_Sat%> and %<char%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7385 c-decl.c:7487
+#: c-decl.c:7407 c-decl.c:7509
#, gcc-internal-format
msgid "both %<_Sat%> and %<int%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7388 c-decl.c:7506
+#: c-decl.c:7410 c-decl.c:7528
#, gcc-internal-format
msgid "both %<_Sat%> and %<float%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7391 c-decl.c:7525
+#: c-decl.c:7413 c-decl.c:7547
#, gcc-internal-format
msgid "both %<_Sat%> and %<double%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7394
+#: c-decl.c:7416
#, gcc-internal-format
msgid "both %<_Sat%> and %<_Decimal32%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7397
+#: c-decl.c:7419
#, gcc-internal-format
msgid "both %<_Sat%> and %<_Decimal64%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7400
+#: c-decl.c:7422
#, gcc-internal-format
msgid "both %<_Sat%> and %<_Decimal128%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7403
+#: c-decl.c:7425
#, gcc-internal-format
msgid "both %<_Sat%> and %<complex%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7542
+#: c-decl.c:7564
#, gcc-internal-format
msgid "both %<long long%> and %<%s%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7545
+#: c-decl.c:7567
#, gcc-internal-format
msgid "both %<long%> and %<%s%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7548
+#: c-decl.c:7570
#, gcc-internal-format
msgid "both %<short%> and %<%s%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7551
+#: c-decl.c:7573
#, gcc-internal-format
msgid "both %<signed%> and %<%s%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7554
+#: c-decl.c:7576
#, gcc-internal-format
msgid "both %<unsigned%> and %<%s%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7557 c-decl.c:7583
+#: c-decl.c:7579 c-decl.c:7605
#, gcc-internal-format
msgid "both %<complex%> and %<%s%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7560
+#: c-decl.c:7582
#, gcc-internal-format
msgid "both %<_Sat%> and %<%s%> in declaration specifiers"
msgstr ""
-#: c-decl.c:7570
+#: c-decl.c:7592
#, gcc-internal-format
msgid "decimal floating point not supported for this target"
msgstr ""
-#: c-decl.c:7572
+#: c-decl.c:7594
#, gcc-internal-format
msgid "ISO C does not support decimal floating point"
msgstr ""
-#: c-decl.c:7591
+#: c-decl.c:7613 c-decl.c:7792 c-parser.c:5101
#, gcc-internal-format
msgid "fixed-point types not supported for this target"
msgstr ""
-#: c-decl.c:7593
+#: c-decl.c:7615
#, gcc-internal-format
msgid "ISO C does not support fixed-point types"
msgstr ""
-#: c-decl.c:7627
+#: c-decl.c:7649
#, gcc-internal-format
msgid "%qE fails to be a typedef or built in type"
msgstr ""
-#: c-decl.c:7660
+#: c-decl.c:7682
#, gcc-internal-format
msgid "%qE is not at beginning of declaration"
msgstr ""
-#: c-decl.c:7674
+#: c-decl.c:7696
#, gcc-internal-format
msgid "%<__thread%> used with %<auto%>"
msgstr ""
-#: c-decl.c:7676
+#: c-decl.c:7698
#, gcc-internal-format
msgid "%<__thread%> used with %<register%>"
msgstr ""
-#: c-decl.c:7678
+#: c-decl.c:7700
#, gcc-internal-format
msgid "%<__thread%> used with %<typedef%>"
msgstr ""
-#: c-decl.c:7689
+#: c-decl.c:7711
#, gcc-internal-format
msgid "%<__thread%> before %<extern%>"
msgstr ""
-#: c-decl.c:7698
+#: c-decl.c:7720
#, gcc-internal-format
msgid "%<__thread%> before %<static%>"
msgstr ""
-#: c-decl.c:7714
+#: c-decl.c:7736
#, gcc-internal-format
msgid "multiple storage classes in declaration specifiers"
msgstr ""
-#: c-decl.c:7721
+#: c-decl.c:7743
#, gcc-internal-format
msgid "%<__thread%> used with %qE"
msgstr ""
-#: c-decl.c:7768
+#: c-decl.c:7790
#, gcc-internal-format
msgid "%<_Sat%> is used without %<_Fract%> or %<_Accum%>"
msgstr ""
-#: c-decl.c:7780
+#: c-decl.c:7804
#, gcc-internal-format
msgid "ISO C does not support plain %<complex%> meaning %<double complex%>"
msgstr ""
-#: c-decl.c:7825 c-decl.c:7851
+#: c-decl.c:7849 c-decl.c:7875
#, gcc-internal-format
msgid "ISO C does not support complex integer types"
msgstr ""
-#: c-decl.c:8001 toplev.c:836
+#: c-decl.c:8029 toplev.c:838
#, gcc-internal-format
msgid "%q+F used but never defined"
msgstr ""
@@ -20503,17 +20273,17 @@ msgstr ""
msgid "missing controlling predicate"
msgstr ""
-#: c-omp.c:331
+#: c-omp.c:348
#, gcc-internal-format
msgid "invalid controlling predicate"
msgstr ""
-#: c-omp.c:338
+#: c-omp.c:355
#, gcc-internal-format
msgid "missing increment expression"
msgstr ""
-#: c-omp.c:404
+#: c-omp.c:422
#, gcc-internal-format
msgid "invalid increment expression"
msgstr ""
@@ -20574,107 +20344,107 @@ msgid ""
"-fhandle-exceptions has been renamed -fexceptions (and is now on by default)"
msgstr ""
-#: c-opts.c:1025
+#: c-opts.c:1029
#, gcc-internal-format
msgid "-fno-gnu89-inline is only supported in GNU99 or C99 mode"
msgstr ""
-#: c-opts.c:1094
+#: c-opts.c:1103
#, gcc-internal-format
msgid "-Wformat-y2k ignored without -Wformat"
msgstr ""
-#: c-opts.c:1096
+#: c-opts.c:1105
#, gcc-internal-format
msgid "-Wformat-extra-args ignored without -Wformat"
msgstr ""
-#: c-opts.c:1098
+#: c-opts.c:1107
#, gcc-internal-format
msgid "-Wformat-zero-length ignored without -Wformat"
msgstr ""
-#: c-opts.c:1100
+#: c-opts.c:1109
#, gcc-internal-format
msgid "-Wformat-nonliteral ignored without -Wformat"
msgstr ""
-#: c-opts.c:1102
+#: c-opts.c:1111
#, gcc-internal-format
msgid "-Wformat-contains-nul ignored without -Wformat"
msgstr ""
-#: c-opts.c:1104
+#: c-opts.c:1113
#, gcc-internal-format
msgid "-Wformat-security ignored without -Wformat"
msgstr ""
-#: c-opts.c:1128
+#: c-opts.c:1137
#, gcc-internal-format
msgid "opening output file %s: %m"
msgstr ""
-#: c-opts.c:1133
+#: c-opts.c:1142
#, gcc-internal-format
msgid "too many filenames given. Type %s --help for usage"
msgstr ""
-#: c-opts.c:1217
+#: c-opts.c:1226
#, gcc-internal-format
msgid "The C parser does not support -dy, option ignored"
msgstr ""
-#: c-opts.c:1221
+#: c-opts.c:1230
#, gcc-internal-format
msgid "The Objective-C parser does not support -dy, option ignored"
msgstr ""
-#: c-opts.c:1224
+#: c-opts.c:1233
#, gcc-internal-format
msgid "The C++ parser does not support -dy, option ignored"
msgstr ""
-#: c-opts.c:1228
+#: c-opts.c:1237
#, gcc-internal-format
msgid "The Objective-C++ parser does not support -dy, option ignored"
msgstr ""
-#: c-opts.c:1278
+#: c-opts.c:1287
#, gcc-internal-format
msgid "opening dependency file %s: %m"
msgstr ""
-#: c-opts.c:1288
+#: c-opts.c:1297
#, gcc-internal-format
msgid "closing dependency file %s: %m"
msgstr ""
-#: c-opts.c:1291
+#: c-opts.c:1300
#, gcc-internal-format
msgid "when writing output to %s: %m"
msgstr ""
-#: c-opts.c:1371
+#: c-opts.c:1380
#, gcc-internal-format
msgid "to generate dependencies you must specify either -M or -MM"
msgstr ""
-#: c-opts.c:1394
+#: c-opts.c:1403
#, gcc-internal-format
msgid "-MG may only be used with -M or -MM"
msgstr ""
-#: c-opts.c:1423
+#: c-opts.c:1432
#, gcc-internal-format
msgid "-fdirectives-only is incompatible with -Wunused_macros"
msgstr ""
-#: c-opts.c:1425
+#: c-opts.c:1434
#, gcc-internal-format
msgid "-fdirectives-only is incompatible with -traditional"
msgstr ""
-#: c-opts.c:1563
+#: c-opts.c:1572
#, gcc-internal-format
msgid "too late for # directive to set debug directory"
msgstr ""
@@ -20689,12 +20459,12 @@ msgstr ""
msgid "ISO C forbids an empty translation unit"
msgstr ""
-#: c-parser.c:1056 c-parser.c:6085
+#: c-parser.c:1056 c-parser.c:6109
#, gcc-internal-format
msgid "ISO C does not allow extra %<;%> outside of a function"
msgstr ""
-#: c-parser.c:1158 c-parser.c:6643
+#: c-parser.c:1158 c-parser.c:6667
#, gcc-internal-format
msgid "expected declaration specifiers"
msgstr ""
@@ -20722,17 +20492,17 @@ msgstr ""
msgid "ISO C forbids nested functions"
msgstr ""
-#: c-parser.c:1641 c-parser.c:2454 c-parser.c:3091 c-parser.c:3343
-#: c-parser.c:4277 c-parser.c:4877 c-parser.c:5284 c-parser.c:5305
-#: c-parser.c:5422 c-parser.c:5574 c-parser.c:5591 c-parser.c:5727
-#: c-parser.c:5739 c-parser.c:5764 c-parser.c:5898 c-parser.c:5927
-#: c-parser.c:5935 c-parser.c:5963 c-parser.c:5977 c-parser.c:6193
-#: c-parser.c:6292 c-parser.c:6813 c-parser.c:7514
+#: c-parser.c:1641 c-parser.c:2454 c-parser.c:3094 c-parser.c:3352
+#: c-parser.c:4286 c-parser.c:4886 c-parser.c:5308 c-parser.c:5329
+#: c-parser.c:5446 c-parser.c:5598 c-parser.c:5615 c-parser.c:5751
+#: c-parser.c:5763 c-parser.c:5788 c-parser.c:5922 c-parser.c:5951
+#: c-parser.c:5959 c-parser.c:5987 c-parser.c:6001 c-parser.c:6217
+#: c-parser.c:6316 c-parser.c:6837 c-parser.c:7538
#, gcc-internal-format
msgid "expected identifier"
msgstr ""
-#: c-parser.c:1674 cp/parser.c:11882
+#: c-parser.c:1674 cp/parser.c:11972
#, gcc-internal-format
msgid "comma at end of enumerator list"
msgstr ""
@@ -20742,7 +20512,7 @@ msgstr ""
msgid "expected %<,%> or %<}%>"
msgstr ""
-#: c-parser.c:1694 c-parser.c:1877 c-parser.c:6052
+#: c-parser.c:1694 c-parser.c:1877 c-parser.c:6076
#, gcc-internal-format
msgid "expected %<{%>"
msgstr ""
@@ -20757,7 +20527,7 @@ msgstr ""
msgid "expected class name"
msgstr ""
-#: c-parser.c:1831 c-parser.c:5831
+#: c-parser.c:1831 c-parser.c:5855
#, gcc-internal-format
msgid "extra semicolon in struct or union specified"
msgstr ""
@@ -20772,7 +20542,7 @@ msgstr ""
msgid "expected %<;%>"
msgstr ""
-#: c-parser.c:1942 c-parser.c:2920
+#: c-parser.c:1942 c-parser.c:2922
#, gcc-internal-format
msgid "expected specifier-qualifier-list"
msgstr ""
@@ -20807,93 +20577,93 @@ msgstr ""
msgid "ISO C requires a named argument before %<...%>"
msgstr ""
-#: c-parser.c:2630
+#: c-parser.c:2632
#, gcc-internal-format
msgid "expected declaration specifiers or %<...%>"
msgstr ""
-#: c-parser.c:2681
+#: c-parser.c:2683
#, gcc-internal-format
msgid "wide string literal in %<asm%>"
msgstr ""
-#: c-parser.c:2687 c-parser.c:6698
+#: c-parser.c:2689 c-parser.c:6722
#, gcc-internal-format
msgid "expected string literal"
msgstr ""
-#: c-parser.c:3012
+#: c-parser.c:3014
#, gcc-internal-format
msgid "ISO C forbids empty initializer braces"
msgstr ""
-#: c-parser.c:3058
+#: c-parser.c:3061
#, gcc-internal-format
msgid "obsolete use of designated initializer with %<:%>"
msgstr ""
-#: c-parser.c:3188
+#: c-parser.c:3191
#, gcc-internal-format
msgid "ISO C forbids specifying range of elements to initialize"
msgstr ""
-#: c-parser.c:3201
+#: c-parser.c:3204
#, gcc-internal-format
msgid "ISO C90 forbids specifying subobject to initialize"
msgstr ""
-#: c-parser.c:3208
+#: c-parser.c:3211
#, gcc-internal-format
msgid "obsolete use of designated initializer without %<=%>"
msgstr ""
-#: c-parser.c:3214
+#: c-parser.c:3217
#, gcc-internal-format
msgid "expected %<=%>"
msgstr ""
-#: c-parser.c:3358
+#: c-parser.c:3367
#, gcc-internal-format
msgid "ISO C forbids label declarations"
msgstr ""
-#: c-parser.c:3363 c-parser.c:3439
+#: c-parser.c:3372 c-parser.c:3448
#, gcc-internal-format
msgid "expected declaration or statement"
msgstr ""
-#: c-parser.c:3393 c-parser.c:3421
+#: c-parser.c:3402 c-parser.c:3430
#, gcc-internal-format
msgid "ISO C90 forbids mixed declarations and code"
msgstr ""
-#: c-parser.c:3446
+#: c-parser.c:3455
#, gcc-internal-format
msgid "expected %<}%> before %<else%>"
msgstr ""
-#: c-parser.c:3451
+#: c-parser.c:3460
#, gcc-internal-format
msgid "%<else%> without a previous %<if%>"
msgstr ""
-#: c-parser.c:3467
+#: c-parser.c:3476
#, gcc-internal-format
msgid "label at end of compound statement"
msgstr ""
-#: c-parser.c:3510
+#: c-parser.c:3519
#, gcc-internal-format
msgid "expected %<:%> or %<...%>"
msgstr ""
-#: c-parser.c:3544
+#: c-parser.c:3553
#, gcc-internal-format
msgid ""
"a label can only be part of a statement and a declaration is not a statement"
msgstr ""
-#: c-parser.c:3706
+#: c-parser.c:3715
#, gcc-internal-format
msgid "expected identifier or %<*%>"
msgstr ""
@@ -20902,224 +20672,224 @@ msgstr ""
#. c_parser_skip_until_found stops at a closing nesting
#. delimiter without consuming it, but here we need to consume
#. it to proceed further.
-#: c-parser.c:3768
+#: c-parser.c:3777
#, gcc-internal-format
msgid "expected statement"
msgstr ""
-#: c-parser.c:3863 cp/parser.c:7228
+#: c-parser.c:3872 cp/parser.c:7296
#, gcc-internal-format
msgid "suggest braces around empty body in an %<if%> statement"
msgstr ""
-#: c-parser.c:3889 cp/parser.c:7249
+#: c-parser.c:3898 cp/parser.c:7317
#, gcc-internal-format
msgid "suggest braces around empty body in an %<else%> statement"
msgstr ""
-#: c-parser.c:4009
+#: c-parser.c:4018
#, gcc-internal-format
msgid "suggest braces around empty body in %<do%> statement"
msgstr ""
-#: c-parser.c:4162
+#: c-parser.c:4171
#, gcc-internal-format
msgid "%E qualifier ignored on asm"
msgstr ""
-#: c-parser.c:4450
+#: c-parser.c:4459
#, gcc-internal-format
msgid "ISO C forbids omitting the middle term of a ?: expression"
msgstr ""
-#: c-parser.c:4846
+#: c-parser.c:4855
#, gcc-internal-format
msgid "traditional C rejects the unary plus operator"
msgstr ""
-#: c-parser.c:4970
+#: c-parser.c:4972
#, gcc-internal-format
msgid "%<sizeof%> applied to a bit-field"
msgstr ""
-#: c-parser.c:5118 c-parser.c:5464 c-parser.c:5486
+#: c-parser.c:5131 c-parser.c:5488 c-parser.c:5510
#, gcc-internal-format
msgid "expected expression"
msgstr ""
-#: c-parser.c:5145
+#: c-parser.c:5158
#, gcc-internal-format
msgid "braced-group within expression allowed only inside a function"
msgstr ""
-#: c-parser.c:5159
+#: c-parser.c:5172
#, gcc-internal-format
msgid "ISO C forbids braced-groups within expressions"
msgstr ""
-#: c-parser.c:5346
+#: c-parser.c:5370
#, gcc-internal-format
msgid "first argument to %<__builtin_choose_expr%> not a constant"
msgstr ""
-#: c-parser.c:5515
+#: c-parser.c:5539
#, gcc-internal-format
msgid "compound literal has variable size"
msgstr ""
-#: c-parser.c:5523
+#: c-parser.c:5547
#, gcc-internal-format
msgid "ISO C90 forbids compound literals"
msgstr ""
-#: c-parser.c:6048
+#: c-parser.c:6072
#, gcc-internal-format
msgid "extra semicolon in method definition specified"
msgstr ""
-#: c-parser.c:6592
+#: c-parser.c:6616
#, gcc-internal-format
msgid "%<#pragma omp barrier%> may only be used in compound statements"
msgstr ""
-#: c-parser.c:6603
+#: c-parser.c:6627
#, gcc-internal-format
msgid "%<#pragma omp flush%> may only be used in compound statements"
msgstr ""
-#: c-parser.c:6614
+#: c-parser.c:6638
#, gcc-internal-format
msgid "%<#pragma omp taskwait%> may only be used in compound statements"
msgstr ""
-#: c-parser.c:6627
+#: c-parser.c:6651
#, gcc-internal-format
msgid ""
"%<#pragma omp section%> may only be used in %<#pragma omp sections%> "
"construct"
msgstr ""
-#: c-parser.c:6633
+#: c-parser.c:6657
#, gcc-internal-format
msgid "%<#pragma GCC pch_preprocess%> must be first"
msgstr ""
-#: c-parser.c:6791
+#: c-parser.c:6815
#, gcc-internal-format
msgid "too many %qs clauses"
msgstr ""
-#: c-parser.c:6887
+#: c-parser.c:6911
#, gcc-internal-format
msgid "collapse argument needs positive constant integer expression"
msgstr ""
-#: c-parser.c:6952
+#: c-parser.c:6976
#, gcc-internal-format
msgid "expected %<none%> or %<shared%>"
msgstr ""
-#: c-parser.c:6995
+#: c-parser.c:7019
#, gcc-internal-format
msgid "expected %<(%>"
msgstr ""
-#: c-parser.c:7039 c-parser.c:7223
+#: c-parser.c:7063 c-parser.c:7247
#, gcc-internal-format
msgid "expected integer expression"
msgstr ""
-#: c-parser.c:7049
+#: c-parser.c:7073
#, gcc-internal-format
msgid "%<num_threads%> value must be positive"
msgstr ""
-#: c-parser.c:7129
+#: c-parser.c:7153
#, gcc-internal-format
msgid "expected %<+%>, %<*%>, %<-%>, %<&%>, %<^%>, %<|%>, %<&&%>, or %<||%>"
msgstr ""
-#: c-parser.c:7214
+#: c-parser.c:7238
#, gcc-internal-format
msgid "schedule %<runtime%> does not take a %<chunk_size%> parameter"
msgstr ""
-#: c-parser.c:7218
+#: c-parser.c:7242
#, gcc-internal-format
msgid "schedule %<auto%> does not take a %<chunk_size%> parameter"
msgstr ""
-#: c-parser.c:7236
+#: c-parser.c:7260
#, gcc-internal-format
msgid "invalid schedule kind"
msgstr ""
-#: c-parser.c:7354
+#: c-parser.c:7378
#, gcc-internal-format
msgid "expected %<#pragma omp%> clause"
msgstr ""
-#: c-parser.c:7363
+#: c-parser.c:7387
#, gcc-internal-format
msgid "%qs is not valid for %qs"
msgstr ""
-#: c-parser.c:7464
+#: c-parser.c:7488
#, gcc-internal-format
msgid "invalid operator for %<#pragma omp atomic%>"
msgstr ""
-#: c-parser.c:7517 c-parser.c:7537
+#: c-parser.c:7541 c-parser.c:7561
#, gcc-internal-format
msgid "expected %<(%> or end of line"
msgstr ""
-#: c-parser.c:7569
+#: c-parser.c:7593
#, gcc-internal-format
msgid "for statement expected"
msgstr ""
-#: c-parser.c:7619
+#: c-parser.c:7643
#, gcc-internal-format
msgid "expected iteration declaration or initialization"
msgstr ""
-#: c-parser.c:7684
+#: c-parser.c:7722
#, gcc-internal-format
msgid "not enough perfectly nested loops"
msgstr ""
-#: c-parser.c:7732
+#: c-parser.c:7770
#, gcc-internal-format
msgid "collapsed loops not perfectly nested"
msgstr ""
-#: c-parser.c:7769 cp/pt.c:10362
+#: c-parser.c:7807 cp/pt.c:10533
#, gcc-internal-format
msgid "iteration variable %qD should not be firstprivate"
msgstr ""
-#: c-parser.c:7919
+#: c-parser.c:7957
#, gcc-internal-format
msgid "expected %<#pragma omp section%> or %<}%>"
msgstr ""
-#: c-parser.c:8189
+#: c-parser.c:8227
#, gcc-internal-format
msgid "%qD is not a variable"
msgstr ""
-#: c-parser.c:8191 cp/semantics.c:3787
+#: c-parser.c:8229 cp/semantics.c:3802
#, gcc-internal-format
msgid "%qE declared %<threadprivate%> after first use"
msgstr ""
-#: c-parser.c:8193 cp/semantics.c:3789
+#: c-parser.c:8231 cp/semantics.c:3804
#, gcc-internal-format
msgid "automatic variable %qE cannot be %<threadprivate%>"
msgstr ""
-#: c-parser.c:8197 cp/semantics.c:3791
+#: c-parser.c:8235 cp/semantics.c:3806
#, gcc-internal-format
msgid "%<threadprivate%> %qE has incomplete type"
msgstr ""
@@ -21500,7 +21270,7 @@ msgstr ""
msgid "%qD has an incomplete type"
msgstr ""
-#: c-typeck.c:194 cp/call.c:2914
+#: c-typeck.c:194 cp/call.c:2920
#, gcc-internal-format
msgid "invalid use of void expression"
msgstr ""
@@ -21526,97 +21296,97 @@ msgstr ""
msgid "invalid use of incomplete typedef %qD"
msgstr ""
-#: c-typeck.c:473 c-typeck.c:498
+#: c-typeck.c:486 c-typeck.c:511
#, gcc-internal-format
msgid "function types not truly compatible in ISO C"
msgstr ""
-#: c-typeck.c:626
+#: c-typeck.c:639
#, gcc-internal-format
msgid "can%'t mix operands of decimal float and vector types"
msgstr ""
-#: c-typeck.c:631
+#: c-typeck.c:644
#, gcc-internal-format
msgid "can%'t mix operands of decimal float and complex types"
msgstr ""
-#: c-typeck.c:636
+#: c-typeck.c:649
#, gcc-internal-format
msgid "can%'t mix operands of decimal float and other float types"
msgstr ""
-#: c-typeck.c:1042
+#: c-typeck.c:1055
#, gcc-internal-format
msgid "types are not quite compatible"
msgstr ""
-#: c-typeck.c:1365
+#: c-typeck.c:1378
#, gcc-internal-format
msgid "function return types not compatible due to %<volatile%>"
msgstr ""
-#: c-typeck.c:1524 c-typeck.c:2887
+#: c-typeck.c:1537 c-typeck.c:2905
#, gcc-internal-format
msgid "arithmetic on pointer to an incomplete type"
msgstr ""
-#: c-typeck.c:1920
+#: c-typeck.c:1933
#, gcc-internal-format
msgid "%qT has no member named %qE"
msgstr ""
-#: c-typeck.c:1961
+#: c-typeck.c:1974
#, gcc-internal-format
msgid "request for member %qE in something not a structure or union"
msgstr ""
-#: c-typeck.c:2010
+#: c-typeck.c:2023
#, gcc-internal-format
msgid "dereferencing pointer to incomplete type"
msgstr ""
-#: c-typeck.c:2014
+#: c-typeck.c:2027
#, gcc-internal-format
msgid "dereferencing %<void *%> pointer"
msgstr ""
-#: c-typeck.c:2033
+#: c-typeck.c:2046
#, gcc-internal-format
msgid "invalid type argument of %qs (have %qT)"
msgstr ""
-#: c-typeck.c:2064 cp/typeck.c:2669
+#: c-typeck.c:2077 cp/typeck.c:2697
#, gcc-internal-format
msgid "subscripted value is neither array nor pointer"
msgstr ""
-#: c-typeck.c:2075 cp/typeck.c:2584 cp/typeck.c:2674
+#: c-typeck.c:2088 cp/typeck.c:2612 cp/typeck.c:2702
#, gcc-internal-format
msgid "array subscript is not an integer"
msgstr ""
-#: c-typeck.c:2081
+#: c-typeck.c:2094
#, gcc-internal-format
msgid "subscripted value is pointer to function"
msgstr ""
-#: c-typeck.c:2129
+#: c-typeck.c:2142
#, gcc-internal-format
msgid "ISO C forbids subscripting %<register%> array"
msgstr ""
-#: c-typeck.c:2132
+#: c-typeck.c:2145
#, gcc-internal-format
msgid "ISO C90 forbids subscripting non-lvalue array"
msgstr ""
-#: c-typeck.c:2249
+#: c-typeck.c:2262
#, gcc-internal-format
msgid "%qD is static but used in inline function %qD which is not static"
msgstr ""
-#: c-typeck.c:2397
+#: c-typeck.c:2410
#, gcc-internal-format
msgid "called object %qE is not a function"
msgstr ""
@@ -21624,342 +21394,342 @@ msgstr ""
#. This situation leads to run-time undefined behavior. We can't,
#. therefore, simply error unless we can prove that all possible
#. executions of the program must execute the code.
-#: c-typeck.c:2424
+#: c-typeck.c:2448
#, gcc-internal-format
msgid "function called through a non-compatible type"
msgstr ""
-#: c-typeck.c:2561
+#: c-typeck.c:2579
#, gcc-internal-format
msgid "type of formal parameter %d is incomplete"
msgstr ""
-#: c-typeck.c:2574
+#: c-typeck.c:2592
#, gcc-internal-format
msgid ""
"passing argument %d of %qE as integer rather than floating due to prototype"
msgstr ""
-#: c-typeck.c:2579
+#: c-typeck.c:2597
#, gcc-internal-format
msgid ""
"passing argument %d of %qE as integer rather than complex due to prototype"
msgstr ""
-#: c-typeck.c:2584
+#: c-typeck.c:2602
#, gcc-internal-format
msgid ""
"passing argument %d of %qE as complex rather than floating due to prototype"
msgstr ""
-#: c-typeck.c:2589
+#: c-typeck.c:2607
#, gcc-internal-format
msgid ""
"passing argument %d of %qE as floating rather than integer due to prototype"
msgstr ""
-#: c-typeck.c:2594
+#: c-typeck.c:2612
#, gcc-internal-format
msgid ""
"passing argument %d of %qE as complex rather than integer due to prototype"
msgstr ""
-#: c-typeck.c:2599
+#: c-typeck.c:2617
#, gcc-internal-format
msgid ""
"passing argument %d of %qE as floating rather than complex due to prototype"
msgstr ""
-#: c-typeck.c:2612
+#: c-typeck.c:2630
#, gcc-internal-format
msgid ""
"passing argument %d of %qE as %<float%> rather than %<double%> due to "
"prototype"
msgstr ""
-#: c-typeck.c:2637
+#: c-typeck.c:2655
#, gcc-internal-format
msgid "passing argument %d of %qE as %qT rather than %qT due to prototype"
msgstr ""
-#: c-typeck.c:2658
+#: c-typeck.c:2676
#, gcc-internal-format
msgid "passing argument %d of %qE with different width due to prototype"
msgstr ""
-#: c-typeck.c:2681
+#: c-typeck.c:2699
#, gcc-internal-format
msgid "passing argument %d of %qE as unsigned due to prototype"
msgstr ""
-#: c-typeck.c:2685
+#: c-typeck.c:2703
#, gcc-internal-format
msgid "passing argument %d of %qE as signed due to prototype"
msgstr ""
-#: c-typeck.c:2800 c-typeck.c:2804
+#: c-typeck.c:2818 c-typeck.c:2822
#, gcc-internal-format
msgid "comparison with string literal results in unspecified behavior"
msgstr ""
-#: c-typeck.c:2828
+#: c-typeck.c:2846
#, gcc-internal-format
msgid "pointer of type %<void *%> used in subtraction"
msgstr ""
-#: c-typeck.c:2831
+#: c-typeck.c:2849
#, gcc-internal-format
msgid "pointer to a function used in subtraction"
msgstr ""
-#: c-typeck.c:2946
+#: c-typeck.c:2964
#, gcc-internal-format
msgid "wrong type argument to unary plus"
msgstr ""
-#: c-typeck.c:2959
+#: c-typeck.c:2977
#, gcc-internal-format
msgid "wrong type argument to unary minus"
msgstr ""
-#: c-typeck.c:2979
+#: c-typeck.c:2997
#, gcc-internal-format
msgid "ISO C does not support %<~%> for complex conjugation"
msgstr ""
-#: c-typeck.c:2985
+#: c-typeck.c:3003
#, gcc-internal-format
msgid "wrong type argument to bit-complement"
msgstr ""
-#: c-typeck.c:2993
+#: c-typeck.c:3011
#, gcc-internal-format
msgid "wrong type argument to abs"
msgstr ""
-#: c-typeck.c:3005
+#: c-typeck.c:3023
#, gcc-internal-format
msgid "wrong type argument to conjugation"
msgstr ""
-#: c-typeck.c:3018
+#: c-typeck.c:3036
#, gcc-internal-format
msgid "wrong type argument to unary exclamation mark"
msgstr ""
-#: c-typeck.c:3055
+#: c-typeck.c:3073
#, gcc-internal-format
msgid "ISO C does not support %<++%> and %<--%> on complex types"
msgstr ""
-#: c-typeck.c:3074 c-typeck.c:3106
+#: c-typeck.c:3092 c-typeck.c:3124
#, gcc-internal-format
msgid "wrong type argument to increment"
msgstr ""
-#: c-typeck.c:3076 c-typeck.c:3109
+#: c-typeck.c:3094 c-typeck.c:3127
#, gcc-internal-format
msgid "wrong type argument to decrement"
msgstr ""
-#: c-typeck.c:3096
+#: c-typeck.c:3114
#, gcc-internal-format
msgid "increment of pointer to unknown structure"
msgstr ""
-#: c-typeck.c:3099
+#: c-typeck.c:3117
#, gcc-internal-format
msgid "decrement of pointer to unknown structure"
msgstr ""
-#: c-typeck.c:3308
+#: c-typeck.c:3326
#, gcc-internal-format
msgid "assignment of read-only member %qD"
msgstr ""
-#: c-typeck.c:3309
+#: c-typeck.c:3327
#, gcc-internal-format
msgid "increment of read-only member %qD"
msgstr ""
-#: c-typeck.c:3310
+#: c-typeck.c:3328
#, gcc-internal-format
msgid "decrement of read-only member %qD"
msgstr ""
-#: c-typeck.c:3311
+#: c-typeck.c:3329
#, gcc-internal-format
msgid "read-only member %qD used as %<asm%> output"
msgstr ""
-#: c-typeck.c:3315
+#: c-typeck.c:3333
#, gcc-internal-format
msgid "assignment of read-only variable %qD"
msgstr ""
-#: c-typeck.c:3316
+#: c-typeck.c:3334
#, gcc-internal-format
msgid "increment of read-only variable %qD"
msgstr ""
-#: c-typeck.c:3317
+#: c-typeck.c:3335
#, gcc-internal-format
msgid "decrement of read-only variable %qD"
msgstr ""
-#: c-typeck.c:3318
+#: c-typeck.c:3336
#, gcc-internal-format
msgid "read-only variable %qD used as %<asm%> output"
msgstr ""
-#: c-typeck.c:3321
+#: c-typeck.c:3339
#, gcc-internal-format
msgid "assignment of read-only location %qE"
msgstr ""
-#: c-typeck.c:3322
+#: c-typeck.c:3340
#, gcc-internal-format
msgid "increment of read-only location %qE"
msgstr ""
-#: c-typeck.c:3323
+#: c-typeck.c:3341
#, gcc-internal-format
msgid "decrement of read-only location %qE"
msgstr ""
-#: c-typeck.c:3324
+#: c-typeck.c:3342
#, gcc-internal-format
msgid "read-only location %qE used as %<asm%> output"
msgstr ""
-#: c-typeck.c:3360
+#: c-typeck.c:3378
#, gcc-internal-format
msgid "cannot take address of bit-field %qD"
msgstr ""
-#: c-typeck.c:3388
+#: c-typeck.c:3406
#, gcc-internal-format
msgid "global register variable %qD used in nested function"
msgstr ""
-#: c-typeck.c:3391
+#: c-typeck.c:3409
#, gcc-internal-format
msgid "register variable %qD used in nested function"
msgstr ""
-#: c-typeck.c:3396
+#: c-typeck.c:3414
#, gcc-internal-format
msgid "address of global register variable %qD requested"
msgstr ""
-#: c-typeck.c:3398
+#: c-typeck.c:3416
#, gcc-internal-format
msgid "address of register variable %qD requested"
msgstr ""
-#: c-typeck.c:3444
+#: c-typeck.c:3462
#, gcc-internal-format
msgid "non-lvalue array in conditional expression"
msgstr ""
-#: c-typeck.c:3492
+#: c-typeck.c:3510
#, gcc-internal-format
msgid "signed and unsigned type in conditional expression"
msgstr ""
-#: c-typeck.c:3500
+#: c-typeck.c:3518
#, gcc-internal-format
msgid "ISO C forbids conditional expr with only one void side"
msgstr ""
-#: c-typeck.c:3515 c-typeck.c:3524
+#: c-typeck.c:3533 c-typeck.c:3542
#, gcc-internal-format
msgid "ISO C forbids conditional expr between %<void *%> and function pointer"
msgstr ""
-#: c-typeck.c:3532
+#: c-typeck.c:3550
#, gcc-internal-format
msgid "pointer type mismatch in conditional expression"
msgstr ""
-#: c-typeck.c:3540 c-typeck.c:3551
+#: c-typeck.c:3558 c-typeck.c:3569
#, gcc-internal-format
msgid "pointer/integer type mismatch in conditional expression"
msgstr ""
-#: c-typeck.c:3565
+#: c-typeck.c:3583
#, gcc-internal-format
msgid "type mismatch in conditional expression"
msgstr ""
-#: c-typeck.c:3606
+#: c-typeck.c:3624
#, gcc-internal-format
msgid "left-hand operand of comma expression has no effect"
msgstr ""
-#: c-typeck.c:3643
+#: c-typeck.c:3661
#, gcc-internal-format
msgid "cast specifies array type"
msgstr ""
-#: c-typeck.c:3649
+#: c-typeck.c:3667
#, gcc-internal-format
msgid "cast specifies function type"
msgstr ""
-#: c-typeck.c:3665
+#: c-typeck.c:3683
#, gcc-internal-format
msgid "ISO C forbids casting nonscalar to the same type"
msgstr ""
-#: c-typeck.c:3682
+#: c-typeck.c:3700
#, gcc-internal-format
msgid "ISO C forbids casts to union type"
msgstr ""
-#: c-typeck.c:3689
+#: c-typeck.c:3707
#, gcc-internal-format
msgid "cast to union type from type not present in union"
msgstr ""
-#: c-typeck.c:3735
+#: c-typeck.c:3753
#, gcc-internal-format
msgid "cast adds new qualifiers to function type"
msgstr ""
#. There are qualifiers present in IN_OTYPE that are not
#. present in IN_TYPE.
-#: c-typeck.c:3740
+#: c-typeck.c:3758
#, gcc-internal-format
msgid "cast discards qualifiers from pointer target type"
msgstr ""
-#: c-typeck.c:3756
+#: c-typeck.c:3774
#, gcc-internal-format
msgid "cast increases required alignment of target type"
msgstr ""
-#: c-typeck.c:3767
+#: c-typeck.c:3785
#, gcc-internal-format
msgid "cast from pointer to integer of different size"
msgstr ""
-#: c-typeck.c:3771
+#: c-typeck.c:3789
#, gcc-internal-format
msgid "cast from function call of type %qT to non-matching type %qT"
msgstr ""
-#: c-typeck.c:3779
+#: c-typeck.c:3797
#, gcc-internal-format
msgid "cast to pointer from integer of different size"
msgstr ""
-#: c-typeck.c:3793
+#: c-typeck.c:3811
#, gcc-internal-format
msgid "ISO C forbids conversion of function pointer to object pointer type"
msgstr ""
-#: c-typeck.c:3802
+#: c-typeck.c:3820
#, gcc-internal-format
msgid "ISO C forbids conversion of object pointer to function pointer type"
msgstr ""
@@ -21967,478 +21737,478 @@ msgstr ""
#. This macro is used to emit diagnostics to ensure that all format
#. strings are complete sentences, visible to gettext and checked at
#. compile time.
-#: c-typeck.c:4013 c-typeck.c:4446
+#: c-typeck.c:4031 c-typeck.c:4464
#, gcc-internal-format
msgid "expected %qT but argument is of type %qT"
msgstr ""
-#: c-typeck.c:4092
+#: c-typeck.c:4110
#, gcc-internal-format
msgid "cannot pass rvalue to reference parameter"
msgstr ""
-#: c-typeck.c:4206 c-typeck.c:4375
+#: c-typeck.c:4224 c-typeck.c:4393
#, gcc-internal-format
msgid ""
"passing argument %d of %qE makes qualified function pointer from unqualified"
msgstr ""
-#: c-typeck.c:4209 c-typeck.c:4378
+#: c-typeck.c:4227 c-typeck.c:4396
#, gcc-internal-format
msgid "assignment makes qualified function pointer from unqualified"
msgstr ""
-#: c-typeck.c:4212 c-typeck.c:4380
+#: c-typeck.c:4230 c-typeck.c:4398
#, gcc-internal-format
msgid "initialization makes qualified function pointer from unqualified"
msgstr ""
-#: c-typeck.c:4215 c-typeck.c:4382
+#: c-typeck.c:4233 c-typeck.c:4400
#, gcc-internal-format
msgid "return makes qualified function pointer from unqualified"
msgstr ""
-#: c-typeck.c:4220 c-typeck.c:4340
+#: c-typeck.c:4238 c-typeck.c:4358
#, gcc-internal-format
msgid "passing argument %d of %qE discards qualifiers from pointer target type"
msgstr ""
-#: c-typeck.c:4222 c-typeck.c:4342
+#: c-typeck.c:4240 c-typeck.c:4360
#, gcc-internal-format
msgid "assignment discards qualifiers from pointer target type"
msgstr ""
-#: c-typeck.c:4224 c-typeck.c:4344
+#: c-typeck.c:4242 c-typeck.c:4362
#, gcc-internal-format
msgid "initialization discards qualifiers from pointer target type"
msgstr ""
-#: c-typeck.c:4226 c-typeck.c:4346
+#: c-typeck.c:4244 c-typeck.c:4364
#, gcc-internal-format
msgid "return discards qualifiers from pointer target type"
msgstr ""
-#: c-typeck.c:4234
+#: c-typeck.c:4252
#, gcc-internal-format
msgid "ISO C prohibits argument conversion to union type"
msgstr ""
-#: c-typeck.c:4267
+#: c-typeck.c:4285
#, gcc-internal-format
msgid "request for implicit conversion from %qT to %qT not permitted in C++"
msgstr ""
-#: c-typeck.c:4279
+#: c-typeck.c:4297
#, gcc-internal-format
msgid "argument %d of %qE might be a candidate for a format attribute"
msgstr ""
-#: c-typeck.c:4285
+#: c-typeck.c:4303
#, gcc-internal-format
msgid "assignment left-hand side might be a candidate for a format attribute"
msgstr ""
-#: c-typeck.c:4290
+#: c-typeck.c:4308
#, gcc-internal-format
msgid ""
"initialization left-hand side might be a candidate for a format attribute"
msgstr ""
-#: c-typeck.c:4295
+#: c-typeck.c:4313
#, gcc-internal-format
msgid "return type might be a candidate for a format attribute"
msgstr ""
-#: c-typeck.c:4319
+#: c-typeck.c:4337
#, gcc-internal-format
msgid ""
"ISO C forbids passing argument %d of %qE between function pointer and %<void "
"*%>"
msgstr ""
-#: c-typeck.c:4322
+#: c-typeck.c:4340
#, gcc-internal-format
msgid "ISO C forbids assignment between function pointer and %<void *%>"
msgstr ""
-#: c-typeck.c:4324
+#: c-typeck.c:4342
#, gcc-internal-format
msgid "ISO C forbids initialization between function pointer and %<void *%>"
msgstr ""
-#: c-typeck.c:4326
+#: c-typeck.c:4344
#, gcc-internal-format
msgid "ISO C forbids return between function pointer and %<void *%>"
msgstr ""
-#: c-typeck.c:4357
+#: c-typeck.c:4375
#, gcc-internal-format
msgid "pointer targets in passing argument %d of %qE differ in signedness"
msgstr ""
-#: c-typeck.c:4359
+#: c-typeck.c:4377
#, gcc-internal-format
msgid "pointer targets in assignment differ in signedness"
msgstr ""
-#: c-typeck.c:4361
+#: c-typeck.c:4379
#, gcc-internal-format
msgid "pointer targets in initialization differ in signedness"
msgstr ""
-#: c-typeck.c:4363
+#: c-typeck.c:4381
#, gcc-internal-format
msgid "pointer targets in return differ in signedness"
msgstr ""
-#: c-typeck.c:4390
+#: c-typeck.c:4408
#, gcc-internal-format
msgid "passing argument %d of %qE from incompatible pointer type"
msgstr ""
-#: c-typeck.c:4392
+#: c-typeck.c:4410
#, gcc-internal-format
msgid "assignment from incompatible pointer type"
msgstr ""
-#: c-typeck.c:4393
+#: c-typeck.c:4411
#, gcc-internal-format
msgid "initialization from incompatible pointer type"
msgstr ""
-#: c-typeck.c:4395
+#: c-typeck.c:4413
#, gcc-internal-format
msgid "return from incompatible pointer type"
msgstr ""
-#: c-typeck.c:4413
+#: c-typeck.c:4431
#, gcc-internal-format
msgid "passing argument %d of %qE makes pointer from integer without a cast"
msgstr ""
-#: c-typeck.c:4415
+#: c-typeck.c:4433
#, gcc-internal-format
msgid "assignment makes pointer from integer without a cast"
msgstr ""
-#: c-typeck.c:4417
+#: c-typeck.c:4435
#, gcc-internal-format
msgid "initialization makes pointer from integer without a cast"
msgstr ""
-#: c-typeck.c:4419
+#: c-typeck.c:4437
#, gcc-internal-format
msgid "return makes pointer from integer without a cast"
msgstr ""
-#: c-typeck.c:4427
+#: c-typeck.c:4445
#, gcc-internal-format
msgid "passing argument %d of %qE makes integer from pointer without a cast"
msgstr ""
-#: c-typeck.c:4429
+#: c-typeck.c:4447
#, gcc-internal-format
msgid "assignment makes integer from pointer without a cast"
msgstr ""
-#: c-typeck.c:4431
+#: c-typeck.c:4449
#, gcc-internal-format
msgid "initialization makes integer from pointer without a cast"
msgstr ""
-#: c-typeck.c:4433
+#: c-typeck.c:4451
#, gcc-internal-format
msgid "return makes integer from pointer without a cast"
msgstr ""
-#: c-typeck.c:4449
+#: c-typeck.c:4467
#, gcc-internal-format
msgid "incompatible types when assigning to type %qT from type %qT"
msgstr ""
-#: c-typeck.c:4453
+#: c-typeck.c:4471
#, gcc-internal-format
msgid "incompatible types when initializing type %qT using type %qT"
msgstr ""
-#: c-typeck.c:4457
+#: c-typeck.c:4475
#, gcc-internal-format
msgid "incompatible types when returning type %qT but %qT was expected"
msgstr ""
-#: c-typeck.c:4514
+#: c-typeck.c:4532
#, gcc-internal-format
msgid "traditional C rejects automatic aggregate initialization"
msgstr ""
-#: c-typeck.c:4685 c-typeck.c:4701 c-typeck.c:4718
+#: c-typeck.c:4703 c-typeck.c:4719 c-typeck.c:4736
#, gcc-internal-format
msgid "(near initialization for %qs)"
msgstr ""
-#: c-typeck.c:5273 cp/decl.c:5124
+#: c-typeck.c:5291 cp/decl.c:5158
#, gcc-internal-format
msgid "opaque vector types cannot be initialized"
msgstr ""
-#: c-typeck.c:5898
+#: c-typeck.c:5916
#, gcc-internal-format
msgid "unknown field %qE specified in initializer"
msgstr ""
-#: c-typeck.c:6793
+#: c-typeck.c:6836
#, gcc-internal-format
msgid "traditional C rejects initialization of unions"
msgstr ""
-#: c-typeck.c:7104
+#: c-typeck.c:7147
#, gcc-internal-format
msgid "jump into statement expression"
msgstr ""
-#: c-typeck.c:7110
+#: c-typeck.c:7153
#, gcc-internal-format
msgid "jump into scope of identifier with variably modified type"
msgstr ""
-#: c-typeck.c:7146
+#: c-typeck.c:7189
#, gcc-internal-format
msgid "ISO C forbids %<goto *expr;%>"
msgstr ""
-#: c-typeck.c:7161 cp/typeck.c:6757
+#: c-typeck.c:7204 cp/typeck.c:6820
#, gcc-internal-format
msgid "function declared %<noreturn%> has a %<return%> statement"
msgstr ""
-#: c-typeck.c:7170
+#: c-typeck.c:7213
#, gcc-internal-format
msgid "%<return%> with no value, in function returning non-void"
msgstr ""
-#: c-typeck.c:7180
+#: c-typeck.c:7223
#, gcc-internal-format
msgid "%<return%> with a value, in function returning void"
msgstr ""
-#: c-typeck.c:7182
+#: c-typeck.c:7225
#, gcc-internal-format
msgid "ISO C forbids %<return%> with expression, in function returning void"
msgstr ""
-#: c-typeck.c:7239
+#: c-typeck.c:7284
#, gcc-internal-format
msgid "function returns address of local variable"
msgstr ""
-#: c-typeck.c:7314 cp/semantics.c:949
+#: c-typeck.c:7359 cp/semantics.c:952
#, gcc-internal-format
msgid "switch quantity not an integer"
msgstr ""
-#: c-typeck.c:7326
+#: c-typeck.c:7371
#, gcc-internal-format
msgid "%<long%> switch expression not converted to %<int%> in ISO C"
msgstr ""
-#: c-typeck.c:7369
+#: c-typeck.c:7414
#, gcc-internal-format
msgid ""
"case label in statement expression not containing enclosing switch statement"
msgstr ""
-#: c-typeck.c:7372
+#: c-typeck.c:7417
#, gcc-internal-format
msgid ""
"%<default%> label in statement expression not containing enclosing switch "
"statement"
msgstr ""
-#: c-typeck.c:7378
+#: c-typeck.c:7423
#, gcc-internal-format
msgid ""
"case label in scope of identifier with variably modified type not containing "
"enclosing switch statement"
msgstr ""
-#: c-typeck.c:7381
+#: c-typeck.c:7426
#, gcc-internal-format
msgid ""
"%<default%> label in scope of identifier with variably modified type not "
"containing enclosing switch statement"
msgstr ""
-#: c-typeck.c:7385
+#: c-typeck.c:7430
#, gcc-internal-format
msgid "case label not within a switch statement"
msgstr ""
-#: c-typeck.c:7387
+#: c-typeck.c:7432
#, gcc-internal-format
msgid "%<default%> label not within a switch statement"
msgstr ""
-#: c-typeck.c:7464
+#: c-typeck.c:7509
#, gcc-internal-format
msgid "%Hsuggest explicit braces to avoid ambiguous %<else%>"
msgstr ""
-#: c-typeck.c:7573 cp/cp-gimplify.c:92
+#: c-typeck.c:7618 cp/cp-gimplify.c:92
#, gcc-internal-format
msgid "break statement not within loop or switch"
msgstr ""
-#: c-typeck.c:7575
+#: c-typeck.c:7620
#, gcc-internal-format
msgid "continue statement not within a loop"
msgstr ""
-#: c-typeck.c:7580
+#: c-typeck.c:7625
#, gcc-internal-format
msgid "break statement used with OpenMP for loop"
msgstr ""
-#: c-typeck.c:7606
+#: c-typeck.c:7651
#, gcc-internal-format
msgid "%Hstatement with no effect"
msgstr ""
-#: c-typeck.c:7628
+#: c-typeck.c:7673
#, gcc-internal-format
msgid "expression statement has incomplete type"
msgstr ""
-#: c-typeck.c:8200 cp/typeck.c:3446
+#: c-typeck.c:8245 cp/typeck.c:3506
#, gcc-internal-format
msgid "right shift count is negative"
msgstr ""
-#: c-typeck.c:8207 cp/typeck.c:3452
+#: c-typeck.c:8252 cp/typeck.c:3512
#, gcc-internal-format
msgid "right shift count >= width of type"
msgstr ""
-#: c-typeck.c:8229 cp/typeck.c:3473
+#: c-typeck.c:8274 cp/typeck.c:3533
#, gcc-internal-format
msgid "left shift count is negative"
msgstr ""
-#: c-typeck.c:8232 cp/typeck.c:3478
+#: c-typeck.c:8277 cp/typeck.c:3538
#, gcc-internal-format
msgid "left shift count >= width of type"
msgstr ""
-#: c-typeck.c:8251 cp/typeck.c:3524
+#: c-typeck.c:8296 cp/typeck.c:3584
#, gcc-internal-format
msgid "comparing floating point with == or != is unsafe"
msgstr ""
-#: c-typeck.c:8275 c-typeck.c:8282
+#: c-typeck.c:8320 c-typeck.c:8327
#, gcc-internal-format
msgid "ISO C forbids comparison of %<void *%> with function pointer"
msgstr ""
-#: c-typeck.c:8289 c-typeck.c:8351
+#: c-typeck.c:8334 c-typeck.c:8396
#, gcc-internal-format
msgid "comparison of distinct pointer types lacks a cast"
msgstr ""
-#: c-typeck.c:8299 c-typeck.c:8308 cp/typeck.c:3547 cp/typeck.c:3559
+#: c-typeck.c:8344 c-typeck.c:8353 cp/typeck.c:3607 cp/typeck.c:3619
#, gcc-internal-format
msgid "the address of %qD will never be NULL"
msgstr ""
-#: c-typeck.c:8315 c-typeck.c:8320 c-typeck.c:8373 c-typeck.c:8378
+#: c-typeck.c:8360 c-typeck.c:8365 c-typeck.c:8418 c-typeck.c:8423
#, gcc-internal-format
msgid "comparison between pointer and integer"
msgstr ""
-#: c-typeck.c:8342
+#: c-typeck.c:8387
#, gcc-internal-format
msgid "comparison of complete and incomplete pointers"
msgstr ""
-#: c-typeck.c:8344
+#: c-typeck.c:8389
#, gcc-internal-format
msgid "ISO C forbids ordered comparisons of pointers to functions"
msgstr ""
-#: c-typeck.c:8359 c-typeck.c:8362 c-typeck.c:8368
+#: c-typeck.c:8404 c-typeck.c:8407 c-typeck.c:8413
#, gcc-internal-format
msgid "ordered comparison of pointer with integer zero"
msgstr ""
-#: c-typeck.c:8546
+#: c-typeck.c:8591
#, gcc-internal-format
msgid "used array that cannot be converted to pointer where scalar is required"
msgstr ""
-#: c-typeck.c:8550
+#: c-typeck.c:8595
#, gcc-internal-format
msgid "used struct type value where scalar is required"
msgstr ""
-#: c-typeck.c:8554
+#: c-typeck.c:8599
#, gcc-internal-format
msgid "used union type value where scalar is required"
msgstr ""
-#: c-typeck.c:8690 cp/semantics.c:3670
+#: c-typeck.c:8735 cp/semantics.c:3685
#, gcc-internal-format
msgid "%qE has invalid type for %<reduction%>"
msgstr ""
-#: c-typeck.c:8724 cp/semantics.c:3683
+#: c-typeck.c:8769 cp/semantics.c:3698
#, gcc-internal-format
msgid "%qE has invalid type for %<reduction(%s)%>"
msgstr ""
-#: c-typeck.c:8740 cp/semantics.c:3693
+#: c-typeck.c:8785 cp/semantics.c:3708
#, gcc-internal-format
msgid "%qE must be %<threadprivate%> for %<copyin%>"
msgstr ""
-#: c-typeck.c:8749 cp/semantics.c:3490
+#: c-typeck.c:8794 cp/semantics.c:3505
#, gcc-internal-format
msgid "%qE is not a variable in clause %qs"
msgstr ""
-#: c-typeck.c:8756 c-typeck.c:8776 c-typeck.c:8796
+#: c-typeck.c:8801 c-typeck.c:8821 c-typeck.c:8841
#, gcc-internal-format
msgid "%qE appears more than once in data clauses"
msgstr ""
-#: c-typeck.c:8770 cp/semantics.c:3513
+#: c-typeck.c:8815 cp/semantics.c:3528
#, gcc-internal-format
msgid "%qE is not a variable in clause %<firstprivate%>"
msgstr ""
-#: c-typeck.c:8790 cp/semantics.c:3535
+#: c-typeck.c:8835 cp/semantics.c:3550
#, gcc-internal-format
msgid "%qE is not a variable in clause %<lastprivate%>"
msgstr ""
-#: c-typeck.c:8850 cp/semantics.c:3734
+#: c-typeck.c:8895 cp/semantics.c:3749
#, gcc-internal-format
msgid "%qE is predetermined %qs for %qs"
msgstr ""
-#: calls.c:2049
+#: calls.c:2055
#, gcc-internal-format
msgid "function call has aggregate value"
msgstr ""
-#: cfgexpand.c:298
+#: cfgexpand.c:299
#, gcc-internal-format
msgid "Unrecognized GIMPLE statement during RTL expansion"
msgstr ""
-#: cfgexpand.c:2343
+#: cfgexpand.c:2332
#, gcc-internal-format
msgid "not protecting local variables: variable length buffer"
msgstr ""
-#: cfgexpand.c:2346
+#: cfgexpand.c:2335
#, gcc-internal-format
msgid "not protecting function: no buffer at least %d bytes long"
msgstr ""
@@ -22928,27 +22698,27 @@ msgstr ""
msgid "failed to reclaim unneeded function"
msgstr ""
-#: cgraphunit.c:1343
+#: cgraphunit.c:1342
#, gcc-internal-format
msgid "nodes with unreleased memory found"
msgstr ""
-#: collect2.c:1209
+#: collect2.c:1210
#, gcc-internal-format
msgid "unknown demangling style '%s'"
msgstr ""
-#: collect2.c:1532
+#: collect2.c:1533
#, gcc-internal-format
msgid "%s terminated with signal %d [%s]%s"
msgstr ""
-#: collect2.c:1550
+#: collect2.c:1551
#, gcc-internal-format
msgid "%s returned %d exit status"
msgstr ""
-#: collect2.c:2261
+#: collect2.c:2262
#, gcc-internal-format
msgid "cannot find 'ldd'"
msgstr ""
@@ -22958,47 +22728,47 @@ msgstr ""
msgid "cannot convert to a pointer type"
msgstr ""
-#: convert.c:364
+#: convert.c:369
#, gcc-internal-format
msgid "pointer value used where a floating point value was expected"
msgstr ""
-#: convert.c:368
+#: convert.c:373
#, gcc-internal-format
msgid "aggregate value used where a float was expected"
msgstr ""
-#: convert.c:393
+#: convert.c:398
#, gcc-internal-format
msgid "conversion to incomplete type"
msgstr ""
-#: convert.c:762 convert.c:838
+#: convert.c:768 convert.c:844
#, gcc-internal-format
msgid "can't convert between vector values of different size"
msgstr ""
-#: convert.c:768
+#: convert.c:774
#, gcc-internal-format
msgid "aggregate value used where an integer was expected"
msgstr ""
-#: convert.c:818
+#: convert.c:824
#, gcc-internal-format
msgid "pointer value used where a complex was expected"
msgstr ""
-#: convert.c:822
+#: convert.c:828
#, gcc-internal-format
msgid "aggregate value used where a complex was expected"
msgstr ""
-#: convert.c:844
+#: convert.c:850
#, gcc-internal-format
msgid "can't convert value to a vector"
msgstr ""
-#: convert.c:883
+#: convert.c:889
#, gcc-internal-format
msgid "aggregate value used where a fixed-point was expected"
msgstr ""
@@ -23063,12 +22833,12 @@ msgstr ""
msgid "this can result in poorly optimized code"
msgstr ""
-#: coverage.c:568
+#: coverage.c:570
#, gcc-internal-format
msgid "cannot open %s"
msgstr ""
-#: coverage.c:603
+#: coverage.c:605
#, gcc-internal-format
msgid "error writing %qs"
msgstr ""
@@ -23108,27 +22878,27 @@ msgstr ""
msgid "dominator of %d should be %d, not %d"
msgstr ""
-#: dwarf2out.c:4467
+#: dwarf2out.c:4522
#, gcc-internal-format
msgid "DW_LOC_OP %s not implemented"
msgstr ""
-#: emit-rtl.c:2365
+#: emit-rtl.c:2465
#, gcc-internal-format
msgid "invalid rtl sharing found in the insn"
msgstr ""
-#: emit-rtl.c:2367
+#: emit-rtl.c:2467
#, gcc-internal-format
msgid "shared rtx"
msgstr ""
-#: emit-rtl.c:2369
+#: emit-rtl.c:2469
#, gcc-internal-format
msgid "internal consistency failure"
msgstr ""
-#: emit-rtl.c:3429
+#: emit-rtl.c:3529
#, gcc-internal-format
msgid "ICE: emit_insn used where emit_jump_insn needed:\n"
msgstr ""
@@ -23143,47 +22913,47 @@ msgstr ""
msgid "exception handling disabled, use -fexceptions to enable"
msgstr ""
-#: except.c:2854
+#: except.c:2856
#, gcc-internal-format
msgid "argument of %<__builtin_eh_return_regno%> must be constant"
msgstr ""
-#: except.c:2987
+#: except.c:2989
#, gcc-internal-format
msgid "__builtin_eh_return not supported on this target"
msgstr ""
-#: except.c:3861 except.c:3870
+#: except.c:3863 except.c:3872
#, gcc-internal-format
msgid "region_array is corrupted for region %i"
msgstr ""
-#: except.c:3875
+#: except.c:3877
#, gcc-internal-format
msgid "outer block of region %i is wrong"
msgstr ""
-#: except.c:3880
+#: except.c:3882
#, gcc-internal-format
msgid "region %i may contain throw and is contained in region that may not"
msgstr ""
-#: except.c:3886
+#: except.c:3888
#, gcc-internal-format
msgid "negative nesting depth of region %i"
msgstr ""
-#: except.c:3906
+#: except.c:3908
#, gcc-internal-format
msgid "tree list ends on depth %i"
msgstr ""
-#: except.c:3911
+#: except.c:3913
#, gcc-internal-format
msgid "array does not match the region tree"
msgstr ""
-#: except.c:3917
+#: except.c:3919
#, gcc-internal-format
msgid "verify_eh_tree failed"
msgstr ""
@@ -23197,7 +22967,7 @@ msgstr ""
msgid "%Kcall to %qs declared with attribute error: %s"
msgstr ""
-#: expr.c:8064
+#: expr.c:8065
msgid "%Kcall to %qs declared with attribute warning: %s"
msgstr ""
@@ -23216,85 +22986,90 @@ msgstr ""
msgid "large fixed-point constant implicitly truncated to fixed-point type"
msgstr ""
-#: fold-const.c:989 tree-ssa-loop-niter.c:1854 tree-vrp.c:5595 tree-vrp.c:5636
+#: fold-const.c:992 tree-ssa-loop-niter.c:1880 tree-vrp.c:5715 tree-vrp.c:5756
#, gcc-internal-format
msgid "%H%s"
msgstr ""
-#: fold-const.c:1359
+#: fold-const.c:1362
#, gcc-internal-format
msgid "assuming signed overflow does not occur when negating a division"
msgstr ""
-#: fold-const.c:5127
+#: fold-const.c:4016 fold-const.c:4027
+#, gcc-internal-format
+msgid "comparison is always %d due to width of bit-field"
+msgstr ""
+
+#: fold-const.c:5353
#, gcc-internal-format
msgid "assuming signed overflow does not occur when simplifying range test"
msgstr ""
-#: fold-const.c:5504 fold-const.c:5519
+#: fold-const.c:5730 fold-const.c:5745
#, gcc-internal-format
msgid "comparison is always %d"
msgstr ""
-#: fold-const.c:5536
+#: fold-const.c:5874
#, gcc-internal-format
msgid "%<or%> of unmatched not-equal tests is always 1"
msgstr ""
-#: fold-const.c:5541
+#: fold-const.c:5879
#, gcc-internal-format
msgid "%<and%> of mutually exclusive equal-tests is always 0"
msgstr ""
-#: fold-const.c:8432
+#: fold-const.c:8778
#, gcc-internal-format
msgid ""
"assuming signed overflow does not occur when reducing constant in comparison"
msgstr ""
-#: fold-const.c:8799
+#: fold-const.c:9145
#, gcc-internal-format
msgid ""
"assuming signed overflow does not occur when combining constants around a "
"comparison"
msgstr ""
-#: fold-const.c:13334
+#: fold-const.c:13681
#, gcc-internal-format
msgid "fold check: original tree changed by fold"
msgstr ""
-#: function.c:306
+#: function.c:251
#, gcc-internal-format
msgid "%Jtotal size of local objects too large"
msgstr ""
-#: function.c:802 varasm.c:2139
+#: function.c:918 varasm.c:2139
#, gcc-internal-format
msgid "size of variable %q+D is too large"
msgstr ""
-#: function.c:1546 gimplify.c:4775
+#: function.c:1626 gimplify.c:4743
#, gcc-internal-format
msgid "impossible constraint in %<asm%>"
msgstr ""
-#: function.c:3614
+#: function.c:3732
#, gcc-internal-format
msgid "variable %q+D might be clobbered by %<longjmp%> or %<vfork%>"
msgstr ""
-#: function.c:3635
+#: function.c:3753
#, gcc-internal-format
msgid "argument %q+D might be clobbered by %<longjmp%> or %<vfork%>"
msgstr ""
-#: function.c:4079
+#: function.c:4198
#, gcc-internal-format
msgid "function returns an aggregate"
msgstr ""
-#: function.c:4480
+#: function.c:4599
#, gcc-internal-format
msgid "unused parameter %q+D"
msgstr ""
@@ -23319,12 +23094,12 @@ msgstr ""
msgid "extraneous argument to '%s' option"
msgstr ""
-#: gcc.c:4011
+#: gcc.c:4029
#, gcc-internal-format
msgid "warning: -pipe ignored because -save-temps specified"
msgstr ""
-#: gcc.c:4304
+#: gcc.c:4322
#, gcc-internal-format
msgid "warning: '-x %s' after last input file has no effect"
msgstr ""
@@ -23332,52 +23107,52 @@ msgstr ""
#. Catch the case where a spec string contains something like
#. '%{foo:%*}'. i.e. there is no * in the pattern on the left
#. hand side of the :.
-#: gcc.c:5387
+#: gcc.c:5405
#, gcc-internal-format
msgid "spec failure: '%%*' has not been initialized by pattern match"
msgstr ""
-#: gcc.c:5396
+#: gcc.c:5414
#, gcc-internal-format
msgid "warning: use of obsolete %%[ operator in specs"
msgstr ""
-#: gcc.c:5477
+#: gcc.c:5495
#, gcc-internal-format
msgid "spec failure: unrecognized spec option '%c'"
msgstr ""
-#: gcc.c:6383
+#: gcc.c:6401
#, gcc-internal-format
msgid "spec failure: more than one arg to SYSROOT_SUFFIX_SPEC"
msgstr ""
-#: gcc.c:6406
+#: gcc.c:6424
#, gcc-internal-format
msgid "spec failure: more than one arg to SYSROOT_HEADERS_SUFFIX_SPEC"
msgstr ""
-#: gcc.c:6493
+#: gcc.c:6511
#, gcc-internal-format
msgid "unrecognized option '-%s'"
msgstr ""
-#: gcc.c:6705 gcc.c:6768
+#: gcc.c:6726 gcc.c:6789
#, gcc-internal-format
msgid "%s: %s compiler not installed on this system"
msgstr ""
-#: gcc.c:6868
+#: gcc.c:6889
#, gcc-internal-format
msgid "%s: linker input file unused because linking not done"
msgstr ""
-#: gcc.c:6908
+#: gcc.c:6929
#, gcc-internal-format
msgid "language %s not recognized"
msgstr ""
-#: gcc.c:6979
+#: gcc.c:7000
#, gcc-internal-format
msgid "%s: %s"
msgstr ""
@@ -23440,67 +23215,62 @@ msgstr ""
msgid "gimple check: expected %s(%s), have %s(%s) in %s, at %s:%d"
msgstr ""
-#: gimplify.c:4660
+#: gimplify.c:4628
#, gcc-internal-format
msgid "invalid lvalue in asm output %d"
msgstr ""
-#: gimplify.c:4776
+#: gimplify.c:4744
#, gcc-internal-format
msgid "non-memory input %d must stay in memory"
msgstr ""
-#: gimplify.c:4791
+#: gimplify.c:4759
#, gcc-internal-format
msgid "memory input %d is not directly addressable"
msgstr ""
-#: gimplify.c:5285
+#: gimplify.c:5253
#, gcc-internal-format
msgid "%qs not specified in enclosing parallel"
msgstr ""
-#: gimplify.c:5287
+#: gimplify.c:5255
#, gcc-internal-format
msgid "%Henclosing parallel"
msgstr ""
-#: gimplify.c:5378
+#: gimplify.c:5360
#, gcc-internal-format
msgid "iteration variable %qs should be private"
msgstr ""
-#: gimplify.c:5392
+#: gimplify.c:5374
#, gcc-internal-format
msgid "iteration variable %qs should not be firstprivate"
msgstr ""
-#: gimplify.c:5395
+#: gimplify.c:5377
#, gcc-internal-format
msgid "iteration variable %qs should not be reduction"
msgstr ""
-#: gimplify.c:5558
+#: gimplify.c:5540
#, gcc-internal-format
msgid "%s variable %qs is private in outer context"
msgstr ""
-#: gimplify.c:7059
+#: gimplify.c:7056
#, gcc-internal-format
msgid "gimplification failed"
msgstr ""
-#: global.c:272 global.c:285 global.c:299 ira.c:1321 ira.c:1334 ira.c:1348
-#, gcc-internal-format
-msgid "%s cannot be used in asm here"
-msgstr ""
-
#: graph.c:401 java/jcf-parse.c:1750 java/jcf-parse.c:1890 objc/objc-act.c:493
#, gcc-internal-format
msgid "can't open %s: %m"
msgstr ""
-#: graphite.c:5253 toplev.c:1712
+#: graphite.c:6190 toplev.c:1714
#, gcc-internal-format
msgid "Graphite loop optimizations cannot be used"
msgstr ""
@@ -23510,59 +23280,64 @@ msgstr ""
msgid "fix_sched_param: unknown param: %s"
msgstr ""
-#: omp-low.c:1817
+#: ira.c:1436 ira.c:1449 ira.c:1463
+#, gcc-internal-format
+msgid "%s cannot be used in asm here"
+msgstr ""
+
+#: omp-low.c:1818
#, gcc-internal-format
msgid ""
"barrier region may not be closely nested inside of work-sharing, critical, "
"ordered, master or explicit task region"
msgstr ""
-#: omp-low.c:1822
+#: omp-low.c:1823
#, gcc-internal-format
msgid ""
"work-sharing region may not be closely nested inside of work-sharing, "
"critical, ordered, master or explicit task region"
msgstr ""
-#: omp-low.c:1840
+#: omp-low.c:1841
#, gcc-internal-format
msgid ""
"master region may not be closely nested inside of work-sharing or explicit "
"task region"
msgstr ""
-#: omp-low.c:1855
+#: omp-low.c:1856
#, gcc-internal-format
msgid ""
"ordered region may not be closely nested inside of critical or explicit task "
"region"
msgstr ""
-#: omp-low.c:1861
+#: omp-low.c:1862
#, gcc-internal-format
msgid ""
"ordered region must be closely nested inside a loop region with an ordered "
"clause"
msgstr ""
-#: omp-low.c:1876
+#: omp-low.c:1877
#, gcc-internal-format
msgid ""
"critical region may not be nested inside a critical region with the same name"
msgstr ""
-#: omp-low.c:6622 cp/decl.c:2667
+#: omp-low.c:6632 cp/decl.c:2680
#, gcc-internal-format
msgid "invalid exit from OpenMP structured block"
msgstr ""
-#: omp-low.c:6624 omp-low.c:6629
+#: omp-low.c:6634 omp-low.c:6639
#, gcc-internal-format
msgid "invalid entry to OpenMP structured block"
msgstr ""
#. Otherwise, be vague and lazy, but efficient.
-#: omp-low.c:6632
+#: omp-low.c:6642
#, gcc-internal-format
msgid "invalid branch to/from an OpenMP structured block"
msgstr ""
@@ -23590,7 +23365,7 @@ msgstr ""
msgid "command line option \"%s\" is valid for %s but not for %s"
msgstr ""
-#: opts.c:479 opts.c:799
+#: opts.c:479 opts.c:807
#, gcc-internal-format
msgid "unrecognized command line option \"%s\""
msgstr ""
@@ -23610,128 +23385,133 @@ msgstr ""
msgid "argument to \"%s\" should be a non-negative integer"
msgstr ""
-#: opts.c:761
+#: opts.c:769
#, gcc-internal-format
msgid "disallowed call to %qs"
msgstr ""
-#: opts.c:1015
+#: opts.c:1031
#, gcc-internal-format
msgid "Section anchors must be disabled when unit-at-a-time is disabled."
msgstr ""
-#: opts.c:1019
+#: opts.c:1035
#, gcc-internal-format
msgid "Toplevel reorder must be disabled when unit-at-a-time is disabled."
msgstr ""
-#: opts.c:1034
+#: opts.c:1050
#, gcc-internal-format
msgid "section anchors must be disabled when toplevel reorder is disabled"
msgstr ""
-#: opts.c:1064
+#: opts.c:1080
#, gcc-internal-format
msgid "-freorder-blocks-and-partition does not work with exceptions"
msgstr ""
-#: opts.c:1075
+#: opts.c:1091
#, gcc-internal-format
msgid "-freorder-blocks-and-partition does not support unwind info"
msgstr ""
-#: opts.c:1089
+#: opts.c:1105
#, gcc-internal-format
msgid "-freorder-blocks-and-partition does not work on this architecture"
msgstr ""
-#: opts.c:1101
+#: opts.c:1119
#, gcc-internal-format
-msgid "-fira does not work on this architecture"
+msgid "-fira-algorithm=CB does not work on this architecture"
msgstr ""
-#: opts.c:1406
+#: opts.c:1428
#, gcc-internal-format
msgid "unrecognized include_flags 0x%x passed to print_specific_help"
msgstr ""
-#: opts.c:1780
+#: opts.c:1809
#, gcc-internal-format
msgid "structure alignment must be a small power of two, not %d"
msgstr ""
-#: opts.c:1867
+#: opts.c:1896
#, gcc-internal-format
msgid "unrecognized visibility value \"%s\""
msgstr ""
-#: opts.c:1925
+#: opts.c:1954
#, gcc-internal-format
msgid "unknown stack check parameter \"%s\""
msgstr ""
-#: opts.c:1951
+#: opts.c:1980
#, gcc-internal-format
msgid "unrecognized register name \"%s\""
msgstr ""
-#: opts.c:1975
+#: opts.c:2004
#, gcc-internal-format
msgid "unknown tls-model \"%s\""
msgstr ""
-#: opts.c:1986
+#: opts.c:2013
#, gcc-internal-format
msgid "unknown ira algorithm \"%s\""
msgstr ""
-#: opts.c:2089
+#: opts.c:2024
+#, gcc-internal-format
+msgid "unknown ira region \"%s\""
+msgstr ""
+
+#: opts.c:2127
#, gcc-internal-format
msgid "%s: --param arguments should be of the form NAME=VALUE"
msgstr ""
-#: opts.c:2094
+#: opts.c:2132
#, gcc-internal-format
msgid "invalid --param value %qs"
msgstr ""
-#: opts.c:2212
+#: opts.c:2250
#, gcc-internal-format
msgid "target system does not support debug output"
msgstr ""
-#: opts.c:2219
+#: opts.c:2257
#, gcc-internal-format
msgid "debug format \"%s\" conflicts with prior selection"
msgstr ""
-#: opts.c:2235
+#: opts.c:2273
#, gcc-internal-format
msgid "unrecognised debug output level \"%s\""
msgstr ""
-#: opts.c:2237
+#: opts.c:2275
#, gcc-internal-format
msgid "debug output level %s is too high"
msgstr ""
-#: opts.c:2319
+#: opts.c:2357
#, gcc-internal-format
msgid "-Werror=%s: No option -%s"
msgstr ""
-#: params.c:68
+#: params.c:69
#, gcc-internal-format
msgid "minimum value of parameter %qs is %u"
msgstr ""
-#: params.c:73
+#: params.c:74
#, gcc-internal-format
msgid "maximum value of parameter %qs is %u"
msgstr ""
#. If we didn't find this parameter, issue an error message.
-#: params.c:85
+#: params.c:86
#, gcc-internal-format
msgid "invalid parameter %qs"
msgstr ""
@@ -23799,49 +23579,49 @@ msgstr ""
msgid "output operand %d must use %<&%> constraint"
msgstr ""
-#: regclass.c:873
+#: reginfo.c:820
#, gcc-internal-format
msgid "can't use '%s' as a %s register"
msgstr ""
-#: regclass.c:888 config/ia64/ia64.c:5175 config/ia64/ia64.c:5182
-#: config/pa/pa.c:362 config/pa/pa.c:369 config/sh/sh.c:7961
-#: config/sh/sh.c:7968 config/spu/spu.c:4486 config/spu/spu.c:4493
+#: reginfo.c:835 config/ia64/ia64.c:5180 config/ia64/ia64.c:5187
+#: config/pa/pa.c:363 config/pa/pa.c:370 config/sh/sh.c:7963
+#: config/sh/sh.c:7970 config/spu/spu.c:4489 config/spu/spu.c:4496
#, gcc-internal-format
msgid "unknown register name: %s"
msgstr ""
-#: regclass.c:898
+#: reginfo.c:844
#, gcc-internal-format
msgid "global register variable follows a function definition"
msgstr ""
-#: regclass.c:902
+#: reginfo.c:848
#, gcc-internal-format
msgid "register used for two global register variables"
msgstr ""
-#: regclass.c:907
+#: reginfo.c:853
#, gcc-internal-format
msgid "call-clobbered register used for global register variable"
msgstr ""
-#: regrename.c:1898
+#: regrename.c:1907
#, gcc-internal-format
msgid "validate_value_data: [%u] Bad next_regno for empty chain (%u)"
msgstr ""
-#: regrename.c:1910
+#: regrename.c:1919
#, gcc-internal-format
msgid "validate_value_data: Loop in regno chain (%u)"
msgstr ""
-#: regrename.c:1913
+#: regrename.c:1922
#, gcc-internal-format
msgid "validate_value_data: [%u] Bad oldest_regno (%u)"
msgstr ""
-#: regrename.c:1925
+#: regrename.c:1934
#, gcc-internal-format
msgid "validate_value_data: [%u] Non-empty reg in chain (%s %u %i)"
msgstr ""
@@ -23856,12 +23636,12 @@ msgstr ""
msgid "impossible register constraint in %<asm%>"
msgstr ""
-#: reload.c:3615
+#: reload.c:3611
#, gcc-internal-format
msgid "%<&%> constraint used with no register class"
msgstr ""
-#: reload.c:3786 reload.c:4044
+#: reload.c:3782 reload.c:4040
#, gcc-internal-format
msgid "inconsistent operand constraints in an %<asm%>"
msgstr ""
@@ -23891,17 +23671,17 @@ msgstr ""
msgid "unable to find a register to spill in class %qs"
msgstr ""
-#: reload1.c:4270
+#: reload1.c:4249
#, gcc-internal-format
msgid "%<asm%> operand requires impossible reload"
msgstr ""
-#: reload1.c:5616
+#: reload1.c:5632
#, gcc-internal-format
msgid "%<asm%> operand constraint incompatible with operand size"
msgstr ""
-#: reload1.c:7565
+#: reload1.c:7583
#, gcc-internal-format
msgid "output operand is constant in %<asm%>"
msgstr ""
@@ -24108,32 +23888,37 @@ msgstr ""
msgid "padding struct to align %q+D"
msgstr ""
-#: stor-layout.c:1259
+#: stor-layout.c:969
+#, gcc-internal-format
+msgid "Offset of packed bit-field %qD has changed in GCC 4.4"
+msgstr ""
+
+#: stor-layout.c:1273
#, gcc-internal-format
msgid "padding struct size to alignment boundary"
msgstr ""
-#: stor-layout.c:1289
+#: stor-layout.c:1303
#, gcc-internal-format
msgid "packed attribute causes inefficient alignment for %qs"
msgstr ""
-#: stor-layout.c:1293
+#: stor-layout.c:1307
#, gcc-internal-format
msgid "packed attribute is unnecessary for %qs"
msgstr ""
-#: stor-layout.c:1299
+#: stor-layout.c:1313
#, gcc-internal-format
msgid "packed attribute causes inefficient alignment"
msgstr ""
-#: stor-layout.c:1301
+#: stor-layout.c:1315
#, gcc-internal-format
msgid "packed attribute is unnecessary"
msgstr ""
-#: stor-layout.c:1831
+#: stor-layout.c:1848
#, gcc-internal-format
msgid "alignment of array elements is greater than element size"
msgstr ""
@@ -24153,630 +23938,635 @@ msgstr ""
msgid "#pragma GCC target is not supported for this machine"
msgstr ""
-#: tlink.c:482
+#: tlink.c:483
#, gcc-internal-format
msgid "repository file '%s' does not contain command-line arguments"
msgstr ""
-#: tlink.c:730
+#: tlink.c:731
#, gcc-internal-format
msgid ""
"'%s' was assigned to '%s', but was not defined during recompilation, or vice "
"versa"
msgstr ""
-#: tlink.c:800
+#: tlink.c:801
#, gcc-internal-format
msgid "ld returned %d exit status"
msgstr ""
-#: toplev.c:517
+#: toplev.c:519
#, gcc-internal-format
msgid "invalid option argument %qs"
msgstr ""
-#: toplev.c:615
+#: toplev.c:617
#, gcc-internal-format
msgid "getting core file size maximum limit: %m"
msgstr ""
-#: toplev.c:618
+#: toplev.c:620
#, gcc-internal-format
msgid "setting core file size limit to maximum: %m"
msgstr ""
-#: toplev.c:838
+#: toplev.c:840
#, gcc-internal-format
msgid "%q+F declared %<static%> but never defined"
msgstr ""
-#: toplev.c:866
+#: toplev.c:868
#, gcc-internal-format
msgid "%q+D defined but not used"
msgstr ""
-#: toplev.c:909
+#: toplev.c:911
#, gcc-internal-format
msgid "%qD is deprecated (declared at %s:%d)"
msgstr ""
-#: toplev.c:932
+#: toplev.c:934
#, gcc-internal-format
msgid "%qs is deprecated (declared at %s:%d)"
msgstr ""
-#: toplev.c:936
+#: toplev.c:938
#, gcc-internal-format
msgid "type is deprecated (declared at %s:%d)"
msgstr ""
-#: toplev.c:942
+#: toplev.c:944
#, gcc-internal-format
msgid "%qs is deprecated"
msgstr ""
-#: toplev.c:944
+#: toplev.c:946
#, gcc-internal-format
msgid "type is deprecated"
msgstr ""
-#: toplev.c:1088
+#: toplev.c:1090
#, gcc-internal-format
msgid "unrecognized gcc debugging option: %c"
msgstr ""
-#: toplev.c:1341
+#: toplev.c:1343
#, gcc-internal-format
msgid "can%'t open %s for writing: %m"
msgstr ""
-#: toplev.c:1362
+#: toplev.c:1364
#, gcc-internal-format
msgid "-frecord-gcc-switches is not supported by the current target"
msgstr ""
-#: toplev.c:1686
+#: toplev.c:1688
#, gcc-internal-format
msgid "this target does not support %qs"
msgstr ""
-#: toplev.c:1741
+#: toplev.c:1743
#, gcc-internal-format
msgid "instruction scheduling not supported on this target machine"
msgstr ""
-#: toplev.c:1745
+#: toplev.c:1747
#, gcc-internal-format
msgid "this target machine does not have delayed branches"
msgstr ""
-#: toplev.c:1759
+#: toplev.c:1761
#, gcc-internal-format
msgid "-f%sleading-underscore not supported on this target machine"
msgstr ""
-#: toplev.c:1832
+#: toplev.c:1834
#, gcc-internal-format
msgid "target system does not support the \"%s\" debug format"
msgstr ""
-#: toplev.c:1845
+#: toplev.c:1847
#, gcc-internal-format
msgid "variable tracking requested, but useless unless producing debug info"
msgstr ""
-#: toplev.c:1848
+#: toplev.c:1850
#, gcc-internal-format
msgid "variable tracking requested, but not supported by this debug format"
msgstr ""
-#: toplev.c:1882
+#: toplev.c:1884
#, gcc-internal-format
msgid "can%'t open %s: %m"
msgstr ""
-#: toplev.c:1889
+#: toplev.c:1891
#, gcc-internal-format
msgid "-ffunction-sections not supported for this target"
msgstr ""
-#: toplev.c:1894
+#: toplev.c:1896
#, gcc-internal-format
msgid "-fdata-sections not supported for this target"
msgstr ""
-#: toplev.c:1901
+#: toplev.c:1903
#, gcc-internal-format
msgid "-ffunction-sections disabled; it makes profiling impossible"
msgstr ""
-#: toplev.c:1908
+#: toplev.c:1910
#, gcc-internal-format
msgid "-fprefetch-loop-arrays not supported for this target"
msgstr ""
-#: toplev.c:1914
+#: toplev.c:1916
#, gcc-internal-format
msgid ""
"-fprefetch-loop-arrays not supported for this target (try -march switches)"
msgstr ""
-#: toplev.c:1923
+#: toplev.c:1925
#, gcc-internal-format
msgid "-fprefetch-loop-arrays is not supported with -Os"
msgstr ""
-#: toplev.c:1934
+#: toplev.c:1936
#, gcc-internal-format
msgid "-fassociative-math disabled; other options take precedence"
msgstr ""
-#: toplev.c:1950
+#: toplev.c:1952
#, gcc-internal-format
msgid "-fstack-protector not supported for this target"
msgstr ""
-#: toplev.c:1963
+#: toplev.c:1965
#, gcc-internal-format
msgid "unwind tables currently require a frame pointer for correctness"
msgstr ""
-#: toplev.c:2148
+#: toplev.c:2150
#, gcc-internal-format
msgid "error writing to %s: %m"
msgstr ""
-#: toplev.c:2150 java/jcf-parse.c:1769
+#: toplev.c:2152 java/jcf-parse.c:1769
#, gcc-internal-format
msgid "error closing %s: %m"
msgstr ""
-#: tree-cfg.c:1508 tree-cfg.c:2174
+#: tree-cfg.c:1513 tree-cfg.c:2186
#, gcc-internal-format
msgid "%Hwill never be executed"
msgstr ""
-#: tree-cfg.c:2808
+#: tree-cfg.c:2820
#, gcc-internal-format
msgid "SSA name in freelist but still referenced"
msgstr ""
-#: tree-cfg.c:2817
+#: tree-cfg.c:2829
+#, gcc-internal-format
+msgid "Indirect reference's operand is not a register or a constant."
+msgstr ""
+
+#: tree-cfg.c:2838
#, gcc-internal-format
msgid "ASSERT_EXPR with an always-false condition"
msgstr ""
-#: tree-cfg.c:2827
+#: tree-cfg.c:2844
#, gcc-internal-format
-msgid "GIMPLE register modified with BIT_FIELD_REF"
+msgid "MODIFY_EXPR not expected while having tuples."
msgstr ""
-#: tree-cfg.c:2850
+#: tree-cfg.c:2865
#, gcc-internal-format
msgid "constant not recomputed when ADDR_EXPR changed"
msgstr ""
-#: tree-cfg.c:2855
+#: tree-cfg.c:2870
#, gcc-internal-format
msgid "side effects not recomputed when ADDR_EXPR changed"
msgstr ""
-#: tree-cfg.c:2871
+#: tree-cfg.c:2886 tree-ssa.c:491
#, gcc-internal-format
msgid "address taken, but ADDRESSABLE bit not set"
msgstr ""
-#: tree-cfg.c:2882
+#: tree-cfg.c:2897
#, gcc-internal-format
msgid "non-integral used in condition"
msgstr ""
-#: tree-cfg.c:2887
+#: tree-cfg.c:2902
#, gcc-internal-format
msgid "invalid conditional operand"
msgstr ""
-#: tree-cfg.c:2934
+#: tree-cfg.c:2949
#, gcc-internal-format
msgid "invalid position or size operand to BIT_FIELD_REF"
msgstr ""
-#: tree-cfg.c:2941
+#: tree-cfg.c:2956
#, gcc-internal-format
msgid ""
"integral result type precision does not match field size of BIT_FIELD_REF"
msgstr ""
-#: tree-cfg.c:2949
+#: tree-cfg.c:2964
#, gcc-internal-format
msgid ""
"mode precision of non-integral result does not match field size of "
"BIT_FIELD_REF"
msgstr ""
-#: tree-cfg.c:2960
+#: tree-cfg.c:2975
#, gcc-internal-format
msgid "invalid reference prefix"
msgstr ""
-#: tree-cfg.c:2971
+#: tree-cfg.c:2986
#, gcc-internal-format
msgid "invalid operand to plus/minus, type is a pointer"
msgstr ""
-#: tree-cfg.c:2982
+#: tree-cfg.c:2997
#, gcc-internal-format
msgid "invalid operand to pointer plus, first operand is not a pointer"
msgstr ""
-#: tree-cfg.c:2990
+#: tree-cfg.c:3005
#, gcc-internal-format
msgid ""
"invalid operand to pointer plus, second operand is not an integer with type "
"of sizetype."
msgstr ""
-#: tree-cfg.c:3061
+#: tree-cfg.c:3076
#, gcc-internal-format
msgid "invalid expression for min lvalue"
msgstr ""
-#: tree-cfg.c:3072
+#: tree-cfg.c:3087
#, gcc-internal-format
msgid "invalid operand in indirect reference"
msgstr ""
-#: tree-cfg.c:3079
+#: tree-cfg.c:3094
#, gcc-internal-format
msgid "type mismatch in indirect reference"
msgstr ""
-#: tree-cfg.c:3107
+#: tree-cfg.c:3122
#, gcc-internal-format
msgid "invalid operands to array reference"
msgstr ""
-#: tree-cfg.c:3118
+#: tree-cfg.c:3133
#, gcc-internal-format
msgid "type mismatch in array reference"
msgstr ""
-#: tree-cfg.c:3127
+#: tree-cfg.c:3142
#, gcc-internal-format
msgid "type mismatch in array range reference"
msgstr ""
-#: tree-cfg.c:3138
+#: tree-cfg.c:3153
#, gcc-internal-format
msgid "type mismatch in real/imagpart reference"
msgstr ""
-#: tree-cfg.c:3148
+#: tree-cfg.c:3163
#, gcc-internal-format
msgid "type mismatch in component reference"
msgstr ""
-#: tree-cfg.c:3210
+#: tree-cfg.c:3225
#, gcc-internal-format
msgid "non-function in gimple call"
msgstr ""
-#: tree-cfg.c:3217
+#: tree-cfg.c:3232
#, gcc-internal-format
msgid "invalid LHS in gimple call"
msgstr ""
-#: tree-cfg.c:3233
+#: tree-cfg.c:3248
#, gcc-internal-format
msgid "invalid conversion in gimple call"
msgstr ""
-#: tree-cfg.c:3258
+#: tree-cfg.c:3273
#, gcc-internal-format
msgid "invalid operands in gimple comparison"
msgstr ""
-#: tree-cfg.c:3276
+#: tree-cfg.c:3291
#, gcc-internal-format
msgid "type mismatch in comparison expression"
msgstr ""
-#: tree-cfg.c:3302
+#: tree-cfg.c:3317
#, gcc-internal-format
msgid "non-register as LHS of unary operation"
msgstr ""
-#: tree-cfg.c:3308
+#: tree-cfg.c:3323
#, gcc-internal-format
msgid "invalid operand in unary operation"
msgstr ""
-#: tree-cfg.c:3343
+#: tree-cfg.c:3358
#, gcc-internal-format
msgid "invalid types in nop conversion"
msgstr ""
-#: tree-cfg.c:3357
+#: tree-cfg.c:3372
#, gcc-internal-format
msgid "invalid types in fixed-point conversion"
msgstr ""
-#: tree-cfg.c:3370
+#: tree-cfg.c:3385
#, gcc-internal-format
msgid "invalid types in conversion to floating point"
msgstr ""
-#: tree-cfg.c:3383
+#: tree-cfg.c:3398
#, gcc-internal-format
msgid "invalid types in conversion to integer"
msgstr ""
-#: tree-cfg.c:3418
+#: tree-cfg.c:3433
#, gcc-internal-format
msgid "non-trivial conversion in unary operation"
msgstr ""
-#: tree-cfg.c:3445
+#: tree-cfg.c:3460
#, gcc-internal-format
msgid "non-register as LHS of binary operation"
msgstr ""
-#: tree-cfg.c:3452
+#: tree-cfg.c:3467
#, gcc-internal-format
msgid "invalid operands in binary operation"
msgstr ""
-#: tree-cfg.c:3467
+#: tree-cfg.c:3482
#, gcc-internal-format
msgid "type mismatch in complex expression"
msgstr ""
-#: tree-cfg.c:3486
+#: tree-cfg.c:3507
#, gcc-internal-format
msgid "type mismatch in shift expression"
msgstr ""
-#: tree-cfg.c:3506
+#: tree-cfg.c:3528
#, gcc-internal-format
msgid "type mismatch in vector shift expression"
msgstr ""
-#: tree-cfg.c:3522
+#: tree-cfg.c:3544
#, gcc-internal-format
msgid "type mismatch in pointer plus expression"
msgstr ""
-#: tree-cfg.c:3545
+#: tree-cfg.c:3567
#, gcc-internal-format
msgid "type mismatch in binary truth expression"
msgstr ""
-#: tree-cfg.c:3580
+#: tree-cfg.c:3602
#, gcc-internal-format
msgid "invalid (pointer) operands to plus/minus"
msgstr ""
-#: tree-cfg.c:3625
+#: tree-cfg.c:3647
#, gcc-internal-format
msgid "type mismatch in binary expression"
msgstr ""
-#: tree-cfg.c:3650
+#: tree-cfg.c:3672
#, gcc-internal-format
msgid "non-trivial conversion at assignment"
msgstr ""
-#: tree-cfg.c:3667
+#: tree-cfg.c:3689
#, gcc-internal-format
msgid "invalid operand in unary expression"
msgstr ""
-#: tree-cfg.c:3677
+#: tree-cfg.c:3699
#, gcc-internal-format
msgid "type mismatch in address expression"
msgstr ""
-#: tree-cfg.c:3701 tree-cfg.c:3727
+#: tree-cfg.c:3723 tree-cfg.c:3749
#, gcc-internal-format
msgid "invalid rhs for gimple memory store"
msgstr ""
-#: tree-cfg.c:3793
+#: tree-cfg.c:3815
#, gcc-internal-format
msgid "invalid operand in return statement"
msgstr ""
-#: tree-cfg.c:3805
+#: tree-cfg.c:3827
#, gcc-internal-format
msgid "invalid conversion in return statement"
msgstr ""
-#: tree-cfg.c:3829
+#: tree-cfg.c:3851
#, gcc-internal-format
msgid "goto destination is neither a label nor a pointer"
msgstr ""
-#: tree-cfg.c:3844
+#: tree-cfg.c:3866
#, gcc-internal-format
msgid "invalid operand to switch statement"
msgstr ""
-#: tree-cfg.c:3864
+#: tree-cfg.c:3886
#, gcc-internal-format
msgid "Invalid PHI result"
msgstr ""
-#: tree-cfg.c:3876
+#: tree-cfg.c:3898
#, gcc-internal-format
msgid "Invalid PHI argument"
msgstr ""
-#: tree-cfg.c:3882
+#: tree-cfg.c:3904
#, gcc-internal-format
msgid "Incompatible types in PHI argument"
msgstr ""
-#: tree-cfg.c:4007
+#: tree-cfg.c:4029
#, gcc-internal-format
msgid "verify_gimple failed"
msgstr ""
-#: tree-cfg.c:4041
+#: tree-cfg.c:4063
#, gcc-internal-format
msgid "invalid function in call statement"
msgstr ""
-#: tree-cfg.c:4052
+#: tree-cfg.c:4074
#, gcc-internal-format
msgid "invalid pure const state for function"
msgstr ""
-#: tree-cfg.c:4062 tree-ssa.c:845 tree-ssa.c:855
+#: tree-cfg.c:4084 tree-ssa.c:860 tree-ssa.c:870
#, gcc-internal-format
msgid "in statement"
msgstr ""
-#: tree-cfg.c:4076
+#: tree-cfg.c:4098
#, gcc-internal-format
msgid "statement marked for throw, but doesn%'t"
msgstr ""
-#: tree-cfg.c:4081
+#: tree-cfg.c:4103
#, gcc-internal-format
msgid "statement marked for throw in middle of block"
msgstr ""
-#: tree-cfg.c:4153
+#: tree-cfg.c:4175
#, gcc-internal-format
msgid "Dead STMT in EH table"
msgstr ""
-#: tree-cfg.c:4191
+#: tree-cfg.c:4213
#, gcc-internal-format
msgid "gimple_bb (phi) is set to a wrong basic block"
msgstr ""
-#: tree-cfg.c:4202
+#: tree-cfg.c:4224
#, gcc-internal-format
msgid "missing PHI def"
msgstr ""
-#: tree-cfg.c:4213
+#: tree-cfg.c:4235
#, gcc-internal-format
msgid "PHI argument is not a GIMPLE value"
msgstr ""
-#: tree-cfg.c:4222 tree-cfg.c:4267
+#: tree-cfg.c:4244 tree-cfg.c:4289
#, gcc-internal-format
msgid "incorrect sharing of tree nodes"
msgstr ""
-#: tree-cfg.c:4237
+#: tree-cfg.c:4259
#, gcc-internal-format
msgid "invalid GIMPLE statement"
msgstr ""
-#: tree-cfg.c:4246
+#: tree-cfg.c:4268
#, gcc-internal-format
msgid "gimple_bb (stmt) is set to a wrong basic block"
msgstr ""
-#: tree-cfg.c:4258
+#: tree-cfg.c:4280
#, gcc-internal-format
msgid "incorrect entry in label_to_block_map.\n"
msgstr ""
-#: tree-cfg.c:4283
+#: tree-cfg.c:4305
#, gcc-internal-format
msgid "verify_stmts failed"
msgstr ""
-#: tree-cfg.c:4306
+#: tree-cfg.c:4328
#, gcc-internal-format
msgid "ENTRY_BLOCK has IL associated with it"
msgstr ""
-#: tree-cfg.c:4312
+#: tree-cfg.c:4334
#, gcc-internal-format
msgid "EXIT_BLOCK has IL associated with it"
msgstr ""
-#: tree-cfg.c:4319
+#: tree-cfg.c:4341
#, gcc-internal-format
msgid "fallthru to exit from bb %d"
msgstr ""
-#: tree-cfg.c:4343
+#: tree-cfg.c:4365
#, gcc-internal-format
msgid "nonlocal label "
msgstr ""
-#: tree-cfg.c:4352 tree-cfg.c:4361 tree-cfg.c:4386
+#: tree-cfg.c:4374 tree-cfg.c:4383 tree-cfg.c:4408
#, gcc-internal-format
msgid "label "
msgstr ""
-#: tree-cfg.c:4376
+#: tree-cfg.c:4398
#, gcc-internal-format
msgid "control flow in the middle of basic block %d"
msgstr ""
-#: tree-cfg.c:4406
+#: tree-cfg.c:4428
#, gcc-internal-format
msgid "fallthru edge after a control statement in bb %d"
msgstr ""
-#: tree-cfg.c:4419
+#: tree-cfg.c:4441
#, gcc-internal-format
msgid "true/false edge after a non-GIMPLE_COND in bb %d"
msgstr ""
-#: tree-cfg.c:4442 tree-cfg.c:4464 tree-cfg.c:4477 tree-cfg.c:4546
+#: tree-cfg.c:4464 tree-cfg.c:4486 tree-cfg.c:4499 tree-cfg.c:4568
#, gcc-internal-format
msgid "wrong outgoing edge flags at end of bb %d"
msgstr ""
-#: tree-cfg.c:4452
+#: tree-cfg.c:4474
#, gcc-internal-format
msgid "explicit goto at end of bb %d"
msgstr ""
-#: tree-cfg.c:4482
+#: tree-cfg.c:4504
#, gcc-internal-format
msgid "return edge does not point to exit in bb %d"
msgstr ""
-#: tree-cfg.c:4512
+#: tree-cfg.c:4534
#, gcc-internal-format
msgid "found default case not at the start of case vector"
msgstr ""
-#: tree-cfg.c:4520
+#: tree-cfg.c:4542
#, gcc-internal-format
msgid "case labels not sorted: "
msgstr ""
-#: tree-cfg.c:4537
+#: tree-cfg.c:4559
#, gcc-internal-format
msgid "extra outgoing edge %d->%d"
msgstr ""
-#: tree-cfg.c:4560
+#: tree-cfg.c:4582
#, gcc-internal-format
msgid "missing edge %i->%i"
msgstr ""
-#: tree-cfg.c:7036
+#: tree-cfg.c:7065
#, gcc-internal-format
msgid "%H%<noreturn%> function does return"
msgstr ""
-#: tree-cfg.c:7056
+#: tree-cfg.c:7085
#, gcc-internal-format
msgid "control reaches end of non-void function"
msgstr ""
-#: tree-cfg.c:7118
+#: tree-cfg.c:7147
#, gcc-internal-format
msgid "%Jfunction might be possible candidate for attribute %<noreturn%>"
msgstr ""
@@ -24822,85 +24612,85 @@ msgstr ""
msgid "unnecessary EH edge %i->%i"
msgstr ""
-#: tree-inline.c:2354
+#: tree-inline.c:2436
#, gcc-internal-format
msgid ""
"function %q+F can never be inlined because it uses variable sized variables"
msgstr ""
-#: tree-inline.c:2388
+#: tree-inline.c:2470
#, gcc-internal-format
msgid ""
"function %q+F can never be inlined because it uses alloca (override using "
"the always_inline attribute)"
msgstr ""
-#: tree-inline.c:2402
+#: tree-inline.c:2484
#, gcc-internal-format
msgid "function %q+F can never be inlined because it uses setjmp"
msgstr ""
-#: tree-inline.c:2416
+#: tree-inline.c:2498
#, gcc-internal-format
msgid ""
"function %q+F can never be inlined because it uses variable argument lists"
msgstr ""
-#: tree-inline.c:2428
+#: tree-inline.c:2510
#, gcc-internal-format
msgid ""
"function %q+F can never be inlined because it uses setjmp-longjmp exception "
"handling"
msgstr ""
-#: tree-inline.c:2436
+#: tree-inline.c:2518
#, gcc-internal-format
msgid "function %q+F can never be inlined because it uses non-local goto"
msgstr ""
-#: tree-inline.c:2448
+#: tree-inline.c:2530
#, gcc-internal-format
msgid ""
"function %q+F can never be inlined because it uses __builtin_return or "
"__builtin_apply_args"
msgstr ""
-#: tree-inline.c:2468
+#: tree-inline.c:2550
#, gcc-internal-format
msgid "function %q+F can never be inlined because it contains a computed goto"
msgstr ""
-#: tree-inline.c:2483
+#: tree-inline.c:2565
#, gcc-internal-format
msgid "function %q+F can never be inlined because it receives a non-local goto"
msgstr ""
-#: tree-inline.c:2509
+#: tree-inline.c:2591
#, gcc-internal-format
msgid ""
"function %q+F can never be inlined because it saves address of local label "
"in a static variable"
msgstr ""
-#: tree-inline.c:2600
+#: tree-inline.c:2682
#, gcc-internal-format
msgid ""
"function %q+F can never be inlined because it is suppressed using -fno-inline"
msgstr ""
-#: tree-inline.c:2614
+#: tree-inline.c:2696
#, gcc-internal-format
msgid ""
"function %q+F can never be inlined because it uses attributes conflicting "
"with inlining"
msgstr ""
-#: tree-inline.c:3162 tree-inline.c:3172
+#: tree-inline.c:3244 tree-inline.c:3254
#, gcc-internal-format
msgid "inlining failed in call to %q+F: %s"
msgstr ""
-#: tree-inline.c:3163 tree-inline.c:3174
+#: tree-inline.c:3245 tree-inline.c:3256
#, gcc-internal-format
msgid "called from here"
msgstr ""
@@ -24925,18 +24715,18 @@ msgstr ""
msgid "mudflap: this language is not supported"
msgstr ""
-#: tree-optimize.c:443
+#: tree-optimize.c:445
#, gcc-internal-format
msgid "size of return value of %q+D is %u bytes"
msgstr ""
-#: tree-optimize.c:446
+#: tree-optimize.c:448
#, gcc-internal-format
msgid "size of return value of %q+D is larger than %wd bytes"
msgstr ""
-#: tree-outof-ssa.c:682 tree-outof-ssa.c:744 tree-ssa-coalesce.c:935
-#: tree-ssa-coalesce.c:950 tree-ssa-coalesce.c:1172 tree-ssa-live.c:1088
+#: tree-outof-ssa.c:682 tree-outof-ssa.c:744 tree-ssa-coalesce.c:934
+#: tree-ssa-coalesce.c:949 tree-ssa-coalesce.c:1171 tree-ssa-live.c:1187
#, gcc-internal-format
msgid "SSA corruption"
msgstr ""
@@ -24966,17 +24756,19 @@ msgstr ""
msgid "unimplemented functionality"
msgstr ""
-#: tree-ssa-alias-warnings.c:843
+#: tree-ssa-structalias.c:4782
#, gcc-internal-format
-msgid ""
-"%Hlikely type-punning may break strict-aliasing rules: object %<%s%s%> of "
-"main type %qT is referenced at or around %s:%d and may be aliased to object %"
-"<%s%s%> of main type %qT which is referenced at or around %s:%d."
+msgid "initialized from %qE"
msgstr ""
-#: tree-ssa-alias-warnings.c:969
+#: tree-ssa-structalias.c:4786
#, gcc-internal-format
-msgid "dereferencing type-punned pointer %D will break strict-aliasing rules"
+msgid "initialized from here"
+msgstr ""
+
+#: tree-ssa-structalias.c:4835
+#, gcc-internal-format
+msgid "dereferencing pointer %qD does break strict-aliasing rules"
msgstr ""
#: tree-ssa.c:252
@@ -25064,255 +24856,255 @@ msgstr ""
msgid "PHI argument is not SSA_NAME, or invariant"
msgstr ""
-#: tree-ssa.c:483
+#: tree-ssa.c:498
#, gcc-internal-format
msgid "wrong edge %d->%d for PHI argument"
msgstr ""
-#: tree-ssa.c:533
+#: tree-ssa.c:548
#, gcc-internal-format
msgid "non-addressable variable inside an alias set"
msgstr ""
-#: tree-ssa.c:544
+#: tree-ssa.c:559
#, gcc-internal-format
msgid "verify_flow_insensitive_alias_info failed"
msgstr ""
-#: tree-ssa.c:586
+#: tree-ssa.c:601
#, gcc-internal-format
msgid "dereferenced pointers should have a name or a symbol tag"
msgstr ""
-#: tree-ssa.c:593
+#: tree-ssa.c:608
#, gcc-internal-format
msgid "pointers with a memory tag, should have points-to sets"
msgstr ""
-#: tree-ssa.c:607
+#: tree-ssa.c:622
#, gcc-internal-format
msgid "pointer escapes but its name tag is not call-clobbered"
msgstr ""
-#: tree-ssa.c:617
+#: tree-ssa.c:632
#, gcc-internal-format
msgid "verify_flow_sensitive_alias_info failed"
msgstr ""
-#: tree-ssa.c:645
+#: tree-ssa.c:660
#, gcc-internal-format
msgid "variable in call_clobbered_vars but not marked call_clobbered"
msgstr ""
-#: tree-ssa.c:664
+#: tree-ssa.c:679
#, gcc-internal-format
msgid "variable marked call_clobbered but not in call_clobbered_vars bitmap."
msgstr ""
-#: tree-ssa.c:674
+#: tree-ssa.c:689
#, gcc-internal-format
msgid "verify_call_clobbering failed"
msgstr ""
-#: tree-ssa.c:695
+#: tree-ssa.c:710
#, gcc-internal-format
msgid "Memory partitions should have at least one symbol"
msgstr ""
-#: tree-ssa.c:705
+#: tree-ssa.c:720
#, gcc-internal-format
msgid "Partitioned symbols should belong to exactly one partition"
msgstr ""
-#: tree-ssa.c:718
+#: tree-ssa.c:733
#, gcc-internal-format
msgid "verify_memory_partitions failed"
msgstr ""
-#: tree-ssa.c:790
+#: tree-ssa.c:805
#, gcc-internal-format
msgid "AUX pointer initialized for edge %d->%d"
msgstr ""
-#: tree-ssa.c:815
+#: tree-ssa.c:830
#, gcc-internal-format
msgid "stmt (%p) marked modified after optimization pass: "
msgstr ""
-#: tree-ssa.c:835
+#: tree-ssa.c:850
#, gcc-internal-format
msgid "statement makes a memory store, but has no VDEFS"
msgstr ""
-#: tree-ssa.c:894
+#: tree-ssa.c:909
#, gcc-internal-format
msgid "verify_ssa failed"
msgstr ""
-#: tree-ssa.c:1453
+#: tree-ssa.c:1468
#, gcc-internal-format
msgid "%J%qD was declared here"
msgstr ""
-#: tree-ssa.c:1517
+#: tree-ssa.c:1536
#, gcc-internal-format
msgid "%qD is used uninitialized in this function"
msgstr ""
-#: tree-ssa.c:1520 tree-ssa.c:1559
+#: tree-ssa.c:1539 tree-ssa.c:1578
#, gcc-internal-format
msgid "%qD may be used uninitialized in this function"
msgstr ""
-#: tree-vrp.c:4919
+#: tree-vrp.c:5039
#, gcc-internal-format
msgid "%Harray subscript is outside array bounds"
msgstr ""
-#: tree-vrp.c:4933
+#: tree-vrp.c:5053
#, gcc-internal-format
msgid "%Harray subscript is above array bounds"
msgstr ""
-#: tree-vrp.c:4940
+#: tree-vrp.c:5060
#, gcc-internal-format
msgid "%Harray subscript is below array bounds"
msgstr ""
-#: tree-vrp.c:5577
+#: tree-vrp.c:5697
#, gcc-internal-format
msgid ""
"assuming signed overflow does not occur when simplifying conditional to "
"constant"
msgstr ""
-#: tree-vrp.c:5583
+#: tree-vrp.c:5703
#, gcc-internal-format
msgid "assuming signed overflow does not occur when simplifying conditional"
msgstr ""
-#: tree-vrp.c:5620
+#: tree-vrp.c:5740
#, gcc-internal-format
msgid "comparison always false due to limited range of data type"
msgstr ""
-#: tree-vrp.c:5623
+#: tree-vrp.c:5743
#, gcc-internal-format
msgid "comparison always true due to limited range of data type"
msgstr ""
-#: tree.c:3702
+#: tree.c:3707
#, gcc-internal-format
msgid "ignoring attributes applied to %qT after definition"
msgstr ""
-#: tree.c:3985
+#: tree.c:3990
#, gcc-internal-format
msgid "%q+D already declared with dllexport attribute: dllimport ignored"
msgstr ""
-#: tree.c:3997
+#: tree.c:4002
#, gcc-internal-format
msgid ""
"%q+D redeclared without dllimport attribute after being referenced with dll "
"linkage"
msgstr ""
-#: tree.c:4012
+#: tree.c:4017
#, gcc-internal-format
msgid "%q+D redeclared without dllimport attribute: previous dllimport ignored"
msgstr ""
-#: tree.c:4071 tree.c:4083 tree.c:4093 config/darwin.c:1437
-#: config/arm/arm.c:3177 config/arm/arm.c:3205 config/avr/avr.c:4748
-#: config/h8300/h8300.c:5282 config/h8300/h8300.c:5306 config/i386/i386.c:4172
-#: config/i386/i386.c:25848 config/ia64/ia64.c:619
-#: config/m68hc11/m68hc11.c:1118 config/rs6000/rs6000.c:20738
+#: tree.c:4076 tree.c:4088 tree.c:4098 config/darwin.c:1437
+#: config/arm/arm.c:3294 config/arm/arm.c:3322 config/avr/avr.c:4791
+#: config/h8300/h8300.c:5283 config/h8300/h8300.c:5307 config/i386/i386.c:4196
+#: config/i386/i386.c:26429 config/ia64/ia64.c:621
+#: config/m68hc11/m68hc11.c:1118 config/rs6000/rs6000.c:20739
#: config/sh/symbian.c:408 config/sh/symbian.c:415
#, gcc-internal-format
msgid "%qs attribute ignored"
msgstr ""
-#: tree.c:4109
+#: tree.c:4114
#, gcc-internal-format
msgid "inline function %q+D declared as dllimport: attribute ignored"
msgstr ""
-#: tree.c:4117
+#: tree.c:4122
#, gcc-internal-format
msgid "function %q+D definition is marked dllimport"
msgstr ""
-#: tree.c:4125 config/sh/symbian.c:430
+#: tree.c:4130 config/sh/symbian.c:430
#, gcc-internal-format
msgid "variable %q+D definition is marked dllimport"
msgstr ""
-#: tree.c:4148 config/sh/symbian.c:505
+#: tree.c:4153 config/sh/symbian.c:505
#, gcc-internal-format
msgid "external linkage required for symbol %q+D because of %qs attribute"
msgstr ""
-#: tree.c:4162
+#: tree.c:4167
#, gcc-internal-format
msgid ""
"%qs implies default visibility, but %qD has already been declared with a "
"different visibility"
msgstr ""
-#: tree.c:5744
+#: tree.c:5749
#, gcc-internal-format
msgid "arrays of functions are not meaningful"
msgstr ""
-#: tree.c:5895
+#: tree.c:5900
#, gcc-internal-format
msgid "function return type cannot be function"
msgstr ""
-#: tree.c:7053 tree.c:7138 tree.c:7199
+#: tree.c:7058 tree.c:7143 tree.c:7204
#, gcc-internal-format
msgid "tree check: %s, have %s in %s, at %s:%d"
msgstr ""
-#: tree.c:7090
+#: tree.c:7095
#, gcc-internal-format
msgid "tree check: expected none of %s, have %s in %s, at %s:%d"
msgstr ""
-#: tree.c:7103
+#: tree.c:7108
#, gcc-internal-format
msgid "tree check: expected class %qs, have %qs (%s) in %s, at %s:%d"
msgstr ""
-#: tree.c:7152
+#: tree.c:7157
#, gcc-internal-format
msgid "tree check: did not expect class %qs, have %qs (%s) in %s, at %s:%d"
msgstr ""
-#: tree.c:7165
+#: tree.c:7170
#, gcc-internal-format
msgid "tree check: expected omp_clause %s, have %s in %s, at %s:%d"
msgstr ""
-#: tree.c:7225
+#: tree.c:7230
#, gcc-internal-format
msgid ""
"tree check: expected tree that contains %qs structure, have %qs in %s, at %s:"
"%d"
msgstr ""
-#: tree.c:7239
+#: tree.c:7244
#, gcc-internal-format
msgid "tree check: accessed elt %d of tree_vec with %d elts in %s, at %s:%d"
msgstr ""
-#: tree.c:7252
+#: tree.c:7257
#, gcc-internal-format
msgid "tree check: accessed operand %d of %s with %d operands in %s, at %s:%d"
msgstr ""
-#: tree.c:7265
+#: tree.c:7270
#, gcc-internal-format
msgid ""
"tree check: accessed operand %d of omp_clause %s with %d operands in %s, at %"
@@ -25417,83 +25209,83 @@ msgid ""
"requested alignment for %q+D is greater than implemented alignment of %wu"
msgstr ""
-#: varasm.c:4483
+#: varasm.c:4482
#, gcc-internal-format
msgid "initializer for integer/fixed-point value is too complicated"
msgstr ""
-#: varasm.c:4488
+#: varasm.c:4487
#, gcc-internal-format
msgid "initializer for floating value is not a floating constant"
msgstr ""
-#: varasm.c:4761
+#: varasm.c:4760
#, gcc-internal-format
msgid "invalid initial value for member %qs"
msgstr ""
-#: varasm.c:4957 varasm.c:5001
+#: varasm.c:4956 varasm.c:5000
#, gcc-internal-format
msgid "weak declaration of %q+D must precede definition"
msgstr ""
-#: varasm.c:4965
+#: varasm.c:4964
#, gcc-internal-format
msgid ""
"weak declaration of %q+D after first use results in unspecified behavior"
msgstr ""
-#: varasm.c:4999
+#: varasm.c:4998
#, gcc-internal-format
msgid "weak declaration of %q+D must be public"
msgstr ""
-#: varasm.c:5003
+#: varasm.c:5002
#, gcc-internal-format
msgid "weak declaration of %q+D not supported"
msgstr ""
-#: varasm.c:5029
+#: varasm.c:5028
#, gcc-internal-format
msgid "only weak aliases are supported in this configuration"
msgstr ""
-#: varasm.c:5264
+#: varasm.c:5263
#, gcc-internal-format
msgid "%Jweakref is not supported in this configuration"
msgstr ""
-#: varasm.c:5345
+#: varasm.c:5344
#, gcc-internal-format
msgid "%q+D aliased to undefined symbol %qs"
msgstr ""
-#: varasm.c:5350
+#: varasm.c:5349
#, gcc-internal-format
msgid "%q+D aliased to external symbol %qs"
msgstr ""
-#: varasm.c:5389
+#: varasm.c:5388
#, gcc-internal-format
msgid "weakref %q+D ultimately targets itself"
msgstr ""
-#: varasm.c:5398
+#: varasm.c:5397
#, gcc-internal-format
msgid "weakref %q+D must have static linkage"
msgstr ""
-#: varasm.c:5404
+#: varasm.c:5403
#, gcc-internal-format
msgid "%Jalias definitions not supported in this configuration"
msgstr ""
-#: varasm.c:5409
+#: varasm.c:5408
#, gcc-internal-format
msgid "%Jonly weak aliases are supported in this configuration"
msgstr ""
-#: varasm.c:5469
+#: varasm.c:5468
#, gcc-internal-format
msgid "visibility attribute not supported in this configuration; ignored"
msgstr ""
@@ -25519,63 +25311,63 @@ msgstr ""
msgid "no sclass for %s stab (0x%x)"
msgstr ""
-#: config/darwin-c.c:84
+#: config/darwin-c.c:85
#, gcc-internal-format
msgid "too many #pragma options align=reset"
msgstr ""
-#: config/darwin-c.c:104 config/darwin-c.c:107 config/darwin-c.c:109
-#: config/darwin-c.c:111
+#: config/darwin-c.c:105 config/darwin-c.c:108 config/darwin-c.c:110
+#: config/darwin-c.c:112
#, gcc-internal-format
msgid "malformed '#pragma options', ignoring"
msgstr ""
-#: config/darwin-c.c:114
+#: config/darwin-c.c:115
#, gcc-internal-format
msgid "junk at end of '#pragma options'"
msgstr ""
-#: config/darwin-c.c:124
+#: config/darwin-c.c:125
#, gcc-internal-format
msgid "malformed '#pragma options align={mac68k|power|reset}', ignoring"
msgstr ""
-#: config/darwin-c.c:136
+#: config/darwin-c.c:137
#, gcc-internal-format
msgid "missing '(' after '#pragma unused', ignoring"
msgstr ""
-#: config/darwin-c.c:154
+#: config/darwin-c.c:155
#, gcc-internal-format
msgid "missing ')' after '#pragma unused', ignoring"
msgstr ""
-#: config/darwin-c.c:157
+#: config/darwin-c.c:158
#, gcc-internal-format
msgid "junk at end of '#pragma unused'"
msgstr ""
-#: config/darwin-c.c:168
+#: config/darwin-c.c:169
#, gcc-internal-format
msgid "malformed '#pragma ms_struct', ignoring"
msgstr ""
-#: config/darwin-c.c:176
+#: config/darwin-c.c:177
#, gcc-internal-format
msgid "malformed '#pragma ms_struct {on|off|reset}', ignoring"
msgstr ""
-#: config/darwin-c.c:179
+#: config/darwin-c.c:180
#, gcc-internal-format
msgid "junk at end of '#pragma ms_struct'"
msgstr ""
-#: config/darwin-c.c:405
+#: config/darwin-c.c:406
#, gcc-internal-format
msgid "subframework include %s conflicts with framework include"
msgstr ""
-#: config/darwin-c.c:588
+#: config/darwin-c.c:589
#, gcc-internal-format
msgid "Unknown value %qs of -mmacosx-version-min"
msgstr ""
@@ -25673,7 +25465,7 @@ msgstr ""
#. coalesced sections. Weak aliases (or any other kind of aliases) are
#. not supported. Weak symbols that aren't visible outside the .s file
#. are not supported.
-#: config/darwin.h:451
+#: config/darwin.h:452
#, gcc-internal-format
msgid "alias definitions not supported in Mach-O; ignored"
msgstr ""
@@ -25684,83 +25476,83 @@ msgstr ""
msgid "profiler support for VxWorks"
msgstr ""
-#: config/alpha/alpha.c:232 config/rs6000/rs6000.c:2186
+#: config/alpha/alpha.c:233 config/rs6000/rs6000.c:2193
#, gcc-internal-format
msgid "bad value %qs for -mtls-size switch"
msgstr ""
-#: config/alpha/alpha.c:286
+#: config/alpha/alpha.c:287
#, gcc-internal-format
msgid "-f%s ignored for Unicos/Mk (not supported)"
msgstr ""
-#: config/alpha/alpha.c:310
+#: config/alpha/alpha.c:311
#, gcc-internal-format
msgid "-mieee not supported on Unicos/Mk"
msgstr ""
-#: config/alpha/alpha.c:321
+#: config/alpha/alpha.c:322
#, gcc-internal-format
msgid "-mieee-with-inexact not supported on Unicos/Mk"
msgstr ""
-#: config/alpha/alpha.c:338
+#: config/alpha/alpha.c:339
#, gcc-internal-format
msgid "bad value %qs for -mtrap-precision switch"
msgstr ""
-#: config/alpha/alpha.c:352
+#: config/alpha/alpha.c:353
#, gcc-internal-format
msgid "bad value %qs for -mfp-rounding-mode switch"
msgstr ""
-#: config/alpha/alpha.c:367
+#: config/alpha/alpha.c:368
#, gcc-internal-format
msgid "bad value %qs for -mfp-trap-mode switch"
msgstr ""
-#: config/alpha/alpha.c:381 config/alpha/alpha.c:393
+#: config/alpha/alpha.c:382 config/alpha/alpha.c:394
#, gcc-internal-format
msgid "bad value %qs for -mcpu switch"
msgstr ""
-#: config/alpha/alpha.c:400
+#: config/alpha/alpha.c:401
#, gcc-internal-format
msgid "trap mode not supported on Unicos/Mk"
msgstr ""
-#: config/alpha/alpha.c:407
+#: config/alpha/alpha.c:408
#, gcc-internal-format
msgid "fp software completion requires -mtrap-precision=i"
msgstr ""
-#: config/alpha/alpha.c:423
+#: config/alpha/alpha.c:424
#, gcc-internal-format
msgid "rounding mode not supported for VAX floats"
msgstr ""
-#: config/alpha/alpha.c:428
+#: config/alpha/alpha.c:429
#, gcc-internal-format
msgid "trap mode not supported for VAX floats"
msgstr ""
-#: config/alpha/alpha.c:432
+#: config/alpha/alpha.c:433
#, gcc-internal-format
msgid "128-bit long double not supported for VAX floats"
msgstr ""
-#: config/alpha/alpha.c:460
+#: config/alpha/alpha.c:461
#, gcc-internal-format
msgid "L%d cache latency unknown for %s"
msgstr ""
-#: config/alpha/alpha.c:475
+#: config/alpha/alpha.c:476
#, gcc-internal-format
msgid "bad value %qs for -mmemory-latency"
msgstr ""
-#: config/alpha/alpha.c:6549 config/alpha/alpha.c:6552 config/s390/s390.c:8737
-#: config/s390/s390.c:8740
+#: config/alpha/alpha.c:6563 config/alpha/alpha.c:6566 config/s390/s390.c:8718
+#: config/s390/s390.c:8721
#, gcc-internal-format
msgid "bad builtin fcode"
msgstr ""
@@ -25775,200 +25567,205 @@ msgstr ""
msgid "argument of %qs attribute is not \"ilink1\" or \"ilink2\""
msgstr ""
-#: config/arm/arm.c:1083
+#: config/arm/arm.c:1182
#, gcc-internal-format
msgid "switch -mcpu=%s conflicts with -march= switch"
msgstr ""
-#: config/arm/arm.c:1093 config/rs6000/rs6000.c:1593 config/sparc/sparc.c:764
+#: config/arm/arm.c:1192 config/rs6000/rs6000.c:1593 config/sparc/sparc.c:764
#, gcc-internal-format
msgid "bad value (%s) for %s switch"
msgstr ""
-#: config/arm/arm.c:1206
+#: config/arm/arm.c:1305
#, gcc-internal-format
msgid "invalid ABI option: -mabi=%s"
msgstr ""
-#: config/arm/arm.c:1214
+#: config/arm/arm.c:1313
#, gcc-internal-format
msgid "target CPU does not support ARM mode"
msgstr ""
-#: config/arm/arm.c:1220
+#: config/arm/arm.c:1319
#, gcc-internal-format
msgid "target CPU does not support interworking"
msgstr ""
-#: config/arm/arm.c:1226
+#: config/arm/arm.c:1325
#, gcc-internal-format
msgid "target CPU does not support THUMB instructions"
msgstr ""
-#: config/arm/arm.c:1244
+#: config/arm/arm.c:1343
#, gcc-internal-format
msgid ""
"enabling backtrace support is only meaningful when compiling for the Thumb"
msgstr ""
-#: config/arm/arm.c:1247
+#: config/arm/arm.c:1346
#, gcc-internal-format
msgid ""
"enabling callee interworking support is only meaningful when compiling for "
"the Thumb"
msgstr ""
-#: config/arm/arm.c:1250
+#: config/arm/arm.c:1349
#, gcc-internal-format
msgid ""
"enabling caller interworking support is only meaningful when compiling for "
"the Thumb"
msgstr ""
-#: config/arm/arm.c:1254
+#: config/arm/arm.c:1353
#, gcc-internal-format
msgid "-mapcs-stack-check incompatible with -mno-apcs-frame"
msgstr ""
-#: config/arm/arm.c:1262
+#: config/arm/arm.c:1361
#, gcc-internal-format
msgid "-fpic and -mapcs-reent are incompatible"
msgstr ""
-#: config/arm/arm.c:1265
+#: config/arm/arm.c:1364
#, gcc-internal-format
msgid "APCS reentrant code not supported. Ignored"
msgstr ""
-#: config/arm/arm.c:1273
+#: config/arm/arm.c:1372
#, gcc-internal-format
msgid "-g with -mno-apcs-frame may not give sensible debugging"
msgstr ""
-#: config/arm/arm.c:1276
+#: config/arm/arm.c:1375
#, gcc-internal-format
msgid "passing floating point arguments in fp regs not yet supported"
msgstr ""
-#: config/arm/arm.c:1333
+#: config/arm/arm.c:1432
#, gcc-internal-format
msgid "iwmmxt requires an AAPCS compatible ABI for proper operation"
msgstr ""
-#: config/arm/arm.c:1336
+#: config/arm/arm.c:1435
#, gcc-internal-format
msgid "iwmmxt abi requires an iwmmxt capable cpu"
msgstr ""
-#: config/arm/arm.c:1346
+#: config/arm/arm.c:1445
#, gcc-internal-format
msgid "invalid floating point emulation option: -mfpe=%s"
msgstr ""
-#: config/arm/arm.c:1363
+#: config/arm/arm.c:1462
#, gcc-internal-format
msgid "invalid floating point option: -mfpu=%s"
msgstr ""
-#: config/arm/arm.c:1403
+#: config/arm/arm.c:1502
#, gcc-internal-format
msgid "invalid floating point abi: -mfloat-abi=%s"
msgstr ""
-#: config/arm/arm.c:1410
+#: config/arm/arm.c:1509
#, gcc-internal-format
msgid "-mfloat-abi=hard and VFP"
msgstr ""
-#: config/arm/arm.c:1416
+#: config/arm/arm.c:1515
#, gcc-internal-format
msgid "iWMMXt and hardware floating point"
msgstr ""
-#: config/arm/arm.c:1420
+#: config/arm/arm.c:1519
#, gcc-internal-format
msgid "Thumb-2 iWMMXt"
msgstr ""
-#: config/arm/arm.c:1443
+#: config/arm/arm.c:1542
#, gcc-internal-format
msgid "invalid thread pointer option: -mtp=%s"
msgstr ""
-#: config/arm/arm.c:1456
+#: config/arm/arm.c:1555
#, gcc-internal-format
msgid "can not use -mtp=cp15 with 16-bit Thumb"
msgstr ""
-#: config/arm/arm.c:1470
+#: config/arm/arm.c:1569
#, gcc-internal-format
msgid "structure size boundary can only be set to %s"
msgstr ""
-#: config/arm/arm.c:1476
+#: config/arm/arm.c:1575
#, gcc-internal-format
msgid "RTP PIC is incompatible with Thumb"
msgstr ""
-#: config/arm/arm.c:1485
+#: config/arm/arm.c:1584
#, gcc-internal-format
msgid "RTP PIC is incompatible with -msingle-pic-base"
msgstr ""
-#: config/arm/arm.c:1497
+#: config/arm/arm.c:1596
#, gcc-internal-format
msgid "-mpic-register= is useless without -fpic"
msgstr ""
-#: config/arm/arm.c:1506
+#: config/arm/arm.c:1605
#, gcc-internal-format
msgid "unable to use '%s' for PIC register"
msgstr ""
-#: config/arm/arm.c:3145 config/arm/arm.c:3163 config/avr/avr.c:4768
-#: config/avr/avr.c:4810 config/bfin/bfin.c:5173 config/h8300/h8300.c:5258
-#: config/i386/i386.c:4134 config/i386/i386.c:25793
-#: config/m68hc11/m68hc11.c:1155 config/m68k/m68k.c:783
-#: config/mcore/mcore.c:3034 config/mips/mips.c:1224 config/mips/mips.c:1226
-#: config/rs6000/rs6000.c:20664 config/sh/sh.c:8127 config/sh/sh.c:8145
-#: config/sh/sh.c:8174 config/sh/sh.c:8256 config/sh/sh.c:8279
-#: config/stormy16/stormy16.c:2227 config/v850/v850.c:2048
+#: config/arm/arm.c:3262 config/arm/arm.c:3280 config/avr/avr.c:4811
+#: config/avr/avr.c:4827 config/bfin/bfin.c:5228 config/h8300/h8300.c:5259
+#: config/i386/i386.c:4158 config/i386/i386.c:26374
+#: config/m68hc11/m68hc11.c:1155 config/m68k/m68k.c:780
+#: config/mcore/mcore.c:3034 config/mips/mips.c:1223 config/mips/mips.c:1225
+#: config/rs6000/rs6000.c:20665 config/sh/sh.c:8129 config/sh/sh.c:8147
+#: config/sh/sh.c:8176 config/sh/sh.c:8258 config/sh/sh.c:8281
+#: config/stormy16/stormy16.c:2221 config/v850/v850.c:2048
#, gcc-internal-format
msgid "%qs attribute only applies to functions"
msgstr ""
-#: config/arm/arm.c:14342
+#: config/arm/arm.c:14790
#, gcc-internal-format
msgid "unable to compute real location of stacked parameter"
msgstr ""
-#: config/arm/arm.c:15848
+#: config/arm/arm.c:16296
#, gcc-internal-format
msgid "argument must be a constant"
msgstr ""
#. @@@ better error message
-#: config/arm/arm.c:16156 config/arm/arm.c:16193
+#: config/arm/arm.c:16604 config/arm/arm.c:16641
#, gcc-internal-format
msgid "selector must be an immediate"
msgstr ""
#. @@@ better error message
-#: config/arm/arm.c:16236
+#: config/arm/arm.c:16684
#, gcc-internal-format
msgid "mask must be an immediate"
msgstr ""
-#: config/arm/arm.c:16897
+#: config/arm/arm.c:17345
#, gcc-internal-format
msgid "no low registers available for popping high registers"
msgstr ""
-#: config/arm/arm.c:17120
+#: config/arm/arm.c:17568
#, gcc-internal-format
msgid "interrupt Service Routines cannot be coded in Thumb mode"
msgstr ""
+#: config/arm/arm.c:19618
+#, gcc-internal-format
+msgid "the mangling of %<va_list%> has changed in GCC 4.4"
+msgstr ""
+
#: config/arm/pe.c:158 config/mcore/mcore.c:2900
#, gcc-internal-format
msgid "initialized variable %q+D is marked dllimport"
@@ -25979,37 +25776,37 @@ msgstr ""
msgid "static variable %q+D is marked dllimport"
msgstr ""
-#: config/avr/avr.c:4741
+#: config/avr/avr.c:4613
#, gcc-internal-format
-msgid "only initialized variables can be placed into program memory area"
+msgid "%qs appears to be a misspelled interrupt handler"
msgstr ""
-#: config/avr/avr.c:4785
+#: config/avr/avr.c:4622
#, gcc-internal-format
-msgid "%qs appears to be a misspelled interrupt handler"
+msgid "%qs appears to be a misspelled signal handler"
msgstr ""
-#: config/avr/avr.c:4793
+#: config/avr/avr.c:4784
#, gcc-internal-format
-msgid "%qs appears to be a misspelled signal handler"
+msgid "only initialized variables can be placed into program memory area"
msgstr ""
-#: config/avr/avr.c:4901
+#: config/avr/avr.c:4918
#, gcc-internal-format
msgid "only uninitialized variables can be placed in the .noinit section"
msgstr ""
-#: config/avr/avr.c:4915
+#: config/avr/avr.c:4932
#, gcc-internal-format
msgid "MCU %qs supported for assembler only"
msgstr ""
-#: config/avr/avr.h:759
+#: config/avr/avr.h:756
#, gcc-internal-format
msgid "trampolines not supported"
msgstr ""
-#: config/bfin/bfin.c:2479 config/m68k/m68k.c:500
+#: config/bfin/bfin.c:2479 config/m68k/m68k.c:497
#, gcc-internal-format
msgid "-mshared-library-id=%s is not between 0 and %d"
msgstr ""
@@ -26039,7 +25836,7 @@ msgstr ""
msgid "ID shared libraries and FD-PIC mode can't be used together."
msgstr ""
-#: config/bfin/bfin.c:2611 config/m68k/m68k.c:608
+#: config/bfin/bfin.c:2611 config/m68k/m68k.c:605
#, gcc-internal-format
msgid "cannot specify both -msep-data and -mid-shared-library"
msgstr ""
@@ -26064,27 +25861,27 @@ msgstr ""
msgid "-mcorea and -mcoreb can't be used together"
msgstr ""
-#: config/bfin/bfin.c:5178
+#: config/bfin/bfin.c:5233
#, gcc-internal-format
msgid "multiple function type attributes specified"
msgstr ""
-#: config/bfin/bfin.c:5234 config/bfin/bfin.c:5263 config/spu/spu.c:3587
+#: config/bfin/bfin.c:5289 config/bfin/bfin.c:5318 config/spu/spu.c:3591
#, gcc-internal-format
msgid "`%s' attribute only applies to functions"
msgstr ""
-#: config/bfin/bfin.c:5245
+#: config/bfin/bfin.c:5300
#, gcc-internal-format
msgid "can't apply both longcall and shortcall attributes to the same function"
msgstr ""
-#: config/bfin/bfin.c:5295
+#: config/bfin/bfin.c:5350
#, gcc-internal-format
msgid "`%s' attribute only applies to variables"
msgstr ""
-#: config/bfin/bfin.c:5302
+#: config/bfin/bfin.c:5357
#, gcc-internal-format
msgid "`%s' attribute cannot be specified for local variables"
msgstr ""
@@ -26175,7 +25972,7 @@ msgid "emitting PIC operand, but PIC register isn't set up"
msgstr ""
#. Definitions for GCC. Part of the machine description for CRIS.
-#. Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+#. Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
#. Free Software Foundation, Inc.
#. Contributed by Axis Communications. Written by Hans-Peter Nilsson.
#.
@@ -26223,17 +26020,17 @@ msgstr ""
#. See cris.c for TARGET_ASM_FUNCTION_PROLOGUE and
#. TARGET_ASM_FUNCTION_EPILOGUE.
#. Node: Profiling
-#: config/cris/cris.h:952
+#: config/cris/cris.h:953
#, gcc-internal-format
msgid "no FUNCTION_PROFILER for CRIS"
msgstr ""
-#: config/crx/crx.h:367
+#: config/crx/crx.h:368
#, gcc-internal-format
msgid "Profiler support for CRX"
msgstr ""
-#: config/crx/crx.h:378
+#: config/crx/crx.h:379
#, gcc-internal-format
msgid "Trampoline support for CRX"
msgstr ""
@@ -26298,12 +26095,12 @@ msgstr ""
msgid "this builtin function is only available on the fr450"
msgstr ""
-#: config/h8300/h8300.c:331
+#: config/h8300/h8300.c:332
#, gcc-internal-format
msgid "-ms2600 is used without -ms"
msgstr ""
-#: config/h8300/h8300.c:337
+#: config/h8300/h8300.c:338
#, gcc-internal-format
msgid "-mn is used without -mh or -ms"
msgstr ""
@@ -26318,346 +26115,363 @@ msgstr ""
msgid "can't set position in PCH file: %m"
msgstr ""
-#: config/i386/i386.c:2656 config/i386/i386.c:2882
+#: config/i386/i386.c:2660 config/i386/i386.c:2900
#, gcc-internal-format
msgid "bad value (%s) for %stune=%s %s"
msgstr ""
-#: config/i386/i386.c:2698
+#: config/i386/i386.c:2704
#, gcc-internal-format
msgid "bad value (%s) for %sstringop-strategy=%s %s"
msgstr ""
-#: config/i386/i386.c:2702
+#: config/i386/i386.c:2708
#, gcc-internal-format
msgid ""
"%stune=x86-64%s is deprecated. Use %stune=k8%s or %stune=generic%s instead "
"as appropriate."
msgstr ""
-#: config/i386/i386.c:2712
+#: config/i386/i386.c:2718
#, gcc-internal-format
msgid "generic CPU can be used only for %stune=%s %s"
msgstr ""
-#: config/i386/i386.c:2715 config/i386/i386.c:2843
+#: config/i386/i386.c:2721 config/i386/i386.c:2861
#, gcc-internal-format
msgid "bad value (%s) for %sarch=%s %s"
msgstr ""
-#: config/i386/i386.c:2727
+#: config/i386/i386.c:2732
+#, gcc-internal-format
+msgid "unknown ABI (%s) for %sabi=%s %s"
+msgstr ""
+
+#: config/i386/i386.c:2745
#, gcc-internal-format
msgid "code model %s does not support PIC mode"
msgstr ""
-#: config/i386/i386.c:2733
+#: config/i386/i386.c:2751
#, gcc-internal-format
msgid "bad value (%s) for %scmodel=%s %s"
msgstr ""
-#: config/i386/i386.c:2757
+#: config/i386/i386.c:2775
#, gcc-internal-format
msgid "bad value (%s) for %sasm=%s %s"
msgstr ""
-#: config/i386/i386.c:2761
+#: config/i386/i386.c:2779
#, gcc-internal-format
msgid "code model %qs not supported in the %s bit mode"
msgstr ""
-#: config/i386/i386.c:2764
+#: config/i386/i386.c:2782
#, gcc-internal-format
msgid "%i-bit mode not compiled in"
msgstr ""
-#: config/i386/i386.c:2776 config/i386/i386.c:2868
+#: config/i386/i386.c:2794 config/i386/i386.c:2886
#, gcc-internal-format
msgid "CPU you selected does not support x86-64 instruction set"
msgstr ""
-#: config/i386/i386.c:2901
+#: config/i386/i386.c:2919
#, gcc-internal-format
msgid "%sregparm%s is ignored in 64-bit mode"
msgstr ""
-#: config/i386/i386.c:2904
+#: config/i386/i386.c:2922
#, gcc-internal-format
msgid "%sregparm=%d%s is not between 0 and %d"
msgstr ""
-#: config/i386/i386.c:2917
+#: config/i386/i386.c:2935
#, gcc-internal-format
-msgid "%salign-loops%s is obsolete, use %salign-loops%s"
+msgid "%salign-loops%s is obsolete, use -falign-loops%s"
msgstr ""
-#: config/i386/i386.c:2923 config/i386/i386.c:2938 config/i386/i386.c:2953
+#: config/i386/i386.c:2941 config/i386/i386.c:2956 config/i386/i386.c:2971
#, gcc-internal-format
msgid "%salign-loops=%d%s is not between 0 and %d"
msgstr ""
-#: config/i386/i386.c:2932
+#: config/i386/i386.c:2950
#, gcc-internal-format
-msgid "%salign-jumps%s is obsolete, use %salign-jumps%s"
+msgid "%salign-jumps%s is obsolete, use -falign-jumps%s"
msgstr ""
-#: config/i386/i386.c:2947
+#: config/i386/i386.c:2965
#, gcc-internal-format
-msgid "%salign-functions%s is obsolete, use %salign-functions%s"
+msgid "%salign-functions%s is obsolete, use -falign-functions%s"
msgstr ""
-#: config/i386/i386.c:2982
+#: config/i386/i386.c:3000
#, gcc-internal-format
msgid "%sbranch-cost=%d%s is not between 0 and 5"
msgstr ""
-#: config/i386/i386.c:2990
+#: config/i386/i386.c:3008
#, gcc-internal-format
msgid "%slarge-data-threshold=%d%s is negative"
msgstr ""
-#: config/i386/i386.c:3004
+#: config/i386/i386.c:3022
#, gcc-internal-format
msgid "bad value (%s) for %stls-dialect=%s %s"
msgstr ""
-#: config/i386/i386.c:3012
+#: config/i386/i386.c:3030
#, gcc-internal-format
msgid "pc%d is not valid precision setting (32, 64 or 80)"
msgstr ""
-#: config/i386/i386.c:3028
+#: config/i386/i386.c:3046
#, gcc-internal-format
msgid "%srtd%s is ignored in 64bit mode"
msgstr ""
-#: config/i386/i386.c:3083
+#: config/i386/i386.c:3101
#, gcc-internal-format
msgid "%spreferred-stack-boundary=%d%s is not between %d and 12"
msgstr ""
-#: config/i386/i386.c:3104
+#: config/i386/i386.c:3122
#, gcc-internal-format
msgid "-mincoming-stack-boundary=%d is not between %d and 12"
msgstr ""
-#: config/i386/i386.c:3117
+#: config/i386/i386.c:3135
#, gcc-internal-format
msgid "%ssseregparm%s used without SSE enabled"
msgstr ""
-#: config/i386/i386.c:3128 config/i386/i386.c:3142
+#: config/i386/i386.c:3146 config/i386/i386.c:3160
#, gcc-internal-format
msgid "SSE instruction set disabled, using 387 arithmetics"
msgstr ""
-#: config/i386/i386.c:3147
+#: config/i386/i386.c:3165
#, gcc-internal-format
msgid "387 instruction set disabled, using SSE arithmetics"
msgstr ""
-#: config/i386/i386.c:3154
+#: config/i386/i386.c:3172
#, gcc-internal-format
msgid "bad value (%s) for %sfpmath=%s %s"
msgstr ""
-#: config/i386/i386.c:3170
+#: config/i386/i386.c:3188
#, gcc-internal-format
msgid "unknown vectorization library ABI type (%s) for %sveclibabi=%s %s"
msgstr ""
-#: config/i386/i386.c:3190
+#: config/i386/i386.c:3208
#, gcc-internal-format
msgid ""
"unwind tables currently require either a frame pointer or %saccumulate-"
"outgoing-args%s for correctness"
msgstr ""
-#: config/i386/i386.c:3203
+#: config/i386/i386.c:3221
#, gcc-internal-format
msgid "stack probing requires %saccumulate-outgoing-args%s for correctness"
msgstr ""
-#: config/i386/i386.c:3540
+#: config/i386/i386.c:3559
#, gcc-internal-format
msgid "attribute(target(\"%s\")) is unknown"
msgstr ""
-#: config/i386/i386.c:3562
+#: config/i386/i386.c:3581
#, gcc-internal-format
msgid "option(\"%s\") was already specified"
msgstr ""
-#: config/i386/i386.c:4147 config/i386/i386.c:4191
+#: config/i386/i386.c:4171 config/i386/i386.c:4215
#, gcc-internal-format
msgid "fastcall and regparm attributes are not compatible"
msgstr ""
-#: config/i386/i386.c:4154
+#: config/i386/i386.c:4178
#, gcc-internal-format
msgid "%qs attribute requires an integer constant argument"
msgstr ""
-#: config/i386/i386.c:4160
+#: config/i386/i386.c:4184
#, gcc-internal-format
msgid "argument to %qs attribute larger than %d"
msgstr ""
-#: config/i386/i386.c:4183 config/i386/i386.c:4218
+#: config/i386/i386.c:4207 config/i386/i386.c:4242
#, gcc-internal-format
msgid "fastcall and cdecl attributes are not compatible"
msgstr ""
-#: config/i386/i386.c:4187
+#: config/i386/i386.c:4211
#, gcc-internal-format
msgid "fastcall and stdcall attributes are not compatible"
msgstr ""
-#: config/i386/i386.c:4201 config/i386/i386.c:4214
+#: config/i386/i386.c:4225 config/i386/i386.c:4238
#, gcc-internal-format
msgid "stdcall and cdecl attributes are not compatible"
msgstr ""
-#: config/i386/i386.c:4205
+#: config/i386/i386.c:4229
#, gcc-internal-format
msgid "stdcall and fastcall attributes are not compatible"
msgstr ""
-#: config/i386/i386.c:4294
+#: config/i386/i386.c:4316
#, gcc-internal-format
msgid "nested functions are limited to 2 register parameters"
msgstr ""
-#: config/i386/i386.c:4378
+#: config/i386/i386.c:4402
#, gcc-internal-format
msgid "Calling %qD with attribute sseregparm without SSE/SSE2 enabled"
msgstr ""
-#: config/i386/i386.c:4381
+#: config/i386/i386.c:4405
#, gcc-internal-format
msgid "Calling %qT with attribute sseregparm without SSE/SSE2 enabled"
msgstr ""
-#: config/i386/i386.c:5202
+#: config/i386/i386.c:4664
+#, gcc-internal-format
+msgid ""
+"ms_abi attribute require -maccumulate-outgoing-args or subtarget "
+"optimization implying it"
+msgstr ""
+
+#: config/i386/i386.c:4781
+#, gcc-internal-format
+msgid "AVX vector argument without AVX enabled changes the ABI"
+msgstr ""
+
+#: config/i386/i386.c:5058
+#, gcc-internal-format
+msgid "The ABI of passing union with long double has changed in GCC 4.4"
+msgstr ""
+
+#: config/i386/i386.c:5303
#, gcc-internal-format
msgid "SSE register return with SSE disabled"
msgstr ""
-#: config/i386/i386.c:5208
+#: config/i386/i386.c:5309
#, gcc-internal-format
msgid "SSE register argument with SSE disabled"
msgstr ""
-#: config/i386/i386.c:5224
+#: config/i386/i386.c:5325
#, gcc-internal-format
msgid "x87 register return with x87 disabled"
msgstr ""
-#: config/i386/i386.c:5559
+#: config/i386/i386.c:5691
#, gcc-internal-format
msgid "SSE vector argument without SSE enabled changes the ABI"
msgstr ""
-#: config/i386/i386.c:5581 config/i386/i386.c:5649
-#, gcc-internal-format
-msgid "AVX vector argument without AVX enabled changes the ABI"
-msgstr ""
-
-#: config/i386/i386.c:5600
+#: config/i386/i386.c:5728
#, gcc-internal-format
msgid "MMX vector argument without MMX enabled changes the ABI"
msgstr ""
-#: config/i386/i386.c:6196
+#: config/i386/i386.c:6329
#, gcc-internal-format
msgid "SSE vector return without SSE enabled changes the ABI"
msgstr ""
-#: config/i386/i386.c:6206
+#: config/i386/i386.c:6339
#, gcc-internal-format
msgid "MMX vector return without MMX enabled changes the ABI"
msgstr ""
-#: config/i386/i386.c:10314
+#: config/i386/i386.c:10606
#, gcc-internal-format
msgid "extended registers have no high halves"
msgstr ""
-#: config/i386/i386.c:10329
+#: config/i386/i386.c:10621
#, gcc-internal-format
msgid "unsupported operand size for extended register"
msgstr ""
-#: config/i386/i386.c:23000
+#: config/i386/i386.c:23591
#, gcc-internal-format
msgid "last argument must be an immediate"
msgstr ""
-#: config/i386/i386.c:23293
+#: config/i386/i386.c:23884
#, gcc-internal-format
msgid "the fifth argument must be a 8-bit immediate"
msgstr ""
-#: config/i386/i386.c:23388
+#: config/i386/i386.c:23979
#, gcc-internal-format
msgid "the third argument must be a 8-bit immediate"
msgstr ""
-#: config/i386/i386.c:23735
+#: config/i386/i386.c:24319
#, gcc-internal-format
msgid "the last argument must be a 4-bit immediate"
msgstr ""
-#: config/i386/i386.c:23744
+#: config/i386/i386.c:24324
#, gcc-internal-format
msgid "the last argument must be a 2-bit immediate"
msgstr ""
-#: config/i386/i386.c:23753
+#: config/i386/i386.c:24333
#, gcc-internal-format
msgid "the last argument must be a 1-bit immediate"
msgstr ""
-#: config/i386/i386.c:23762
+#: config/i386/i386.c:24342
#, gcc-internal-format
msgid "the last argument must be a 5-bit immediate"
msgstr ""
-#: config/i386/i386.c:23771
+#: config/i386/i386.c:24351
#, gcc-internal-format
msgid "the next to last argument must be an 8-bit immediate"
msgstr ""
-#: config/i386/i386.c:23775 config/i386/i386.c:23952
+#: config/i386/i386.c:24355 config/i386/i386.c:24533
#, gcc-internal-format
msgid "the last argument must be an 8-bit immediate"
msgstr ""
-#: config/i386/i386.c:24010 config/rs6000/rs6000.c:8519
+#: config/i386/i386.c:24591 config/rs6000/rs6000.c:8540
#, gcc-internal-format
msgid "selector must be an integer constant in the range 0..%wi"
msgstr ""
-#: config/i386/i386.c:24153
+#: config/i386/i386.c:24734
#, gcc-internal-format
msgid "%qE needs unknown isa option"
msgstr ""
-#: config/i386/i386.c:24157
+#: config/i386/i386.c:24738
#, gcc-internal-format
msgid "%qE needs isa option %s"
msgstr ""
-#: config/i386/i386.c:25800
+#: config/i386/i386.c:26381
#, gcc-internal-format
msgid "%qs attribute only available for 64-bit"
msgstr ""
-#: config/i386/i386.c:25811 config/i386/i386.c:25820
+#: config/i386/i386.c:26392 config/i386/i386.c:26401
#, gcc-internal-format
msgid "ms_abi and sysv_abi attributes are not compatible"
msgstr ""
-#: config/i386/i386.c:25858 config/rs6000/rs6000.c:20747
+#: config/i386/i386.c:26439 config/rs6000/rs6000.c:20748
#, gcc-internal-format
msgid "%qs incompatible attribute ignored"
msgstr ""
@@ -26672,23 +26486,23 @@ msgstr ""
msgid "definition of static data member %q+D of dllimport'd class"
msgstr ""
-#: config/i386/winnt.c:58
+#: config/i386/winnt.c:59
#, gcc-internal-format
msgid "%qs attribute only applies to variables"
msgstr ""
-#: config/i386/winnt.c:80
+#: config/i386/winnt.c:81
#, gcc-internal-format
msgid ""
"%qs attribute applies only to initialized variables with external linkage"
msgstr ""
-#: config/i386/winnt.c:297
+#: config/i386/winnt.c:290
#, gcc-internal-format
msgid "%q+D:'selectany' attribute applies only to initialized objects"
msgstr ""
-#: config/i386/winnt.c:454
+#: config/i386/winnt.c:447
#, gcc-internal-format
msgid "%q+D causes a section type conflict"
msgstr ""
@@ -26713,79 +26527,79 @@ msgstr ""
msgid "malformed #pragma builtin"
msgstr ""
-#: config/ia64/ia64.c:587 config/m32r/m32r.c:373
+#: config/ia64/ia64.c:589 config/m32r/m32r.c:373
#, gcc-internal-format
msgid "invalid argument of %qs attribute"
msgstr ""
-#: config/ia64/ia64.c:599
+#: config/ia64/ia64.c:601
#, gcc-internal-format
msgid "%Jan address area attribute cannot be specified for local variables"
msgstr ""
-#: config/ia64/ia64.c:606
+#: config/ia64/ia64.c:608
#, gcc-internal-format
msgid "address area of %q+D conflicts with previous declaration"
msgstr ""
-#: config/ia64/ia64.c:613
+#: config/ia64/ia64.c:615
#, gcc-internal-format
msgid "%Jaddress area attribute cannot be specified for functions"
msgstr ""
-#: config/ia64/ia64.c:5163 config/pa/pa.c:350 config/sh/sh.c:7950
-#: config/spu/spu.c:4475
+#: config/ia64/ia64.c:5168 config/pa/pa.c:351 config/sh/sh.c:7952
+#: config/spu/spu.c:4478
#, gcc-internal-format
msgid "value of -mfixed-range must have form REG1-REG2"
msgstr ""
-#: config/ia64/ia64.c:5190 config/pa/pa.c:377 config/sh/sh.c:7976
-#: config/spu/spu.c:4501
+#: config/ia64/ia64.c:5195 config/pa/pa.c:378 config/sh/sh.c:7978
+#: config/spu/spu.c:4504
#, gcc-internal-format
msgid "%s-%s is an empty range"
msgstr ""
-#: config/ia64/ia64.c:5218
+#: config/ia64/ia64.c:5223
#, gcc-internal-format
msgid "bad value %<%s%> for -mtls-size= switch"
msgstr ""
-#: config/ia64/ia64.c:5246
+#: config/ia64/ia64.c:5251
#, gcc-internal-format
msgid "bad value %<%s%> for -mtune= switch"
msgstr ""
-#: config/ia64/ia64.c:5265
+#: config/ia64/ia64.c:5270
#, gcc-internal-format
msgid "not yet implemented: latency-optimized inline square root"
msgstr ""
-#: config/ia64/ia64.c:10472
+#: config/ia64/ia64.c:10535
#, gcc-internal-format
msgid "version attribute is not a string"
msgstr ""
-#: config/iq2000/iq2000.c:1816
+#: config/iq2000/iq2000.c:1817
#, gcc-internal-format
msgid "gp_offset (%ld) or end_offset (%ld) is less than zero"
msgstr ""
-#: config/iq2000/iq2000.c:2586
+#: config/iq2000/iq2000.c:2587
#, gcc-internal-format
msgid "argument %qd is not a constant"
msgstr ""
-#: config/iq2000/iq2000.c:2888 config/xtensa/xtensa.c:2320
+#: config/iq2000/iq2000.c:2889 config/xtensa/xtensa.c:2320
#, gcc-internal-format
msgid "PRINT_OPERAND_ADDRESS, null pointer"
msgstr ""
-#: config/iq2000/iq2000.c:3043
+#: config/iq2000/iq2000.c:3044
#, gcc-internal-format
msgid "PRINT_OPERAND: Unknown punctuation '%c'"
msgstr ""
-#: config/iq2000/iq2000.c:3052 config/xtensa/xtensa.c:2174
+#: config/iq2000/iq2000.c:3053 config/xtensa/xtensa.c:2174
#, gcc-internal-format
msgid "PRINT_OPERAND null pointer"
msgstr ""
@@ -26820,7 +26634,7 @@ msgstr ""
msgid "`%s' attribute applies only to functions"
msgstr ""
-#: config/m32c/m32c.c:2809 config/sh/sh.c:8182
+#: config/m32c/m32c.c:2809 config/sh/sh.c:8184
#, gcc-internal-format
msgid "`%s' attribute argument not an integer constant"
msgstr ""
@@ -26845,183 +26659,183 @@ msgstr ""
msgid "%<trap%> attribute is already used"
msgstr ""
-#: config/m68k/m68k.c:549
+#: config/m68k/m68k.c:546
#, gcc-internal-format
msgid "-mcpu=%s conflicts with -march=%s"
msgstr ""
-#: config/m68k/m68k.c:620
+#: config/m68k/m68k.c:617
#, gcc-internal-format
msgid "-mpcrel -fPIC is not currently supported on selected cpu"
msgstr ""
-#: config/m68k/m68k.c:682
+#: config/m68k/m68k.c:679
#, gcc-internal-format
msgid "-falign-labels=%d is not supported"
msgstr ""
-#: config/m68k/m68k.c:687
+#: config/m68k/m68k.c:684
#, gcc-internal-format
msgid "-falign-loops=%d is not supported"
msgstr ""
-#: config/m68k/m68k.c:790
+#: config/m68k/m68k.c:787
#, gcc-internal-format
msgid "multiple interrupt attributes not allowed"
msgstr ""
-#: config/m68k/m68k.c:797
+#: config/m68k/m68k.c:794
#, gcc-internal-format
msgid "interrupt_thread is available only on fido"
msgstr ""
-#: config/m68k/m68k.c:1119 config/rs6000/rs6000.c:15570
+#: config/m68k/m68k.c:1116 config/rs6000/rs6000.c:15586
#, gcc-internal-format
msgid "stack limit expression is not supported"
msgstr ""
-#: config/mips/mips.c:1236
+#: config/mips/mips.c:1235
#, gcc-internal-format
msgid "%qs cannot have both %<mips16%> and %<nomips16%> attributes"
msgstr ""
-#: config/mips/mips.c:1258 config/mips/mips.c:1261
+#: config/mips/mips.c:1257 config/mips/mips.c:1260
#, gcc-internal-format
msgid "%qs redeclared with conflicting %qs attributes"
msgstr ""
-#: config/mips/mips.c:2719
+#: config/mips/mips.c:2718
#, gcc-internal-format
msgid "MIPS16 TLS"
msgstr ""
-#: config/mips/mips.c:6057
+#: config/mips/mips.c:6058
#, gcc-internal-format
msgid "cannot handle inconsistent calls to %qs"
msgstr ""
-#: config/mips/mips.c:11698
+#: config/mips/mips.c:11706
#, gcc-internal-format
msgid "invalid argument to built-in function"
msgstr ""
-#: config/mips/mips.c:11939
+#: config/mips/mips.c:11947
#, gcc-internal-format
msgid "built-in function %qs not supported for MIPS16"
msgstr ""
-#: config/mips/mips.c:12517
+#: config/mips/mips.c:12525
#, gcc-internal-format
msgid "%qs does not support MIPS16 code"
msgstr ""
-#: config/mips/mips.c:13491
+#: config/mips/mips.c:13499
#, gcc-internal-format
msgid "MIPS16 PIC for ABIs other than o32 and o64"
msgstr ""
-#: config/mips/mips.c:13494
+#: config/mips/mips.c:13502
#, gcc-internal-format
msgid "MIPS16 -mxgot code"
msgstr ""
-#: config/mips/mips.c:13497
+#: config/mips/mips.c:13505
#, gcc-internal-format
msgid "hard-float MIPS16 code for ABIs other than o32 and o64"
msgstr ""
-#: config/mips/mips.c:13626
+#: config/mips/mips.c:13634
#, gcc-internal-format
msgid "CPU names must be lower case"
msgstr ""
-#: config/mips/mips.c:13769
+#: config/mips/mips.c:13777
#, gcc-internal-format
msgid ""
"%<-%s%> conflicts with the other architecture options, which specify a %s "
"processor"
msgstr ""
-#: config/mips/mips.c:13785
+#: config/mips/mips.c:13793
#, gcc-internal-format
msgid "%<-march=%s%> is not compatible with the selected ABI"
msgstr ""
-#: config/mips/mips.c:13800
+#: config/mips/mips.c:13808
#, gcc-internal-format
msgid "%<-mgp64%> used with a 32-bit processor"
msgstr ""
-#: config/mips/mips.c:13802
+#: config/mips/mips.c:13810
#, gcc-internal-format
msgid "%<-mgp32%> used with a 64-bit ABI"
msgstr ""
-#: config/mips/mips.c:13804
+#: config/mips/mips.c:13812
#, gcc-internal-format
msgid "%<-mgp64%> used with a 32-bit ABI"
msgstr ""
-#: config/mips/mips.c:13820 config/mips/mips.c:13822 config/mips/mips.c:13889
+#: config/mips/mips.c:13828 config/mips/mips.c:13830 config/mips/mips.c:13897
#, gcc-internal-format
msgid "unsupported combination: %s"
msgstr ""
-#: config/mips/mips.c:13826
+#: config/mips/mips.c:13834
#, gcc-internal-format
msgid ""
"%<-mgp32%> and %<-mfp64%> can only be combined if the target supports the "
"mfhc1 and mthc1 instructions"
msgstr ""
-#: config/mips/mips.c:13829
+#: config/mips/mips.c:13837
#, gcc-internal-format
msgid "%<-mgp32%> and %<-mfp64%> can only be combined when using the o32 ABI"
msgstr ""
-#: config/mips/mips.c:13883
+#: config/mips/mips.c:13891
#, gcc-internal-format
msgid "the %qs architecture does not support branch-likely instructions"
msgstr ""
-#: config/mips/mips.c:13923
+#: config/mips/mips.c:13931
#, gcc-internal-format
msgid "%<-mno-gpopt%> needs %<-mexplicit-relocs%>"
msgstr ""
-#: config/mips/mips.c:13931 config/mips/mips.c:13934
+#: config/mips/mips.c:13939 config/mips/mips.c:13942
#, gcc-internal-format
msgid "cannot use small-data accesses for %qs"
msgstr ""
-#: config/mips/mips.c:13948
+#: config/mips/mips.c:13956
#, gcc-internal-format
msgid "%<-mips3d%> requires %<-mpaired-single%>"
msgstr ""
-#: config/mips/mips.c:13957
+#: config/mips/mips.c:13965
#, gcc-internal-format
msgid "%qs must be used with %qs"
msgstr ""
-#: config/mips/mips.c:13964
+#: config/mips/mips.c:13972
#, gcc-internal-format
msgid "the %qs architecture does not support paired-single instructions"
msgstr ""
-#: config/mips/mips.c:13970
+#: config/mips/mips.c:13978
#, gcc-internal-format
msgid "%qs requires a target that provides the %qs instruction"
msgstr ""
-#: config/mips/mips.c:14049
+#: config/mips/mips.c:14078
#, gcc-internal-format
msgid "%qs requires branch-likely instructions"
msgstr ""
#. Output assembler code to FILE to increment profiler label # LABELNO
#. for profiling a function entry.
-#: config/mips/mips.h:2290
+#: config/mips/mips.h:2308
#, gcc-internal-format
msgid "mips16 function profiling"
msgstr ""
@@ -27079,27 +26893,27 @@ msgstr ""
msgid "MMIX Internal: %s is not a shiftable int"
msgstr ""
-#: config/pa/pa.c:482
+#: config/pa/pa.c:483
#, gcc-internal-format
msgid "PIC code generation is not supported in the portable runtime model"
msgstr ""
-#: config/pa/pa.c:487
+#: config/pa/pa.c:488
#, gcc-internal-format
msgid "PIC code generation is not compatible with fast indirect calls"
msgstr ""
-#: config/pa/pa.c:492
+#: config/pa/pa.c:493
#, gcc-internal-format
msgid "-g is only supported when using GAS on this processor,"
msgstr ""
-#: config/pa/pa.c:493
+#: config/pa/pa.c:494
#, gcc-internal-format
msgid "-g option disabled"
msgstr ""
-#: config/pa/pa.c:8382
+#: config/pa/pa.c:8388
#, gcc-internal-format
msgid ""
"alignment (%u) for %s exceeds maximum alignment for global common data. "
@@ -27111,93 +26925,93 @@ msgstr ""
msgid "-munix=98 option required for C89 Amendment 1 features.\n"
msgstr ""
-#: config/picochip/picochip.c:369
+#: config/picochip/picochip.c:379
#, gcc-internal-format
msgid "invalid AE type specified (%s)\n"
msgstr ""
-#: config/picochip/picochip.c:392
+#: config/picochip/picochip.c:402
#, gcc-internal-format
msgid "Invalid mul type specified (%s) - expected mac, mul or none"
msgstr ""
-#: config/picochip/picochip.c:624
+#: config/picochip/picochip.c:634
#, gcc-internal-format
msgid "unexpected mode %s encountered in picochip_emit_save_register\n"
msgstr ""
-#: config/picochip/picochip.c:791
+#: config/picochip/picochip.c:801
#, gcc-internal-format
msgid "Defaulting to stack for %s register creation\n"
msgstr ""
-#: config/picochip/picochip.c:1330
+#: config/picochip/picochip.c:1338
#, gcc-internal-format
msgid "LCFI labels have already been deferred."
msgstr ""
-#: config/picochip/picochip.c:1393
+#: config/picochip/picochip.c:1401
#, gcc-internal-format
msgid "LM label has already been deferred."
msgstr ""
-#: config/picochip/picochip.c:1673
+#: config/picochip/picochip.c:1681
#, gcc-internal-format
msgid "picochip_asm_output_opcode - Found multiple lines in VLIW packet %s\n"
msgstr ""
-#: config/picochip/picochip.c:1776
+#: config/picochip/picochip.c:1784
#, gcc-internal-format
msgid "picochip_asm_output_opcode - can't output unknown operator %c\n"
msgstr ""
-#: config/picochip/picochip.c:2028 config/picochip/picochip.c:2087
+#: config/picochip/picochip.c:2036 config/picochip/picochip.c:2095
#, gcc-internal-format
msgid "%s: At least one operand can't be handled"
msgstr ""
-#: config/picochip/picochip.c:2168
+#: config/picochip/picochip.c:2176
#, gcc-internal-format
msgid "Unknown short branch in %s (type %d)\n"
msgstr ""
-#: config/picochip/picochip.c:2205
+#: config/picochip/picochip.c:2213
#, gcc-internal-format
msgid "Unknown long branch in %s (type %d)\n"
msgstr ""
-#: config/picochip/picochip.c:2245 config/picochip/picochip.c:2313
+#: config/picochip/picochip.c:2253 config/picochip/picochip.c:2321
#, gcc-internal-format
msgid "PUT uses port array index %d, which is out of range [%d..%d)"
msgstr ""
-#: config/picochip/picochip.c:2279
+#: config/picochip/picochip.c:2287
#, gcc-internal-format
msgid "GET uses port array index %d, which is out of range [%d..%d)"
msgstr ""
-#: config/picochip/picochip.c:3122
+#: config/picochip/picochip.c:3130
#, gcc-internal-format
msgid "Too many ALU instructions emitted (%d)\n"
msgstr ""
-#: config/picochip/picochip.c:3753 config/picochip/picochip.c:3846
+#: config/picochip/picochip.c:3761 config/picochip/picochip.c:3854
#, gcc-internal-format
msgid "%s: Second source operand is not a constant"
msgstr ""
-#: config/picochip/picochip.c:3756 config/picochip/picochip.c:3807
-#: config/picochip/picochip.c:3849
+#: config/picochip/picochip.c:3764 config/picochip/picochip.c:3815
+#: config/picochip/picochip.c:3857
#, gcc-internal-format
msgid "%s: Third source operand is not a constant"
msgstr ""
-#: config/picochip/picochip.c:3810
+#: config/picochip/picochip.c:3818
#, gcc-internal-format
msgid "%s: Fourth source operand is not a constant"
msgstr ""
-#: config/picochip/picochip.c:4144
+#: config/picochip/picochip.c:4128
#, gcc-internal-format
msgid "%s (disable warning using -mno-inefficient-warnings)"
msgstr ""
@@ -27337,233 +27151,233 @@ msgid ""
"unknown -mtraceback arg %qs; expecting %<full%>, %<partial%> or %<none%>"
msgstr ""
-#: config/rs6000/rs6000.c:2169
+#: config/rs6000/rs6000.c:2176
#, gcc-internal-format
msgid "unknown -m%s= option specified: '%s'"
msgstr ""
-#: config/rs6000/rs6000.c:2215
+#: config/rs6000/rs6000.c:2222
#, gcc-internal-format
msgid "unknown value %s for -mfpu"
msgstr ""
-#: config/rs6000/rs6000.c:2408
+#: config/rs6000/rs6000.c:2415
#, gcc-internal-format
msgid "not configured for ABI: '%s'"
msgstr ""
-#: config/rs6000/rs6000.c:2421
+#: config/rs6000/rs6000.c:2428
#, gcc-internal-format
msgid "Using darwin64 ABI"
msgstr ""
-#: config/rs6000/rs6000.c:2426
+#: config/rs6000/rs6000.c:2433
#, gcc-internal-format
msgid "Using old darwin ABI"
msgstr ""
-#: config/rs6000/rs6000.c:2433
+#: config/rs6000/rs6000.c:2440
#, gcc-internal-format
msgid "Using IBM extended precision long double"
msgstr ""
-#: config/rs6000/rs6000.c:2439
+#: config/rs6000/rs6000.c:2446
#, gcc-internal-format
msgid "Using IEEE extended precision long double"
msgstr ""
-#: config/rs6000/rs6000.c:2444
+#: config/rs6000/rs6000.c:2451
#, gcc-internal-format
msgid "unknown ABI specified: '%s'"
msgstr ""
-#: config/rs6000/rs6000.c:2471
+#: config/rs6000/rs6000.c:2478
#, gcc-internal-format
msgid "invalid option for -mfloat-gprs: '%s'"
msgstr ""
-#: config/rs6000/rs6000.c:2481
+#: config/rs6000/rs6000.c:2488
#, gcc-internal-format
msgid "Unknown switch -mlong-double-%s"
msgstr ""
-#: config/rs6000/rs6000.c:2502
+#: config/rs6000/rs6000.c:2509
#, gcc-internal-format
msgid ""
"-malign-power is not supported for 64-bit Darwin; it is incompatible with "
"the installed C and C++ libraries"
msgstr ""
-#: config/rs6000/rs6000.c:2510
+#: config/rs6000/rs6000.c:2517
#, gcc-internal-format
msgid "unknown -malign-XXXXX option specified: '%s'"
msgstr ""
-#: config/rs6000/rs6000.c:2517
+#: config/rs6000/rs6000.c:2524
#, gcc-internal-format
msgid "-msingle-float option equivalent to -mhard-float"
msgstr ""
-#: config/rs6000/rs6000.c:2533
+#: config/rs6000/rs6000.c:2540
#, gcc-internal-format
msgid "-msimple-fpu option ignored"
msgstr ""
-#: config/rs6000/rs6000.c:5355
+#: config/rs6000/rs6000.c:5376
#, gcc-internal-format
msgid ""
"GCC vector returned by reference: non-standard ABI extension with no "
"compatibility guarantee"
msgstr ""
-#: config/rs6000/rs6000.c:5428
+#: config/rs6000/rs6000.c:5449
#, gcc-internal-format
msgid ""
"cannot return value in vector register because altivec instructions are "
"disabled, use -maltivec to enable them"
msgstr ""
-#: config/rs6000/rs6000.c:5686
+#: config/rs6000/rs6000.c:5707
#, gcc-internal-format
msgid ""
"cannot pass argument in vector register because altivec instructions are "
"disabled, use -maltivec to enable them"
msgstr ""
-#: config/rs6000/rs6000.c:6587
+#: config/rs6000/rs6000.c:6608
#, gcc-internal-format
msgid ""
"GCC vector passed by reference: non-standard ABI extension with no "
"compatibility guarantee"
msgstr ""
-#: config/rs6000/rs6000.c:7847
+#: config/rs6000/rs6000.c:7868
#, gcc-internal-format
msgid "argument 1 must be a 5-bit signed literal"
msgstr ""
-#: config/rs6000/rs6000.c:7950 config/rs6000/rs6000.c:8882
+#: config/rs6000/rs6000.c:7971 config/rs6000/rs6000.c:8903
#, gcc-internal-format
msgid "argument 2 must be a 5-bit unsigned literal"
msgstr ""
-#: config/rs6000/rs6000.c:7990
+#: config/rs6000/rs6000.c:8011
#, gcc-internal-format
msgid "argument 1 of __builtin_altivec_predicate must be a constant"
msgstr ""
-#: config/rs6000/rs6000.c:8043
+#: config/rs6000/rs6000.c:8064
#, gcc-internal-format
msgid "argument 1 of __builtin_altivec_predicate is out of range"
msgstr ""
-#: config/rs6000/rs6000.c:8292
+#: config/rs6000/rs6000.c:8313
#, gcc-internal-format
msgid "argument 3 must be a 4-bit unsigned literal"
msgstr ""
-#: config/rs6000/rs6000.c:8464
+#: config/rs6000/rs6000.c:8485
#, gcc-internal-format
msgid "argument to %qs must be a 2-bit unsigned literal"
msgstr ""
-#: config/rs6000/rs6000.c:8606
+#: config/rs6000/rs6000.c:8627
#, gcc-internal-format
msgid "unresolved overload for Altivec builtin %qF"
msgstr ""
-#: config/rs6000/rs6000.c:8697
+#: config/rs6000/rs6000.c:8718
#, gcc-internal-format
msgid "argument to dss must be a 2-bit unsigned literal"
msgstr ""
-#: config/rs6000/rs6000.c:9002
+#: config/rs6000/rs6000.c:9023
#, gcc-internal-format
msgid "argument 1 of __builtin_paired_predicate must be a constant"
msgstr ""
-#: config/rs6000/rs6000.c:9049
+#: config/rs6000/rs6000.c:9070
#, gcc-internal-format
msgid "argument 1 of __builtin_paired_predicate is out of range"
msgstr ""
-#: config/rs6000/rs6000.c:9074
+#: config/rs6000/rs6000.c:9095
#, gcc-internal-format
msgid "argument 1 of __builtin_spe_predicate must be a constant"
msgstr ""
-#: config/rs6000/rs6000.c:9146
+#: config/rs6000/rs6000.c:9167
#, gcc-internal-format
msgid "argument 1 of __builtin_spe_predicate is out of range"
msgstr ""
-#: config/rs6000/rs6000.c:15533
+#: config/rs6000/rs6000.c:15549
#, gcc-internal-format
msgid "stack frame too large"
msgstr ""
-#: config/rs6000/rs6000.c:18600
+#: config/rs6000/rs6000.c:18601
#, gcc-internal-format
msgid "no profiling of 64-bit code for this ABI"
msgstr ""
-#: config/rs6000/rs6000.c:20549
+#: config/rs6000/rs6000.c:20550
#, gcc-internal-format
msgid "use of %<long%> in AltiVec types is invalid for 64-bit code"
msgstr ""
-#: config/rs6000/rs6000.c:20551
+#: config/rs6000/rs6000.c:20552
#, gcc-internal-format
msgid "use of %<long%> in AltiVec types is deprecated; use %<int%>"
msgstr ""
-#: config/rs6000/rs6000.c:20555
+#: config/rs6000/rs6000.c:20556
#, gcc-internal-format
msgid "use of %<long long%> in AltiVec types is invalid"
msgstr ""
-#: config/rs6000/rs6000.c:20557
+#: config/rs6000/rs6000.c:20558
#, gcc-internal-format
msgid "use of %<double%> in AltiVec types is invalid"
msgstr ""
-#: config/rs6000/rs6000.c:20559
+#: config/rs6000/rs6000.c:20560
#, gcc-internal-format
msgid "use of %<long double%> in AltiVec types is invalid"
msgstr ""
-#: config/rs6000/rs6000.c:20561
+#: config/rs6000/rs6000.c:20562
#, gcc-internal-format
msgid "use of boolean types in AltiVec types is invalid"
msgstr ""
-#: config/rs6000/rs6000.c:20563
+#: config/rs6000/rs6000.c:20564
#, gcc-internal-format
msgid "use of %<complex%> in AltiVec types is invalid"
msgstr ""
-#: config/rs6000/rs6000.c:20565
+#: config/rs6000/rs6000.c:20566
#, gcc-internal-format
msgid "use of decimal floating point types in AltiVec types is invalid"
msgstr ""
-#: config/rs6000/rs6000.c:22851
+#: config/rs6000/rs6000.c:22852
#, gcc-internal-format
msgid "emitting microcode insn %s\t[%s] #%d"
msgstr ""
-#: config/rs6000/rs6000.c:22855
+#: config/rs6000/rs6000.c:22856
#, gcc-internal-format
msgid "emitting conditional microcode insn %s\t[%s] #%d"
msgstr ""
-#: config/rs6000/aix43.h:38 config/rs6000/aix51.h:37 config/rs6000/aix52.h:38
+#: config/rs6000/aix43.h:38 config/rs6000/aix51.h:38 config/rs6000/aix52.h:38
#: config/rs6000/aix53.h:38 config/rs6000/aix61.h:38
#, gcc-internal-format
msgid "-maix64 and POWER architecture are incompatible"
msgstr ""
-#: config/rs6000/aix43.h:43 config/rs6000/aix51.h:42 config/rs6000/aix52.h:43
+#: config/rs6000/aix43.h:43 config/rs6000/aix51.h:43 config/rs6000/aix52.h:43
#: config/rs6000/aix53.h:43 config/rs6000/aix61.h:43
#, gcc-internal-format
msgid "-maix64 requires PowerPC64 architecture remain enabled"
@@ -27575,7 +27389,7 @@ msgstr ""
msgid "soft-float and long-double-128 are incompatible"
msgstr ""
-#: config/rs6000/aix43.h:53 config/rs6000/aix51.h:46 config/rs6000/aix52.h:53
+#: config/rs6000/aix43.h:53 config/rs6000/aix51.h:47 config/rs6000/aix52.h:53
#: config/rs6000/aix53.h:53 config/rs6000/aix61.h:53
#, gcc-internal-format
msgid ""
@@ -27597,7 +27411,7 @@ msgstr ""
msgid "E500 and FPRs not supported"
msgstr ""
-#: config/rs6000/eabispe.h:41 config/rs6000/linuxspe.h:40
+#: config/rs6000/eabispe.h:41 config/rs6000/linuxspe.h:41
#, gcc-internal-format
msgid "-m64 not supported in this configuration"
msgstr ""
@@ -27744,22 +27558,22 @@ msgstr ""
msgid "-mstack-guard implies use of -mstack-size"
msgstr ""
-#: config/s390/s390.c:7083
+#: config/s390/s390.c:7064
#, gcc-internal-format
msgid "total size of local variables exceeds architecture limit"
msgstr ""
-#: config/s390/s390.c:7753
+#: config/s390/s390.c:7734
#, gcc-internal-format
msgid "frame size of function %qs is "
msgstr ""
-#: config/s390/s390.c:7783
+#: config/s390/s390.c:7764
#, gcc-internal-format
msgid "frame size of %qs is "
msgstr ""
-#: config/s390/s390.c:7787
+#: config/s390/s390.c:7768
#, gcc-internal-format
msgid "%qs uses dynamic stack allocation"
msgstr ""
@@ -27769,59 +27583,59 @@ msgstr ""
msgid "-fPIC and -G are incompatible"
msgstr ""
-#: config/sh/sh.c:6969
+#: config/sh/sh.c:6971
#, gcc-internal-format
msgid "__builtin_saveregs not supported by this subtarget"
msgstr ""
-#: config/sh/sh.c:8038
+#: config/sh/sh.c:8040
#, gcc-internal-format
msgid "%qs attribute only applies to interrupt functions"
msgstr ""
-#: config/sh/sh.c:8121
+#: config/sh/sh.c:8123
#, gcc-internal-format
msgid "%qs attribute is supported only for SH2A"
msgstr ""
-#: config/sh/sh.c:8151
+#: config/sh/sh.c:8153
#, gcc-internal-format
msgid "attribute interrupt_handler is not compatible with -m5-compact"
msgstr ""
-#: config/sh/sh.c:8168
+#: config/sh/sh.c:8170
#, gcc-internal-format
msgid "%qs attribute only applies to SH2A"
msgstr ""
-#: config/sh/sh.c:8190
+#: config/sh/sh.c:8192
#, gcc-internal-format
msgid "`%s' attribute argument should be between 0 to 255"
msgstr ""
#. The argument must be a constant string.
-#: config/sh/sh.c:8263
+#: config/sh/sh.c:8265
#, gcc-internal-format
msgid "%qs attribute argument not a string constant"
msgstr ""
#. The argument must be a constant integer.
-#: config/sh/sh.c:8288
+#: config/sh/sh.c:8290
#, gcc-internal-format
msgid "%qs attribute argument not an integer constant"
msgstr ""
-#: config/sh/sh.c:10480
+#: config/sh/sh.c:10482
#, gcc-internal-format
msgid "r0 needs to be available as a call-clobbered register"
msgstr ""
-#: config/sh/sh.c:10501
+#: config/sh/sh.c:10503
#, gcc-internal-format
msgid "Need a second call-clobbered general purpose register"
msgstr ""
-#: config/sh/sh.c:10509
+#: config/sh/sh.c:10511
#, gcc-internal-format
msgid "Need a call-clobbered target register"
msgstr ""
@@ -27854,7 +27668,7 @@ msgstr ""
msgid "%s %q+D %s after being referenced with dllimport linkage"
msgstr ""
-#: config/sh/symbian.c:891 cp/tree.c:2808
+#: config/sh/symbian.c:891 cp/tree.c:2843
#, gcc-internal-format
msgid "lang_* check: failed in %s, at %s:%d"
msgstr ""
@@ -27927,57 +27741,57 @@ msgstr ""
msgid "parameter list does not match a valid signature for %s()"
msgstr ""
-#: config/spu/spu.c:379 config/spu/spu.c:390
+#: config/spu/spu.c:383 config/spu/spu.c:394
#, gcc-internal-format
msgid "Unknown architecture '%s'"
msgstr ""
-#: config/spu/spu.c:3645
+#: config/spu/spu.c:3649
#, gcc-internal-format
msgid "`%s' attribute ignored"
msgstr ""
-#: config/spu/spu.c:5826
+#: config/spu/spu.c:5828
#, gcc-internal-format
msgid "%s expects an integer literal in the range [%d, %d]."
msgstr ""
-#: config/spu/spu.c:5846
+#: config/spu/spu.c:5848
#, gcc-internal-format
msgid "%s expects an integer literal in the range [%d, %d]. ("
msgstr ""
-#: config/spu/spu.c:5876
+#: config/spu/spu.c:5878
#, gcc-internal-format
msgid "%d least significant bits of %s are ignored."
msgstr ""
-#: config/stormy16/stormy16.c:1085
+#: config/stormy16/stormy16.c:1086
#, gcc-internal-format
msgid "local variable memory requirements exceed capacity"
msgstr ""
-#: config/stormy16/stormy16.c:1251
+#: config/stormy16/stormy16.c:1243
#, gcc-internal-format
msgid "function_profiler support"
msgstr ""
-#: config/stormy16/stormy16.c:1340
+#: config/stormy16/stormy16.c:1333
#, gcc-internal-format
msgid "cannot use va_start in interrupt function"
msgstr ""
-#: config/stormy16/stormy16.c:1881
+#: config/stormy16/stormy16.c:1875
#, gcc-internal-format
msgid "switch statement of size %lu entries too large"
msgstr ""
-#: config/stormy16/stormy16.c:2249
+#: config/stormy16/stormy16.c:2244
#, gcc-internal-format
msgid "%<__BELOW100__%> attribute only applies to variables"
msgstr ""
-#: config/stormy16/stormy16.c:2256
+#: config/stormy16/stormy16.c:2251
#, gcc-internal-format
msgid "__BELOW100__ attribute not allowed with auto storage class"
msgstr ""
@@ -28127,221 +27941,221 @@ msgstr ""
msgid "only uninitialized variables can be placed in a .bss section"
msgstr ""
-#: cp/call.c:2550
+#: cp/call.c:2552
#, gcc-internal-format
msgid "%s %D(%T, %T, %T) <built-in>"
msgstr ""
-#: cp/call.c:2555
+#: cp/call.c:2557
#, gcc-internal-format
msgid "%s %D(%T, %T) <built-in>"
msgstr ""
-#: cp/call.c:2559
+#: cp/call.c:2561
#, gcc-internal-format
msgid "%s %D(%T) <built-in>"
msgstr ""
-#: cp/call.c:2563
+#: cp/call.c:2565
#, gcc-internal-format
msgid "%s %T <conversion>"
msgstr ""
-#: cp/call.c:2565
+#: cp/call.c:2567
#, gcc-internal-format
msgid "%s %+#D <near match>"
msgstr ""
-#: cp/call.c:2567 cp/pt.c:1404
+#: cp/call.c:2569 cp/pt.c:1406
#, gcc-internal-format
msgid "%s %+#D"
msgstr ""
-#: cp/call.c:2849
+#: cp/call.c:2851
#, gcc-internal-format
msgid "conversion from %qT to %qT is ambiguous"
msgstr ""
-#: cp/call.c:3004 cp/call.c:3024 cp/call.c:3088
+#: cp/call.c:3010 cp/call.c:3030 cp/call.c:3094
#, gcc-internal-format
msgid "no matching function for call to %<%D(%A)%>"
msgstr ""
-#: cp/call.c:3027 cp/call.c:3091
+#: cp/call.c:3033 cp/call.c:3097
#, gcc-internal-format
msgid "call of overloaded %<%D(%A)%> is ambiguous"
msgstr ""
#. It's no good looking for an overloaded operator() on a
#. pointer-to-member-function.
-#: cp/call.c:3164
+#: cp/call.c:3170
#, gcc-internal-format
msgid ""
"pointer-to-member function %E cannot be called without an object; consider "
"using .* or ->*"
msgstr ""
-#: cp/call.c:3240
+#: cp/call.c:3246
#, gcc-internal-format
msgid "no match for call to %<(%T) (%A)%>"
msgstr ""
-#: cp/call.c:3252
+#: cp/call.c:3258
#, gcc-internal-format
msgid "call of %<(%T) (%A)%> is ambiguous"
msgstr ""
-#: cp/call.c:3293
+#: cp/call.c:3299
#, gcc-internal-format
msgid "%s for ternary %<operator?:%> in %<%E ? %E : %E%>"
msgstr ""
-#: cp/call.c:3299
+#: cp/call.c:3305
#, gcc-internal-format
msgid "%s for %<operator%s%> in %<%E%s%>"
msgstr ""
-#: cp/call.c:3303
+#: cp/call.c:3309
#, gcc-internal-format
msgid "%s for %<operator[]%> in %<%E[%E]%>"
msgstr ""
-#: cp/call.c:3308
+#: cp/call.c:3314
#, gcc-internal-format
msgid "%s for %qs in %<%s %E%>"
msgstr ""
-#: cp/call.c:3313
+#: cp/call.c:3319
#, gcc-internal-format
msgid "%s for %<operator%s%> in %<%E %s %E%>"
msgstr ""
-#: cp/call.c:3316
+#: cp/call.c:3322
#, gcc-internal-format
msgid "%s for %<operator%s%> in %<%s%E%>"
msgstr ""
-#: cp/call.c:3410
+#: cp/call.c:3416
#, gcc-internal-format
msgid "ISO C++ forbids omitting the middle term of a ?: expression"
msgstr ""
-#: cp/call.c:3490
+#: cp/call.c:3496
#, gcc-internal-format
msgid ""
"second operand to the conditional operator is of type %<void%>, but the "
"third operand is neither a throw-expression nor of type %<void%>"
msgstr ""
-#: cp/call.c:3495
+#: cp/call.c:3501
#, gcc-internal-format
msgid ""
"third operand to the conditional operator is of type %<void%>, but the "
"second operand is neither a throw-expression nor of type %<void%>"
msgstr ""
-#: cp/call.c:3537 cp/call.c:3773
+#: cp/call.c:3543 cp/call.c:3779
#, gcc-internal-format
msgid "operands to ?: have different types %qT and %qT"
msgstr ""
-#: cp/call.c:3720
+#: cp/call.c:3726
#, gcc-internal-format
msgid "enumeral mismatch in conditional expression: %qT vs %qT"
msgstr ""
-#: cp/call.c:3731
+#: cp/call.c:3737
#, gcc-internal-format
msgid "enumeral and non-enumeral type in conditional expression"
msgstr ""
-#: cp/call.c:4043
+#: cp/call.c:4049
#, gcc-internal-format
msgid "no %<%D(int)%> declared for postfix %qs, trying prefix operator instead"
msgstr ""
-#: cp/call.c:4121
+#: cp/call.c:4127
#, gcc-internal-format
msgid "comparison between %q#T and %q#T"
msgstr ""
-#: cp/call.c:4406
+#: cp/call.c:4412
#, gcc-internal-format
msgid "no corresponding deallocation function for %qD"
msgstr ""
-#: cp/call.c:4411
+#: cp/call.c:4417
#, gcc-internal-format
msgid "no suitable %<operator %s%> for %qT"
msgstr ""
-#: cp/call.c:4429
+#: cp/call.c:4435
#, gcc-internal-format
msgid "%q+#D is private"
msgstr ""
-#: cp/call.c:4431
+#: cp/call.c:4437
#, gcc-internal-format
msgid "%q+#D is protected"
msgstr ""
-#: cp/call.c:4433
+#: cp/call.c:4439
#, gcc-internal-format
msgid "%q+#D is inaccessible"
msgstr ""
-#: cp/call.c:4434
+#: cp/call.c:4440
#, gcc-internal-format
msgid "within this context"
msgstr ""
-#: cp/call.c:4480
+#: cp/call.c:4486
#, gcc-internal-format
msgid "passing NULL to non-pointer argument %P of %qD"
msgstr ""
-#: cp/call.c:4483
+#: cp/call.c:4489
#, gcc-internal-format
msgid "converting to non-pointer type %qT from NULL"
msgstr ""
-#: cp/call.c:4489
+#: cp/call.c:4495
#, gcc-internal-format
msgid "converting %<false%> to pointer type for argument %P of %qD"
msgstr ""
-#: cp/call.c:4540 cp/cvt.c:217
+#: cp/call.c:4546 cp/cvt.c:217
#, gcc-internal-format
msgid "invalid conversion from %qT to %qT"
msgstr ""
-#: cp/call.c:4542
+#: cp/call.c:4548
#, gcc-internal-format
msgid " initializing argument %P of %qD"
msgstr ""
-#: cp/call.c:4566
+#: cp/call.c:4572
#, gcc-internal-format
msgid ""
"converting to %qT from initializer list would use explicit constructor %qD"
msgstr ""
-#: cp/call.c:4723
+#: cp/call.c:4735
#, gcc-internal-format
msgid "cannot bind bitfield %qE to %qT"
msgstr ""
-#: cp/call.c:4726 cp/call.c:4744
+#: cp/call.c:4738 cp/call.c:4756
#, gcc-internal-format
msgid "cannot bind packed field %qE to %qT"
msgstr ""
-#: cp/call.c:4729
+#: cp/call.c:4741
#, gcc-internal-format
msgid "cannot bind rvalue %qE to %qT"
msgstr ""
-#: cp/call.c:4853
+#: cp/call.c:4865
#, gcc-internal-format
msgid ""
"cannot pass objects of non-POD type %q#T through %<...%>; call will abort at "
@@ -28349,108 +28163,108 @@ msgid ""
msgstr ""
#. Undefined behavior [expr.call] 5.2.2/7.
-#: cp/call.c:4881
+#: cp/call.c:4893
#, gcc-internal-format
msgid ""
"cannot receive objects of non-POD type %q#T through %<...%>; call will abort "
"at runtime"
msgstr ""
-#: cp/call.c:4929
+#: cp/call.c:4941
#, gcc-internal-format
msgid "the default argument for parameter %d of %qD has not yet been parsed"
msgstr ""
-#: cp/call.c:4939
+#: cp/call.c:4951
#, gcc-internal-format
msgid "recursive evaluation of default argument for %q#D"
msgstr ""
-#: cp/call.c:5046
+#: cp/call.c:5068
#, gcc-internal-format
msgid "argument of function call might be a candidate for a format attribute"
msgstr ""
-#: cp/call.c:5200
+#: cp/call.c:5222
#, gcc-internal-format
msgid "passing %qT as %<this%> argument of %q#D discards qualifiers"
msgstr ""
-#: cp/call.c:5222
+#: cp/call.c:5244
#, gcc-internal-format
msgid "%qT is not an accessible base of %qT"
msgstr ""
-#: cp/call.c:5494
+#: cp/call.c:5522
#, gcc-internal-format
msgid "could not find class$ field in java interface type %qT"
msgstr ""
-#: cp/call.c:5737
+#: cp/call.c:5765
#, gcc-internal-format
msgid "call to non-function %qD"
msgstr ""
-#: cp/call.c:5876
+#: cp/call.c:5904
#, gcc-internal-format
msgid "no matching function for call to %<%T::%s(%A)%#V%>"
msgstr ""
-#: cp/call.c:5897
+#: cp/call.c:5925
#, gcc-internal-format
msgid "call of overloaded %<%s(%A)%> is ambiguous"
msgstr ""
-#: cp/call.c:5926
+#: cp/call.c:5954
#, gcc-internal-format
msgid "cannot call member function %qD without object"
msgstr ""
-#: cp/call.c:6597
+#: cp/call.c:6642
#, gcc-internal-format
msgid "passing %qT chooses %qT over %qT"
msgstr ""
-#: cp/call.c:6599 cp/name-lookup.c:4420 cp/name-lookup.c:4864
+#: cp/call.c:6644 cp/name-lookup.c:4468 cp/name-lookup.c:4913
#, gcc-internal-format
msgid " in call to %qD"
msgstr ""
-#: cp/call.c:6656
+#: cp/call.c:6701
#, gcc-internal-format
msgid "choosing %qD over %qD"
msgstr ""
-#: cp/call.c:6657
+#: cp/call.c:6702
#, gcc-internal-format
msgid " for conversion from %qT to %qT"
msgstr ""
-#: cp/call.c:6660
+#: cp/call.c:6705
#, gcc-internal-format
msgid " because conversion sequence for the argument is better"
msgstr ""
-#: cp/call.c:6776
+#: cp/call.c:6821
#, gcc-internal-format
msgid ""
"ISO C++ says that these are ambiguous, even though the worst conversion for "
"the first is better than the worst conversion for the second:"
msgstr ""
-#: cp/call.c:6920
+#: cp/call.c:6965
#, gcc-internal-format
msgid "could not convert %qE to %qT"
msgstr ""
-#: cp/call.c:7126
+#: cp/call.c:7171
#, gcc-internal-format
msgid ""
"invalid initialization of non-const reference of type %qT from a temporary "
"of type %qT"
msgstr ""
-#: cp/call.c:7130
+#: cp/call.c:7175
#, gcc-internal-format
msgid ""
"invalid initialization of reference of type %qT from expression of type %qT"
@@ -28552,7 +28366,7 @@ msgstr ""
msgid " by %q+D"
msgstr ""
-#: cp/class.c:2500 cp/decl2.c:1264
+#: cp/class.c:2500 cp/decl2.c:1279
#, gcc-internal-format
msgid "%q+#D invalid; an anonymous union can only have non-static data members"
msgstr ""
@@ -28563,7 +28377,7 @@ msgid ""
"%q+#D invalid; an anonymous struct can only have non-static data members"
msgstr ""
-#: cp/class.c:2511 cp/decl2.c:1270
+#: cp/class.c:2511 cp/decl2.c:1285
#, gcc-internal-format
msgid "private member %q+#D in anonymous union"
msgstr ""
@@ -28573,7 +28387,7 @@ msgstr ""
msgid "private member %q+#D in anonymous struct"
msgstr ""
-#: cp/class.c:2518 cp/decl2.c:1272
+#: cp/class.c:2518 cp/decl2.c:1287
#, gcc-internal-format
msgid "protected member %q+#D in anonymous union"
msgstr ""
@@ -28658,160 +28472,160 @@ msgstr ""
msgid "ignoring packed attribute because of unpacked non-POD field %q+#D"
msgstr ""
-#: cp/class.c:3052
+#: cp/class.c:3053
#, gcc-internal-format
msgid "field %q+#D with same name as class"
msgstr ""
-#: cp/class.c:3083
+#: cp/class.c:3084
#, gcc-internal-format
msgid "%q#T has pointer data members"
msgstr ""
-#: cp/class.c:3088
+#: cp/class.c:3089
#, gcc-internal-format
msgid " but does not override %<%T(const %T&)%>"
msgstr ""
-#: cp/class.c:3090
+#: cp/class.c:3091
#, gcc-internal-format
msgid " or %<operator=(const %T&)%>"
msgstr ""
-#: cp/class.c:3094
+#: cp/class.c:3095
#, gcc-internal-format
msgid " but does not override %<operator=(const %T&)%>"
msgstr ""
-#: cp/class.c:3555
+#: cp/class.c:3556
#, gcc-internal-format
msgid ""
"offset of empty base %qT may not be ABI-compliant and maychange in a future "
"version of GCC"
msgstr ""
-#: cp/class.c:3680
+#: cp/class.c:3681
#, gcc-internal-format
msgid "class %qT will be considered nearly empty in a future version of GCC"
msgstr ""
-#: cp/class.c:3762
+#: cp/class.c:3763
#, gcc-internal-format
msgid "initializer specified for non-virtual method %q+D"
msgstr ""
-#: cp/class.c:4329
+#: cp/class.c:4334
#, gcc-internal-format
msgid "non-static reference %q+#D in class without a constructor"
msgstr ""
-#: cp/class.c:4334
+#: cp/class.c:4339
#, gcc-internal-format
msgid "non-static const member %q+#D in class without a constructor"
msgstr ""
-#: cp/class.c:4589
+#: cp/class.c:4594
#, gcc-internal-format
msgid ""
"offset of virtual base %qT is not ABI-compliant and may change in a future "
"version of GCC"
msgstr ""
-#: cp/class.c:4690
+#: cp/class.c:4695
#, gcc-internal-format
msgid "direct base %qT inaccessible in %qT due to ambiguity"
msgstr ""
-#: cp/class.c:4702
+#: cp/class.c:4707
#, gcc-internal-format
msgid "virtual base %qT inaccessible in %qT due to ambiguity"
msgstr ""
-#: cp/class.c:4881
+#: cp/class.c:4886
#, gcc-internal-format
msgid ""
"size assigned to %qT may not be ABI-compliant and may change in a future "
"version of GCC"
msgstr ""
-#: cp/class.c:4921
+#: cp/class.c:4926
#, gcc-internal-format
msgid ""
"the offset of %qD may not be ABI-compliant and may change in a future "
"version of GCC"
msgstr ""
-#: cp/class.c:4949
+#: cp/class.c:4954
#, gcc-internal-format
msgid ""
"offset of %q+D is not ABI-compliant and may change in a future version of GCC"
msgstr ""
-#: cp/class.c:4958
+#: cp/class.c:4963
#, gcc-internal-format
msgid ""
"%q+D contains empty classes which may cause base classes to be placed at "
"different locations in a future version of GCC"
msgstr ""
-#: cp/class.c:5045
+#: cp/class.c:5050
#, gcc-internal-format
msgid ""
"layout of classes derived from empty class %qT may change in a future "
"version of GCC"
msgstr ""
-#: cp/class.c:5191
+#: cp/class.c:5196
#, gcc-internal-format
msgid "redefinition of %q#T"
msgstr ""
-#: cp/class.c:5347
+#: cp/class.c:5352
#, gcc-internal-format
msgid "%q#T has virtual functions and accessible non-virtual destructor"
msgstr ""
-#: cp/class.c:5449
+#: cp/class.c:5454
#, gcc-internal-format
msgid "trying to finish struct, but kicked out due to previous parse errors"
msgstr ""
-#: cp/class.c:5908
+#: cp/class.c:5916
#, gcc-internal-format
msgid "language string %<\"%E\"%> not recognized"
msgstr ""
-#: cp/class.c:5997
+#: cp/class.c:6009
#, gcc-internal-format
msgid "cannot resolve overloaded function %qD based on conversion to type %qT"
msgstr ""
-#: cp/class.c:6126
+#: cp/class.c:6138
#, gcc-internal-format
msgid "no matches converting function %qD to type %q#T"
msgstr ""
-#: cp/class.c:6149
+#: cp/class.c:6161
#, gcc-internal-format
msgid "converting overloaded function %qD to type %q#T is ambiguous"
msgstr ""
-#: cp/class.c:6175
+#: cp/class.c:6187
#, gcc-internal-format
msgid "assuming pointer to member %qD"
msgstr ""
-#: cp/class.c:6178
+#: cp/class.c:6190
#, gcc-internal-format
msgid "(a pointer to member can only be formed with %<&%E%>)"
msgstr ""
-#: cp/class.c:6238 cp/class.c:6272
+#: cp/class.c:6252 cp/class.c:6286
#, gcc-internal-format
msgid "not enough type information"
msgstr ""
-#: cp/class.c:6255
+#: cp/class.c:6269
#, gcc-internal-format
msgid "argument of type %qT does not match %qT"
msgstr ""
@@ -28821,12 +28635,12 @@ msgstr ""
#. A name N used in a class S shall refer to the same declaration
#. in its context and when re-evaluated in the completed scope of
#. S.
-#: cp/class.c:6542 cp/decl.c:1194 cp/name-lookup.c:526
+#: cp/class.c:6587 cp/decl.c:1193 cp/name-lookup.c:526
#, gcc-internal-format
msgid "declaration of %q#D"
msgstr ""
-#: cp/class.c:6543
+#: cp/class.c:6588
#, gcc-internal-format
msgid "changes meaning of %qD from %q+#D"
msgstr ""
@@ -28841,7 +28655,7 @@ msgstr ""
msgid "statement with no effect"
msgstr ""
-#: cp/cp-gimplify.c:1150
+#: cp/cp-gimplify.c:1141
#, gcc-internal-format
msgid "%qE implicitly determined as %<firstprivate%> has reference type"
msgstr ""
@@ -28866,7 +28680,7 @@ msgstr ""
msgid "conversion from %qT to %qT discards qualifiers"
msgstr ""
-#: cp/cvt.c:470 cp/typeck.c:5386
+#: cp/cvt.c:470 cp/typeck.c:5449
#, gcc-internal-format
msgid "casting %qT to %qT does not dereference pointer"
msgstr ""
@@ -28958,112 +28772,112 @@ msgstr ""
msgid " candidate conversions include %qD and %qD"
msgstr ""
-#: cp/decl.c:1057
+#: cp/decl.c:1056
#, gcc-internal-format
msgid "%qD was declared %<extern%> and later %<static%>"
msgstr ""
-#: cp/decl.c:1058 cp/decl.c:1605 objc/objc-act.c:2935 objc/objc-act.c:7522
+#: cp/decl.c:1057 cp/decl.c:1604 objc/objc-act.c:2935 objc/objc-act.c:7522
#, gcc-internal-format
msgid "previous declaration of %q+D"
msgstr ""
-#: cp/decl.c:1091
+#: cp/decl.c:1090
#, gcc-internal-format
msgid "declaration of %qF throws different exceptions"
msgstr ""
-#: cp/decl.c:1092
+#: cp/decl.c:1091
#, gcc-internal-format
msgid "from previous declaration %q+F"
msgstr ""
-#: cp/decl.c:1148
+#: cp/decl.c:1147
#, gcc-internal-format
msgid "function %q+D redeclared as inline"
msgstr ""
-#: cp/decl.c:1150
+#: cp/decl.c:1149
#, gcc-internal-format
msgid "previous declaration of %q+D with attribute noinline"
msgstr ""
-#: cp/decl.c:1157
+#: cp/decl.c:1156
#, gcc-internal-format
msgid "function %q+D redeclared with attribute noinline"
msgstr ""
-#: cp/decl.c:1159
+#: cp/decl.c:1158
#, gcc-internal-format
msgid "previous declaration of %q+D was inline"
msgstr ""
-#: cp/decl.c:1181 cp/decl.c:1254
+#: cp/decl.c:1180 cp/decl.c:1253
#, gcc-internal-format
msgid "shadowing %s function %q#D"
msgstr ""
-#: cp/decl.c:1190
+#: cp/decl.c:1189
#, gcc-internal-format
msgid "library function %q#D redeclared as non-function %q#D"
msgstr ""
-#: cp/decl.c:1195
+#: cp/decl.c:1194
#, gcc-internal-format
msgid "conflicts with built-in declaration %q#D"
msgstr ""
-#: cp/decl.c:1249 cp/decl.c:1375 cp/decl.c:1391
+#: cp/decl.c:1248 cp/decl.c:1374 cp/decl.c:1390
#, gcc-internal-format
msgid "new declaration %q#D"
msgstr ""
-#: cp/decl.c:1250
+#: cp/decl.c:1249
#, gcc-internal-format
msgid "ambiguates built-in declaration %q#D"
msgstr ""
-#: cp/decl.c:1339
+#: cp/decl.c:1338
#, gcc-internal-format
msgid "%q#D redeclared as different kind of symbol"
msgstr ""
-#: cp/decl.c:1342
+#: cp/decl.c:1341
#, gcc-internal-format
msgid "previous declaration of %q+#D"
msgstr ""
-#: cp/decl.c:1361
+#: cp/decl.c:1360
#, gcc-internal-format
msgid "declaration of template %q#D"
msgstr ""
-#: cp/decl.c:1362 cp/name-lookup.c:527 cp/name-lookup.c:807
+#: cp/decl.c:1361 cp/name-lookup.c:527 cp/name-lookup.c:807
#, gcc-internal-format
msgid "conflicts with previous declaration %q+#D"
msgstr ""
-#: cp/decl.c:1376 cp/decl.c:1392
+#: cp/decl.c:1375 cp/decl.c:1391
#, gcc-internal-format
msgid "ambiguates old declaration %q+#D"
msgstr ""
-#: cp/decl.c:1384
+#: cp/decl.c:1383
#, gcc-internal-format
msgid "declaration of C function %q#D conflicts with"
msgstr ""
-#: cp/decl.c:1386
+#: cp/decl.c:1385
#, gcc-internal-format
msgid "previous declaration %q+#D here"
msgstr ""
-#: cp/decl.c:1400
+#: cp/decl.c:1399
#, gcc-internal-format
msgid "conflicting declaration %q#D"
msgstr ""
-#: cp/decl.c:1401
+#: cp/decl.c:1400
#, gcc-internal-format
msgid "%q+D has a previous declaration as %q#D"
msgstr ""
@@ -29075,63 +28889,63 @@ msgstr ""
#. A namespace-name defined at global scope shall not be
#. declared as the name of any other entity in any global scope
#. of the program.
-#: cp/decl.c:1453
+#: cp/decl.c:1452
#, gcc-internal-format
msgid "declaration of namespace %qD conflicts with"
msgstr ""
-#: cp/decl.c:1454
+#: cp/decl.c:1453
#, gcc-internal-format
msgid "previous declaration of namespace %q+D here"
msgstr ""
-#: cp/decl.c:1465
+#: cp/decl.c:1464
#, gcc-internal-format
msgid "%q+#D previously defined here"
msgstr ""
#. Prototype decl follows defn w/o prototype.
-#: cp/decl.c:1475
+#: cp/decl.c:1474
#, gcc-internal-format
msgid "prototype for %q+#D"
msgstr ""
-#: cp/decl.c:1476
+#: cp/decl.c:1475
#, gcc-internal-format
msgid "%Jfollows non-prototype definition here"
msgstr ""
-#: cp/decl.c:1516
+#: cp/decl.c:1515
#, gcc-internal-format
msgid "previous declaration of %q+#D with %qL linkage"
msgstr ""
-#: cp/decl.c:1518
+#: cp/decl.c:1517
#, gcc-internal-format
msgid "conflicts with new declaration with %qL linkage"
msgstr ""
-#: cp/decl.c:1541 cp/decl.c:1547
+#: cp/decl.c:1540 cp/decl.c:1546
#, gcc-internal-format
msgid "default argument given for parameter %d of %q#D"
msgstr ""
-#: cp/decl.c:1543 cp/decl.c:1549
+#: cp/decl.c:1542 cp/decl.c:1548
#, gcc-internal-format
msgid "after previous specification in %q+#D"
msgstr ""
-#: cp/decl.c:1604
+#: cp/decl.c:1603
#, gcc-internal-format
msgid "redundant redeclaration of %qD in same scope"
msgstr ""
-#: cp/decl.c:1610
+#: cp/decl.c:1609
#, gcc-internal-format
msgid "deleted definition of %qD"
msgstr ""
-#: cp/decl.c:1611
+#: cp/decl.c:1610
#, gcc-internal-format
msgid "after previous declaration %q+D"
msgstr ""
@@ -29144,329 +28958,334 @@ msgstr ""
#. that specialization that would cause an implicit
#. instantiation to take place, in every translation unit in
#. which such a use occurs.
-#: cp/decl.c:1939
+#: cp/decl.c:1946
#, gcc-internal-format
msgid "explicit specialization of %qD after first use"
msgstr ""
-#: cp/decl.c:2029
+#: cp/decl.c:2042
#, gcc-internal-format
msgid "%q+D: visibility attribute ignored because it"
msgstr ""
-#: cp/decl.c:2031
+#: cp/decl.c:2044
#, gcc-internal-format
msgid "%Jconflicts with previous declaration here"
msgstr ""
-#: cp/decl.c:2464
+#: cp/decl.c:2477
#, gcc-internal-format
msgid "jump to label %qD"
msgstr ""
-#: cp/decl.c:2466
+#: cp/decl.c:2479
#, gcc-internal-format
msgid "jump to case label"
msgstr ""
-#: cp/decl.c:2468
+#: cp/decl.c:2481
#, gcc-internal-format
msgid "%H from here"
msgstr ""
-#: cp/decl.c:2487 cp/decl.c:2650
+#: cp/decl.c:2500 cp/decl.c:2663
#, gcc-internal-format
msgid " exits OpenMP structured block"
msgstr ""
-#: cp/decl.c:2508
+#: cp/decl.c:2521
#, gcc-internal-format
msgid " crosses initialization of %q+#D"
msgstr ""
-#: cp/decl.c:2510 cp/decl.c:2625
+#: cp/decl.c:2523 cp/decl.c:2638
#, gcc-internal-format
msgid " enters scope of non-POD %q+#D"
msgstr ""
-#: cp/decl.c:2523 cp/decl.c:2629
+#: cp/decl.c:2536 cp/decl.c:2642
#, gcc-internal-format
msgid " enters try block"
msgstr ""
-#: cp/decl.c:2525 cp/decl.c:2631
+#: cp/decl.c:2538 cp/decl.c:2644
#, gcc-internal-format
msgid " enters catch block"
msgstr ""
-#: cp/decl.c:2535 cp/decl.c:2634
+#: cp/decl.c:2548 cp/decl.c:2647
#, gcc-internal-format
msgid " enters OpenMP structured block"
msgstr ""
-#: cp/decl.c:2606 cp/decl.c:2646
+#: cp/decl.c:2619 cp/decl.c:2659
#, gcc-internal-format
msgid "jump to label %q+D"
msgstr ""
-#: cp/decl.c:2607 cp/decl.c:2647
+#: cp/decl.c:2620 cp/decl.c:2660
#, gcc-internal-format
msgid " from here"
msgstr ""
#. Can't skip init of __exception_info.
-#: cp/decl.c:2619
+#: cp/decl.c:2632
#, gcc-internal-format
msgid "%J enters catch block"
msgstr ""
-#: cp/decl.c:2623
+#: cp/decl.c:2636
#, gcc-internal-format
msgid " skips initialization of %q+#D"
msgstr ""
-#: cp/decl.c:2699
+#: cp/decl.c:2712
#, gcc-internal-format
msgid "label named wchar_t"
msgstr ""
-#: cp/decl.c:2703
+#: cp/decl.c:2716
#, gcc-internal-format
msgid "duplicate label %qD"
msgstr ""
-#: cp/decl.c:2969
+#: cp/decl.c:2983
#, gcc-internal-format
msgid "%qD is not a type"
msgstr ""
-#: cp/decl.c:2975
+#: cp/decl.c:2989
#, gcc-internal-format
msgid "%qD used without template parameters"
msgstr ""
-#: cp/decl.c:2990
+#: cp/decl.c:2998
#, gcc-internal-format
msgid "%q#T is not a class"
msgstr ""
-#: cp/decl.c:3002 cp/decl.c:3070
+#: cp/decl.c:3022 cp/decl.c:3090
#, gcc-internal-format
msgid "no class template named %q#T in %q#T"
msgstr ""
-#: cp/decl.c:3010
+#: cp/decl.c:3030
#, gcc-internal-format
msgid "%<typename %T::%D%> names %q#T, which is not a class template"
msgstr ""
-#: cp/decl.c:3017
+#: cp/decl.c:3037
#, gcc-internal-format
msgid "%<typename %T::%D%> names %q#T, which is not a type"
msgstr ""
-#: cp/decl.c:3079
+#: cp/decl.c:3099
#, gcc-internal-format
msgid "template parameters do not match template"
msgstr ""
-#: cp/decl.c:3080 cp/friend.c:321 cp/friend.c:329
+#: cp/decl.c:3100 cp/friend.c:321 cp/friend.c:329
#, gcc-internal-format
msgid "%q+D declared here"
msgstr ""
-#: cp/decl.c:3755
+#: cp/decl.c:3783
#, gcc-internal-format
msgid "%Jan anonymous struct cannot have function members"
msgstr ""
-#: cp/decl.c:3757
+#: cp/decl.c:3785
#, gcc-internal-format
msgid "%Jan anonymous union cannot have function members"
msgstr ""
-#: cp/decl.c:3775
+#: cp/decl.c:3803
#, gcc-internal-format
msgid "member %q+#D with constructor not allowed in anonymous aggregate"
msgstr ""
-#: cp/decl.c:3778
+#: cp/decl.c:3806
#, gcc-internal-format
msgid "member %q+#D with destructor not allowed in anonymous aggregate"
msgstr ""
-#: cp/decl.c:3781
+#: cp/decl.c:3809
#, gcc-internal-format
msgid ""
"member %q+#D with copy assignment operator not allowed in anonymous aggregate"
msgstr ""
-#: cp/decl.c:3806
+#: cp/decl.c:3834
#, gcc-internal-format
msgid "multiple types in one declaration"
msgstr ""
-#: cp/decl.c:3810
+#: cp/decl.c:3838
#, gcc-internal-format
msgid "redeclaration of C++ built-in type %qT"
msgstr ""
-#: cp/decl.c:3847
+#: cp/decl.c:3875
#, gcc-internal-format
msgid "missing type-name in typedef-declaration"
msgstr ""
-#: cp/decl.c:3854
+#: cp/decl.c:3882
#, gcc-internal-format
msgid "ISO C++ prohibits anonymous structs"
msgstr ""
-#: cp/decl.c:3861
+#: cp/decl.c:3889
#, gcc-internal-format
msgid "%qs can only be specified for functions"
msgstr ""
-#: cp/decl.c:3867
+#: cp/decl.c:3895
#, gcc-internal-format
msgid "%<friend%> can only be specified inside a class"
msgstr ""
-#: cp/decl.c:3869
+#: cp/decl.c:3897
#, gcc-internal-format
msgid "%<explicit%> can only be specified for constructors"
msgstr ""
-#: cp/decl.c:3871
+#: cp/decl.c:3899
#, gcc-internal-format
msgid "a storage class can only be specified for objects and functions"
msgstr ""
-#: cp/decl.c:3877
+#: cp/decl.c:3905
#, gcc-internal-format
msgid "qualifiers can only be specified for objects and functions"
msgstr ""
-#: cp/decl.c:3880
+#: cp/decl.c:3908
#, gcc-internal-format
msgid "%<typedef%> was ignored in this declaration"
msgstr ""
-#: cp/decl.c:3909
+#: cp/decl.c:3937
#, gcc-internal-format
msgid "attribute ignored in declaration of %q+#T"
msgstr ""
-#: cp/decl.c:3910
+#: cp/decl.c:3938
#, gcc-internal-format
msgid "attribute for %q+#T must follow the %qs keyword"
msgstr ""
-#: cp/decl.c:3952
+#: cp/decl.c:3980
#, gcc-internal-format
msgid "ignoring attributes applied to class type %qT outside of definition"
msgstr ""
#. A template type parameter or other dependent type.
-#: cp/decl.c:3956
+#: cp/decl.c:3984
#, gcc-internal-format
msgid ""
"ignoring attributes applied to dependent type %qT without an associated "
"declaration"
msgstr ""
-#: cp/decl.c:4032
+#: cp/decl.c:4060
#, gcc-internal-format
msgid "typedef %qD is initialized (use decltype instead)"
msgstr ""
-#: cp/decl.c:4050
+#: cp/decl.c:4078
#, gcc-internal-format
msgid "declaration of %q#D has %<extern%> and is initialized"
msgstr ""
-#: cp/decl.c:4075
+#: cp/decl.c:4103
#, gcc-internal-format
msgid "definition of %q#D is marked %<dllimport%>"
msgstr ""
-#: cp/decl.c:4094
+#: cp/decl.c:4122
#, gcc-internal-format
msgid "%q#D is not a static member of %q#T"
msgstr ""
-#: cp/decl.c:4100
+#: cp/decl.c:4128
#, gcc-internal-format
msgid "ISO C++ does not permit %<%T::%D%> to be defined as %<%T::%D%>"
msgstr ""
-#: cp/decl.c:4109
+#: cp/decl.c:4137
#, gcc-internal-format
msgid ""
"template header not allowed in member definition of explicitly specialized "
"class"
msgstr ""
-#: cp/decl.c:4117
+#: cp/decl.c:4145
#, gcc-internal-format
msgid "duplicate initialization of %qD"
msgstr ""
-#: cp/decl.c:4156
+#: cp/decl.c:4184
#, gcc-internal-format
msgid "declaration of %q#D outside of class is not definition"
msgstr ""
-#: cp/decl.c:4251
+#: cp/decl.c:4279
#, gcc-internal-format
msgid "variable %q#D has initializer but incomplete type"
msgstr ""
-#: cp/decl.c:4257 cp/decl.c:4999
+#: cp/decl.c:4285 cp/decl.c:5033
#, gcc-internal-format
msgid "elements of array %q#D have incomplete type"
msgstr ""
-#: cp/decl.c:4264 cp/decl.c:5495
+#: cp/decl.c:4292 cp/decl.c:5529
#, gcc-internal-format
msgid "declaration of %q#D has no initializer"
msgstr ""
-#: cp/decl.c:4266
+#: cp/decl.c:4294
#, gcc-internal-format
msgid "aggregate %q#D has incomplete type and cannot be defined"
msgstr ""
-#: cp/decl.c:4302
+#: cp/decl.c:4330
#, gcc-internal-format
msgid "%qD declared as reference but not initialized"
msgstr ""
-#: cp/decl.c:4308
+#: cp/decl.c:4336
#, gcc-internal-format
msgid "ISO C++ forbids use of initializer list to initialize reference %qD"
msgstr ""
-#: cp/decl.c:4334
+#: cp/decl.c:4362
#, gcc-internal-format
msgid "cannot initialize %qT from %qT"
msgstr ""
-#: cp/decl.c:4395
+#: cp/decl.c:4423
+#, gcc-internal-format
+msgid "name used in a GNU-style designated initializer for an array"
+msgstr ""
+
+#: cp/decl.c:4428
#, gcc-internal-format
msgid "name %qD used in a GNU-style designated initializer for an array"
msgstr ""
-#: cp/decl.c:4444
+#: cp/decl.c:4478
#, gcc-internal-format
msgid "initializer fails to determine size of %qD"
msgstr ""
-#: cp/decl.c:4451
+#: cp/decl.c:4485
#, gcc-internal-format
msgid "array size missing in %qD"
msgstr ""
-#: cp/decl.c:4463
+#: cp/decl.c:4497
#, gcc-internal-format
msgid "zero-size array %qD"
msgstr ""
@@ -29474,273 +29293,273 @@ msgstr ""
#. An automatic variable with an incomplete type: that is an error.
#. Don't talk about array types here, since we took care of that
#. message in grokdeclarator.
-#: cp/decl.c:4506
+#: cp/decl.c:4540
#, gcc-internal-format
msgid "storage size of %qD isn't known"
msgstr ""
-#: cp/decl.c:4529
+#: cp/decl.c:4563
#, gcc-internal-format
msgid "storage size of %qD isn't constant"
msgstr ""
-#: cp/decl.c:4580
+#: cp/decl.c:4614
#, gcc-internal-format
msgid ""
"sorry: semantics of inline function static data %q+#D are wrong (you'll wind "
"up with multiple copies)"
msgstr ""
-#: cp/decl.c:4583
+#: cp/decl.c:4617
#, gcc-internal-format
msgid "%J you can work around this by removing the initializer"
msgstr ""
-#: cp/decl.c:4610
+#: cp/decl.c:4644
#, gcc-internal-format
msgid "uninitialized const %qD"
msgstr ""
-#: cp/decl.c:4722
+#: cp/decl.c:4756
#, gcc-internal-format
msgid "invalid type %qT as initializer for a vector of type %qT"
msgstr ""
-#: cp/decl.c:4764
+#: cp/decl.c:4798
#, gcc-internal-format
msgid "initializer for %qT must be brace-enclosed"
msgstr ""
-#: cp/decl.c:4782
+#: cp/decl.c:4816
#, gcc-internal-format
msgid "%qT has no non-static data member named %qD"
msgstr ""
-#: cp/decl.c:4838
+#: cp/decl.c:4872
#, gcc-internal-format
msgid "braces around scalar initializer for type %qT"
msgstr ""
-#: cp/decl.c:4924
+#: cp/decl.c:4958
#, gcc-internal-format
msgid "missing braces around initializer for %qT"
msgstr ""
-#: cp/decl.c:4981
+#: cp/decl.c:5015 cp/typeck2.c:1087 cp/typeck2.c:1110 cp/typeck2.c:1153
#, gcc-internal-format
msgid "too many initializers for %qT"
msgstr ""
-#: cp/decl.c:5001
+#: cp/decl.c:5035
#, gcc-internal-format
msgid "elements of array %q#T have incomplete type"
msgstr ""
-#: cp/decl.c:5010
+#: cp/decl.c:5044
#, gcc-internal-format
msgid "variable-sized object %qD may not be initialized"
msgstr ""
-#: cp/decl.c:5012
+#: cp/decl.c:5046
#, gcc-internal-format
msgid "variable-sized compound literal"
msgstr ""
-#: cp/decl.c:5066
+#: cp/decl.c:5100
#, gcc-internal-format
msgid "%qD has incomplete type"
msgstr ""
-#: cp/decl.c:5086
+#: cp/decl.c:5120
#, gcc-internal-format
msgid "scalar object %qD requires one element in initializer"
msgstr ""
-#: cp/decl.c:5117
+#: cp/decl.c:5151
#, gcc-internal-format
msgid "in C++98 %qD must be initialized by constructor, not by %<{...}%>"
msgstr ""
-#: cp/decl.c:5149
+#: cp/decl.c:5183
#, gcc-internal-format
msgid "array %qD initialized by parenthesized string literal %qE"
msgstr ""
-#: cp/decl.c:5163
+#: cp/decl.c:5197
#, gcc-internal-format
msgid "structure %qD with uninitialized const members"
msgstr ""
-#: cp/decl.c:5165
+#: cp/decl.c:5199
#, gcc-internal-format
msgid "structure %qD with uninitialized reference members"
msgstr ""
-#: cp/decl.c:5462
+#: cp/decl.c:5496
#, gcc-internal-format
msgid "assignment (not initialization) in declaration"
msgstr ""
-#: cp/decl.c:5575
+#: cp/decl.c:5555 cp/decl2.c:850
+#, gcc-internal-format
+msgid "%qD cannot be defaulted"
+msgstr ""
+
+#: cp/decl.c:5631
#, gcc-internal-format
msgid "shadowing previous type declaration of %q#D"
msgstr ""
-#: cp/decl.c:5605
+#: cp/decl.c:5661
#, gcc-internal-format
msgid "%qD cannot be thread-local because it has non-POD type %qT"
msgstr ""
-#: cp/decl.c:5637
+#: cp/decl.c:5693
#, gcc-internal-format
msgid "Java object %qD not allocated with %<new%>"
msgstr ""
-#: cp/decl.c:5654
+#: cp/decl.c:5710
#, gcc-internal-format
msgid "%qD is thread-local and so cannot be dynamically initialized"
msgstr ""
-#: cp/decl.c:5672
+#: cp/decl.c:5728
#, gcc-internal-format
msgid ""
"%qD cannot be initialized by a non-constant expression when being declared"
msgstr ""
-#: cp/decl.c:5712
+#: cp/decl.c:5768
#, gcc-internal-format
msgid "non-static data member %qD has Java class type"
msgstr ""
-#: cp/decl.c:5778 cp/decl2.c:835
-#, gcc-internal-format
-msgid "%qD cannot be defaulted"
-msgstr ""
-
-#: cp/decl.c:5789
+#: cp/decl.c:5832
#, gcc-internal-format
msgid "function %q#D is initialized like a variable"
msgstr ""
-#: cp/decl.c:6377
+#: cp/decl.c:6420
#, gcc-internal-format
msgid "destructor for alien class %qT cannot be a member"
msgstr ""
-#: cp/decl.c:6379
+#: cp/decl.c:6422
#, gcc-internal-format
msgid "constructor for alien class %qT cannot be a member"
msgstr ""
-#: cp/decl.c:6400
+#: cp/decl.c:6443
#, gcc-internal-format
msgid "%qD declared as a %<virtual%> %s"
msgstr ""
-#: cp/decl.c:6402
+#: cp/decl.c:6445
#, gcc-internal-format
msgid "%qD declared as an %<inline%> %s"
msgstr ""
-#: cp/decl.c:6404
+#: cp/decl.c:6447
#, gcc-internal-format
msgid ""
"%<const%> and %<volatile%> function specifiers on %qD invalid in %s "
"declaration"
msgstr ""
-#: cp/decl.c:6408
+#: cp/decl.c:6451
#, gcc-internal-format
msgid "%q+D declared as a friend"
msgstr ""
-#: cp/decl.c:6414
+#: cp/decl.c:6457
#, gcc-internal-format
msgid "%q+D declared with an exception specification"
msgstr ""
-#: cp/decl.c:6448
+#: cp/decl.c:6491
#, gcc-internal-format
msgid "definition of %qD is not in namespace enclosing %qT"
msgstr ""
-#: cp/decl.c:6566
+#: cp/decl.c:6611
#, gcc-internal-format
msgid "defining explicit specialization %qD in friend declaration"
msgstr ""
#. Something like `template <class T> friend void f<T>()'.
-#: cp/decl.c:6576
+#: cp/decl.c:6621
#, gcc-internal-format
msgid "invalid use of template-id %qD in declaration of primary template"
msgstr ""
-#: cp/decl.c:6606
+#: cp/decl.c:6651
#, gcc-internal-format
msgid ""
"default arguments are not allowed in declaration of friend template "
"specialization %qD"
msgstr ""
-#: cp/decl.c:6614
+#: cp/decl.c:6659
#, gcc-internal-format
msgid ""
"%<inline%> is not allowed in declaration of friend template specialization %"
"qD"
msgstr ""
-#: cp/decl.c:6657
+#: cp/decl.c:6702
#, gcc-internal-format
msgid "cannot declare %<::main%> to be a template"
msgstr ""
-#: cp/decl.c:6659
+#: cp/decl.c:6704
#, gcc-internal-format
msgid "cannot declare %<::main%> to be inline"
msgstr ""
-#: cp/decl.c:6661
+#: cp/decl.c:6706
#, gcc-internal-format
msgid "cannot declare %<::main%> to be static"
msgstr ""
-#: cp/decl.c:6689
+#: cp/decl.c:6734
#, gcc-internal-format
msgid "non-local function %q#D uses anonymous type"
msgstr ""
-#: cp/decl.c:6692 cp/decl.c:6968
+#: cp/decl.c:6737 cp/decl.c:7013
#, gcc-internal-format
msgid ""
"%q+#D does not refer to the unqualified type, so it is not used for linkage"
msgstr ""
-#: cp/decl.c:6698
+#: cp/decl.c:6743
#, gcc-internal-format
msgid "non-local function %q#D uses local type %qT"
msgstr ""
-#: cp/decl.c:6717
+#: cp/decl.c:6762
#, gcc-internal-format
msgid "static member function %qD cannot have cv-qualifier"
msgstr ""
-#: cp/decl.c:6718
+#: cp/decl.c:6763
#, gcc-internal-format
msgid "non-member function %qD cannot have cv-qualifier"
msgstr ""
-#: cp/decl.c:6766
+#: cp/decl.c:6811
#, gcc-internal-format
msgid "%<::main%> must return %<int%>"
msgstr ""
-#: cp/decl.c:6806
+#: cp/decl.c:6851
#, gcc-internal-format
msgid "definition of implicitly-declared %qD"
msgstr ""
-#: cp/decl.c:6823 cp/decl2.c:680
+#: cp/decl.c:6868 cp/decl2.c:685
#, gcc-internal-format
msgid "no %q#D member function declared in class %qT"
msgstr ""
@@ -29749,594 +29568,589 @@ msgstr ""
#. no linkage can only be used to declare extern "C"
#. entities. Since it's not always an error in the
#. ISO C++ 90 Standard, we only issue a warning.
-#: cp/decl.c:6965
+#: cp/decl.c:7010
#, gcc-internal-format
msgid "non-local variable %q#D uses anonymous type"
msgstr ""
-#: cp/decl.c:6974
+#: cp/decl.c:7019
#, gcc-internal-format
msgid "non-local variable %q#D uses local type %qT"
msgstr ""
-#: cp/decl.c:7097
+#: cp/decl.c:7142
#, gcc-internal-format
msgid ""
"invalid in-class initialization of static data member of non-integral type %"
"qT"
msgstr ""
-#: cp/decl.c:7107
+#: cp/decl.c:7152
#, gcc-internal-format
msgid "ISO C++ forbids in-class initialization of non-const static member %qD"
msgstr ""
-#: cp/decl.c:7111
+#: cp/decl.c:7156
#, gcc-internal-format
msgid ""
"ISO C++ forbids initialization of member constant %qD of non-integral type %"
"qT"
msgstr ""
-#: cp/decl.c:7136
+#: cp/decl.c:7181
#, gcc-internal-format
msgid "size of array %qD has non-integral type %qT"
msgstr ""
-#: cp/decl.c:7138
+#: cp/decl.c:7183
#, gcc-internal-format
msgid "size of array has non-integral type %qT"
msgstr ""
-#: cp/decl.c:7181
+#: cp/decl.c:7235
#, gcc-internal-format
msgid "size of array %qD is negative"
msgstr ""
-#: cp/decl.c:7183
+#: cp/decl.c:7237
#, gcc-internal-format
msgid "size of array is negative"
msgstr ""
-#: cp/decl.c:7191
+#: cp/decl.c:7245
#, gcc-internal-format
msgid "ISO C++ forbids zero-size array %qD"
msgstr ""
-#: cp/decl.c:7193
+#: cp/decl.c:7247
#, gcc-internal-format
msgid "ISO C++ forbids zero-size array"
msgstr ""
-#: cp/decl.c:7200
+#: cp/decl.c:7254
#, gcc-internal-format
msgid "size of array %qD is not an integral constant-expression"
msgstr ""
-#: cp/decl.c:7203
+#: cp/decl.c:7257
#, gcc-internal-format
msgid "size of array is not an integral constant-expression"
msgstr ""
-#: cp/decl.c:7209
+#: cp/decl.c:7263
#, gcc-internal-format
msgid "ISO C++ forbids variable length array %qD"
msgstr ""
-#: cp/decl.c:7211
+#: cp/decl.c:7265
#, gcc-internal-format
msgid "ISO C++ forbids variable length array"
msgstr ""
-#: cp/decl.c:7217
+#: cp/decl.c:7271
#, gcc-internal-format
msgid "variable length array %qD is used"
msgstr ""
-#: cp/decl.c:7253
+#: cp/decl.c:7307
#, gcc-internal-format
msgid "overflow in array dimension"
msgstr ""
-#: cp/decl.c:7334
+#: cp/decl.c:7388
#, gcc-internal-format
msgid "declaration of %qD as %s"
msgstr ""
-#: cp/decl.c:7336
+#: cp/decl.c:7390
#, gcc-internal-format
msgid "creating %s"
msgstr ""
-#: cp/decl.c:7348
+#: cp/decl.c:7402
#, gcc-internal-format
msgid ""
"declaration of %qD as multidimensional array must have bounds for all "
"dimensions except the first"
msgstr ""
-#: cp/decl.c:7352
+#: cp/decl.c:7406
#, gcc-internal-format
msgid ""
"multidimensional array must have bounds for all dimensions except the first"
msgstr ""
-#: cp/decl.c:7387
+#: cp/decl.c:7441
#, gcc-internal-format
msgid "return type specification for constructor invalid"
msgstr ""
-#: cp/decl.c:7397
+#: cp/decl.c:7451
#, gcc-internal-format
msgid "return type specification for destructor invalid"
msgstr ""
-#: cp/decl.c:7410
+#: cp/decl.c:7464
#, gcc-internal-format
msgid "return type specified for %<operator %T%>"
msgstr ""
-#: cp/decl.c:7432
+#: cp/decl.c:7486
#, gcc-internal-format
msgid "unnamed variable or field declared void"
msgstr ""
-#: cp/decl.c:7436
+#: cp/decl.c:7490
#, gcc-internal-format
msgid "variable or field %qE declared void"
msgstr ""
-#: cp/decl.c:7439
+#: cp/decl.c:7493
#, gcc-internal-format
msgid "variable or field declared void"
msgstr ""
-#: cp/decl.c:7609
+#: cp/decl.c:7663
#, gcc-internal-format
msgid "invalid use of qualified-name %<::%D%>"
msgstr ""
-#: cp/decl.c:7612
+#: cp/decl.c:7666
#, gcc-internal-format
msgid "invalid use of qualified-name %<%T::%D%>"
msgstr ""
-#: cp/decl.c:7615
+#: cp/decl.c:7669
#, gcc-internal-format
msgid "invalid use of qualified-name %<%D::%D%>"
msgstr ""
-#: cp/decl.c:7627
+#: cp/decl.c:7681
#, gcc-internal-format
msgid "type %qT is not derived from type %qT"
msgstr ""
-#: cp/decl.c:7643 cp/decl.c:7733 cp/decl.c:8927
+#: cp/decl.c:7697 cp/decl.c:7789 cp/decl.c:8979
#, gcc-internal-format
msgid "declaration of %qD as non-function"
msgstr ""
-#: cp/decl.c:7649
+#: cp/decl.c:7703
#, gcc-internal-format
msgid "declaration of %qD as non-member"
msgstr ""
-#: cp/decl.c:7678
+#: cp/decl.c:7734
#, gcc-internal-format
msgid "declarator-id missing; using reserved word %qD"
msgstr ""
-#: cp/decl.c:7725
+#: cp/decl.c:7781
#, gcc-internal-format
msgid "function definition does not declare parameters"
msgstr ""
-#: cp/decl.c:7767
+#: cp/decl.c:7823
#, gcc-internal-format
msgid "two or more data types in declaration of %qs"
msgstr ""
-#: cp/decl.c:7773
+#: cp/decl.c:7829
#, gcc-internal-format
msgid "conflicting specifiers in declaration of %qs"
msgstr ""
-#: cp/decl.c:7844 cp/decl.c:7847 cp/decl.c:7850
+#: cp/decl.c:7900 cp/decl.c:7903 cp/decl.c:7906
#, gcc-internal-format
msgid "ISO C++ forbids declaration of %qs with no type"
msgstr ""
-#: cp/decl.c:7875 cp/decl.c:7893
+#: cp/decl.c:7931 cp/decl.c:7949
#, gcc-internal-format
msgid "%<signed%> or %<unsigned%> invalid for %qs"
msgstr ""
-#: cp/decl.c:7877
+#: cp/decl.c:7933
#, gcc-internal-format
msgid "%<signed%> and %<unsigned%> specified together for %qs"
msgstr ""
-#: cp/decl.c:7879
+#: cp/decl.c:7935
#, gcc-internal-format
msgid "%<long long%> invalid for %qs"
msgstr ""
-#: cp/decl.c:7881
+#: cp/decl.c:7937
#, gcc-internal-format
msgid "%<long%> invalid for %qs"
msgstr ""
-#: cp/decl.c:7883
+#: cp/decl.c:7939
#, gcc-internal-format
msgid "%<short%> invalid for %qs"
msgstr ""
-#: cp/decl.c:7885
+#: cp/decl.c:7941
#, gcc-internal-format
msgid "%<long%> or %<short%> invalid for %qs"
msgstr ""
-#: cp/decl.c:7887
+#: cp/decl.c:7943
#, gcc-internal-format
msgid "%<long%> or %<short%> specified with char for %qs"
msgstr ""
-#: cp/decl.c:7889
+#: cp/decl.c:7945
#, gcc-internal-format
msgid "%<long%> and %<short%> specified together for %qs"
msgstr ""
-#: cp/decl.c:7895
+#: cp/decl.c:7951
#, gcc-internal-format
msgid "%<short%> or %<long%> invalid for %qs"
msgstr ""
-#: cp/decl.c:7903
+#: cp/decl.c:7959
#, gcc-internal-format
msgid "long, short, signed or unsigned used invalidly for %qs"
msgstr ""
-#: cp/decl.c:7967
+#: cp/decl.c:8023
#, gcc-internal-format
msgid "complex invalid for %qs"
msgstr ""
-#: cp/decl.c:7996
+#: cp/decl.c:8052
#, gcc-internal-format
msgid "qualifiers are not allowed on declaration of %<operator %T%>"
msgstr ""
-#: cp/decl.c:8009 cp/typeck.c:7189
+#: cp/decl.c:8065 cp/typeck.c:7252
#, gcc-internal-format
msgid "ignoring %qV qualifiers added to function type %qT"
msgstr ""
-#: cp/decl.c:8032
+#: cp/decl.c:8088
#, gcc-internal-format
msgid "member %qD cannot be declared both virtual and static"
msgstr ""
-#: cp/decl.c:8040
+#: cp/decl.c:8096
#, gcc-internal-format
msgid "%<%T::%D%> is not a valid declarator"
msgstr ""
-#: cp/decl.c:8049
+#: cp/decl.c:8105
#, gcc-internal-format
msgid "typedef declaration invalid in parameter declaration"
msgstr ""
-#: cp/decl.c:8055
+#: cp/decl.c:8111
#, gcc-internal-format
msgid "storage class specifiers invalid in parameter declarations"
msgstr ""
-#: cp/decl.c:8059
+#: cp/decl.c:8115
#, gcc-internal-format
msgid "parameter declared %<auto%>"
msgstr ""
-#: cp/decl.c:8068
+#: cp/decl.c:8124
#, gcc-internal-format
msgid "%<virtual%> outside class declaration"
msgstr ""
-#: cp/decl.c:8086
+#: cp/decl.c:8142
#, gcc-internal-format
msgid "multiple storage classes in declaration of %qs"
msgstr ""
-#: cp/decl.c:8109
+#: cp/decl.c:8165
#, gcc-internal-format
msgid "storage class specified for %qs"
msgstr ""
-#: cp/decl.c:8130
+#: cp/decl.c:8186
#, gcc-internal-format
msgid "top-level declaration of %qs specifies %<auto%>"
msgstr ""
-#: cp/decl.c:8143
+#: cp/decl.c:8199
#, gcc-internal-format
msgid "storage class specifiers invalid in friend function declarations"
msgstr ""
-#: cp/decl.c:8257
-#, gcc-internal-format
-msgid "invalid use of %<auto%> in conversion operator"
-msgstr ""
-
-#: cp/decl.c:8262
+#: cp/decl.c:8314
#, gcc-internal-format
msgid "%qs function uses %<auto%> type specifier without late return type"
msgstr ""
-#: cp/decl.c:8268
+#: cp/decl.c:8320
#, gcc-internal-format
msgid ""
"%qs function with late return type has %qT as its type rather than plain %"
"<auto%>"
msgstr ""
-#: cp/decl.c:8276
+#: cp/decl.c:8328
#, gcc-internal-format
msgid ""
"%qs function with late return type not declared with %<auto%> type specifier"
msgstr ""
-#: cp/decl.c:8309
+#: cp/decl.c:8361
#, gcc-internal-format
msgid "destructor cannot be static member function"
msgstr ""
-#: cp/decl.c:8314
+#: cp/decl.c:8366
#, gcc-internal-format
msgid "destructors may not be cv-qualified"
msgstr ""
-#: cp/decl.c:8332
+#: cp/decl.c:8384
#, gcc-internal-format
msgid "constructors cannot be declared virtual"
msgstr ""
-#: cp/decl.c:8345
+#: cp/decl.c:8397
#, gcc-internal-format
msgid "can't initialize friend function %qs"
msgstr ""
#. Cannot be both friend and virtual.
-#: cp/decl.c:8349
+#: cp/decl.c:8401
#, gcc-internal-format
msgid "virtual functions cannot be friends"
msgstr ""
-#: cp/decl.c:8353
+#: cp/decl.c:8405
#, gcc-internal-format
msgid "friend declaration not in class definition"
msgstr ""
-#: cp/decl.c:8355
+#: cp/decl.c:8407
#, gcc-internal-format
msgid "can't define friend function %qs in a local class definition"
msgstr ""
-#: cp/decl.c:8368
+#: cp/decl.c:8420
#, gcc-internal-format
msgid "destructors may not have parameters"
msgstr ""
-#: cp/decl.c:8387
+#: cp/decl.c:8439
#, gcc-internal-format
msgid "cannot declare pointer to %q#T"
msgstr ""
-#: cp/decl.c:8400 cp/decl.c:8407
+#: cp/decl.c:8452 cp/decl.c:8459
#, gcc-internal-format
msgid "cannot declare reference to %q#T"
msgstr ""
-#: cp/decl.c:8409
+#: cp/decl.c:8461
#, gcc-internal-format
msgid "cannot declare pointer to %q#T member"
msgstr ""
-#: cp/decl.c:8460
+#: cp/decl.c:8512
#, gcc-internal-format
msgid ""
"cannot declare reference to %q#T, which is not a typedef or a template type "
"argument"
msgstr ""
-#: cp/decl.c:8504
+#: cp/decl.c:8556
#, gcc-internal-format
msgid "template-id %qD used as a declarator"
msgstr ""
-#: cp/decl.c:8555
+#: cp/decl.c:8607
#, gcc-internal-format
msgid "member functions are implicitly friends of their class"
msgstr ""
-#: cp/decl.c:8560
+#: cp/decl.c:8612
#, gcc-internal-format
msgid "extra qualification %<%T::%> on member %qs"
msgstr ""
-#: cp/decl.c:8592
+#: cp/decl.c:8644
#, gcc-internal-format
msgid "cannot define member function %<%T::%s%> within %<%T%>"
msgstr ""
-#: cp/decl.c:8609
+#: cp/decl.c:8661
#, gcc-internal-format
msgid "cannot declare member %<%T::%s%> within %qT"
msgstr ""
-#: cp/decl.c:8632
+#: cp/decl.c:8684
#, gcc-internal-format
msgid "non-parameter %qs cannot be a parameter pack"
msgstr ""
-#: cp/decl.c:8653
+#: cp/decl.c:8705
#, gcc-internal-format
msgid "data member may not have variably modified type %qT"
msgstr ""
-#: cp/decl.c:8655
+#: cp/decl.c:8707
#, gcc-internal-format
msgid "parameter may not have variably modified type %qT"
msgstr ""
#. [dcl.fct.spec] The explicit specifier shall only be used in
#. declarations of constructors within a class definition.
-#: cp/decl.c:8663
+#: cp/decl.c:8715
#, gcc-internal-format
msgid "only declarations of constructors can be %<explicit%>"
msgstr ""
-#: cp/decl.c:8671
+#: cp/decl.c:8723
#, gcc-internal-format
msgid "non-member %qs cannot be declared %<mutable%>"
msgstr ""
-#: cp/decl.c:8676
+#: cp/decl.c:8728
#, gcc-internal-format
msgid "non-object member %qs cannot be declared %<mutable%>"
msgstr ""
-#: cp/decl.c:8682
+#: cp/decl.c:8734
#, gcc-internal-format
msgid "function %qs cannot be declared %<mutable%>"
msgstr ""
-#: cp/decl.c:8687
+#: cp/decl.c:8739
#, gcc-internal-format
msgid "static %qs cannot be declared %<mutable%>"
msgstr ""
-#: cp/decl.c:8692
+#: cp/decl.c:8744
#, gcc-internal-format
msgid "const %qs cannot be declared %<mutable%>"
msgstr ""
-#: cp/decl.c:8729
+#: cp/decl.c:8781
#, gcc-internal-format
msgid "%Jtypedef name may not be a nested-name-specifier"
msgstr ""
-#: cp/decl.c:8747
+#: cp/decl.c:8799
#, gcc-internal-format
msgid "ISO C++ forbids nested type %qD with same name as enclosing class"
msgstr ""
-#: cp/decl.c:8831
+#: cp/decl.c:8883
#, gcc-internal-format
msgid ""
"qualified function types cannot be used to declare static member functions"
msgstr ""
-#: cp/decl.c:8833
+#: cp/decl.c:8885
#, gcc-internal-format
msgid "qualified function types cannot be used to declare free functions"
msgstr ""
-#: cp/decl.c:8859
+#: cp/decl.c:8911
#, gcc-internal-format
msgid "type qualifiers specified for friend class declaration"
msgstr ""
-#: cp/decl.c:8864
+#: cp/decl.c:8916
#, gcc-internal-format
msgid "%<inline%> specified for friend class declaration"
msgstr ""
-#: cp/decl.c:8872
+#: cp/decl.c:8924
#, gcc-internal-format
msgid "template parameters cannot be friends"
msgstr ""
-#: cp/decl.c:8874
+#: cp/decl.c:8926
#, gcc-internal-format
msgid "friend declaration requires class-key, i.e. %<friend class %T::%D%>"
msgstr ""
-#: cp/decl.c:8878
+#: cp/decl.c:8930
#, gcc-internal-format
msgid "friend declaration requires class-key, i.e. %<friend %#T%>"
msgstr ""
-#: cp/decl.c:8891
+#: cp/decl.c:8943
#, gcc-internal-format
msgid "trying to make class %qT a friend of global scope"
msgstr ""
-#: cp/decl.c:8902
+#: cp/decl.c:8954
#, gcc-internal-format
msgid "invalid qualifiers on non-member function type"
msgstr ""
-#: cp/decl.c:8917
+#: cp/decl.c:8969
#, gcc-internal-format
msgid "abstract declarator %qT used as declaration"
msgstr ""
-#: cp/decl.c:8946
+#: cp/decl.c:8998
#, gcc-internal-format
msgid "cannot use %<::%> in parameter declaration"
msgstr ""
#. Something like struct S { int N::j; };
-#: cp/decl.c:8992
+#: cp/decl.c:9044
#, gcc-internal-format
msgid "invalid use of %<::%>"
msgstr ""
-#: cp/decl.c:9007
+#: cp/decl.c:9059
#, gcc-internal-format
msgid "can't make %qD into a method -- not in a class"
msgstr ""
-#: cp/decl.c:9016
+#: cp/decl.c:9068
#, gcc-internal-format
msgid "function %qD declared virtual inside a union"
msgstr ""
-#: cp/decl.c:9025
+#: cp/decl.c:9077
#, gcc-internal-format
msgid "%qD cannot be declared virtual, since it is always static"
msgstr ""
-#: cp/decl.c:9041
+#: cp/decl.c:9095
#, gcc-internal-format
msgid "expected qualified name in friend declaration for destructor %qD"
msgstr ""
-#: cp/decl.c:9051
+#: cp/decl.c:9102
#, gcc-internal-format
msgid "declaration of %qD as member of %qT"
msgstr ""
-#: cp/decl.c:9058
+#: cp/decl.c:9109
#, gcc-internal-format
msgid "expected qualified name in friend declaration for constructor %qD"
msgstr ""
-#: cp/decl.c:9130
+#: cp/decl.c:9172
#, gcc-internal-format
msgid "field %qD has incomplete type"
msgstr ""
-#: cp/decl.c:9132
+#: cp/decl.c:9174
#, gcc-internal-format
msgid "name %qT has incomplete type"
msgstr ""
-#: cp/decl.c:9141
+#: cp/decl.c:9183
#, gcc-internal-format
msgid " in instantiation of template %qT"
msgstr ""
-#: cp/decl.c:9150
+#: cp/decl.c:9192
#, gcc-internal-format
msgid "%qE is neither function nor member function; cannot be declared friend"
msgstr ""
@@ -30353,107 +30167,117 @@ msgstr ""
#. the rest of the compiler does not correctly
#. handle the initialization unless the member is
#. static so we make it static below.
-#: cp/decl.c:9202
+#: cp/decl.c:9244
#, gcc-internal-format
msgid "ISO C++ forbids initialization of member %qD"
msgstr ""
-#: cp/decl.c:9204
+#: cp/decl.c:9246
#, gcc-internal-format
msgid "making %qD static"
msgstr ""
-#: cp/decl.c:9269
+#: cp/decl.c:9311
#, gcc-internal-format
msgid "storage class %<auto%> invalid for function %qs"
msgstr ""
-#: cp/decl.c:9271
+#: cp/decl.c:9313
#, gcc-internal-format
msgid "storage class %<register%> invalid for function %qs"
msgstr ""
-#: cp/decl.c:9273
+#: cp/decl.c:9315
#, gcc-internal-format
msgid "storage class %<__thread%> invalid for function %qs"
msgstr ""
-#: cp/decl.c:9285
+#: cp/decl.c:9327
#, gcc-internal-format
msgid ""
"%<static%> specified invalid for function %qs declared out of global scope"
msgstr ""
-#: cp/decl.c:9289
+#: cp/decl.c:9331
#, gcc-internal-format
msgid ""
"%<inline%> specifier invalid for function %qs declared out of global scope"
msgstr ""
-#: cp/decl.c:9297
+#: cp/decl.c:9338
+#, gcc-internal-format
+msgid "%q#T is not a class or a namespace"
+msgstr ""
+
+#: cp/decl.c:9346
#, gcc-internal-format
msgid "virtual non-class function %qs"
msgstr ""
-#: cp/decl.c:9329
+#: cp/decl.c:9353
+#, gcc-internal-format
+msgid "%qs defined in a non-class scope"
+msgstr ""
+
+#: cp/decl.c:9386
#, gcc-internal-format
msgid "cannot declare member function %qD to have static linkage"
msgstr ""
#. FIXME need arm citation
-#: cp/decl.c:9336
+#: cp/decl.c:9393
#, gcc-internal-format
msgid "cannot declare static function inside another function"
msgstr ""
-#: cp/decl.c:9366
+#: cp/decl.c:9423
#, gcc-internal-format
msgid ""
"%<static%> may not be used when defining (as opposed to declaring) a static "
"data member"
msgstr ""
-#: cp/decl.c:9373
+#: cp/decl.c:9430
#, gcc-internal-format
msgid "static member %qD declared %<register%>"
msgstr ""
-#: cp/decl.c:9379
+#: cp/decl.c:9436
#, gcc-internal-format
msgid "cannot explicitly declare member %q#D to have extern linkage"
msgstr ""
-#: cp/decl.c:9523
+#: cp/decl.c:9580
#, gcc-internal-format
msgid "default argument for %q#D has type %qT"
msgstr ""
-#: cp/decl.c:9526
+#: cp/decl.c:9583
#, gcc-internal-format
msgid "default argument for parameter of type %qT has type %qT"
msgstr ""
-#: cp/decl.c:9542
+#: cp/decl.c:9599
#, gcc-internal-format
msgid "default argument %qE uses local variable %qD"
msgstr ""
-#: cp/decl.c:9625
+#: cp/decl.c:9682
#, gcc-internal-format
msgid "parameter %qD has Java class type"
msgstr ""
-#: cp/decl.c:9645
+#: cp/decl.c:9702
#, gcc-internal-format
msgid "parameter %qD invalidly declared method type"
msgstr ""
-#: cp/decl.c:9669
+#: cp/decl.c:9726
#, gcc-internal-format
msgid "parameter %qD includes %s to array of unknown bound %qT"
msgstr ""
-#: cp/decl.c:9684
+#: cp/decl.c:9741
#, gcc-internal-format
msgid "parameter packs must be at the end of the parameter list"
msgstr ""
@@ -30473,139 +30297,139 @@ msgstr ""
#. or implicitly defined), there's no need to worry about their
#. existence. Theoretically, they should never even be
#. instantiated, but that's hard to forestall.
-#: cp/decl.c:9903
+#: cp/decl.c:9964
#, gcc-internal-format
msgid "invalid constructor; you probably meant %<%T (const %T&)%>"
msgstr ""
-#: cp/decl.c:10025
+#: cp/decl.c:10086
#, gcc-internal-format
msgid "%qD may not be declared within a namespace"
msgstr ""
-#: cp/decl.c:10030
+#: cp/decl.c:10091
#, gcc-internal-format
msgid "%qD may not be declared as static"
msgstr ""
-#: cp/decl.c:10056
+#: cp/decl.c:10117
#, gcc-internal-format
msgid "%qD must be a nonstatic member function"
msgstr ""
-#: cp/decl.c:10065
+#: cp/decl.c:10126
#, gcc-internal-format
msgid ""
"%qD must be either a non-static member function or a non-member function"
msgstr ""
-#: cp/decl.c:10087
+#: cp/decl.c:10148
#, gcc-internal-format
msgid "%qD must have an argument of class or enumerated type"
msgstr ""
-#: cp/decl.c:10128
+#: cp/decl.c:10189
#, gcc-internal-format
msgid "conversion to %s%s will never use a type conversion operator"
msgstr ""
#. 13.4.0.3
-#: cp/decl.c:10136
+#: cp/decl.c:10197
#, gcc-internal-format
msgid "ISO C++ prohibits overloading operator ?:"
msgstr ""
-#: cp/decl.c:10141
+#: cp/decl.c:10202
#, gcc-internal-format
msgid "%qD must not have variable number of arguments"
msgstr ""
-#: cp/decl.c:10192
+#: cp/decl.c:10253
#, gcc-internal-format
msgid "postfix %qD must take %<int%> as its argument"
msgstr ""
-#: cp/decl.c:10195
+#: cp/decl.c:10256
#, gcc-internal-format
msgid "postfix %qD must take %<int%> as its second argument"
msgstr ""
-#: cp/decl.c:10203
+#: cp/decl.c:10264
#, gcc-internal-format
msgid "%qD must take either zero or one argument"
msgstr ""
-#: cp/decl.c:10205
+#: cp/decl.c:10266
#, gcc-internal-format
msgid "%qD must take either one or two arguments"
msgstr ""
-#: cp/decl.c:10227
+#: cp/decl.c:10288
#, gcc-internal-format
msgid "prefix %qD should return %qT"
msgstr ""
-#: cp/decl.c:10233
+#: cp/decl.c:10294
#, gcc-internal-format
msgid "postfix %qD should return %qT"
msgstr ""
-#: cp/decl.c:10242
+#: cp/decl.c:10303
#, gcc-internal-format
msgid "%qD must take %<void%>"
msgstr ""
-#: cp/decl.c:10244 cp/decl.c:10253
+#: cp/decl.c:10305 cp/decl.c:10314
#, gcc-internal-format
msgid "%qD must take exactly one argument"
msgstr ""
-#: cp/decl.c:10255
+#: cp/decl.c:10316
#, gcc-internal-format
msgid "%qD must take exactly two arguments"
msgstr ""
-#: cp/decl.c:10264
+#: cp/decl.c:10325
#, gcc-internal-format
msgid "user-defined %qD always evaluates both arguments"
msgstr ""
-#: cp/decl.c:10278
+#: cp/decl.c:10339
#, gcc-internal-format
msgid "%qD should return by value"
msgstr ""
-#: cp/decl.c:10289 cp/decl.c:10294
+#: cp/decl.c:10350 cp/decl.c:10355
#, gcc-internal-format
msgid "%qD cannot have default arguments"
msgstr ""
-#: cp/decl.c:10352
+#: cp/decl.c:10413
#, gcc-internal-format
msgid "using template type parameter %qT after %qs"
msgstr ""
-#: cp/decl.c:10367
+#: cp/decl.c:10428
#, gcc-internal-format
msgid "using typedef-name %qD after %qs"
msgstr ""
-#: cp/decl.c:10368
+#: cp/decl.c:10429
#, gcc-internal-format
msgid "%q+D has a previous declaration here"
msgstr ""
-#: cp/decl.c:10376
+#: cp/decl.c:10437
#, gcc-internal-format
msgid "%qT referred to as %qs"
msgstr ""
-#: cp/decl.c:10377 cp/decl.c:10384
+#: cp/decl.c:10438 cp/decl.c:10445
#, gcc-internal-format
msgid "%q+T has a previous declaration here"
msgstr ""
-#: cp/decl.c:10383
+#: cp/decl.c:10444
#, gcc-internal-format
msgid "%qT referred to as enum"
msgstr ""
@@ -30617,77 +30441,77 @@ msgstr ""
#. void f(class C); // No template header here
#.
#. then the required template argument is missing.
-#: cp/decl.c:10398
+#: cp/decl.c:10459
#, gcc-internal-format
msgid "template argument required for %<%s %T%>"
msgstr ""
-#: cp/decl.c:10446 cp/name-lookup.c:2795
+#: cp/decl.c:10507 cp/name-lookup.c:2800
#, gcc-internal-format
msgid "%qD has the same name as the class in which it is declared"
msgstr ""
-#: cp/decl.c:10476 cp/name-lookup.c:2303
+#: cp/decl.c:10537 cp/name-lookup.c:2308
#, gcc-internal-format
msgid "reference to %qD is ambiguous"
msgstr ""
-#: cp/decl.c:10590
+#: cp/decl.c:10651
#, gcc-internal-format
msgid "use of enum %q#D without previous declaration"
msgstr ""
-#: cp/decl.c:10611
+#: cp/decl.c:10672
#, gcc-internal-format
msgid "redeclaration of %qT as a non-template"
msgstr ""
-#: cp/decl.c:10612
+#: cp/decl.c:10673
#, gcc-internal-format
msgid "previous declaration %q+D"
msgstr ""
-#: cp/decl.c:10723
+#: cp/decl.c:10784
#, gcc-internal-format
msgid "derived union %qT invalid"
msgstr ""
-#: cp/decl.c:10732
+#: cp/decl.c:10793
#, gcc-internal-format
msgid "Java class %qT cannot have multiple bases"
msgstr ""
-#: cp/decl.c:10743
+#: cp/decl.c:10804
#, gcc-internal-format
msgid "Java class %qT cannot have virtual bases"
msgstr ""
-#: cp/decl.c:10763
+#: cp/decl.c:10824
#, gcc-internal-format
msgid "base type %qT fails to be a struct or class type"
msgstr ""
-#: cp/decl.c:10796
+#: cp/decl.c:10857
#, gcc-internal-format
msgid "recursive type %qT undefined"
msgstr ""
-#: cp/decl.c:10798
+#: cp/decl.c:10859
#, gcc-internal-format
msgid "duplicate base type %qT invalid"
msgstr ""
-#: cp/decl.c:10882
+#: cp/decl.c:10943
#, gcc-internal-format
msgid "multiple definition of %q#T"
msgstr ""
-#: cp/decl.c:10883
+#: cp/decl.c:10944
#, gcc-internal-format
msgid "%Jprevious definition here"
msgstr ""
-#: cp/decl.c:10927
+#: cp/decl.c:10991
#, gcc-internal-format
msgid "underlying type %<%T%> of %<%T%> must be an integral type"
msgstr ""
@@ -30696,57 +30520,62 @@ msgstr ""
#.
#. IF no integral type can represent all the enumerator values, the
#. enumeration is ill-formed.
-#: cp/decl.c:11059
+#: cp/decl.c:11123
#, gcc-internal-format
msgid "no integral type can represent all of the enumerator values for %qT"
msgstr ""
-#: cp/decl.c:11190
+#: cp/decl.c:11254
#, gcc-internal-format
msgid "enumerator value for %qD is not an integer constant"
msgstr ""
-#: cp/decl.c:11222
+#: cp/decl.c:11286
#, gcc-internal-format
msgid "overflow in enumeration values at %qD"
msgstr ""
-#: cp/decl.c:11242
+#: cp/decl.c:11306
#, gcc-internal-format
msgid "enumerator value %E is too large for underlying type %<%T%>"
msgstr ""
-#: cp/decl.c:11339
+#: cp/decl.c:11403
#, gcc-internal-format
msgid "return type %q#T is incomplete"
msgstr ""
-#: cp/decl.c:11341
+#: cp/decl.c:11405
#, gcc-internal-format
msgid "return type has Java class type %q#T"
msgstr ""
-#: cp/decl.c:11466 cp/typeck.c:6876
+#: cp/decl.c:11530 cp/typeck.c:6939
#, gcc-internal-format
msgid "%<operator=%> should return a reference to %<*this%>"
msgstr ""
-#: cp/decl.c:11860
+#: cp/decl.c:11845
+#, gcc-internal-format
+msgid "invalid function declaration"
+msgstr ""
+
+#: cp/decl.c:11929
#, gcc-internal-format
msgid "parameter %qD declared void"
msgstr ""
-#: cp/decl.c:12361
+#: cp/decl.c:12430
#, gcc-internal-format
msgid "invalid member function declaration"
msgstr ""
-#: cp/decl.c:12376
+#: cp/decl.c:12445
#, gcc-internal-format
msgid "%qD is already defined in class %qT"
msgstr ""
-#: cp/decl.c:12623
+#: cp/decl.c:12692
#, gcc-internal-format
msgid "static member function %q#D declared with type qualifiers"
msgstr ""
@@ -30788,7 +30617,7 @@ msgstr ""
msgid "deleting %qT is undefined"
msgstr ""
-#: cp/decl2.c:461 cp/pt.c:3838
+#: cp/decl2.c:461 cp/pt.c:3848
#, gcc-internal-format
msgid "template declaration of %q#D"
msgstr ""
@@ -30803,92 +30632,98 @@ msgstr ""
msgid "Java method %qD has non-Java parameter type %qT"
msgstr ""
-#: cp/decl2.c:642
+#: cp/decl2.c:579
+#, gcc-internal-format
+msgid ""
+"template parameter lists provided don't match the template parameters of %qD"
+msgstr ""
+
+#: cp/decl2.c:647
#, gcc-internal-format
msgid "prototype for %q#D does not match any in class %qT"
msgstr ""
-#: cp/decl2.c:722
+#: cp/decl2.c:727
#, gcc-internal-format
msgid "local class %q#T shall not have static data member %q#D"
msgstr ""
-#: cp/decl2.c:730
+#: cp/decl2.c:735
#, gcc-internal-format
msgid "initializer invalid for static member with constructor"
msgstr ""
-#: cp/decl2.c:733
+#: cp/decl2.c:738
#, gcc-internal-format
msgid "(an out of class initialization is required)"
msgstr ""
-#: cp/decl2.c:793
+#: cp/decl2.c:798
#, gcc-internal-format
msgid "member %qD conflicts with virtual function table field name"
msgstr ""
-#: cp/decl2.c:813
+#: cp/decl2.c:828
#, gcc-internal-format
msgid "%qD is already defined in %qT"
msgstr ""
-#: cp/decl2.c:851
+#: cp/decl2.c:866
#, gcc-internal-format
msgid "initializer specified for static member function %qD"
msgstr ""
-#: cp/decl2.c:874
+#: cp/decl2.c:889
#, gcc-internal-format
msgid "field initializer is not constant"
msgstr ""
-#: cp/decl2.c:901
+#: cp/decl2.c:916
#, gcc-internal-format
msgid "%<asm%> specifiers are not permitted on non-static data members"
msgstr ""
-#: cp/decl2.c:953
+#: cp/decl2.c:968
#, gcc-internal-format
msgid "bit-field %qD with non-integral type"
msgstr ""
-#: cp/decl2.c:959
+#: cp/decl2.c:974
#, gcc-internal-format
msgid "cannot declare %qD to be a bit-field type"
msgstr ""
-#: cp/decl2.c:969
+#: cp/decl2.c:984
#, gcc-internal-format
msgid "cannot declare bit-field %qD with function type"
msgstr ""
-#: cp/decl2.c:976
+#: cp/decl2.c:991
#, gcc-internal-format
msgid "%qD is already defined in the class %qT"
msgstr ""
-#: cp/decl2.c:983
+#: cp/decl2.c:998
#, gcc-internal-format
msgid "static member %qD cannot be a bit-field"
msgstr ""
-#: cp/decl2.c:1251
+#: cp/decl2.c:1266
#, gcc-internal-format
msgid "anonymous struct not inside named type"
msgstr ""
-#: cp/decl2.c:1335
+#: cp/decl2.c:1350
#, gcc-internal-format
msgid "namespace-scope anonymous aggregates must be static"
msgstr ""
-#: cp/decl2.c:1344
+#: cp/decl2.c:1359
#, gcc-internal-format
msgid "anonymous union with no members"
msgstr ""
-#: cp/decl2.c:1380
+#: cp/decl2.c:1396
#, gcc-internal-format
msgid "%<operator new%> must return type %qT"
msgstr ""
@@ -30897,62 +30732,62 @@ msgstr ""
#.
#. The first parameter shall not have an associated default
#. argument.
-#: cp/decl2.c:1391
+#: cp/decl2.c:1407
#, gcc-internal-format
msgid "the first parameter of %<operator new%> cannot have a default argument"
msgstr ""
-#: cp/decl2.c:1407
+#: cp/decl2.c:1423
#, gcc-internal-format
msgid "%<operator new%> takes type %<size_t%> (%qT) as first parameter"
msgstr ""
-#: cp/decl2.c:1436
+#: cp/decl2.c:1452
#, gcc-internal-format
msgid "%<operator delete%> must return type %qT"
msgstr ""
-#: cp/decl2.c:1445
+#: cp/decl2.c:1461
#, gcc-internal-format
msgid "%<operator delete%> takes type %qT as first parameter"
msgstr ""
-#: cp/decl2.c:2122
+#: cp/decl2.c:2152
#, gcc-internal-format
msgid "%qT has a field %qD whose type uses the anonymous namespace"
msgstr ""
-#: cp/decl2.c:2129
+#: cp/decl2.c:2159
#, gcc-internal-format
msgid "%qT declared with greater visibility than the type of its field %qD"
msgstr ""
-#: cp/decl2.c:2142
+#: cp/decl2.c:2172
#, gcc-internal-format
msgid "%qT has a base %qT whose type uses the anonymous namespace"
msgstr ""
-#: cp/decl2.c:2148
+#: cp/decl2.c:2178
#, gcc-internal-format
msgid "%qT declared with greater visibility than its base %qT"
msgstr ""
-#: cp/decl2.c:3582
+#: cp/decl2.c:3612
#, gcc-internal-format
msgid "inline function %q+D used but never defined"
msgstr ""
-#: cp/decl2.c:3731
+#: cp/decl2.c:3761
#, gcc-internal-format
msgid "default argument missing for parameter %P of %q+#D"
msgstr ""
-#: cp/decl2.c:3780 cp/search.c:1919
+#: cp/decl2.c:3810 cp/search.c:1912
#, gcc-internal-format
msgid "deleted function %q+D"
msgstr ""
-#: cp/decl2.c:3781
+#: cp/decl2.c:3811
#, gcc-internal-format
msgid "used here"
msgstr ""
@@ -30960,7 +30795,7 @@ msgstr ""
#. We really want to suppress this warning in system headers,
#. because libstdc++ uses variadic templates even when we aren't
#. in C++0x mode.
-#: cp/error.c:2701
+#: cp/error.c:2710
#, gcc-internal-format
msgid "%s only available with -std=c++0x or -std=gnu++0x"
msgstr ""
@@ -30982,43 +30817,43 @@ msgstr ""
msgid "type %qT is not derived from %<java::lang::Throwable%>"
msgstr ""
-#: cp/except.c:367
+#: cp/except.c:368
#, gcc-internal-format
msgid "mixing C++ and Java catches in a single translation unit"
msgstr ""
-#: cp/except.c:638
+#: cp/except.c:639
#, gcc-internal-format
msgid "throwing NULL, which has integral, not pointer type"
msgstr ""
-#: cp/except.c:661 cp/init.c:1955
+#: cp/except.c:662 cp/init.c:1896
#, gcc-internal-format
msgid "%qD should never be overloaded"
msgstr ""
-#: cp/except.c:758
+#: cp/except.c:759
#, gcc-internal-format
msgid " in thrown expression"
msgstr ""
-#: cp/except.c:914
+#: cp/except.c:915
#, gcc-internal-format
msgid ""
"expression %qE of abstract class type %qT cannot be used in throw-expression"
msgstr ""
-#: cp/except.c:999
+#: cp/except.c:1000
#, gcc-internal-format
msgid "%Hexception of type %qT will be caught"
msgstr ""
-#: cp/except.c:1001
+#: cp/except.c:1002
#, gcc-internal-format
msgid "%H by earlier handler for %qT"
msgstr ""
-#: cp/except.c:1031
+#: cp/except.c:1032
#, gcc-internal-format
msgid "%H%<...%> handler must be the last handler for its try block"
msgstr ""
@@ -31109,273 +30944,273 @@ msgid ""
"already been declared and add <> after the function name here) "
msgstr ""
-#: cp/init.c:372
+#: cp/init.c:351
#, gcc-internal-format
msgid "value-initialization of reference"
msgstr ""
-#: cp/init.c:479
+#: cp/init.c:429
#, gcc-internal-format
msgid "%J%qD should be initialized in the member initialization list"
msgstr ""
-#. TYPE_NEEDS_CONSTRUCTING can be set just because we have a
-#. vtable; still give this diagnostic.
-#: cp/init.c:525 cp/init.c:548
+#: cp/init.c:454
#, gcc-internal-format
-msgid "%Juninitialized member %qD with %<const%> type %qT"
+msgid "%Jvalue-initialization of %q#D, which has reference type"
msgstr ""
-#: cp/init.c:539
+#. TYPE_NEEDS_CONSTRUCTING can be set just because we have a
+#. vtable; still give this diagnostic.
+#: cp/init.c:495 cp/init.c:510
#, gcc-internal-format
-msgid "%Jdefault-initialization of %q#D, which has reference type"
+msgid "%Juninitialized member %qD with %<const%> type %qT"
msgstr ""
-#: cp/init.c:545
+#: cp/init.c:507
#, gcc-internal-format
msgid "%Juninitialized reference member %qD"
msgstr ""
-#: cp/init.c:693
+#: cp/init.c:655
#, gcc-internal-format
msgid "%q+D will be initialized after"
msgstr ""
-#: cp/init.c:696
+#: cp/init.c:658
#, gcc-internal-format
msgid "base %qT will be initialized after"
msgstr ""
-#: cp/init.c:699
+#: cp/init.c:661
#, gcc-internal-format
msgid " %q+#D"
msgstr ""
-#: cp/init.c:701
+#: cp/init.c:663
#, gcc-internal-format
msgid " base %qT"
msgstr ""
-#: cp/init.c:702
+#: cp/init.c:664
#, gcc-internal-format
msgid "%J when initialized here"
msgstr ""
-#: cp/init.c:718
+#: cp/init.c:680
#, gcc-internal-format
msgid "%Jmultiple initializations given for %qD"
msgstr ""
-#: cp/init.c:721
+#: cp/init.c:683
#, gcc-internal-format
msgid "%Jmultiple initializations given for base %qT"
msgstr ""
-#: cp/init.c:788
+#: cp/init.c:750
#, gcc-internal-format
msgid "%Jinitializations for multiple members of %qT"
msgstr ""
-#: cp/init.c:851
+#: cp/init.c:813
#, gcc-internal-format
msgid ""
"%Jbase class %q#T should be explicitly initialized in the copy constructor"
msgstr ""
-#: cp/init.c:1080 cp/init.c:1099
+#: cp/init.c:1037 cp/init.c:1056
#, gcc-internal-format
msgid "class %qT does not have any field named %qD"
msgstr ""
-#: cp/init.c:1086
+#: cp/init.c:1043
#, gcc-internal-format
msgid ""
"%q#D is a static data member; it can only be initialized at its definition"
msgstr ""
-#: cp/init.c:1093
+#: cp/init.c:1050
#, gcc-internal-format
msgid "%q#D is not a non-static data member of %qT"
msgstr ""
-#: cp/init.c:1132
+#: cp/init.c:1089
#, gcc-internal-format
msgid "unnamed initializer for %qT, which has no base classes"
msgstr ""
-#: cp/init.c:1140
+#: cp/init.c:1097
#, gcc-internal-format
msgid "unnamed initializer for %qT, which uses multiple inheritance"
msgstr ""
-#: cp/init.c:1186
+#: cp/init.c:1143
#, gcc-internal-format
msgid "%qD is both a direct base and an indirect virtual base"
msgstr ""
-#: cp/init.c:1194
+#: cp/init.c:1151
#, gcc-internal-format
msgid "type %qT is not a direct or virtual base of %qT"
msgstr ""
-#: cp/init.c:1197
+#: cp/init.c:1154
#, gcc-internal-format
msgid "type %qT is not a direct base of %qT"
msgstr ""
-#: cp/init.c:1278
+#: cp/init.c:1235
#, gcc-internal-format
msgid "bad array initializer"
msgstr ""
-#: cp/init.c:1457 cp/semantics.c:2490
+#: cp/init.c:1441 cp/semantics.c:2496
#, gcc-internal-format
msgid "%qT is not a class type"
msgstr ""
-#: cp/init.c:1511
+#: cp/init.c:1495
#, gcc-internal-format
msgid "incomplete type %qT does not have member %qD"
msgstr ""
-#: cp/init.c:1524
+#: cp/init.c:1508
#, gcc-internal-format
msgid "invalid pointer to bit-field %qD"
msgstr ""
-#: cp/init.c:1602
+#: cp/init.c:1586
#, gcc-internal-format
msgid "invalid use of non-static member function %qD"
msgstr ""
-#: cp/init.c:1608
+#: cp/init.c:1592
#, gcc-internal-format
msgid "invalid use of non-static data member %qD"
msgstr ""
-#: cp/init.c:1897
+#: cp/init.c:1852
#, gcc-internal-format
msgid "invalid type %<void%> for new"
msgstr ""
-#: cp/init.c:1910
+#: cp/init.c:1865
#, gcc-internal-format
msgid "uninitialized const in %<new%> of %q#T"
msgstr ""
-#: cp/init.c:1949
+#: cp/init.c:1890
#, gcc-internal-format
msgid "call to Java constructor with %qs undefined"
msgstr ""
-#: cp/init.c:1967
+#: cp/init.c:1908
#, gcc-internal-format
msgid "Java class %q#T object allocated using placement new"
msgstr ""
-#: cp/init.c:1997
+#: cp/init.c:1938
#, gcc-internal-format
msgid "no suitable %qD found in class %qT"
msgstr ""
-#: cp/init.c:2004
+#: cp/init.c:1945
#, gcc-internal-format
msgid "request for member %qD is ambiguous"
msgstr ""
-#: cp/init.c:2184
+#: cp/init.c:2124
#, gcc-internal-format
msgid "ISO C++ forbids initialization in array new"
msgstr ""
-#: cp/init.c:2410
+#: cp/init.c:2348
#, gcc-internal-format
msgid "size in array new must have integral type"
msgstr ""
-#: cp/init.c:2423
+#: cp/init.c:2361
#, gcc-internal-format
msgid "new cannot be applied to a reference type"
msgstr ""
-#: cp/init.c:2432
+#: cp/init.c:2370
#, gcc-internal-format
msgid "new cannot be applied to a function type"
msgstr ""
-#: cp/init.c:2471
+#: cp/init.c:2409
#, gcc-internal-format
msgid "call to Java constructor, while %<jclass%> undefined"
msgstr ""
-#: cp/init.c:2489
+#: cp/init.c:2427
#, gcc-internal-format
msgid "can't find %<class$%> in %qT"
msgstr ""
-#: cp/init.c:2858
+#: cp/init.c:2802
#, gcc-internal-format
msgid "initializer ends prematurely"
msgstr ""
-#: cp/init.c:2916
+#: cp/init.c:2860
#, gcc-internal-format
msgid "cannot initialize multi-dimensional array with initializer"
msgstr ""
-#: cp/init.c:3061
+#: cp/init.c:3008
#, gcc-internal-format
msgid "possible problem detected in invocation of delete operator:"
msgstr ""
-#: cp/init.c:3065
+#: cp/init.c:3012
#, gcc-internal-format
msgid ""
"neither the destructor nor the class-specific operator delete will be "
"called, even if they are declared when the class is defined."
msgstr ""
-#: cp/init.c:3087
+#: cp/init.c:3034
#, gcc-internal-format
msgid "unknown array size in delete"
msgstr ""
-#: cp/init.c:3341
+#: cp/init.c:3288
#, gcc-internal-format
msgid "type to vector delete is neither pointer or array type"
msgstr ""
-#: cp/lex.c:319
+#: cp/lex.c:321
#, gcc-internal-format
msgid "junk at end of #pragma %s"
msgstr ""
-#: cp/lex.c:326
+#: cp/lex.c:328
#, gcc-internal-format
msgid "invalid #pragma %s"
msgstr ""
-#: cp/lex.c:334
+#: cp/lex.c:336
#, gcc-internal-format
msgid "#pragma vtable no longer supported"
msgstr ""
-#: cp/lex.c:406
+#: cp/lex.c:408
#, gcc-internal-format
msgid "#pragma implementation for %qs appears after file is included"
msgstr ""
-#: cp/lex.c:430
+#: cp/lex.c:432
#, gcc-internal-format
msgid "junk at end of #pragma GCC java_exceptions"
msgstr ""
-#: cp/lex.c:444
+#: cp/lex.c:447
#, gcc-internal-format
msgid "%qD not defined"
msgstr ""
-#: cp/lex.c:448
+#: cp/lex.c:451
#, gcc-internal-format
msgid "%qD was not declared in this scope"
msgstr ""
@@ -31390,38 +31225,46 @@ msgstr ""
#. Note that we have the exact wording of the following message in
#. the manual (trouble.texi, node "Name lookup"), so they need to
#. be kept in synch.
-#: cp/lex.c:485
+#: cp/lex.c:488
#, gcc-internal-format
msgid ""
"there are no arguments to %qD that depend on a template parameter, so a "
"declaration of %qD must be available"
msgstr ""
-#: cp/lex.c:494
+#: cp/lex.c:497
#, gcc-internal-format
msgid ""
"(if you use %<-fpermissive%>, G++ will accept your code, but allowing the "
"use of an undeclared name is deprecated)"
msgstr ""
-#: cp/mangle.c:1687
+#: cp/mangle.c:1690
#, gcc-internal-format
msgid "mangling typeof, use decltype instead"
msgstr ""
-#. FIXME the above hack for T() needs to be replaced with
-#. something more general.
-#: cp/mangle.c:2282
+#: cp/mangle.c:1903
+#, gcc-internal-format
+msgid "mangling unknown fixed point type"
+msgstr ""
+
+#: cp/mangle.c:2338
+#, gcc-internal-format
+msgid "mangling %C"
+msgstr ""
+
+#: cp/mangle.c:2375
#, gcc-internal-format
-msgid "mangling function-style cast with more than one argument"
+msgid "mangling new-expression"
msgstr ""
-#: cp/mangle.c:2310
+#: cp/mangle.c:2395
#, gcc-internal-format
msgid "omitted middle operand to %<?:%> operand cannot be mangled"
msgstr ""
-#: cp/mangle.c:2625
+#: cp/mangle.c:2710
#, gcc-internal-format
msgid "the mangled name of %qD will change in a future version of GCC"
msgstr ""
@@ -31484,567 +31327,577 @@ msgstr ""
msgid "due to different exception specifications"
msgstr ""
-#: cp/name-lookup.c:899
+#: cp/name-lookup.c:900
#, gcc-internal-format
msgid "type mismatch with previous external decl of %q#D"
msgstr ""
-#: cp/name-lookup.c:900
+#: cp/name-lookup.c:901
#, gcc-internal-format
msgid "previous external decl of %q+#D"
msgstr ""
-#: cp/name-lookup.c:991
+#: cp/name-lookup.c:992
#, gcc-internal-format
msgid "extern declaration of %q#D doesn't match"
msgstr ""
-#: cp/name-lookup.c:992
+#: cp/name-lookup.c:993
#, gcc-internal-format
msgid "global declaration %q+#D"
msgstr ""
-#: cp/name-lookup.c:1029 cp/name-lookup.c:1036
+#: cp/name-lookup.c:1030 cp/name-lookup.c:1040
#, gcc-internal-format
msgid "declaration of %q#D shadows a parameter"
msgstr ""
#. Location of previous decl is not useful in this case.
-#: cp/name-lookup.c:1061
+#: cp/name-lookup.c:1065
#, gcc-internal-format
msgid "declaration of %qD shadows a member of 'this'"
msgstr ""
-#: cp/name-lookup.c:1067
+#: cp/name-lookup.c:1071
#, gcc-internal-format
msgid "declaration of %qD shadows a previous local"
msgstr ""
-#: cp/name-lookup.c:1074
+#: cp/name-lookup.c:1078
#, gcc-internal-format
msgid "declaration of %qD shadows a global declaration"
msgstr ""
-#: cp/name-lookup.c:1197
+#: cp/name-lookup.c:1201
#, gcc-internal-format
msgid "name lookup of %qD changed"
msgstr ""
-#: cp/name-lookup.c:1198
+#: cp/name-lookup.c:1202
#, gcc-internal-format
msgid " matches this %q+D under ISO standard rules"
msgstr ""
-#: cp/name-lookup.c:1200
+#: cp/name-lookup.c:1204
#, gcc-internal-format
msgid " matches this %q+D under old rules"
msgstr ""
-#: cp/name-lookup.c:1218 cp/name-lookup.c:1226
+#: cp/name-lookup.c:1222 cp/name-lookup.c:1230
#, gcc-internal-format
msgid "name lookup of %qD changed for ISO %<for%> scoping"
msgstr ""
-#: cp/name-lookup.c:1220
+#: cp/name-lookup.c:1224
#, gcc-internal-format
msgid " cannot use obsolete binding at %q+D because it has a destructor"
msgstr ""
-#: cp/name-lookup.c:1229
+#: cp/name-lookup.c:1233
#, gcc-internal-format
msgid " using obsolete binding at %q+D"
msgstr ""
-#: cp/name-lookup.c:1235 cp/parser.c:10068
+#: cp/name-lookup.c:1239 cp/parser.c:10154
#, gcc-internal-format
msgid "(if you use %<-fpermissive%> G++ will accept your code)"
msgstr ""
-#: cp/name-lookup.c:1291
+#: cp/name-lookup.c:1295
#, gcc-internal-format
msgid "%s %s(%E) %p %d\n"
msgstr ""
-#: cp/name-lookup.c:1294
+#: cp/name-lookup.c:1298
#, gcc-internal-format
msgid "%s %s %p %d\n"
msgstr ""
-#: cp/name-lookup.c:1422
+#: cp/name-lookup.c:1426
#, gcc-internal-format
msgid "XXX is_class_level != (current_scope == class_scope)\n"
msgstr ""
-#: cp/name-lookup.c:2016
+#: cp/name-lookup.c:2021
#, gcc-internal-format
msgid "%q#D hides constructor for %q#T"
msgstr ""
-#: cp/name-lookup.c:2033
+#: cp/name-lookup.c:2038
#, gcc-internal-format
msgid "%q#D conflicts with previous using declaration %q#D"
msgstr ""
-#: cp/name-lookup.c:2056
+#: cp/name-lookup.c:2061
#, gcc-internal-format
msgid "previous non-function declaration %q+#D"
msgstr ""
-#: cp/name-lookup.c:2057
+#: cp/name-lookup.c:2062
#, gcc-internal-format
msgid "conflicts with function declaration %q#D"
msgstr ""
#. It's a nested name with template parameter dependent scope.
#. This can only be using-declaration for class member.
-#: cp/name-lookup.c:2135 cp/name-lookup.c:2160
+#: cp/name-lookup.c:2140 cp/name-lookup.c:2165
#, gcc-internal-format
msgid "%qT is not a namespace"
msgstr ""
#. 7.3.3/5
#. A using-declaration shall not name a template-id.
-#: cp/name-lookup.c:2145
+#: cp/name-lookup.c:2150
#, gcc-internal-format
msgid "a using-declaration cannot specify a template-id. Try %<using %D%>"
msgstr ""
-#: cp/name-lookup.c:2152
+#: cp/name-lookup.c:2157
#, gcc-internal-format
msgid "namespace %qD not allowed in using-declaration"
msgstr ""
-#: cp/name-lookup.c:2188
+#: cp/name-lookup.c:2193
#, gcc-internal-format
msgid "%qD not declared"
msgstr ""
-#: cp/name-lookup.c:2224 cp/name-lookup.c:2261 cp/name-lookup.c:2295
-#: cp/name-lookup.c:2310
+#: cp/name-lookup.c:2229 cp/name-lookup.c:2266 cp/name-lookup.c:2300
+#: cp/name-lookup.c:2315
#, gcc-internal-format
msgid "%qD is already declared in this scope"
msgstr ""
-#: cp/name-lookup.c:2914
+#: cp/name-lookup.c:2919
#, gcc-internal-format
msgid "using-declaration for non-member at class scope"
msgstr ""
-#: cp/name-lookup.c:2921
+#: cp/name-lookup.c:2926
#, gcc-internal-format
msgid "%<%T::%D%> names destructor"
msgstr ""
-#: cp/name-lookup.c:2926
+#: cp/name-lookup.c:2931
#, gcc-internal-format
msgid "%<%T::%D%> names constructor"
msgstr ""
-#: cp/name-lookup.c:2931
+#: cp/name-lookup.c:2936
#, gcc-internal-format
msgid "%<%T::%D%> names constructor in %qT"
msgstr ""
-#: cp/name-lookup.c:2981
+#: cp/name-lookup.c:2986
#, gcc-internal-format
msgid "no members matching %<%T::%D%> in %q#T"
msgstr ""
-#: cp/name-lookup.c:3049
+#: cp/name-lookup.c:3054
#, gcc-internal-format
msgid "declaration of %qD not in a namespace surrounding %qD"
msgstr ""
-#: cp/name-lookup.c:3057
+#: cp/name-lookup.c:3062
#, gcc-internal-format
msgid "explicit qualification in declaration of %qD"
msgstr ""
-#: cp/name-lookup.c:3100
+#: cp/name-lookup.c:3105
#, gcc-internal-format
msgid "%qD should have been declared inside %qD"
msgstr ""
-#: cp/name-lookup.c:3145
+#: cp/name-lookup.c:3150
#, gcc-internal-format
msgid "%qD attribute requires a single NTBS argument"
msgstr ""
-#: cp/name-lookup.c:3152
+#: cp/name-lookup.c:3157
#, gcc-internal-format
msgid ""
"%qD attribute is meaningless since members of the anonymous namespace get "
"local symbols"
msgstr ""
-#: cp/name-lookup.c:3161 cp/name-lookup.c:3530
+#: cp/name-lookup.c:3166 cp/name-lookup.c:3536
#, gcc-internal-format
msgid "%qD attribute directive ignored"
msgstr ""
-#: cp/name-lookup.c:3206
+#: cp/name-lookup.c:3211
#, gcc-internal-format
msgid "namespace alias %qD not allowed here, assuming %qD"
msgstr ""
-#: cp/name-lookup.c:3518
+#: cp/name-lookup.c:3524
#, gcc-internal-format
msgid "strong using only meaningful at namespace scope"
msgstr ""
-#: cp/name-lookup.c:3522
+#: cp/name-lookup.c:3528
#, gcc-internal-format
msgid "current namespace %qD does not enclose strongly used namespace %qD"
msgstr ""
-#: cp/name-lookup.c:4418
+#: cp/name-lookup.c:4466
#, gcc-internal-format
msgid "%q+D is not a function,"
msgstr ""
-#: cp/name-lookup.c:4419
+#: cp/name-lookup.c:4467
#, gcc-internal-format
msgid " conflict with %q+D"
msgstr ""
-#: cp/name-lookup.c:4863
+#: cp/name-lookup.c:4912
#, gcc-internal-format
msgid "argument dependent lookup finds %q+D"
msgstr ""
-#: cp/name-lookup.c:5301
+#: cp/name-lookup.c:5353
#, gcc-internal-format
msgid "XXX entering pop_everything ()\n"
msgstr ""
-#: cp/name-lookup.c:5310
+#: cp/name-lookup.c:5362
#, gcc-internal-format
msgid "XXX leaving pop_everything ()\n"
msgstr ""
-#: cp/parser.c:441
+#: cp/parser.c:440
#, gcc-internal-format
msgid "identifier %<%s%> will become a keyword in C++0x"
msgstr ""
-#: cp/parser.c:2081
+#: cp/parser.c:2080
#, gcc-internal-format
msgid "%H%<#pragma%> is not allowed here"
msgstr ""
-#: cp/parser.c:2112
+#: cp/parser.c:2111
#, gcc-internal-format
msgid "%H%<%E::%E%> has not been declared"
msgstr ""
-#: cp/parser.c:2115
+#: cp/parser.c:2114
#, gcc-internal-format
msgid "%H%<::%E%> has not been declared"
msgstr ""
-#: cp/parser.c:2118
+#: cp/parser.c:2117
#, gcc-internal-format
msgid "%Hrequest for member %qE in non-class type %qT"
msgstr ""
-#: cp/parser.c:2121
+#: cp/parser.c:2120
#, gcc-internal-format
msgid "%H%<%T::%E%> has not been declared"
msgstr ""
-#: cp/parser.c:2124
+#: cp/parser.c:2123
#, gcc-internal-format
msgid "%H%qE has not been declared"
msgstr ""
-#: cp/parser.c:2127
+#: cp/parser.c:2126
#, gcc-internal-format
msgid "%H%<%E::%E%> %s"
msgstr ""
-#: cp/parser.c:2129
+#: cp/parser.c:2128
#, gcc-internal-format
msgid "%H%<::%E%> %s"
msgstr ""
-#: cp/parser.c:2131
+#: cp/parser.c:2130
#, gcc-internal-format
msgid "%H%qE %s"
msgstr ""
-#: cp/parser.c:2166
+#: cp/parser.c:2165
#, gcc-internal-format
msgid "%H%<long long long%> is too long for GCC"
msgstr ""
-#: cp/parser.c:2170
+#: cp/parser.c:2169
#, gcc-internal-format
msgid "ISO C++ 1998 does not support %<long long%>"
msgstr ""
-#: cp/parser.c:2190
+#: cp/parser.c:2189
#, gcc-internal-format
msgid "%Hduplicate %qs"
msgstr ""
-#: cp/parser.c:2234
+#: cp/parser.c:2233
#, gcc-internal-format
msgid "%Hnew types may not be defined in a return type"
msgstr ""
-#: cp/parser.c:2236
+#: cp/parser.c:2235
#, gcc-internal-format
msgid "(perhaps a semicolon is missing after the definition of %qT)"
msgstr ""
-#: cp/parser.c:2256
+#: cp/parser.c:2255
#, gcc-internal-format
msgid "%H%qT is not a template"
msgstr ""
-#: cp/parser.c:2258
+#: cp/parser.c:2257
#, gcc-internal-format
msgid "%H%qE is not a template"
msgstr ""
-#: cp/parser.c:2260
+#: cp/parser.c:2259
#, gcc-internal-format
msgid "%Hinvalid template-id"
msgstr ""
-#: cp/parser.c:2322
+#: cp/parser.c:2321
#, gcc-internal-format
msgid "%Hinvalid use of template-name %qE without an argument list"
msgstr ""
-#: cp/parser.c:2325
+#: cp/parser.c:2324
#, gcc-internal-format
msgid "%Hinvalid use of destructor %qD as a type"
msgstr ""
#. Something like 'unsigned A a;'
-#: cp/parser.c:2328
+#: cp/parser.c:2327
#, gcc-internal-format
msgid "%Hinvalid combination of multiple type-specifiers"
msgstr ""
#. Issue an error message.
-#: cp/parser.c:2333
+#: cp/parser.c:2332
#, gcc-internal-format
msgid "%H%qE does not name a type"
msgstr ""
-#: cp/parser.c:2366
+#: cp/parser.c:2365
#, gcc-internal-format
msgid "(perhaps %<typename %T::%E%> was intended)"
msgstr ""
-#: cp/parser.c:2381
+#: cp/parser.c:2380
#, gcc-internal-format
msgid "%H%qE in namespace %qE does not name a type"
msgstr ""
-#: cp/parser.c:2384
+#: cp/parser.c:2383
#, gcc-internal-format
msgid "%H%qE in class %qT does not name a type"
msgstr ""
-#: cp/parser.c:2946
+#: cp/parser.c:2945
#, gcc-internal-format
msgid "%Hunsupported non-standard concatenation of string literals"
msgstr ""
-#: cp/parser.c:3224
+#: cp/parser.c:3148
+#, gcc-internal-format
+msgid "%Hfixed-point types not supported in C++"
+msgstr ""
+
+#: cp/parser.c:3229
#, gcc-internal-format
msgid "ISO C++ forbids braced-groups within expressions"
msgstr ""
-#: cp/parser.c:3235
+#: cp/parser.c:3240
#, gcc-internal-format
msgid ""
"%Hstatement-expressions are not allowed outside functions nor in template-"
"argument lists"
msgstr ""
-#: cp/parser.c:3294
+#: cp/parser.c:3299
#, gcc-internal-format
msgid "%H%<this%> may not be used in this context"
msgstr ""
-#: cp/parser.c:3480
+#: cp/parser.c:3508
#, gcc-internal-format
msgid "%Hlocal variable %qD may not appear in this context"
msgstr ""
-#: cp/parser.c:3780
+#: cp/parser.c:3808
#, gcc-internal-format
msgid "%Hscope %qT before %<~%> is not a class-name"
msgstr ""
-#: cp/parser.c:3882
+#: cp/parser.c:3922
#, gcc-internal-format
msgid "%Hdeclaration of %<~%T%> as member of %qT"
msgstr ""
-#: cp/parser.c:3896
+#: cp/parser.c:3936
#, gcc-internal-format
msgid "%Htypedef-name %qD used as destructor declarator"
msgstr ""
-#: cp/parser.c:4110
+#: cp/parser.c:4150
#, gcc-internal-format
msgid "%H%qD used without template parameters"
msgstr ""
-#: cp/parser.c:4114 cp/parser.c:14760 cp/parser.c:17038
+#: cp/parser.c:4154 cp/parser.c:14857 cp/parser.c:17154
#, gcc-internal-format
msgid "%Hreference to %qD is ambiguous"
msgstr ""
-#: cp/parser.c:4160 cp/pt.c:5599
+#: cp/parser.c:4200 cp/pt.c:5659
#, gcc-internal-format
msgid "%qT is not a template"
msgstr ""
#. Warn the user that a compound literal is not
#. allowed in standard C++.
-#: cp/parser.c:4583
+#: cp/parser.c:4624
#, gcc-internal-format
msgid "ISO C++ forbids compound-literals"
msgstr ""
-#: cp/parser.c:4951
+#: cp/parser.c:4998
#, gcc-internal-format
msgid "%H%qE does not have class type"
msgstr ""
-#: cp/parser.c:5035
+#: cp/parser.c:5082
#, gcc-internal-format
msgid "%Hinvalid use of %qD"
msgstr ""
-#: cp/parser.c:5612
+#: cp/parser.c:5661
#, gcc-internal-format
msgid "%Harray bound forbidden after parenthesized type-id"
msgstr ""
-#: cp/parser.c:5615
+#: cp/parser.c:5664
#, gcc-internal-format
msgid "try removing the parentheses around the type-id"
msgstr ""
-#: cp/parser.c:5808
+#: cp/parser.c:5857
#, gcc-internal-format
msgid "%Hexpression in new-declarator must have integral or enumeration type"
msgstr ""
-#: cp/parser.c:6062
+#: cp/parser.c:6113
#, gcc-internal-format
msgid "use of old-style cast"
msgstr ""
-#: cp/parser.c:6191
+#: cp/parser.c:6244
#, gcc-internal-format
msgid "%H%<>>%> operator will be treated as two right angle brackets in C++0x"
msgstr ""
-#: cp/parser.c:6194
+#: cp/parser.c:6247
#, gcc-internal-format
msgid "suggest parentheses around %<>>%> expression"
msgstr ""
-#: cp/parser.c:7016
+#: cp/parser.c:7084
#, gcc-internal-format
msgid "%Hcase label %qE not within a switch statement"
msgstr ""
-#: cp/parser.c:7028
+#: cp/parser.c:7096
#, gcc-internal-format
msgid "%Hcase label not within a switch statement"
msgstr ""
-#: cp/parser.c:7146
+#: cp/parser.c:7214
#, gcc-internal-format
msgid "%H%<else%> without a previous %<if%>"
msgstr ""
-#: cp/parser.c:7625
+#: cp/parser.c:7693
#, gcc-internal-format
msgid "%Hbreak statement not within loop or switch"
msgstr ""
-#: cp/parser.c:7633 cp/parser.c:7653
+#: cp/parser.c:7701 cp/parser.c:7721
#, gcc-internal-format
msgid "%Hinvalid exit from OpenMP structured block"
msgstr ""
-#: cp/parser.c:7636
+#: cp/parser.c:7704
#, gcc-internal-format
msgid "%Hbreak statement used with OpenMP for loop"
msgstr ""
-#: cp/parser.c:7646
+#: cp/parser.c:7714
#, gcc-internal-format
msgid "%Hcontinue statement not within a loop"
msgstr ""
#. Issue a warning about this use of a GNU extension.
-#: cp/parser.c:7689
+#: cp/parser.c:7757
#, gcc-internal-format
msgid "ISO C++ forbids computed gotos"
msgstr ""
-#: cp/parser.c:7829 cp/parser.c:15630
+#: cp/parser.c:7901 cp/parser.c:15736
#, gcc-internal-format
msgid "extra %<;%>"
msgstr ""
-#: cp/parser.c:8050
+#: cp/parser.c:8122
#, gcc-internal-format
msgid "%H%<__label__%> not at the beginning of a block"
msgstr ""
-#: cp/parser.c:8187
+#: cp/parser.c:8259
#, gcc-internal-format
msgid "%Hmixing declarations and function-definitions is forbidden"
msgstr ""
-#: cp/parser.c:8327
+#: cp/parser.c:8399
#, gcc-internal-format
msgid "%H%<friend%> used outside of class"
msgstr ""
-#: cp/parser.c:8383
+#: cp/parser.c:8455
#, gcc-internal-format
msgid "%H%<auto%> will change meaning in C++0x; please remove it"
msgstr ""
-#: cp/parser.c:8502
+#: cp/parser.c:8574
#, gcc-internal-format
msgid "%Hclass definition may not be declared a friend"
msgstr ""
-#: cp/parser.c:8572 cp/parser.c:15946
+#: cp/parser.c:8644 cp/parser.c:16058
#, gcc-internal-format
msgid "%Htemplates may not be %<virtual%>"
msgstr ""
-#: cp/parser.c:9049
+#: cp/parser.c:9047
+#, gcc-internal-format
+msgid "invalid use of %<auto%> in conversion operator"
+msgstr ""
+
+#: cp/parser.c:9131
#, gcc-internal-format
msgid "%Honly constructors take base initializers"
msgstr ""
-#: cp/parser.c:9071
+#: cp/parser.c:9153
#, gcc-internal-format
msgid "%Hcannot expand initializer for member %<%D%>"
msgstr ""
-#: cp/parser.c:9126
+#: cp/parser.c:9208
#, gcc-internal-format
msgid "anachronistic old-style base class initializer"
msgstr ""
-#: cp/parser.c:9182
+#: cp/parser.c:9268
#, gcc-internal-format
msgid ""
"%Hkeyword %<typename%> not allowed in this context (a qualified member "
@@ -32052,92 +31905,92 @@ msgid ""
msgstr ""
#. Warn that we do not support `export'.
-#: cp/parser.c:9528
+#: cp/parser.c:9614
#, gcc-internal-format
msgid "keyword %<export%> not implemented, and will be ignored"
msgstr ""
-#: cp/parser.c:9710 cp/parser.c:9808 cp/parser.c:9914
+#: cp/parser.c:9796 cp/parser.c:9894 cp/parser.c:10000
#, gcc-internal-format
msgid "%Htemplate parameter pack %qD cannot have a default argument"
msgstr ""
-#: cp/parser.c:9713
+#: cp/parser.c:9799
#, gcc-internal-format
msgid "%Htemplate parameter pack cannot have a default argument"
msgstr ""
-#: cp/parser.c:9811 cp/parser.c:9918
+#: cp/parser.c:9897 cp/parser.c:10004
#, gcc-internal-format
msgid "%Htemplate parameter packs cannot have default arguments"
msgstr ""
-#: cp/parser.c:10060
+#: cp/parser.c:10146
#, gcc-internal-format
msgid "%<<::%> cannot begin a template-argument list"
msgstr ""
-#: cp/parser.c:10064
+#: cp/parser.c:10150
#, gcc-internal-format
msgid ""
"%<<:%> is an alternate spelling for %<[%>. Insert whitespace between %<<%> "
"and %<::%>"
msgstr ""
-#: cp/parser.c:10142
+#: cp/parser.c:10228
#, gcc-internal-format
msgid "%Hparse error in template argument list"
msgstr ""
#. Explain what went wrong.
-#: cp/parser.c:10257
+#: cp/parser.c:10343
#, gcc-internal-format
msgid "%Hnon-template %qD used as template"
msgstr ""
-#: cp/parser.c:10259
+#: cp/parser.c:10345
#, gcc-internal-format
msgid "use %<%T::template %D%> to indicate that it is a template"
msgstr ""
-#: cp/parser.c:10796
+#: cp/parser.c:10882
#, gcc-internal-format
msgid "%Htemplate specialization with C linkage"
msgstr ""
-#: cp/parser.c:11442
+#: cp/parser.c:11527
#, gcc-internal-format
msgid "using %<typename%> outside of template"
msgstr ""
-#: cp/parser.c:11606
+#: cp/parser.c:11695
#, gcc-internal-format
msgid "declaration %qD does not declare anything"
msgstr ""
-#: cp/parser.c:11691
+#: cp/parser.c:11780
#, gcc-internal-format
msgid "attributes ignored on uninstantiated type"
msgstr ""
-#: cp/parser.c:11695
+#: cp/parser.c:11784
#, gcc-internal-format
msgid "attributes ignored on template instantiation"
msgstr ""
-#: cp/parser.c:11700
+#: cp/parser.c:11789
#, gcc-internal-format
msgid ""
"attributes ignored on elaborated-type-specifier that is not a forward "
"declaration"
msgstr ""
-#: cp/parser.c:11977
+#: cp/parser.c:12067
#, gcc-internal-format
msgid "%H%qD is not a namespace-name"
msgstr ""
-#: cp/parser.c:12104
+#: cp/parser.c:12194
#, gcc-internal-format
msgid "%H%<namespace%> definition is not allowed here"
msgstr ""
@@ -32145,166 +31998,166 @@ msgstr ""
#. [namespace.udecl]
#.
#. A using declaration shall not name a template-id.
-#: cp/parser.c:12244
+#: cp/parser.c:12334
#, gcc-internal-format
msgid "%Ha template-id may not appear in a using-declaration"
msgstr ""
-#: cp/parser.c:12621
+#: cp/parser.c:12711
#, gcc-internal-format
msgid "%Han asm-specification is not allowed on a function-definition"
msgstr ""
-#: cp/parser.c:12625
+#: cp/parser.c:12715
#, gcc-internal-format
msgid "%Hattributes are not allowed on a function-definition"
msgstr ""
-#: cp/parser.c:12778
+#: cp/parser.c:12868
#, gcc-internal-format
msgid "%Hinitializer provided for function"
msgstr ""
-#: cp/parser.c:12800
+#: cp/parser.c:12890
#, gcc-internal-format
msgid "attributes after parenthesized initializer ignored"
msgstr ""
-#: cp/parser.c:13198
+#: cp/parser.c:13295
#, gcc-internal-format
msgid "%Harray bound is not an integer constant"
msgstr ""
-#: cp/parser.c:13310
+#: cp/parser.c:13407
#, gcc-internal-format
msgid "%H%<%T::%E%> is not a type"
msgstr ""
-#: cp/parser.c:13337
+#: cp/parser.c:13434
#, gcc-internal-format
msgid "%Hinvalid use of constructor as a template"
msgstr ""
-#: cp/parser.c:13339
+#: cp/parser.c:13436
#, gcc-internal-format
msgid ""
"use %<%T::%D%> instead of %<%T::%D%> to name the constructor in a qualified "
"name"
msgstr ""
-#: cp/parser.c:13512
+#: cp/parser.c:13609
#, gcc-internal-format
msgid "%H%qD is a namespace"
msgstr ""
-#: cp/parser.c:13587
+#: cp/parser.c:13684
#, gcc-internal-format
msgid "%Hduplicate cv-qualifier"
msgstr ""
-#: cp/parser.c:13699
+#: cp/parser.c:13796
#, gcc-internal-format
msgid "invalid use of %<auto%>"
msgstr ""
-#: cp/parser.c:14273
+#: cp/parser.c:14370
#, gcc-internal-format
msgid "%Hfile ends in default argument"
msgstr ""
-#: cp/parser.c:14319
+#: cp/parser.c:14416
#, gcc-internal-format
msgid "deprecated use of default argument for parameter of non-function"
msgstr ""
-#: cp/parser.c:14322
+#: cp/parser.c:14419
#, gcc-internal-format
msgid "%Hdefault arguments are only permitted for function parameters"
msgstr ""
-#: cp/parser.c:14340
+#: cp/parser.c:14437
#, gcc-internal-format
msgid "%H%sparameter pack %qD cannot have a default argument"
msgstr ""
-#: cp/parser.c:14344
+#: cp/parser.c:14441
#, gcc-internal-format
msgid "%H%sparameter pack cannot have a default argument"
msgstr ""
-#: cp/parser.c:14607
+#: cp/parser.c:14704
#, gcc-internal-format
msgid "ISO C++ does not allow designated initializers"
msgstr ""
-#: cp/parser.c:15223
+#: cp/parser.c:15329
#, gcc-internal-format
msgid "%Hinvalid class name in declaration of %qD"
msgstr ""
-#: cp/parser.c:15236
+#: cp/parser.c:15342
#, gcc-internal-format
msgid "%Hdeclaration of %qD in namespace %qD which does not enclose %qD"
msgstr ""
-#: cp/parser.c:15241
+#: cp/parser.c:15347
#, gcc-internal-format
msgid "%Hdeclaration of %qD in %qD which does not enclose %qD"
msgstr ""
-#: cp/parser.c:15255
+#: cp/parser.c:15361
#, gcc-internal-format
msgid "%Hextra qualification not allowed"
msgstr ""
-#: cp/parser.c:15267
+#: cp/parser.c:15373
#, gcc-internal-format
msgid "%Han explicit specialization must be preceded by %<template <>%>"
msgstr ""
-#: cp/parser.c:15296
+#: cp/parser.c:15402
#, gcc-internal-format
msgid "%Hfunction template %qD redeclared as a class template"
msgstr ""
-#: cp/parser.c:15378
+#: cp/parser.c:15484
#, gcc-internal-format
msgid "%Hredefinition of %q#T"
msgstr ""
-#: cp/parser.c:15380
+#: cp/parser.c:15486
#, gcc-internal-format
msgid "%Hprevious definition of %q+#T"
msgstr ""
-#: cp/parser.c:15648
+#: cp/parser.c:15754
#, gcc-internal-format
msgid "%Ha class-key must be used when declaring a friend"
msgstr ""
-#: cp/parser.c:15663
+#: cp/parser.c:15769
#, gcc-internal-format
msgid "%Hfriend declaration does not name a class or function"
msgstr ""
-#: cp/parser.c:15843
+#: cp/parser.c:15949
#, gcc-internal-format
msgid "%Hpure-specifier on function-definition"
msgstr ""
-#: cp/parser.c:16150
+#: cp/parser.c:16262
#, gcc-internal-format
msgid "%Hkeyword %<typename%> not allowed outside of templates"
msgstr ""
-#: cp/parser.c:16153
+#: cp/parser.c:16265
#, gcc-internal-format
msgid ""
"%Hkeyword %<typename%> not allowed in this context (the base class is "
"implicitly a type)"
msgstr ""
-#: cp/parser.c:17216
+#: cp/parser.c:17332
#, gcc-internal-format
msgid "%Htoo few template-parameter-lists"
msgstr ""
@@ -32313,13 +32166,13 @@ msgstr ""
#. something like:
#.
#. template <class T> template <class U> void S::f();
-#: cp/parser.c:17231
+#: cp/parser.c:17347
#, gcc-internal-format
msgid "%Htoo many template-parameter-lists"
msgstr ""
#. Issue an error message.
-#: cp/parser.c:17505
+#: cp/parser.c:17621
#, gcc-internal-format
msgid "%Hnamed return values are no longer supported"
msgstr ""
@@ -32327,303 +32180,303 @@ msgstr ""
#. 14.5.2.2 [temp.mem]
#.
#. A local class shall not have member templates.
-#: cp/parser.c:17580
+#: cp/parser.c:17696
#, gcc-internal-format
msgid "%Hinvalid declaration of member template in local class"
msgstr ""
-#: cp/parser.c:17590
+#: cp/parser.c:17706
#, gcc-internal-format
msgid "%Htemplate with C linkage"
msgstr ""
-#: cp/parser.c:17737
+#: cp/parser.c:17853
#, gcc-internal-format
msgid "%Htemplate declaration of %qs"
msgstr ""
-#: cp/parser.c:17801
+#: cp/parser.c:17917
#, gcc-internal-format
msgid "%Hexplicit template specialization cannot have a storage class"
msgstr ""
-#: cp/parser.c:18019
+#: cp/parser.c:18135
#, gcc-internal-format
msgid "%H%<>>%> should be %<> >%> within a nested template argument list"
msgstr ""
-#: cp/parser.c:18032
+#: cp/parser.c:18148
#, gcc-internal-format
msgid "%Hspurious %<>>%>, use %<>%> to terminate a template argument list"
msgstr ""
-#: cp/parser.c:18361
+#: cp/parser.c:18482
#, gcc-internal-format
msgid "%Hinvalid use of %qD in linkage specification"
msgstr ""
-#: cp/parser.c:18374
+#: cp/parser.c:18495
#, gcc-internal-format
msgid "%H%<__thread%> before %qD"
msgstr ""
-#: cp/parser.c:18695
+#: cp/parser.c:18816
#, gcc-internal-format
msgid "%qs tag used in naming %q#T"
msgstr ""
-#: cp/parser.c:18716
+#: cp/parser.c:18837
#, gcc-internal-format
msgid "%H%qD redeclared with different access"
msgstr ""
-#: cp/parser.c:18734
+#: cp/parser.c:18855
#, gcc-internal-format
msgid "%H%<template%> (as a disambiguator) is only allowed within templates"
msgstr ""
-#: cp/parser.c:19000 cp/parser.c:19927 cp/parser.c:20059
+#: cp/parser.c:19121 cp/parser.c:20048 cp/parser.c:20180
#, gcc-internal-format
msgid "%Hmisplaced %<@%D%> Objective-C++ construct"
msgstr ""
-#: cp/parser.c:19144
+#: cp/parser.c:19265
#, gcc-internal-format
msgid "%H%<@encode%> must specify a type as an argument"
msgstr ""
-#: cp/parser.c:19460
+#: cp/parser.c:19581
#, gcc-internal-format
msgid "%Hinvalid Objective-C++ selector name"
msgstr ""
-#: cp/parser.c:19791
+#: cp/parser.c:19912
#, gcc-internal-format
msgid "%Hidentifier expected after %<@protocol%>"
msgstr ""
-#: cp/parser.c:20152
+#: cp/parser.c:20273
#, gcc-internal-format
msgid "%Htoo many %qs clauses"
msgstr ""
-#: cp/parser.c:20266
+#: cp/parser.c:20387
#, gcc-internal-format
msgid "%Hcollapse argument needs positive constant integer expression"
msgstr ""
-#: cp/parser.c:20555
+#: cp/parser.c:20676
#, gcc-internal-format
msgid "%Hschedule %<runtime%> does not take a %<chunk_size%> parameter"
msgstr ""
-#: cp/parser.c:20558
+#: cp/parser.c:20679
#, gcc-internal-format
msgid "%Hschedule %<auto%> does not take a %<chunk_size%> parameter"
msgstr ""
-#: cp/parser.c:20706
+#: cp/parser.c:20827
#, gcc-internal-format
msgid "%H%qs is not valid for %qs"
msgstr ""
-#: cp/parser.c:21130
+#: cp/parser.c:21250
#, gcc-internal-format
msgid "parenthesized initialization is not allowed in OpenMP %<for%> loop"
msgstr ""
-#: cp/parser.c:21242 cp/parser.c:21280
+#: cp/parser.c:21375 cp/parser.c:21413
#, gcc-internal-format
msgid "%Hiteration variable %qD should not be firstprivate"
msgstr ""
-#: cp/parser.c:21284
+#: cp/parser.c:21417
#, gcc-internal-format
msgid "%Hiteration variable %qD should not be reduction"
msgstr ""
-#: cp/parser.c:21360
+#: cp/parser.c:21484
#, gcc-internal-format
msgid "%Hnot enough collapsed for loops"
msgstr ""
-#: cp/parser.c:21406
+#: cp/parser.c:21530
#, gcc-internal-format
msgid "%Hcollapsed loops not perfectly nested"
msgstr ""
-#: cp/parser.c:21817
+#: cp/parser.c:21941
#, gcc-internal-format
msgid "%Hjunk at end of %<#pragma GCC pch_preprocess%>"
msgstr ""
-#: cp/parser.c:21821
+#: cp/parser.c:21945
#, gcc-internal-format
msgid "%Hexpected string literal"
msgstr ""
-#: cp/parser.c:21854
+#: cp/parser.c:21978
#, gcc-internal-format
msgid "%H%<#pragma GCC pch_preprocess%> must be first"
msgstr ""
-#: cp/parser.c:21865
+#: cp/parser.c:21989
#, gcc-internal-format
msgid "%H%<#pragma omp barrier%> may only be used in compound statements"
msgstr ""
-#: cp/parser.c:21880
+#: cp/parser.c:22004
#, gcc-internal-format
msgid "%H%<#pragma omp flush%> may only be used in compound statements"
msgstr ""
-#: cp/parser.c:21895
+#: cp/parser.c:22019
#, gcc-internal-format
msgid "%H%<#pragma omp taskwait%> may only be used in compound statements"
msgstr ""
-#: cp/parser.c:21923
+#: cp/parser.c:22047
#, gcc-internal-format
msgid ""
"%H%<#pragma omp section%> may only be used in %<#pragma omp sections%> "
"construct"
msgstr ""
-#: cp/parser.c:21981
+#: cp/parser.c:22105
#, gcc-internal-format
msgid "inter-module optimizations not implemented for C++"
msgstr ""
-#: cp/pt.c:252
+#: cp/pt.c:254
#, gcc-internal-format
msgid "data member %qD cannot be a member template"
msgstr ""
-#: cp/pt.c:264
+#: cp/pt.c:266
#, gcc-internal-format
msgid "invalid member template declaration %qD"
msgstr ""
-#: cp/pt.c:611
+#: cp/pt.c:613
#, gcc-internal-format
msgid "explicit specialization in non-namespace scope %qD"
msgstr ""
-#: cp/pt.c:625
+#: cp/pt.c:627
#, gcc-internal-format
msgid "enclosing class templates are not explicitly specialized"
msgstr ""
-#: cp/pt.c:713
+#: cp/pt.c:715
#, gcc-internal-format
msgid "specialization of %qD in different namespace"
msgstr ""
-#: cp/pt.c:714 cp/pt.c:815
+#: cp/pt.c:716 cp/pt.c:817
#, gcc-internal-format
msgid " from definition of %q+#D"
msgstr ""
-#: cp/pt.c:731
+#: cp/pt.c:733
#, gcc-internal-format
msgid ""
"explicit instantiation of %qD in namespace %qD (which does not enclose "
"namespace %qD)"
msgstr ""
-#: cp/pt.c:749
+#: cp/pt.c:751
#, gcc-internal-format
msgid "name of class shadows template template parameter %qD"
msgstr ""
-#: cp/pt.c:782
+#: cp/pt.c:784
#, gcc-internal-format
msgid "specialization of %qT after instantiation"
msgstr ""
-#: cp/pt.c:814
+#: cp/pt.c:816
#, gcc-internal-format
msgid "specializing %q#T in different namespace"
msgstr ""
-#: cp/pt.c:829
+#: cp/pt.c:831
#, gcc-internal-format
msgid "specialization %qT after instantiation %qT"
msgstr ""
-#: cp/pt.c:842
+#: cp/pt.c:844
#, gcc-internal-format
msgid "explicit specialization of non-template %qT"
msgstr ""
-#: cp/pt.c:1249
+#: cp/pt.c:1251
#, gcc-internal-format
msgid "specialization of %qD after instantiation"
msgstr ""
-#: cp/pt.c:1471
+#: cp/pt.c:1473
#, gcc-internal-format
msgid "%qD is not a function template"
msgstr ""
-#: cp/pt.c:1680
+#: cp/pt.c:1682
#, gcc-internal-format
msgid "template-id %qD for %q+D does not match any template declaration"
msgstr ""
-#: cp/pt.c:1688
+#: cp/pt.c:1690
#, gcc-internal-format
msgid "ambiguous template specialization %qD for %q+D"
msgstr ""
#. This case handles bogus declarations like template <>
#. template <class T> void f<int>();
-#: cp/pt.c:1923 cp/pt.c:1977
+#: cp/pt.c:1925 cp/pt.c:1979
#, gcc-internal-format
msgid "template-id %qD in declaration of primary template"
msgstr ""
-#: cp/pt.c:1936
+#: cp/pt.c:1938
#, gcc-internal-format
msgid "template parameter list used in explicit instantiation"
msgstr ""
-#: cp/pt.c:1942
+#: cp/pt.c:1944
#, gcc-internal-format
msgid "definition provided for explicit instantiation"
msgstr ""
-#: cp/pt.c:1950
+#: cp/pt.c:1952
#, gcc-internal-format
msgid "too many template parameter lists in declaration of %qD"
msgstr ""
-#: cp/pt.c:1953
+#: cp/pt.c:1955
#, gcc-internal-format
msgid "too few template parameter lists in declaration of %qD"
msgstr ""
-#: cp/pt.c:1955
+#: cp/pt.c:1957
#, gcc-internal-format
msgid "explicit specialization of %qD must be introduced by %<template <>%>"
msgstr ""
-#: cp/pt.c:1974
+#: cp/pt.c:1976
#, gcc-internal-format
msgid "function template partial specialization %qD is not allowed"
msgstr ""
-#: cp/pt.c:2006
+#: cp/pt.c:2008
#, gcc-internal-format
msgid "default argument specified in explicit specialization"
msgstr ""
-#: cp/pt.c:2036
+#: cp/pt.c:2038
#, gcc-internal-format
msgid "%qD is not a template function"
msgstr ""
-#: cp/pt.c:2044
+#: cp/pt.c:2046
#, gcc-internal-format
msgid "%qD is not declared in %qD"
msgstr ""
@@ -32636,104 +32489,104 @@ msgstr ""
#. program is ill-formed.
#.
#. Similar language is found in [temp.explicit].
-#: cp/pt.c:2106
+#: cp/pt.c:2108
#, gcc-internal-format
msgid "specialization of implicitly-declared special member function"
msgstr ""
-#: cp/pt.c:2150
+#: cp/pt.c:2152
#, gcc-internal-format
msgid "no member function %qD declared in %qT"
msgstr ""
-#: cp/pt.c:2627
+#: cp/pt.c:2633
#, gcc-internal-format
msgid "base initializer expansion %<%T%> contains no parameter packs"
msgstr ""
-#: cp/pt.c:2686
+#: cp/pt.c:2692
#, gcc-internal-format
msgid "expansion pattern %<%T%> contains no argument packs"
msgstr ""
-#: cp/pt.c:2688
+#: cp/pt.c:2694
#, gcc-internal-format
msgid "expansion pattern %<%E%> contains no argument packs"
msgstr ""
-#: cp/pt.c:2729
+#: cp/pt.c:2735
#, gcc-internal-format
msgid "parameter packs not expanded with %<...%>:"
msgstr ""
-#: cp/pt.c:2744 cp/pt.c:3365
+#: cp/pt.c:2750 cp/pt.c:3371
#, gcc-internal-format
msgid " %qD"
msgstr ""
-#: cp/pt.c:2746
+#: cp/pt.c:2752
#, gcc-internal-format
msgid " <anonymous>"
msgstr ""
-#: cp/pt.c:2854
+#: cp/pt.c:2860
#, gcc-internal-format
msgid "declaration of %q+#D"
msgstr ""
-#: cp/pt.c:2855
+#: cp/pt.c:2861
#, gcc-internal-format
msgid " shadows template parm %q+#D"
msgstr ""
-#: cp/pt.c:3361
+#: cp/pt.c:3367
#, gcc-internal-format
msgid "template parameters not used in partial specialization:"
msgstr ""
-#: cp/pt.c:3376
+#: cp/pt.c:3382
#, gcc-internal-format
msgid "partial specialization %qT does not specialize any template arguments"
msgstr ""
-#: cp/pt.c:3421
+#: cp/pt.c:3427
#, gcc-internal-format
msgid ""
"parameter pack argument %qE must be at the end of the template argument list"
msgstr ""
-#: cp/pt.c:3423
+#: cp/pt.c:3429
#, gcc-internal-format
msgid ""
"parameter pack argument %qT must be at the end of the template argument list"
msgstr ""
-#: cp/pt.c:3444
+#: cp/pt.c:3450
#, gcc-internal-format
msgid "template argument %qE involves template parameter(s)"
msgstr ""
-#: cp/pt.c:3488
+#: cp/pt.c:3494
#, gcc-internal-format
msgid "type %qT of template argument %qE depends on template parameter(s)"
msgstr ""
-#: cp/pt.c:3595
+#: cp/pt.c:3602
#, gcc-internal-format
msgid "no default argument for %qD"
msgstr ""
-#: cp/pt.c:3613
+#: cp/pt.c:3623
#, gcc-internal-format
msgid "parameter pack %qE must be at the end of the template parameter list"
msgstr ""
-#: cp/pt.c:3616
+#: cp/pt.c:3626
#, gcc-internal-format
msgid "parameter pack %qT must be at the end of the template parameter list"
msgstr ""
-#: cp/pt.c:3804
+#: cp/pt.c:3814
#, gcc-internal-format
msgid "template class without a name"
msgstr ""
@@ -32741,7 +32594,7 @@ msgstr ""
#. [temp.mem]
#.
#. A destructor shall not be a member template.
-#: cp/pt.c:3814
+#: cp/pt.c:3824
#, gcc-internal-format
msgid "destructor %qD declared as member template"
msgstr ""
@@ -32751,72 +32604,72 @@ msgstr ""
#. An allocation function can be a function
#. template. ... Template allocation functions shall
#. have two or more parameters.
-#: cp/pt.c:3829
+#: cp/pt.c:3839
#, gcc-internal-format
msgid "invalid template declaration of %qD"
msgstr ""
-#: cp/pt.c:3946
+#: cp/pt.c:3956
#, gcc-internal-format
msgid "template definition of non-template %q#D"
msgstr ""
-#: cp/pt.c:3989
+#: cp/pt.c:3999
#, gcc-internal-format
msgid "expected %d levels of template parms for %q#D, got %d"
msgstr ""
-#: cp/pt.c:4001
+#: cp/pt.c:4011
#, gcc-internal-format
msgid "got %d template parameters for %q#D"
msgstr ""
-#: cp/pt.c:4004
+#: cp/pt.c:4014
#, gcc-internal-format
msgid "got %d template parameters for %q#T"
msgstr ""
-#: cp/pt.c:4006
+#: cp/pt.c:4016
#, gcc-internal-format
msgid " but %d required"
msgstr ""
-#: cp/pt.c:4024
+#: cp/pt.c:4034
#, gcc-internal-format
msgid "template arguments to %qD do not match original template %qD"
msgstr ""
-#: cp/pt.c:4028
+#: cp/pt.c:4038
#, gcc-internal-format
msgid "use template<> for an explicit specialization"
msgstr ""
-#: cp/pt.c:4124
+#: cp/pt.c:4134
#, gcc-internal-format
msgid "%qT is not a template type"
msgstr ""
-#: cp/pt.c:4137
+#: cp/pt.c:4147
#, gcc-internal-format
msgid "template specifiers not specified in declaration of %qD"
msgstr ""
-#: cp/pt.c:4147
+#: cp/pt.c:4157
#, gcc-internal-format
msgid "redeclared with %d template parameter(s)"
msgstr ""
-#: cp/pt.c:4149
+#: cp/pt.c:4159
#, gcc-internal-format
msgid "previous declaration %q+D used %d template parameter(s)"
msgstr ""
-#: cp/pt.c:4183
+#: cp/pt.c:4193
#, gcc-internal-format
msgid "template parameter %q+#D"
msgstr ""
-#: cp/pt.c:4184
+#: cp/pt.c:4194
#, gcc-internal-format
msgid "redeclared here as %q#D"
msgstr ""
@@ -32825,203 +32678,220 @@ msgstr ""
#.
#. A template-parameter may not be given default arguments
#. by two different declarations in the same scope.
-#: cp/pt.c:4194
+#: cp/pt.c:4204
#, gcc-internal-format
msgid "redefinition of default argument for %q#D"
msgstr ""
-#: cp/pt.c:4195
+#: cp/pt.c:4205
#, gcc-internal-format
msgid "%Joriginal definition appeared here"
msgstr ""
-#: cp/pt.c:4299
+#: cp/pt.c:4309
#, gcc-internal-format
msgid ""
"%qE is not a valid template argument for type %qT because function %qD has "
"not external linkage"
msgstr ""
-#: cp/pt.c:4340
+#: cp/pt.c:4350
#, gcc-internal-format
msgid ""
"%qE is not a valid template argument for type %qT because string literals "
"can never be used in this context"
msgstr ""
-#: cp/pt.c:4417
+#: cp/pt.c:4427
#, gcc-internal-format
msgid ""
"%qE is not a valid template argument for type %qT because it is a non-"
"constant expression"
msgstr ""
-#: cp/pt.c:4461
+#: cp/pt.c:4471
#, gcc-internal-format
msgid ""
"%qD is not a valid template argument because %qD is a variable, not the "
"address of a variable"
msgstr ""
-#: cp/pt.c:4479
+#: cp/pt.c:4489
#, gcc-internal-format
msgid ""
"%qE is not a valid template argument of type %qT because %qE is not a "
"variable"
msgstr ""
-#: cp/pt.c:4486
+#: cp/pt.c:4496
#, gcc-internal-format
msgid ""
"%qE is not a valid template argument of type %qT because %qD does not have "
"external linkage"
msgstr ""
-#: cp/pt.c:4516
+#: cp/pt.c:4526
#, gcc-internal-format
msgid ""
"%qE is not a valid template argument for type %qT because of conflicts in cv-"
"qualification"
msgstr ""
-#: cp/pt.c:4523
+#: cp/pt.c:4533
#, gcc-internal-format
msgid ""
"%qE is not a valid template argument for type %qT because it is not an lvalue"
msgstr ""
-#: cp/pt.c:4536
+#: cp/pt.c:4546
#, gcc-internal-format
msgid ""
"%qE is not a valid template argument for type %qT because object %qD has not "
"external linkage"
msgstr ""
-#: cp/pt.c:4576
+#: cp/pt.c:4578
+#, gcc-internal-format
+msgid "%qE is not a valid template argument for type %qT"
+msgstr ""
+
+#: cp/pt.c:4579
+#, gcc-internal-format
+msgid "it must be the address of a function with external linkage"
+msgstr ""
+
+#: cp/pt.c:4593
#, gcc-internal-format
msgid ""
"%qE is not a valid template argument for type %qT because it is a pointer"
msgstr ""
-#: cp/pt.c:4578
+#: cp/pt.c:4595
#, gcc-internal-format
msgid "try using %qE instead"
msgstr ""
-#: cp/pt.c:4613
+#: cp/pt.c:4630
#, gcc-internal-format
msgid ""
"%qE is not a valid template argument for type %qT because it is of type %qT"
msgstr ""
-#: cp/pt.c:4616
+#: cp/pt.c:4633
#, gcc-internal-format
msgid "standard conversions are not allowed in this context"
msgstr ""
-#: cp/pt.c:4950
+#: cp/pt.c:4970
#, gcc-internal-format
msgid "to refer to a type member of a template parameter, use %<typename %E%>"
msgstr ""
-#: cp/pt.c:4966 cp/pt.c:4985 cp/pt.c:5035
+#: cp/pt.c:4986 cp/pt.c:5005 cp/pt.c:5055
#, gcc-internal-format
msgid "type/value mismatch at argument %d in template parameter list for %qD"
msgstr ""
-#: cp/pt.c:4970
+#: cp/pt.c:4990
#, gcc-internal-format
msgid " expected a constant of type %qT, got %qT"
msgstr ""
-#: cp/pt.c:4974
+#: cp/pt.c:4994
#, gcc-internal-format
msgid " expected a class template, got %qE"
msgstr ""
-#: cp/pt.c:4976
+#: cp/pt.c:4996
#, gcc-internal-format
msgid " expected a type, got %qE"
msgstr ""
-#: cp/pt.c:4989
+#: cp/pt.c:5009
#, gcc-internal-format
msgid " expected a type, got %qT"
msgstr ""
-#: cp/pt.c:4991
+#: cp/pt.c:5011
#, gcc-internal-format
msgid " expected a class template, got %qT"
msgstr ""
-#: cp/pt.c:5038
+#: cp/pt.c:5058
#, gcc-internal-format
msgid " expected a template of type %qD, got %qD"
msgstr ""
-#: cp/pt.c:5081
+#. Not sure if this is reachable, but it doesn't hurt
+#. to be robust.
+#: cp/pt.c:5091
+#, gcc-internal-format
+msgid "type mismatch in nontype parameter pack"
+msgstr ""
+
+#: cp/pt.c:5113
#, gcc-internal-format
msgid "could not convert template argument %qE to %qT"
msgstr ""
-#: cp/pt.c:5137
+#: cp/pt.c:5169
#, gcc-internal-format
msgid "wrong number of template arguments (%d, should be %d)"
msgstr ""
-#: cp/pt.c:5269
+#: cp/pt.c:5306
#, gcc-internal-format
msgid "wrong number of template arguments (%d, should be %d%s)"
msgstr ""
-#: cp/pt.c:5273
+#: cp/pt.c:5310
#, gcc-internal-format
msgid "provided for %q+D"
msgstr ""
-#: cp/pt.c:5332
+#: cp/pt.c:5375
#, gcc-internal-format
msgid "cannot expand %<%E%> into a fixed-length argument list"
msgstr ""
-#: cp/pt.c:5335
+#: cp/pt.c:5378
#, gcc-internal-format
msgid "cannot expand %<%T%> into a fixed-length argument list"
msgstr ""
-#: cp/pt.c:5351
+#: cp/pt.c:5394
#, gcc-internal-format
msgid "template argument %d is invalid"
msgstr ""
-#: cp/pt.c:5611
+#: cp/pt.c:5671
#, gcc-internal-format
msgid "non-template type %qT used as a template"
msgstr ""
-#: cp/pt.c:5613
+#: cp/pt.c:5673
#, gcc-internal-format
msgid "for template declaration %q+D"
msgstr ""
-#: cp/pt.c:6315
+#: cp/pt.c:6375
#, gcc-internal-format
msgid ""
"template instantiation depth exceeds maximum of %d (use -ftemplate-depth-NN "
"to increase the maximum) instantiating %qD"
msgstr ""
-#: cp/pt.c:7445
+#: cp/pt.c:7572
#, gcc-internal-format
msgid "mismatched argument pack lengths while expanding %<%T%>"
msgstr ""
-#: cp/pt.c:7449
+#: cp/pt.c:7576
#, gcc-internal-format
msgid "mismatched argument pack lengths while expanding %<%E%>"
msgstr ""
-#: cp/pt.c:8404
+#: cp/pt.c:8548
#, gcc-internal-format
msgid "instantiation of %q+D as type %qT"
msgstr ""
@@ -33039,241 +32909,241 @@ msgstr ""
#.
#. is an attempt to declare a variable with function
#. type.
-#: cp/pt.c:8539
+#: cp/pt.c:8688
#, gcc-internal-format
msgid "variable %qD has function type"
msgstr ""
-#: cp/pt.c:8686
+#: cp/pt.c:8835
#, gcc-internal-format
msgid "invalid parameter type %qT"
msgstr ""
-#: cp/pt.c:8688
+#: cp/pt.c:8837
#, gcc-internal-format
msgid "in declaration %q+D"
msgstr ""
-#: cp/pt.c:8765
+#: cp/pt.c:8914
#, gcc-internal-format
msgid "function returning an array"
msgstr ""
-#: cp/pt.c:8767
+#: cp/pt.c:8916
#, gcc-internal-format
msgid "function returning a function"
msgstr ""
-#: cp/pt.c:8794
+#: cp/pt.c:8943
#, gcc-internal-format
msgid "creating pointer to member function of non-class type %qT"
msgstr ""
-#: cp/pt.c:9001
+#: cp/pt.c:9164
#, gcc-internal-format
msgid "array bound is not an integer constant"
msgstr ""
-#: cp/pt.c:9021
+#: cp/pt.c:9184
#, gcc-internal-format
msgid "creating array with negative size (%qE)"
msgstr ""
-#: cp/pt.c:9270
+#: cp/pt.c:9433
#, gcc-internal-format
msgid "forming reference to void"
msgstr ""
-#: cp/pt.c:9272
+#: cp/pt.c:9435
#, gcc-internal-format
msgid "forming %s to reference type %qT"
msgstr ""
-#: cp/pt.c:9323
+#: cp/pt.c:9486
#, gcc-internal-format
msgid "creating pointer to member of non-class type %qT"
msgstr ""
-#: cp/pt.c:9329
+#: cp/pt.c:9492
#, gcc-internal-format
msgid "creating pointer to member reference type %qT"
msgstr ""
-#: cp/pt.c:9335
+#: cp/pt.c:9498
#, gcc-internal-format
msgid "creating pointer to member of type void"
msgstr ""
-#: cp/pt.c:9402
+#: cp/pt.c:9565
#, gcc-internal-format
msgid "creating array of %qT"
msgstr ""
-#: cp/pt.c:9408
+#: cp/pt.c:9571
#, gcc-internal-format
msgid "creating array of %qT, which is an abstract class type"
msgstr ""
-#: cp/pt.c:9459
+#: cp/pt.c:9622
#, gcc-internal-format
msgid "%qT is not a class, struct, or union type"
msgstr ""
-#: cp/pt.c:9494
+#: cp/pt.c:9657
#, gcc-internal-format
msgid "%qT resolves to %qT, which is not an enumeration type"
msgstr ""
-#: cp/pt.c:9497
+#: cp/pt.c:9660
#, gcc-internal-format
msgid "%qT resolves to %qT, which is is not a class type"
msgstr ""
-#: cp/pt.c:9603
+#: cp/pt.c:9766
#, gcc-internal-format
msgid "use of %qs in template"
msgstr ""
-#: cp/pt.c:9740
+#: cp/pt.c:9903
#, gcc-internal-format
msgid ""
"dependent-name %qE is parsed as a non-type, but instantiation yields a type"
msgstr ""
-#: cp/pt.c:9742
+#: cp/pt.c:9905
#, gcc-internal-format
msgid "say %<typename %E%> if a type is meant"
msgstr ""
-#: cp/pt.c:9886
+#: cp/pt.c:10047
#, gcc-internal-format
msgid "using invalid field %qD"
msgstr ""
-#: cp/pt.c:10216 cp/pt.c:10870
+#: cp/pt.c:10377 cp/pt.c:11040
#, gcc-internal-format
msgid "invalid use of pack expansion expression"
msgstr ""
-#: cp/pt.c:10220 cp/pt.c:10874
+#: cp/pt.c:10381 cp/pt.c:11044
#, gcc-internal-format
msgid "use %<...%> to expand argument pack"
msgstr ""
-#: cp/pt.c:10365
+#: cp/pt.c:10536
#, gcc-internal-format
msgid "iteration variable %qD should not be reduction"
msgstr ""
-#: cp/pt.c:11034
+#: cp/pt.c:11204
#, gcc-internal-format
msgid ""
"a cast to a type other than an integral or enumeration type cannot appear in "
"a constant-expression"
msgstr ""
-#: cp/pt.c:11507
+#: cp/pt.c:11671
#, gcc-internal-format
msgid "%qT is not a class or namespace"
msgstr ""
-#: cp/pt.c:11510
+#: cp/pt.c:11674
#, gcc-internal-format
msgid "%qD is not a class or namespace"
msgstr ""
-#: cp/pt.c:11724
+#: cp/pt.c:11894
#, gcc-internal-format
msgid "%qT is/uses anonymous type"
msgstr ""
-#: cp/pt.c:11726
+#: cp/pt.c:11896
#, gcc-internal-format
msgid "template argument for %qD uses local type %qT"
msgstr ""
-#: cp/pt.c:11736
+#: cp/pt.c:11906
#, gcc-internal-format
msgid "%qT is a variably modified type"
msgstr ""
-#: cp/pt.c:11747
+#: cp/pt.c:11917
#, gcc-internal-format
msgid "integral expression %qE is not constant"
msgstr ""
-#: cp/pt.c:11752
+#: cp/pt.c:11935
#, gcc-internal-format
msgid " trying to instantiate %qD"
msgstr ""
-#: cp/pt.c:14531
+#: cp/pt.c:14723
#, gcc-internal-format
msgid "ambiguous class template instantiation for %q#T"
msgstr ""
-#: cp/pt.c:14534
+#: cp/pt.c:14726
#, gcc-internal-format
msgid "%s %+#T"
msgstr ""
-#: cp/pt.c:14557 cp/pt.c:14640
+#: cp/pt.c:14749 cp/pt.c:14832
#, gcc-internal-format
msgid "explicit instantiation of non-template %q#D"
msgstr ""
-#: cp/pt.c:14572
+#: cp/pt.c:14764
#, gcc-internal-format
msgid "%qD is not a static data member of a class template"
msgstr ""
-#: cp/pt.c:14578 cp/pt.c:14635
+#: cp/pt.c:14770 cp/pt.c:14827
#, gcc-internal-format
msgid "no matching template for %qD found"
msgstr ""
-#: cp/pt.c:14583
+#: cp/pt.c:14775
#, gcc-internal-format
msgid ""
"type %qT for explicit instantiation %qD does not match declared type %qT"
msgstr ""
-#: cp/pt.c:14591
+#: cp/pt.c:14783
#, gcc-internal-format
msgid "explicit instantiation of %q#D"
msgstr ""
-#: cp/pt.c:14627
+#: cp/pt.c:14819
#, gcc-internal-format
msgid "duplicate explicit instantiation of %q#D"
msgstr ""
-#: cp/pt.c:14650 cp/pt.c:14742
+#: cp/pt.c:14842 cp/pt.c:14934
#, gcc-internal-format
msgid "ISO C++ 1998 forbids the use of %<extern%> on explicit instantiations"
msgstr ""
-#: cp/pt.c:14655 cp/pt.c:14759
+#: cp/pt.c:14847 cp/pt.c:14951
#, gcc-internal-format
msgid "storage class %qD applied to template instantiation"
msgstr ""
-#: cp/pt.c:14720
+#: cp/pt.c:14912
#, gcc-internal-format
msgid "explicit instantiation of non-template type %qT"
msgstr ""
-#: cp/pt.c:14729
+#: cp/pt.c:14921
#, gcc-internal-format
msgid "explicit instantiation of %q#T before definition of template"
msgstr ""
-#: cp/pt.c:14747
+#: cp/pt.c:14939
#, gcc-internal-format
msgid "ISO C++ forbids the use of %qE on explicit instantiations"
msgstr ""
-#: cp/pt.c:14793
+#: cp/pt.c:14985
#, gcc-internal-format
msgid "duplicate explicit instantiation of %q#T"
msgstr ""
@@ -33285,12 +33155,12 @@ msgstr ""
#. member function or static data member of a class template
#. shall be present in every translation unit in which it is
#. explicitly instantiated.
-#: cp/pt.c:15237
+#: cp/pt.c:15435
#, gcc-internal-format
msgid "explicit instantiation of %qD but no definition available"
msgstr ""
-#: cp/pt.c:15428
+#: cp/pt.c:15601
#, gcc-internal-format
msgid ""
"template instantiation depth exceeds maximum of %d instantiating %q+D, "
@@ -33298,19 +33168,19 @@ msgid ""
"the maximum)"
msgstr ""
-#: cp/pt.c:15783
+#: cp/pt.c:15956
#, gcc-internal-format
msgid "%q#T is not a valid type for a template constant parameter"
msgstr ""
-#: cp/pt.c:16749
+#: cp/pt.c:16932
#, gcc-internal-format
msgid ""
"deducing auto from brace-enclosed initializer list requires #include "
"<initializer_list>"
msgstr ""
-#: cp/pt.c:16790
+#: cp/pt.c:16973
#, gcc-internal-format
msgid "unable to deduce %qT from %qE"
msgstr ""
@@ -33372,415 +33242,415 @@ msgstr ""
msgid "%qT is an inaccessible base of %qT"
msgstr ""
-#: cp/search.c:1869
+#: cp/search.c:1862
#, gcc-internal-format
msgid "deprecated covariant return type for %q+#D"
msgstr ""
-#: cp/search.c:1871 cp/search.c:1886 cp/search.c:1891 cp/search.c:1910
+#: cp/search.c:1864 cp/search.c:1879 cp/search.c:1884 cp/search.c:1903
#, gcc-internal-format
msgid " overriding %q+#D"
msgstr ""
-#: cp/search.c:1885
+#: cp/search.c:1878
#, gcc-internal-format
msgid "invalid covariant return type for %q+#D"
msgstr ""
-#: cp/search.c:1890
+#: cp/search.c:1883
#, gcc-internal-format
msgid "conflicting return type specified for %q+#D"
msgstr ""
-#: cp/search.c:1900
+#: cp/search.c:1893
#, gcc-internal-format
msgid "looser throw specifier for %q+#F"
msgstr ""
-#: cp/search.c:1901
+#: cp/search.c:1894
#, gcc-internal-format
msgid " overriding %q+#F"
msgstr ""
-#: cp/search.c:1909
+#: cp/search.c:1902
#, gcc-internal-format
msgid "conflicting type attributes specified for %q+#D"
msgstr ""
-#: cp/search.c:1920
+#: cp/search.c:1913
#, gcc-internal-format
msgid "overriding non-deleted function %q+D"
msgstr ""
-#: cp/search.c:1924
+#: cp/search.c:1917
#, gcc-internal-format
msgid "non-deleted function %q+D"
msgstr ""
-#: cp/search.c:1925
+#: cp/search.c:1918
#, gcc-internal-format
msgid "overriding deleted function %q+D"
msgstr ""
#. A static member function cannot match an inherited
#. virtual member function.
-#: cp/search.c:2017
+#: cp/search.c:2010
#, gcc-internal-format
msgid "%q+#D cannot be declared"
msgstr ""
-#: cp/search.c:2018
+#: cp/search.c:2011
#, gcc-internal-format
msgid " since %q+#D declared in base class"
msgstr ""
-#: cp/semantics.c:756
+#: cp/semantics.c:761
#, gcc-internal-format
msgid "suggest explicit braces around empty body in %<do%> statement"
msgstr ""
-#: cp/semantics.c:1294
+#: cp/semantics.c:1285
#, gcc-internal-format
msgid "type of asm operand %qE could not be determined"
msgstr ""
-#: cp/semantics.c:1350
+#: cp/semantics.c:1341
#, gcc-internal-format
msgid "__label__ declarations are only allowed in function scopes"
msgstr ""
-#: cp/semantics.c:1438
+#: cp/semantics.c:1429
#, gcc-internal-format
msgid "invalid use of member %q+D in static member function"
msgstr ""
-#: cp/semantics.c:1440
+#: cp/semantics.c:1431
#, gcc-internal-format
msgid "invalid use of non-static data member %q+D"
msgstr ""
-#: cp/semantics.c:1441 cp/semantics.c:1480
+#: cp/semantics.c:1432 cp/semantics.c:1471
#, gcc-internal-format
msgid "from this location"
msgstr ""
-#: cp/semantics.c:1479
+#: cp/semantics.c:1470
#, gcc-internal-format
msgid "object missing in reference to %q+D"
msgstr ""
-#: cp/semantics.c:1958
+#: cp/semantics.c:1964
#, gcc-internal-format
msgid "arguments to destructor are not allowed"
msgstr ""
-#: cp/semantics.c:2010
+#: cp/semantics.c:2016
#, gcc-internal-format
msgid "%<this%> is unavailable for static member functions"
msgstr ""
-#: cp/semantics.c:2016
+#: cp/semantics.c:2022
#, gcc-internal-format
msgid "invalid use of %<this%> in non-member function"
msgstr ""
-#: cp/semantics.c:2018
+#: cp/semantics.c:2024
#, gcc-internal-format
msgid "invalid use of %<this%> at top level"
msgstr ""
-#: cp/semantics.c:2042
+#: cp/semantics.c:2048
#, gcc-internal-format
msgid "invalid qualifying scope in pseudo-destructor name"
msgstr ""
-#: cp/semantics.c:2047 cp/typeck.c:2116
+#: cp/semantics.c:2053 cp/typeck.c:2130
#, gcc-internal-format
msgid "qualified type %qT does not match destructor name ~%qT"
msgstr ""
-#: cp/semantics.c:2069
+#: cp/semantics.c:2075
#, gcc-internal-format
msgid "%qE is not of type %qT"
msgstr ""
-#: cp/semantics.c:2113
+#: cp/semantics.c:2119
#, gcc-internal-format
msgid "compound literal of non-object type %qT"
msgstr ""
-#: cp/semantics.c:2197
+#: cp/semantics.c:2203
#, gcc-internal-format
msgid "template type parameters must use the keyword %<class%> or %<typename%>"
msgstr ""
-#: cp/semantics.c:2238
+#: cp/semantics.c:2244
#, gcc-internal-format
msgid ""
"invalid use of type %qT as a default value for a template template-parameter"
msgstr ""
-#: cp/semantics.c:2241
+#: cp/semantics.c:2247
#, gcc-internal-format
msgid "invalid default argument for a template template parameter"
msgstr ""
-#: cp/semantics.c:2258
+#: cp/semantics.c:2264
#, gcc-internal-format
msgid "definition of %q#T inside template parameter list"
msgstr ""
-#: cp/semantics.c:2269
+#: cp/semantics.c:2275
#, gcc-internal-format
msgid "invalid definition of qualified type %qT"
msgstr ""
-#: cp/semantics.c:2485
+#: cp/semantics.c:2491
#, gcc-internal-format
msgid "invalid base-class specification"
msgstr ""
-#: cp/semantics.c:2497
+#: cp/semantics.c:2503
#, gcc-internal-format
msgid "base class %qT has cv qualifiers"
msgstr ""
-#: cp/semantics.c:2522
+#: cp/semantics.c:2528
#, gcc-internal-format
msgid "%Hincomplete type %qT used in nested name specifier"
msgstr ""
-#: cp/semantics.c:2526
+#: cp/semantics.c:2532
#, gcc-internal-format
msgid "%Hreference to %<%T::%D%> is ambiguous"
msgstr ""
-#: cp/semantics.c:2530
+#: cp/semantics.c:2536
#, gcc-internal-format
msgid "%H%qD is not a member of %qT"
msgstr ""
-#: cp/semantics.c:2533
+#: cp/semantics.c:2539
#, gcc-internal-format
msgid "%H%qD is not a member of %qD"
msgstr ""
-#: cp/semantics.c:2535
+#: cp/semantics.c:2541
#, gcc-internal-format
msgid "%H%<::%D%> has not been declared"
msgstr ""
-#: cp/semantics.c:2676
+#: cp/semantics.c:2682
#, gcc-internal-format
msgid "use of %<auto%> variable from containing function"
msgstr ""
-#: cp/semantics.c:2678
+#: cp/semantics.c:2684
#, gcc-internal-format
msgid " %q+#D declared here"
msgstr ""
-#: cp/semantics.c:2716
+#: cp/semantics.c:2722
#, gcc-internal-format
msgid ""
"template parameter %qD of type %qT is not allowed in an integral constant "
"expression because it is not of integral or enumeration type"
msgstr ""
-#: cp/semantics.c:2885
+#: cp/semantics.c:2891
#, gcc-internal-format
msgid "%qD cannot appear in a constant-expression"
msgstr ""
-#: cp/semantics.c:2893
+#: cp/semantics.c:2899
#, gcc-internal-format
msgid "use of namespace %qD as expression"
msgstr ""
-#: cp/semantics.c:2898
+#: cp/semantics.c:2904
#, gcc-internal-format
msgid "use of class template %qT as expression"
msgstr ""
#. Ambiguous reference to base members.
-#: cp/semantics.c:2904
+#: cp/semantics.c:2910
#, gcc-internal-format
msgid "request for member %qD is ambiguous in multiple inheritance lattice"
msgstr ""
-#: cp/semantics.c:3026 cp/semantics.c:4633
+#: cp/semantics.c:3032 cp/semantics.c:4762
#, gcc-internal-format
msgid "type of %qE is unknown"
msgstr ""
-#: cp/semantics.c:3041
+#: cp/semantics.c:3047
#, gcc-internal-format
msgid "cannot apply %<offsetof%> to destructor %<~%T%>"
msgstr ""
-#: cp/semantics.c:3052
+#: cp/semantics.c:3058
#, gcc-internal-format
msgid "cannot apply %<offsetof%> to member function %qD"
msgstr ""
-#: cp/semantics.c:3488
+#: cp/semantics.c:3503
#, gcc-internal-format
msgid "%qD is not a variable in clause %qs"
msgstr ""
-#: cp/semantics.c:3497 cp/semantics.c:3519 cp/semantics.c:3541
+#: cp/semantics.c:3512 cp/semantics.c:3534 cp/semantics.c:3556
#, gcc-internal-format
msgid "%qD appears more than once in data clauses"
msgstr ""
-#: cp/semantics.c:3511
+#: cp/semantics.c:3526
#, gcc-internal-format
msgid "%qD is not a variable in clause %<firstprivate%>"
msgstr ""
-#: cp/semantics.c:3533
+#: cp/semantics.c:3548
#, gcc-internal-format
msgid "%qD is not a variable in clause %<lastprivate%>"
msgstr ""
-#: cp/semantics.c:3563
+#: cp/semantics.c:3578
#, gcc-internal-format
msgid "num_threads expression must be integral"
msgstr ""
-#: cp/semantics.c:3577
+#: cp/semantics.c:3592
#, gcc-internal-format
msgid "schedule chunk size expression must be integral"
msgstr ""
-#: cp/semantics.c:3709
+#: cp/semantics.c:3724
#, gcc-internal-format
msgid "%qE has reference type for %qs"
msgstr ""
-#: cp/semantics.c:3780
+#: cp/semantics.c:3795
#, gcc-internal-format
msgid "%<threadprivate%> %qD is not file, namespace or block scope variable"
msgstr ""
-#: cp/semantics.c:3794
+#: cp/semantics.c:3809
#, gcc-internal-format
msgid "%<threadprivate%> %qE directive not in %qT definition"
msgstr ""
-#: cp/semantics.c:3926
+#: cp/semantics.c:3944
#, gcc-internal-format
msgid "%Hinvalid controlling predicate"
msgstr ""
-#: cp/semantics.c:3936
+#: cp/semantics.c:3954
#, gcc-internal-format
msgid "%Hdifference between %qE and %qD does not have integer type"
msgstr ""
-#: cp/semantics.c:4031
+#: cp/semantics.c:4049
#, gcc-internal-format
msgid "%Hinvalid increment expression"
msgstr ""
-#: cp/semantics.c:4157 cp/semantics.c:4228
+#: cp/semantics.c:4175 cp/semantics.c:4246
#, gcc-internal-format
msgid "%Hexpected iteration declaration or initialization"
msgstr ""
-#: cp/semantics.c:4168
+#: cp/semantics.c:4186
#, gcc-internal-format
msgid "%Hmissing controlling predicate"
msgstr ""
-#: cp/semantics.c:4174
+#: cp/semantics.c:4192
#, gcc-internal-format
msgid "%Hmissing increment expression"
msgstr ""
-#: cp/semantics.c:4254
+#: cp/semantics.c:4272
#, gcc-internal-format
msgid "%Hinvalid type for iteration variable %qE"
msgstr ""
#. Report the error.
-#: cp/semantics.c:4434
+#: cp/semantics.c:4474
#, gcc-internal-format
msgid "static assertion failed: %E"
msgstr ""
-#: cp/semantics.c:4436
+#: cp/semantics.c:4476
#, gcc-internal-format
msgid "non-constant condition for static assertion"
msgstr ""
-#: cp/semantics.c:4461 cp/semantics.c:4556
+#: cp/semantics.c:4568 cp/semantics.c:4685
#, gcc-internal-format
msgid "argument to decltype must be an expression"
msgstr ""
-#: cp/semantics.c:4507
+#: cp/semantics.c:4635
#, gcc-internal-format
msgid "%qE refers to a set of overloaded functions"
msgstr ""
-#: cp/semantics.c:4589
+#: cp/semantics.c:4718
#, gcc-internal-format
msgid "unable to determine the declared type of expression %<%E%>"
msgstr ""
-#: cp/semantics.c:4802
+#: cp/semantics.c:4949
#, gcc-internal-format
msgid "__is_convertible_to"
msgstr ""
-#: cp/semantics.c:4831
+#: cp/semantics.c:4988 cp/semantics.c:4998
#, gcc-internal-format
msgid "incomplete type %qT not allowed"
msgstr ""
-#: cp/tree.c:863
+#: cp/tree.c:881
#, gcc-internal-format
msgid "%qV qualifiers cannot be applied to %qT"
msgstr ""
-#: cp/tree.c:2184
+#: cp/tree.c:2215
#, gcc-internal-format
msgid "%qE attribute can only be applied to Java class definitions"
msgstr ""
-#: cp/tree.c:2213
+#: cp/tree.c:2244
#, gcc-internal-format
msgid "%qE attribute can only be applied to class definitions"
msgstr ""
-#: cp/tree.c:2219
+#: cp/tree.c:2250
#, gcc-internal-format
msgid "%qE is obsolete; g++ vtables are now COM-compatible by default"
msgstr ""
-#: cp/tree.c:2243
+#: cp/tree.c:2274
#, gcc-internal-format
msgid "requested init_priority is not an integer constant"
msgstr ""
-#: cp/tree.c:2264
+#: cp/tree.c:2295
#, gcc-internal-format
msgid ""
"can only use %qE attribute on file-scope definitions of objects of class type"
msgstr ""
-#: cp/tree.c:2272
+#: cp/tree.c:2303
#, gcc-internal-format
msgid "requested init_priority is out of range"
msgstr ""
-#: cp/tree.c:2282
+#: cp/tree.c:2313
#, gcc-internal-format
msgid "requested init_priority is reserved for internal use"
msgstr ""
-#: cp/tree.c:2293
+#: cp/tree.c:2324
#, gcc-internal-format
msgid "%qE attribute is not supported on this platform"
msgstr ""
@@ -33801,250 +33671,255 @@ msgstr ""
msgid "%s between distinct pointer-to-member types %qT and %qT lacks a cast"
msgstr ""
-#: cp/typeck.c:1186
+#: cp/typeck.c:1200
#, gcc-internal-format
msgid "canonical types differ for identical types %T and %T"
msgstr ""
-#: cp/typeck.c:1193
+#: cp/typeck.c:1207
#, gcc-internal-format
msgid "same canonical type node for different types %T and %T"
msgstr ""
-#: cp/typeck.c:1306
+#: cp/typeck.c:1320
#, gcc-internal-format
msgid "invalid application of %qs to a member function"
msgstr ""
-#: cp/typeck.c:1374
+#: cp/typeck.c:1388
#, gcc-internal-format
msgid "invalid application of %<sizeof%> to a bit-field"
msgstr ""
-#: cp/typeck.c:1382
+#: cp/typeck.c:1396
#, gcc-internal-format
msgid "ISO C++ forbids applying %<sizeof%> to an expression of function type"
msgstr ""
-#: cp/typeck.c:1431
+#: cp/typeck.c:1445
#, gcc-internal-format
msgid "invalid application of %<__alignof%> to a bit-field"
msgstr ""
-#: cp/typeck.c:1442
+#: cp/typeck.c:1456
#, gcc-internal-format
msgid ""
"ISO C++ forbids applying %<__alignof%> to an expression of function type"
msgstr ""
-#: cp/typeck.c:1500
+#: cp/typeck.c:1514
#, gcc-internal-format
msgid "invalid use of non-static member function"
msgstr ""
-#: cp/typeck.c:1762
+#: cp/typeck.c:1776
#, gcc-internal-format
msgid "deprecated conversion from string constant to %qT"
msgstr ""
-#: cp/typeck.c:1885 cp/typeck.c:2246
+#: cp/typeck.c:1899 cp/typeck.c:2274
#, gcc-internal-format
msgid "request for member %qD in %qE, which is of non-class type %qT"
msgstr ""
-#: cp/typeck.c:1914
+#: cp/typeck.c:1928
#, gcc-internal-format
msgid "invalid use of nonstatic data member %qE"
msgstr ""
-#: cp/typeck.c:1916
+#: cp/typeck.c:1930
#, gcc-internal-format
msgid "%qD is not a member of %qT"
msgstr ""
-#: cp/typeck.c:1969
+#: cp/typeck.c:1983
#, gcc-internal-format
msgid "invalid access to non-static data member %qD of NULL object"
msgstr ""
-#: cp/typeck.c:1972 cp/typeck.c:2003
+#: cp/typeck.c:1986 cp/typeck.c:2017
#, gcc-internal-format
msgid "(perhaps the %<offsetof%> macro was used incorrectly)"
msgstr ""
-#: cp/typeck.c:2000
+#: cp/typeck.c:2014
#, gcc-internal-format
msgid "invalid access to non-static data member %qD of NULL object"
msgstr ""
-#: cp/typeck.c:2090
+#: cp/typeck.c:2104
#, gcc-internal-format
msgid "invalid use of %qD"
msgstr ""
-#: cp/typeck.c:2122
+#: cp/typeck.c:2142
+#, gcc-internal-format
+msgid "object type %qT does not match destructor name ~%qT"
+msgstr ""
+
+#: cp/typeck.c:2150
#, gcc-internal-format
msgid "the type being destroyed is %qT, but the destructor refers to %qT"
msgstr ""
-#: cp/typeck.c:2161 cp/typeck.c:2181
+#: cp/typeck.c:2189 cp/typeck.c:2209
#, gcc-internal-format
msgid "%qD is not a template"
msgstr ""
-#: cp/typeck.c:2285
+#: cp/typeck.c:2313
#, gcc-internal-format
msgid "%<%D::%D%> is not a member of %qT"
msgstr ""
-#: cp/typeck.c:2301
+#: cp/typeck.c:2329
#, gcc-internal-format
msgid "%qT is not a base of %qT"
msgstr ""
-#: cp/typeck.c:2321
+#: cp/typeck.c:2349
#, gcc-internal-format
msgid "%qD has no member named %qE"
msgstr ""
-#: cp/typeck.c:2337
+#: cp/typeck.c:2365
#, gcc-internal-format
msgid "%qD is not a member template function"
msgstr ""
-#: cp/typeck.c:2481
+#: cp/typeck.c:2509
#, gcc-internal-format
msgid "%qT is not a pointer-to-object type"
msgstr ""
-#: cp/typeck.c:2509
+#: cp/typeck.c:2537
#, gcc-internal-format
msgid "invalid use of %qs on pointer to member"
msgstr ""
-#: cp/typeck.c:2513
+#: cp/typeck.c:2541
#, gcc-internal-format
msgid "invalid type argument of %qs"
msgstr ""
-#: cp/typeck.c:2515
+#: cp/typeck.c:2543
#, gcc-internal-format
msgid "invalid type argument"
msgstr ""
-#: cp/typeck.c:2542
+#: cp/typeck.c:2570
#, gcc-internal-format
msgid "subscript missing in array reference"
msgstr ""
-#: cp/typeck.c:2622
+#: cp/typeck.c:2650
#, gcc-internal-format
msgid "ISO C++ forbids subscripting non-lvalue array"
msgstr ""
-#: cp/typeck.c:2634
+#: cp/typeck.c:2662
#, gcc-internal-format
msgid "subscripting array declared %<register%>"
msgstr ""
-#: cp/typeck.c:2726
+#: cp/typeck.c:2754
#, gcc-internal-format
msgid "object missing in use of %qE"
msgstr ""
-#: cp/typeck.c:2859
+#: cp/typeck.c:2891
#, gcc-internal-format
msgid "ISO C++ forbids calling %<::main%> from within program"
msgstr ""
-#: cp/typeck.c:2878
+#: cp/typeck.c:2910
#, gcc-internal-format
msgid ""
"must use %<.*%> or %<->*%> to call pointer-to-member function in %<%E (...)%"
">, e.g. %<(... ->* %E) (...)%>"
msgstr ""
-#: cp/typeck.c:2893
+#: cp/typeck.c:2925
#, gcc-internal-format
msgid "%qE cannot be used as a function"
msgstr ""
-#: cp/typeck.c:2986
+#: cp/typeck.c:3018
#, gcc-internal-format
msgid "too many arguments to %s %q+#D"
msgstr ""
-#: cp/typeck.c:2988 cp/typeck.c:3101
+#: cp/typeck.c:3020 cp/typeck.c:3133
#, gcc-internal-format
msgid "at this point in file"
msgstr ""
-#: cp/typeck.c:2991
+#: cp/typeck.c:3023
#, gcc-internal-format
msgid "too many arguments to function"
msgstr ""
-#: cp/typeck.c:3026
+#: cp/typeck.c:3058
#, gcc-internal-format
msgid "parameter %P of %qD has incomplete type %qT"
msgstr ""
-#: cp/typeck.c:3029
+#: cp/typeck.c:3061
#, gcc-internal-format
msgid "parameter %P has incomplete type %qT"
msgstr ""
-#: cp/typeck.c:3099
+#: cp/typeck.c:3131
#, gcc-internal-format
msgid "too few arguments to %s %q+#D"
msgstr ""
-#: cp/typeck.c:3104
+#: cp/typeck.c:3136
#, gcc-internal-format
msgid "too few arguments to function"
msgstr ""
-#: cp/typeck.c:3282 cp/typeck.c:3293
+#: cp/typeck.c:3342 cp/typeck.c:3353
#, gcc-internal-format
msgid "assuming cast to type %qT from overloaded function"
msgstr ""
-#: cp/typeck.c:3501
+#: cp/typeck.c:3561
#, gcc-internal-format
msgid "left rotate count is negative"
msgstr ""
-#: cp/typeck.c:3502
+#: cp/typeck.c:3562
#, gcc-internal-format
msgid "right rotate count is negative"
msgstr ""
-#: cp/typeck.c:3508
+#: cp/typeck.c:3568
#, gcc-internal-format
msgid "left rotate count >= width of type"
msgstr ""
-#: cp/typeck.c:3509
+#: cp/typeck.c:3569
#, gcc-internal-format
msgid "right rotate count >= width of type"
msgstr ""
-#: cp/typeck.c:3528 cp/typeck.c:3751
+#: cp/typeck.c:3588 cp/typeck.c:3811
#, gcc-internal-format
msgid "comparison with string literal results in unspecified behaviour"
msgstr ""
-#: cp/typeck.c:3568 cp/typeck.c:3576 cp/typeck.c:3771 cp/typeck.c:3779
+#: cp/typeck.c:3628 cp/typeck.c:3636 cp/typeck.c:3831 cp/typeck.c:3839
#, gcc-internal-format
msgid "ISO C++ forbids comparison between pointer and integer"
msgstr ""
-#: cp/typeck.c:3796
+#: cp/typeck.c:3856
#, gcc-internal-format
msgid "unordered comparison on non-floating point argument"
msgstr ""
-#: cp/typeck.c:3835
+#: cp/typeck.c:3895
#, gcc-internal-format
msgid "invalid operands of types %qT and %qT to binary %qO"
msgstr ""
@@ -34053,173 +33928,173 @@ msgstr ""
#. performed. Note that pointer-difference and pointer-addition
#. have already been handled above, and so we don't end up here in
#. that case.
-#: cp/typeck.c:3925
+#: cp/typeck.c:3985
#, gcc-internal-format
msgid "NULL used in arithmetic"
msgstr ""
-#: cp/typeck.c:3992
+#: cp/typeck.c:4052
#, gcc-internal-format
msgid "ISO C++ forbids using pointer of type %<void *%> in subtraction"
msgstr ""
-#: cp/typeck.c:3994
+#: cp/typeck.c:4054
#, gcc-internal-format
msgid "ISO C++ forbids using pointer to a function in subtraction"
msgstr ""
-#: cp/typeck.c:3996
+#: cp/typeck.c:4056
#, gcc-internal-format
msgid "ISO C++ forbids using pointer to a method in subtraction"
msgstr ""
-#: cp/typeck.c:4009
+#: cp/typeck.c:4069
#, gcc-internal-format
msgid "invalid use of a pointer to an incomplete type in pointer arithmetic"
msgstr ""
-#: cp/typeck.c:4069
+#: cp/typeck.c:4129
#, gcc-internal-format
msgid "invalid use of %qE to form a pointer-to-member-function"
msgstr ""
-#: cp/typeck.c:4072
+#: cp/typeck.c:4132
#, gcc-internal-format
msgid " a qualified-id is required"
msgstr ""
-#: cp/typeck.c:4077
+#: cp/typeck.c:4137
#, gcc-internal-format
msgid ""
"parentheses around %qE cannot be used to form a pointer-to-member-function"
msgstr ""
-#: cp/typeck.c:4100
+#: cp/typeck.c:4160
#, gcc-internal-format
msgid "taking address of temporary"
msgstr ""
-#: cp/typeck.c:4360
+#: cp/typeck.c:4420
#, gcc-internal-format
msgid "ISO C++ forbids incrementing an enum"
msgstr ""
-#: cp/typeck.c:4361
+#: cp/typeck.c:4421
#, gcc-internal-format
msgid "ISO C++ forbids decrementing an enum"
msgstr ""
-#: cp/typeck.c:4377
+#: cp/typeck.c:4437
#, gcc-internal-format
msgid "cannot increment a pointer to incomplete type %qT"
msgstr ""
-#: cp/typeck.c:4378
+#: cp/typeck.c:4438
#, gcc-internal-format
msgid "cannot decrement a pointer to incomplete type %qT"
msgstr ""
-#: cp/typeck.c:4389
+#: cp/typeck.c:4449
#, gcc-internal-format
msgid "ISO C++ forbids incrementing a pointer of type %qT"
msgstr ""
-#: cp/typeck.c:4390
+#: cp/typeck.c:4450
#, gcc-internal-format
msgid "ISO C++ forbids decrementing a pointer of type %qT"
msgstr ""
-#: cp/typeck.c:4416
+#: cp/typeck.c:4476
#, gcc-internal-format
msgid "invalid use of Boolean expression as operand to %<operator--%>"
msgstr ""
-#: cp/typeck.c:4448
+#: cp/typeck.c:4511
#, gcc-internal-format
msgid "ISO C++ forbids taking address of function %<::main%>"
msgstr ""
#. An expression like &memfn.
-#: cp/typeck.c:4509
+#: cp/typeck.c:4572
#, gcc-internal-format
msgid ""
"ISO C++ forbids taking the address of an unqualified or parenthesized non-"
"static member function to form a pointer to member function. Say %<&%T::%D%>"
msgstr ""
-#: cp/typeck.c:4514
+#: cp/typeck.c:4577
#, gcc-internal-format
msgid ""
"ISO C++ forbids taking the address of a bound member function to form a "
"pointer to member function. Say %<&%T::%D%>"
msgstr ""
-#: cp/typeck.c:4543
+#: cp/typeck.c:4606
#, gcc-internal-format
msgid "ISO C++ forbids taking the address of a cast to a non-lvalue expression"
msgstr ""
-#: cp/typeck.c:4571
+#: cp/typeck.c:4634
#, gcc-internal-format
msgid "cannot create pointer to reference member %qD"
msgstr ""
-#: cp/typeck.c:4786
+#: cp/typeck.c:4849
#, gcc-internal-format
msgid "cannot take the address of %<this%>, which is an rvalue expression"
msgstr ""
-#: cp/typeck.c:4809
+#: cp/typeck.c:4872
#, gcc-internal-format
msgid "address of explicit register variable %qD requested"
msgstr ""
-#: cp/typeck.c:4814
+#: cp/typeck.c:4877
#, gcc-internal-format
msgid "address requested for %qD, which is declared %<register%>"
msgstr ""
-#: cp/typeck.c:4881
+#: cp/typeck.c:4944
#, gcc-internal-format
msgid "%s expression list treated as compound expression"
msgstr ""
-#: cp/typeck.c:4971
+#: cp/typeck.c:5034
#, gcc-internal-format
msgid "cast from type %qT to type %qT casts away constness"
msgstr ""
-#: cp/typeck.c:4976
+#: cp/typeck.c:5039
#, gcc-internal-format
msgid "static_cast from type %qT to type %qT casts away constness"
msgstr ""
-#: cp/typeck.c:4981
+#: cp/typeck.c:5044
#, gcc-internal-format
msgid "reinterpret_cast from type %qT to type %qT casts away constness"
msgstr ""
-#: cp/typeck.c:5301
+#: cp/typeck.c:5364
#, gcc-internal-format
msgid "invalid static_cast from type %qT to type %qT"
msgstr ""
-#: cp/typeck.c:5324
+#: cp/typeck.c:5387
#, gcc-internal-format
msgid "converting from %qT to %qT"
msgstr ""
-#: cp/typeck.c:5373
+#: cp/typeck.c:5436
#, gcc-internal-format
msgid "invalid cast of an rvalue expression of type %qT to type %qT"
msgstr ""
-#: cp/typeck.c:5435
+#: cp/typeck.c:5498
#, gcc-internal-format
msgid "cast from %qT to %qT loses precision"
msgstr ""
-#: cp/typeck.c:5465
+#: cp/typeck.c:5528
#, gcc-internal-format
msgid "cast from %qT to %qT increases required alignment of target type"
msgstr ""
@@ -34228,160 +34103,160 @@ msgstr ""
#. where possible, and it is necessary in some cases. DR 195
#. addresses this issue, but as of 2004/10/26 is still in
#. drafting.
-#: cp/typeck.c:5484
+#: cp/typeck.c:5547
#, gcc-internal-format
msgid ""
"ISO C++ forbids casting between pointer-to-function and pointer-to-object"
msgstr ""
-#: cp/typeck.c:5496
+#: cp/typeck.c:5559
#, gcc-internal-format
msgid "invalid cast from type %qT to type %qT"
msgstr ""
-#: cp/typeck.c:5552
+#: cp/typeck.c:5615
#, gcc-internal-format
msgid ""
"invalid use of const_cast with type %qT, which is not a pointer, reference, "
"nor a pointer-to-data-member type"
msgstr ""
-#: cp/typeck.c:5561
+#: cp/typeck.c:5624
#, gcc-internal-format
msgid ""
"invalid use of const_cast with type %qT, which is a pointer or reference to "
"a function type"
msgstr ""
-#: cp/typeck.c:5586
+#: cp/typeck.c:5649
#, gcc-internal-format
msgid "invalid const_cast of an rvalue of type %qT to type %qT"
msgstr ""
-#: cp/typeck.c:5635
+#: cp/typeck.c:5698
#, gcc-internal-format
msgid "invalid const_cast from type %qT to type %qT"
msgstr ""
-#: cp/typeck.c:5712 cp/typeck.c:5720
+#: cp/typeck.c:5775 cp/typeck.c:5783
#, gcc-internal-format
msgid "ISO C++ forbids casting to an array type %qT"
msgstr ""
-#: cp/typeck.c:5729
+#: cp/typeck.c:5792
#, gcc-internal-format
msgid "invalid cast to function type %qT"
msgstr ""
-#: cp/typeck.c:5968
+#: cp/typeck.c:6031
#, gcc-internal-format
msgid " in evaluation of %<%Q(%#T, %#T)%>"
msgstr ""
-#: cp/typeck.c:6019
+#: cp/typeck.c:6082
#, gcc-internal-format
msgid "incompatible types in assignment of %qT to %qT"
msgstr ""
-#: cp/typeck.c:6032
+#: cp/typeck.c:6095
#, gcc-internal-format
msgid "array used as initializer"
msgstr ""
-#: cp/typeck.c:6034
+#: cp/typeck.c:6097
#, gcc-internal-format
msgid "invalid array assignment"
msgstr ""
-#: cp/typeck.c:6132
+#: cp/typeck.c:6195
#, gcc-internal-format
msgid " in pointer to member function conversion"
msgstr ""
-#: cp/typeck.c:6143
+#: cp/typeck.c:6206
#, gcc-internal-format
msgid "pointer to member conversion via virtual base %qT"
msgstr ""
-#: cp/typeck.c:6183 cp/typeck.c:6195
+#: cp/typeck.c:6246 cp/typeck.c:6258
#, gcc-internal-format
msgid " in pointer to member conversion"
msgstr ""
-#: cp/typeck.c:6273
+#: cp/typeck.c:6336
#, gcc-internal-format
msgid "invalid conversion to type %qT from type %qT"
msgstr ""
-#: cp/typeck.c:6544
+#: cp/typeck.c:6607
#, gcc-internal-format
msgid "cannot convert %qT to %qT for argument %qP to %qD"
msgstr ""
-#: cp/typeck.c:6547
+#: cp/typeck.c:6610
#, gcc-internal-format
msgid "cannot convert %qT to %qT in %s"
msgstr ""
-#: cp/typeck.c:6561
+#: cp/typeck.c:6624
#, gcc-internal-format
msgid "%s might be a candidate for a format attribute"
msgstr ""
-#: cp/typeck.c:6650 cp/typeck.c:6652
+#: cp/typeck.c:6713 cp/typeck.c:6715
#, gcc-internal-format
msgid "in passing argument %P of %q+D"
msgstr ""
-#: cp/typeck.c:6702
+#: cp/typeck.c:6765
#, gcc-internal-format
msgid "returning reference to temporary"
msgstr ""
-#: cp/typeck.c:6709
+#: cp/typeck.c:6772
#, gcc-internal-format
msgid "reference to non-lvalue returned"
msgstr ""
-#: cp/typeck.c:6725
+#: cp/typeck.c:6788
#, gcc-internal-format
msgid "reference to local variable %q+D returned"
msgstr ""
-#: cp/typeck.c:6728
+#: cp/typeck.c:6791
#, gcc-internal-format
msgid "address of local variable %q+D returned"
msgstr ""
-#: cp/typeck.c:6763
+#: cp/typeck.c:6826
#, gcc-internal-format
msgid "returning a value from a destructor"
msgstr ""
#. If a return statement appears in a handler of the
#. function-try-block of a constructor, the program is ill-formed.
-#: cp/typeck.c:6771
+#: cp/typeck.c:6834
#, gcc-internal-format
msgid "cannot return from a handler of a function-try-block of a constructor"
msgstr ""
#. You can't return a value from a constructor.
-#: cp/typeck.c:6774
+#: cp/typeck.c:6837
#, gcc-internal-format
msgid "returning a value from a constructor"
msgstr ""
-#: cp/typeck.c:6799
+#: cp/typeck.c:6862
#, gcc-internal-format
msgid "return-statement with no value, in function returning %qT"
msgstr ""
-#: cp/typeck.c:6820
+#: cp/typeck.c:6883
#, gcc-internal-format
msgid "return-statement with a value, in function returning 'void'"
msgstr ""
-#: cp/typeck.c:6850
+#: cp/typeck.c:6913
#, gcc-internal-format
msgid ""
"%<operator new%> must not return NULL unless it is declared %<throw()%> (or -"
@@ -34499,92 +34374,97 @@ msgstr ""
msgid "int-array initialized from incompatible wide string"
msgstr ""
-#: cp/typeck2.c:829
+#: cp/typeck2.c:831
#, gcc-internal-format
msgid "cannot initialize aggregate of type %qT with a compound literal"
msgstr ""
-#: cp/typeck2.c:838
+#: cp/typeck2.c:840
#, gcc-internal-format
msgid "array must be initialized with a brace-enclosed initializer"
msgstr ""
-#: cp/typeck2.c:920 cp/typeck2.c:1028
+#: cp/typeck2.c:922 cp/typeck2.c:1030
#, gcc-internal-format
msgid "non-trivial designated initializers not supported"
msgstr ""
-#: cp/typeck2.c:1052 cp/typeck2.c:1066
+#: cp/typeck2.c:1054 cp/typeck2.c:1068
#, gcc-internal-format
msgid "missing initializer for member %qD"
msgstr ""
-#: cp/typeck2.c:1057
+#: cp/typeck2.c:1059
#, gcc-internal-format
msgid "uninitialized const member %qD"
msgstr ""
-#: cp/typeck2.c:1059
+#: cp/typeck2.c:1061
#, gcc-internal-format
msgid "member %qD with uninitialized const fields"
msgstr ""
-#: cp/typeck2.c:1061
+#: cp/typeck2.c:1063
#, gcc-internal-format
msgid "member %qD is uninitialized reference"
msgstr ""
-#: cp/typeck2.c:1119
+#: cp/typeck2.c:1131
#, gcc-internal-format
msgid "no field %qD found in union being initialized"
msgstr ""
-#: cp/typeck2.c:1128
+#: cp/typeck2.c:1140
#, gcc-internal-format
msgid "index value instead of field name in union initializer"
msgstr ""
-#: cp/typeck2.c:1283
+#: cp/typeck2.c:1299
#, gcc-internal-format
msgid "circular pointer delegation detected"
msgstr ""
-#: cp/typeck2.c:1296
+#: cp/typeck2.c:1312
#, gcc-internal-format
msgid "base operand of %<->%> has non-pointer type %qT"
msgstr ""
-#: cp/typeck2.c:1320
+#: cp/typeck2.c:1336
#, gcc-internal-format
msgid "result of %<operator->()%> yields non-pointer result"
msgstr ""
-#: cp/typeck2.c:1322
+#: cp/typeck2.c:1338
#, gcc-internal-format
msgid "base operand of %<->%> is not a pointer"
msgstr ""
-#: cp/typeck2.c:1344
+#: cp/typeck2.c:1360
#, gcc-internal-format
msgid "%qE cannot be used as a member pointer, since it is of type %qT"
msgstr ""
-#: cp/typeck2.c:1353
+#: cp/typeck2.c:1369
#, gcc-internal-format
msgid "cannot apply member pointer %qE to %qE, which is of non-class type %qT"
msgstr ""
-#: cp/typeck2.c:1375
+#: cp/typeck2.c:1391
#, gcc-internal-format
msgid "pointer to member type %qT incompatible with object type %qT"
msgstr ""
-#: cp/typeck2.c:1616
+#: cp/typeck2.c:1451
+#, gcc-internal-format
+msgid "invalid value-initialization of reference types"
+msgstr ""
+
+#: cp/typeck2.c:1638
#, gcc-internal-format
msgid "call to function %qD which throws incomplete type %q#T"
msgstr ""
-#: cp/typeck2.c:1619
+#: cp/typeck2.c:1641
#, gcc-internal-format
msgid "call to function which throws incomplete type %q#T"
msgstr ""
@@ -34619,19 +34499,19 @@ msgstr ""
msgid "address of register variable %qs requested"
msgstr ""
-#: fortran/trans-array.c:5714
+#: fortran/trans-array.c:5732
#, gcc-internal-format
msgid ""
"Possible frontend bug: Deferred array size without pointer, allocatable "
"attribute or derived type without allocatable components."
msgstr ""
-#: fortran/trans-array.c:6195
+#: fortran/trans-array.c:6213
#, gcc-internal-format
msgid "bad expression type during walk (%d)"
msgstr ""
-#: fortran/trans-const.c:326
+#: fortran/trans-const.c:330
#, gcc-internal-format
msgid "gfc_conv_constant_to_tree(): invalid type: %s"
msgstr ""
@@ -34641,7 +34521,7 @@ msgstr ""
msgid "intrinsic variable which isn't a procedure"
msgstr ""
-#: fortran/trans-decl.c:3131
+#: fortran/trans-decl.c:3165
#, gcc-internal-format
msgid "backend decl for module variable %s already exists"
msgstr ""
@@ -34656,32 +34536,32 @@ msgstr ""
msgid "Intrinsic function %s(%d) not recognized"
msgstr ""
-#: fortran/trans-io.c:2105
+#: fortran/trans-io.c:2103
#, gcc-internal-format
msgid "Bad IO basetype (%d)"
msgstr ""
-#: fortran/trans-types.c:392
+#: fortran/trans-types.c:378
#, gcc-internal-format
msgid "integer kind=8 not available for -fdefault-integer-8 option"
msgstr ""
-#: fortran/trans-types.c:415
+#: fortran/trans-types.c:401
#, gcc-internal-format
msgid "real kind=8 not available for -fdefault-real-8 option"
msgstr ""
-#: fortran/trans-types.c:428
+#: fortran/trans-types.c:414
#, gcc-internal-format
msgid "Use of -fdefault-double-8 requires -fdefault-real-8"
msgstr ""
-#: fortran/trans-types.c:1261
+#: fortran/trans-types.c:1247
#, gcc-internal-format
msgid "Array element size too big"
msgstr ""
-#: fortran/trans.c:1232
+#: fortran/trans.c:1233
#, gcc-internal-format
msgid "gfc_trans_code(): Bad statement code"
msgstr ""
diff --git a/gcc/protoize.c b/gcc/protoize.c
deleted file mode 100644
index aab1291dbb2..00000000000
--- a/gcc/protoize.c
+++ /dev/null
@@ -1,4535 +0,0 @@
-/* Protoize program - Original version by Ron Guilmette (rfg@segfault.us.com).
- Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 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/>. */
-
-#include "config.h"
-#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-#include "intl.h"
-#include "cppdefault.h"
-
-#include <setjmp.h>
-#include <signal.h>
-#if ! defined( SIGCHLD ) && defined( SIGCLD )
-# define SIGCHLD SIGCLD
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include "version.h"
-
-/* Include getopt.h for the sake of getopt_long. */
-#include "getopt.h"
-
-/* Macro to see if the path elements match. */
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
-#define IS_SAME_PATH_CHAR(a,b) (TOUPPER (a) == TOUPPER (b))
-#else
-#define IS_SAME_PATH_CHAR(a,b) ((a) == (b))
-#endif
-
-/* Macro to see if the paths match. */
-#define IS_SAME_PATH(a,b) (FILENAME_CMP (a, b) == 0)
-
-/* Suffix for aux-info files. */
-#ifdef __MSDOS__
-#define AUX_INFO_SUFFIX "X"
-#else
-#define AUX_INFO_SUFFIX ".X"
-#endif
-
-/* Suffix for saved files. */
-#ifdef __MSDOS__
-#define SAVE_SUFFIX "sav"
-#else
-#define SAVE_SUFFIX ".save"
-#endif
-
-/* Suffix for renamed C++ files. */
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
-#define CPLUS_FILE_SUFFIX "cc"
-#else
-#define CPLUS_FILE_SUFFIX "C"
-#endif
-
-static void usage (void) ATTRIBUTE_NORETURN;
-static void aux_info_corrupted (void) ATTRIBUTE_NORETURN;
-static void declare_source_confusing (const char *) ATTRIBUTE_NORETURN;
-static const char *shortpath (const char *, const char *);
-static void notice (const char *, ...) ATTRIBUTE_PRINTF_1;
-static char *savestring (const char *, unsigned int);
-static char *dupnstr (const char *, size_t);
-static int safe_read (int, void *, int);
-static void safe_write (int, void *, int, const char *);
-static void save_pointers (void);
-static void restore_pointers (void);
-static int is_id_char (int);
-static int in_system_include_dir (const char *);
-static int directory_specified_p (const char *);
-static int file_excluded_p (const char *);
-static char *unexpand_if_needed (const char *);
-static char *abspath (const char *, const char *);
-static void check_aux_info (int);
-static const char *find_corresponding_lparen (const char *);
-static int referenced_file_is_newer (const char *, time_t);
-static void save_def_or_dec (const char *, int);
-static void munge_compile_params (const char *);
-static int gen_aux_info_file (const char *);
-static void process_aux_info_file (const char *, int, int);
-static int identify_lineno (const char *);
-static void check_source (int, const char *);
-static const char *seek_to_line (int);
-static const char *forward_to_next_token_char (const char *);
-static void output_bytes (const char *, size_t);
-static void output_string (const char *);
-static void output_up_to (const char *);
-static int other_variable_style_function (const char *);
-static const char *find_rightmost_formals_list (const char *);
-static void do_cleaning (char *, const char *);
-static const char *careful_find_l_paren (const char *);
-static void do_processing (void);
-
-/* Look for these where the `const' qualifier is intentionally cast aside. */
-#define NONCONST
-
-/* Define a default place to find the SYSCALLS.X file. */
-
-#ifndef UNPROTOIZE
-
-#ifndef STANDARD_EXEC_PREFIX
-#define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/"
-#endif /* !defined STANDARD_EXEC_PREFIX */
-
-static const char * const standard_exec_prefix = STANDARD_EXEC_PREFIX;
-static const char * const target_machine = DEFAULT_TARGET_MACHINE;
-static const char * const target_version = DEFAULT_TARGET_VERSION;
-
-#endif /* !defined (UNPROTOIZE) */
-
-/* Suffix of aux_info files. */
-
-static const char * const aux_info_suffix = AUX_INFO_SUFFIX;
-
-/* String to attach to filenames for saved versions of original files. */
-
-static const char * const save_suffix = SAVE_SUFFIX;
-
-#ifndef UNPROTOIZE
-
-/* String to attach to C filenames renamed to C++. */
-
-static const char * const cplus_suffix = CPLUS_FILE_SUFFIX;
-
-/* File name of the file which contains descriptions of standard system
- routines. Note that we never actually do anything with this file per se,
- but we do read in its corresponding aux_info file. */
-
-static const char syscalls_filename[] = "SYSCALLS.c";
-
-/* Default place to find the above file. */
-
-static const char * default_syscalls_dir;
-
-/* Variable to hold the complete absolutized filename of the SYSCALLS.c.X
- file. */
-
-static char * syscalls_absolute_filename;
-
-#endif /* !defined (UNPROTOIZE) */
-
-/* Type of the structure that holds information about macro unexpansions. */
-
-struct unexpansion_struct {
- const char *const expanded;
- const char *const contracted;
-};
-typedef struct unexpansion_struct unexpansion;
-
-/* A table of conversions that may need to be made for some (stupid) older
- operating systems where these types are preprocessor macros rather than
- typedefs (as they really ought to be).
-
- WARNING: The contracted forms must be as small (or smaller) as the
- expanded forms, or else havoc will ensue. */
-
-static const unexpansion unexpansions[] = {
- { "struct _iobuf", "FILE" },
- { 0, 0 }
-};
-
-/* The number of "primary" slots in the hash tables for filenames and for
- function names. This can be as big or as small as you like, except that
- it must be a power of two. */
-
-#define HASH_TABLE_SIZE (1 << 9)
-
-/* Bit mask to use when computing hash values. */
-
-static const int hash_mask = (HASH_TABLE_SIZE - 1);
-
-
-/* Datatype for lists of directories or filenames. */
-struct string_list
-{
- const char *name;
- struct string_list *next;
-};
-
-static struct string_list *string_list_cons (const char *,
- struct string_list *);
-
-/* List of directories in which files should be converted. */
-
-struct string_list *directory_list;
-
-/* List of file names which should not be converted.
- A file is excluded if the end of its name, following a /,
- matches one of the names in this list. */
-
-struct string_list *exclude_list;
-
-/* The name of the other style of variable-number-of-parameters functions
- (i.e. the style that we want to leave unconverted because we don't yet
- know how to convert them to this style. This string is used in warning
- messages. */
-
-/* Also define here the string that we can search for in the parameter lists
- taken from the .X files which will unambiguously indicate that we have
- found a varargs style function. */
-
-#ifdef UNPROTOIZE
-static const char * const other_var_style = "stdarg";
-#else /* !defined (UNPROTOIZE) */
-static const char * const other_var_style = "varargs";
-static const char *varargs_style_indicator = "va_alist";
-#endif /* !defined (UNPROTOIZE) */
-
-/* The following two types are used to create hash tables. In this program,
- there are two hash tables which are used to store and quickly lookup two
- different classes of strings. The first type of strings stored in the
- first hash table are absolute filenames of files which protoize needs to
- know about. The second type of strings (stored in the second hash table)
- are function names. It is this second class of strings which really
- inspired the use of the hash tables, because there may be a lot of them. */
-
-typedef struct hash_table_entry_struct hash_table_entry;
-
-/* Do some typedefs so that we don't have to write "struct" so often. */
-
-typedef struct def_dec_info_struct def_dec_info;
-typedef struct file_info_struct file_info;
-typedef struct f_list_chain_item_struct f_list_chain_item;
-
-#ifndef UNPROTOIZE
-static int is_syscalls_file (const file_info *);
-static void rename_c_file (const hash_table_entry *);
-static const def_dec_info *find_extern_def (const def_dec_info *,
- const def_dec_info *);
-static const def_dec_info *find_static_definition (const def_dec_info *);
-static void connect_defs_and_decs (const hash_table_entry *);
-static void add_local_decl (const def_dec_info *, const char *);
-static void add_global_decls (const file_info *, const char *);
-#endif /* ! UNPROTOIZE */
-static int needs_to_be_converted (const file_info *);
-static void visit_each_hash_node (const hash_table_entry *,
- void (*)(const hash_table_entry *));
-static hash_table_entry *add_symbol (hash_table_entry *, const char *);
-static hash_table_entry *lookup (hash_table_entry *, const char *);
-static void free_def_dec (def_dec_info *);
-static file_info *find_file (const char *, int);
-static void reverse_def_dec_list (const hash_table_entry *);
-static void edit_fn_declaration (const def_dec_info *, const char *);
-static int edit_formals_lists (const char *, unsigned int,
- const def_dec_info *);
-static void edit_fn_definition (const def_dec_info *, const char *);
-static void scan_for_missed_items (const file_info *);
-static void edit_file (const hash_table_entry *);
-
-/* In the struct below, note that the "_info" field has two different uses
- depending on the type of hash table we are in (i.e. either the filenames
- hash table or the function names hash table). In the filenames hash table
- the info fields of the entries point to the file_info struct which is
- associated with each filename (1 per filename). In the function names
- hash table, the info field points to the head of a singly linked list of
- def_dec_info entries which are all defs or decs of the function whose
- name is pointed to by the "symbol" field. Keeping all of the defs/decs
- for a given function name on a special list specifically for that function
- name makes it quick and easy to find out all of the important information
- about a given (named) function. */
-
-struct hash_table_entry_struct {
- hash_table_entry * hash_next; /* -> to secondary entries */
- const char * symbol; /* -> to the hashed string */
- union {
- const def_dec_info * _ddip;
- file_info * _fip;
- } _info;
-};
-#define ddip _info._ddip
-#define fip _info._fip
-
-/* Define a type specifically for our two hash tables. */
-
-typedef hash_table_entry hash_table[HASH_TABLE_SIZE];
-
-/* The following struct holds all of the important information about any
- single filename (e.g. file) which we need to know about. */
-
-struct file_info_struct {
- const hash_table_entry * hash_entry; /* -> to associated hash entry */
- const def_dec_info * defs_decs; /* -> to chain of defs/decs */
- time_t mtime; /* Time of last modification. */
-};
-
-/* Due to the possibility that functions may return pointers to functions,
- (which may themselves have their own parameter lists) and due to the
- fact that returned pointers-to-functions may be of type "pointer-to-
- function-returning-pointer-to-function" (ad nauseum) we have to keep
- an entire chain of ANSI style formal parameter lists for each function.
-
- Normally, for any given function, there will only be one formals list
- on the chain, but you never know.
-
- Note that the head of each chain of formals lists is pointed to by the
- `f_list_chain' field of the corresponding def_dec_info record.
-
- For any given chain, the item at the head of the chain is the *leftmost*
- parameter list seen in the actual C language function declaration. If
- there are other members of the chain, then these are linked in left-to-right
- order from the head of the chain. */
-
-struct f_list_chain_item_struct {
- const f_list_chain_item * chain_next; /* -> to next item on chain */
- const char * formals_list; /* -> to formals list string */
-};
-
-/* The following struct holds all of the important information about any
- single function definition or declaration which we need to know about.
- Note that for unprotoize we don't need to know very much because we
- never even create records for stuff that we don't intend to convert
- (like for instance defs and decs which are already in old K&R format
- and "implicit" function declarations). */
-
-struct def_dec_info_struct {
- const def_dec_info * next_in_file; /* -> to rest of chain for file */
- file_info * file; /* -> file_info for containing file */
- int line; /* source line number of def/dec */
- const char * ansi_decl; /* -> left end of ansi decl */
- hash_table_entry * hash_entry; /* -> hash entry for function name */
- unsigned int is_func_def; /* = 0 means this is a declaration */
- const def_dec_info * next_for_func; /* -> to rest of chain for func name */
- unsigned int f_list_count; /* count of formals lists we expect */
- char prototyped; /* = 0 means already prototyped */
-#ifndef UNPROTOIZE
- const f_list_chain_item * f_list_chain; /* -> chain of formals lists */
- const def_dec_info * definition; /* -> def/dec containing related def */
- char is_static; /* = 0 means visibility is "extern" */
- char is_implicit; /* != 0 for implicit func decl's */
- char written; /* != 0 means written for implicit */
-#else /* !defined (UNPROTOIZE) */
- const char * formal_names; /* -> to list of names of formals */
- const char * formal_decls; /* -> to string of formal declarations */
-#endif /* !defined (UNPROTOIZE) */
-};
-
-/* Pointer to the tail component of the filename by which this program was
- invoked. Used everywhere in error and warning messages. */
-
-static const char *pname;
-
-/* Error counter. Will be nonzero if we should give up at the next convenient
- stopping point. */
-
-static int errors = 0;
-
-/* Option flags. */
-/* ??? The variables are not marked static because some of them have
- the same names as gcc variables declared in options.h. */
-/* ??? These comments should say what the flag mean as well as the options
- that set them. */
-
-/* File name to use for running gcc. Allows GCC 2 to be named
- something other than gcc. */
-static const char *compiler_file_name = "gcc";
-
-int version_flag = 0; /* Print our version number. */
-int quiet_flag = 0; /* Don't print messages normally. */
-int nochange_flag = 0; /* Don't convert, just say what files
- we would have converted. */
-int nosave_flag = 0; /* Don't save the old version. */
-int keep_flag = 0; /* Don't delete the .X files. */
-static const char ** compile_params = 0; /* Option string for gcc. */
-#ifdef UNPROTOIZE
-static const char *indent_string = " "; /* Indentation for newly
- inserted parm decls. */
-#else /* !defined (UNPROTOIZE) */
-int local_flag = 0; /* Insert new local decls (when?). */
-int global_flag = 0; /* set by -g option */
-int cplusplus_flag = 0; /* Rename converted files to *.C. */
-static const char *nondefault_syscalls_dir = 0; /* Dir to look for
- SYSCALLS.c.X in. */
-#endif /* !defined (UNPROTOIZE) */
-
-/* An index into the compile_params array where we should insert the source
- file name when we are ready to exec the C compiler. A zero value indicates
- that we have not yet called munge_compile_params. */
-
-static int input_file_name_index = 0;
-
-/* An index into the compile_params array where we should insert the filename
- for the aux info file, when we run the C compiler. */
-static int aux_info_file_name_index = 0;
-
-/* Count of command line arguments which were "filename" arguments. */
-
-static int n_base_source_files = 0;
-
-/* Points to a malloc'ed list of pointers to all of the filenames of base
- source files which were specified on the command line. */
-
-static const char **base_source_filenames;
-
-/* Line number of the line within the current aux_info file that we
- are currently processing. Used for error messages in case the prototypes
- info file is corrupted somehow. */
-
-static int current_aux_info_lineno;
-
-/* Pointer to the name of the source file currently being converted. */
-
-static const char *convert_filename;
-
-/* Pointer to relative root string (taken from aux_info file) which indicates
- where directory the user was in when he did the compilation step that
- produced the containing aux_info file. */
-
-static const char *invocation_filename;
-
-/* Pointer to the base of the input buffer that holds the original text for the
- source file currently being converted. */
-
-static const char *orig_text_base;
-
-/* Pointer to the byte just beyond the end of the input buffer that holds the
- original text for the source file currently being converted. */
-
-static const char *orig_text_limit;
-
-/* Pointer to the base of the input buffer that holds the cleaned text for the
- source file currently being converted. */
-
-static const char *clean_text_base;
-
-/* Pointer to the byte just beyond the end of the input buffer that holds the
- cleaned text for the source file currently being converted. */
-
-static const char *clean_text_limit;
-
-/* Pointer to the last byte in the cleaned text buffer that we have already
- (virtually) copied to the output buffer (or decided to ignore). */
-
-static const char * clean_read_ptr;
-
-/* Pointer to the base of the output buffer that holds the replacement text
- for the source file currently being converted. */
-
-static char *repl_text_base;
-
-/* Pointer to the byte just beyond the end of the output buffer that holds the
- replacement text for the source file currently being converted. */
-
-static char *repl_text_limit;
-
-/* Pointer to the last byte which has been stored into the output buffer.
- The next byte to be stored should be stored just past where this points
- to. */
-
-static char * repl_write_ptr;
-
-/* Pointer into the cleaned text buffer for the source file we are currently
- converting. This points to the first character of the line that we last
- did a "seek_to_line" to (see below). */
-
-static const char *last_known_line_start;
-
-/* Number of the line (in the cleaned text buffer) that we last did a
- "seek_to_line" to. Will be one if we just read a new source file
- into the cleaned text buffer. */
-
-static int last_known_line_number;
-
-/* The filenames hash table. */
-
-static hash_table filename_primary;
-
-/* The function names hash table. */
-
-static hash_table function_name_primary;
-
-/* The place to keep the recovery address which is used only in cases where
- we get hopelessly confused by something in the cleaned original text. */
-
-static jmp_buf source_confusion_recovery;
-
-/* A pointer to the current directory filename (used by abspath). */
-
-static char *cwd_buffer;
-
-/* A place to save the read pointer until we are sure that an individual
- attempt at editing will succeed. */
-
-static const char * saved_clean_read_ptr;
-
-/* A place to save the write pointer until we are sure that an individual
- attempt at editing will succeed. */
-
-static char * saved_repl_write_ptr;
-
-/* Translate and output an error message. */
-static void
-notice (const char *cmsgid, ...)
-{
- va_list ap;
-
- va_start (ap, cmsgid);
- vfprintf (stderr, _(cmsgid), ap);
- va_end (ap);
-}
-
-
-/* Make a copy of a string INPUT with size SIZE. */
-
-static char *
-savestring (const char *input, unsigned int size)
-{
- char *output = xmalloc (size + 1);
- strcpy (output, input);
- return output;
-}
-
-
-/* Make a duplicate of the first N bytes of a given string in a newly
- allocated area. */
-
-static char *
-dupnstr (const char *s, size_t n)
-{
- char *ret_val = xmalloc (n + 1);
-
- strncpy (ret_val, s, n);
- ret_val[n] = '\0';
- return ret_val;
-}
-
-/* Read LEN bytes at PTR from descriptor DESC, for file FILENAME,
- retrying if necessary. Return the actual number of bytes read. */
-
-static int
-safe_read (int desc, void *ptr, int len)
-{
- int left = len;
- while (left > 0) {
- int nchars = read (desc, ptr, left);
- if (nchars < 0)
- {
-#ifdef EINTR
- if (errno == EINTR)
- continue;
-#endif
- return nchars;
- }
- if (nchars == 0)
- break;
- /* Arithmetic on void pointers is a gcc extension. */
- ptr = (char *) ptr + nchars;
- left -= nchars;
- }
- return len - left;
-}
-
-/* Write LEN bytes at PTR to descriptor DESC,
- retrying if necessary, and treating any real error as fatal. */
-
-static void
-safe_write (int desc, void *ptr, int len, const char *out_fname)
-{
- while (len > 0) {
- int written = write (desc, ptr, len);
- if (written < 0)
- {
- int errno_val = errno;
-#ifdef EINTR
- if (errno_val == EINTR)
- continue;
-#endif
- notice ("%s: error writing file '%s': %s\n",
- pname, shortpath (NULL, out_fname), xstrerror (errno_val));
- return;
- }
- /* Arithmetic on void pointers is a gcc extension. */
- ptr = (char *) ptr + written;
- len -= written;
- }
-}
-
-/* Get setup to recover in case the edit we are about to do goes awry. */
-
-static void
-save_pointers (void)
-{
- saved_clean_read_ptr = clean_read_ptr;
- saved_repl_write_ptr = repl_write_ptr;
-}
-
-/* Call this routine to recover our previous state whenever something looks
- too confusing in the source code we are trying to edit. */
-
-static void
-restore_pointers (void)
-{
- clean_read_ptr = saved_clean_read_ptr;
- repl_write_ptr = saved_repl_write_ptr;
-}
-
-/* Return true if the given character is a valid identifier character. */
-
-static int
-is_id_char (int ch)
-{
- return (ISIDNUM (ch) || (ch == '$'));
-}
-
-/* Give a message indicating the proper way to invoke this program and then
- exit with nonzero status. */
-
-static void
-usage (void)
-{
-#ifdef UNPROTOIZE
- notice ("%s: usage '%s [ -VqfnkN ] [ -i <istring> ] [ filename ... ]'\n",
- pname, pname);
-#else /* !defined (UNPROTOIZE) */
- notice ("%s: usage '%s [ -VqfnkNlgC ] [ -B <dirname> ] [ filename ... ]'\n",
- pname, pname);
-#endif /* !defined (UNPROTOIZE) */
- exit (FATAL_EXIT_CODE);
-}
-
-/* Return true if the given filename (assumed to be an absolute filename)
- designates a file residing anywhere beneath any one of the "system"
- include directories. */
-
-static int
-in_system_include_dir (const char *path)
-{
- const struct default_include *p;
-
- gcc_assert (IS_ABSOLUTE_PATH (path));
-
- for (p = cpp_include_defaults; p->fname; p++)
- if (!strncmp (path, p->fname, strlen (p->fname))
- && IS_DIR_SEPARATOR (path[strlen (p->fname)]))
- return 1;
- return 0;
-}
-
-#if 0
-/* Return true if the given filename designates a file that the user has
- read access to and for which the user has write access to the containing
- directory. */
-
-static int
-file_could_be_converted (const char *path)
-{
- char *const dir_name = alloca (strlen (path) + 1);
-
- if (access (path, R_OK))
- return 0;
-
- {
- char *dir_last_slash;
-
- strcpy (dir_name, path);
- dir_last_slash = strrchr (dir_name, DIR_SEPARATOR);
-#ifdef DIR_SEPARATOR_2
- {
- char *slash;
-
- slash = strrchr (dir_last_slash ? dir_last_slash : dir_name,
- DIR_SEPARATOR_2);
- if (slash)
- dir_last_slash = slash;
- }
-#endif
- gcc_assert (dir_last_slash);
- *dir_last_slash = '\0';
- }
-
- if (access (path, W_OK))
- return 0;
-
- return 1;
-}
-
-/* Return true if the given filename designates a file that we are allowed
- to modify. Files which we should not attempt to modify are (a) "system"
- include files, and (b) files which the user doesn't have write access to,
- and (c) files which reside in directories which the user doesn't have
- write access to. Unless requested to be quiet, give warnings about
- files that we will not try to convert for one reason or another. An
- exception is made for "system" include files, which we never try to
- convert and for which we don't issue the usual warnings. */
-
-static int
-file_normally_convertible (const char *path)
-{
- char *const dir_name = alloca (strlen (path) + 1);
-
- if (in_system_include_dir (path))
- return 0;
-
- {
- char *dir_last_slash;
-
- strcpy (dir_name, path);
- dir_last_slash = strrchr (dir_name, DIR_SEPARATOR);
-#ifdef DIR_SEPARATOR_2
- {
- char *slash;
-
- slash = strrchr (dir_last_slash ? dir_last_slash : dir_name,
- DIR_SEPARATOR_2);
- if (slash)
- dir_last_slash = slash;
- }
-#endif
- gcc_assert (dir_last_slash);
- *dir_last_slash = '\0';
- }
-
- if (access (path, R_OK))
- {
- if (!quiet_flag)
- notice ("%s: warning: no read access for file '%s'\n",
- pname, shortpath (NULL, path));
- return 0;
- }
-
- if (access (path, W_OK))
- {
- if (!quiet_flag)
- notice ("%s: warning: no write access for file '%s'\n",
- pname, shortpath (NULL, path));
- return 0;
- }
-
- if (access (dir_name, W_OK))
- {
- if (!quiet_flag)
- notice ("%s: warning: no write access for dir containing '%s'\n",
- pname, shortpath (NULL, path));
- return 0;
- }
-
- return 1;
-}
-#endif /* 0 */
-
-#ifndef UNPROTOIZE
-
-/* Return true if the given file_info struct refers to the special SYSCALLS.c.X
- file. Return false otherwise. */
-
-static int
-is_syscalls_file (const file_info *fi_p)
-{
- char const *f = fi_p->hash_entry->symbol;
- size_t fl = strlen (f), sysl = sizeof (syscalls_filename) - 1;
- return sysl <= fl && strcmp (f + fl - sysl, syscalls_filename) == 0;
-}
-
-#endif /* !defined (UNPROTOIZE) */
-
-/* Check to see if this file will need to have anything done to it on this
- run. If there is nothing in the given file which both needs conversion
- and for which we have the necessary stuff to do the conversion, return
- false. Otherwise, return true.
-
- Note that (for protoize) it is only valid to call this function *after*
- the connections between declarations and definitions have all been made
- by connect_defs_and_decs. */
-
-static int
-needs_to_be_converted (const file_info *file_p)
-{
- const def_dec_info *ddp;
-
-#ifndef UNPROTOIZE
-
- if (is_syscalls_file (file_p))
- return 0;
-
-#endif /* !defined (UNPROTOIZE) */
-
- for (ddp = file_p->defs_decs; ddp; ddp = ddp->next_in_file)
-
- if (
-
-#ifndef UNPROTOIZE
-
- /* ... and if we a protoizing and this function is in old style ... */
- !ddp->prototyped
- /* ... and if this a definition or is a decl with an associated def ... */
- && (ddp->is_func_def || (!ddp->is_func_def && ddp->definition))
-
-#else /* defined (UNPROTOIZE) */
-
- /* ... and if we are unprotoizing and this function is in new style ... */
- ddp->prototyped
-
-#endif /* defined (UNPROTOIZE) */
- )
- /* ... then the containing file needs converting. */
- return -1;
- return 0;
-}
-
-/* Return 1 if the file name NAME is in a directory
- that should be converted. */
-
-static int
-directory_specified_p (const char *name)
-{
- struct string_list *p;
-
- for (p = directory_list; p; p = p->next)
- if (!strncmp (name, p->name, strlen (p->name))
- && IS_DIR_SEPARATOR (name[strlen (p->name)]))
- {
- const char *q = name + strlen (p->name) + 1;
-
- /* If there are more slashes, it's in a subdir, so
- this match doesn't count. */
- while (*q++)
- if (IS_DIR_SEPARATOR (*(q-1)))
- goto lose;
- return 1;
-
- lose: ;
- }
-
- return 0;
-}
-
-/* Return 1 if the file named NAME should be excluded from conversion. */
-
-static int
-file_excluded_p (const char *name)
-{
- struct string_list *p;
- int len = strlen (name);
-
- for (p = exclude_list; p; p = p->next)
- if (!strcmp (name + len - strlen (p->name), p->name)
- && IS_DIR_SEPARATOR (name[len - strlen (p->name) - 1]))
- return 1;
-
- return 0;
-}
-
-/* Construct a new element of a string_list.
- STRING is the new element value, and REST holds the remaining elements. */
-
-static struct string_list *
-string_list_cons (const char *string, struct string_list *rest)
-{
- struct string_list *temp = xmalloc (sizeof (struct string_list));
-
- temp->next = rest;
- temp->name = string;
- return temp;
-}
-
-/* ??? The GNU convention for mentioning function args in its comments
- is to capitalize them. So change "hash_tab_p" to HASH_TAB_P below.
- Likewise for all the other functions. */
-
-/* Given a hash table, apply some function to each node in the table. The
- table to traverse is given as the "hash_tab_p" argument, and the
- function to be applied to each node in the table is given as "func"
- argument. */
-
-static void
-visit_each_hash_node (const hash_table_entry *hash_tab_p,
- void (*func) (const hash_table_entry *))
-{
- const hash_table_entry *primary;
-
- for (primary = hash_tab_p; primary < &hash_tab_p[HASH_TABLE_SIZE]; primary++)
- if (primary->symbol)
- {
- hash_table_entry *second;
-
- (*func)(primary);
- for (second = primary->hash_next; second; second = second->hash_next)
- (*func) (second);
- }
-}
-
-/* Initialize all of the fields of a new hash table entry, pointed
- to by the "p" parameter. Note that the space to hold the entry
- is assumed to have already been allocated before this routine is
- called. */
-
-static hash_table_entry *
-add_symbol (hash_table_entry *p, const char *s)
-{
- p->hash_next = NULL;
- p->symbol = xstrdup (s);
- p->ddip = NULL;
- p->fip = NULL;
- return p;
-}
-
-/* Look for a particular function name or filename in the particular
- hash table indicated by "hash_tab_p". If the name is not in the
- given hash table, add it. Either way, return a pointer to the
- hash table entry for the given name. */
-
-static hash_table_entry *
-lookup (hash_table_entry *hash_tab_p, const char *search_symbol)
-{
- int hash_value = 0;
- const char *search_symbol_char_p = search_symbol;
- hash_table_entry *p;
-
- while (*search_symbol_char_p)
- hash_value += *search_symbol_char_p++;
- hash_value &= hash_mask;
- p = &hash_tab_p[hash_value];
- if (! p->symbol)
- return add_symbol (p, search_symbol);
- if (!strcmp (p->symbol, search_symbol))
- return p;
- while (p->hash_next)
- {
- p = p->hash_next;
- if (!strcmp (p->symbol, search_symbol))
- return p;
- }
- p->hash_next = xmalloc (sizeof (hash_table_entry));
- p = p->hash_next;
- return add_symbol (p, search_symbol);
-}
-
-/* Throw a def/dec record on the junk heap.
-
- Also, since we are not using this record anymore, free up all of the
- stuff it pointed to. */
-
-static void
-free_def_dec (def_dec_info *p)
-{
- free ((NONCONST void *) p->ansi_decl);
-
-#ifndef UNPROTOIZE
- {
- const f_list_chain_item * curr;
- const f_list_chain_item * next;
-
- for (curr = p->f_list_chain; curr; curr = next)
- {
- next = curr->chain_next;
- free ((NONCONST void *) curr);
- }
- }
-#endif /* !defined (UNPROTOIZE) */
-
- free (p);
-}
-
-/* Unexpand as many macro symbols as we can find.
-
- If the given line must be unexpanded, make a copy of it in the heap and
- return a pointer to the unexpanded copy. Otherwise return NULL. */
-
-static char *
-unexpand_if_needed (const char *aux_info_line)
-{
- static char *line_buf = 0;
- static int line_buf_size = 0;
- const unexpansion *unexp_p;
- int got_unexpanded = 0;
- const char *s;
- char *copy_p = line_buf;
-
- if (line_buf == 0)
- {
- line_buf_size = 1024;
- line_buf = xmalloc (line_buf_size);
- }
-
- copy_p = line_buf;
-
- /* Make a copy of the input string in line_buf, expanding as necessary. */
-
- for (s = aux_info_line; *s != '\n'; )
- {
- for (unexp_p = unexpansions; unexp_p->expanded; unexp_p++)
- {
- const char *in_p = unexp_p->expanded;
- size_t len = strlen (in_p);
-
- if (*s == *in_p && !strncmp (s, in_p, len) && !is_id_char (s[len]))
- {
- int size = strlen (unexp_p->contracted);
- got_unexpanded = 1;
- if (copy_p + size - line_buf >= line_buf_size)
- {
- int offset = copy_p - line_buf;
- line_buf_size *= 2;
- line_buf_size += size;
- line_buf = xrealloc (line_buf, line_buf_size);
- copy_p = line_buf + offset;
- }
- strcpy (copy_p, unexp_p->contracted);
- copy_p += size;
-
- /* Assume that there will not be another replacement required
- within the text just replaced. */
-
- s += len;
- goto continue_outer;
- }
- }
- if (copy_p - line_buf == line_buf_size)
- {
- int offset = copy_p - line_buf;
- line_buf_size *= 2;
- line_buf = xrealloc (line_buf, line_buf_size);
- copy_p = line_buf + offset;
- }
- *copy_p++ = *s++;
-continue_outer: ;
- }
- if (copy_p + 2 - line_buf >= line_buf_size)
- {
- int offset = copy_p - line_buf;
- line_buf_size *= 2;
- line_buf = xrealloc (line_buf, line_buf_size);
- copy_p = line_buf + offset;
- }
- *copy_p++ = '\n';
- *copy_p = '\0';
-
- return (got_unexpanded ? savestring (line_buf, copy_p - line_buf) : 0);
-}
-
-/* Return the absolutized filename for the given relative
- filename. Note that if that filename is already absolute, it may
- still be returned in a modified form because this routine also
- eliminates redundant slashes and single dots and eliminates double
- dots to get a shortest possible filename from the given input
- filename. The absolutization of relative filenames is made by
- assuming that the given filename is to be taken as relative to
- the first argument (cwd) or to the current directory if cwd is
- NULL. */
-
-static char *
-abspath (const char *cwd, const char *rel_filename)
-{
- /* Setup the current working directory as needed. */
- const char *const cwd2 = (cwd) ? cwd : cwd_buffer;
- char *const abs_buffer = alloca (strlen (cwd2) + strlen (rel_filename) + 2);
- char *endp = abs_buffer;
- char *outp, *inp;
-
- /* Copy the filename (possibly preceded by the current working
- directory name) into the absolutization buffer. */
-
- {
- const char *src_p;
-
- if (! IS_ABSOLUTE_PATH (rel_filename))
- {
- src_p = cwd2;
- while ((*endp++ = *src_p++))
- continue;
- *(endp-1) = DIR_SEPARATOR; /* overwrite null */
- }
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
- else if (IS_DIR_SEPARATOR (rel_filename[0]))
- {
- /* A path starting with a directory separator is considered absolute
- for dos based filesystems, but it's really not -- it's just the
- convention used throughout GCC and it works. However, in this
- case, we still need to prepend the drive spec from cwd_buffer. */
- *endp++ = cwd2[0];
- *endp++ = cwd2[1];
- }
-#endif
- src_p = rel_filename;
- while ((*endp++ = *src_p++))
- continue;
- }
-
- /* Now make a copy of abs_buffer into abs_buffer, shortening the
- filename (by taking out slashes and dots) as we go. */
-
- outp = inp = abs_buffer;
- *outp++ = *inp++; /* copy first slash */
-#if defined (apollo) || defined (_WIN32) || defined (__INTERIX)
- if (IS_DIR_SEPARATOR (inp[0]))
- *outp++ = *inp++; /* copy second slash */
-#endif
- for (;;)
- {
- if (!inp[0])
- break;
- else if (IS_DIR_SEPARATOR (inp[0]) && IS_DIR_SEPARATOR (outp[-1]))
- {
- inp++;
- continue;
- }
- else if (inp[0] == '.' && IS_DIR_SEPARATOR (outp[-1]))
- {
- if (!inp[1])
- break;
- else if (IS_DIR_SEPARATOR (inp[1]))
- {
- inp += 2;
- continue;
- }
- else if ((inp[1] == '.') && (inp[2] == 0
- || IS_DIR_SEPARATOR (inp[2])))
- {
- inp += (IS_DIR_SEPARATOR (inp[2])) ? 3 : 2;
- outp -= 2;
- while (outp >= abs_buffer && ! IS_DIR_SEPARATOR (*outp))
- outp--;
- if (outp < abs_buffer)
- {
- /* Catch cases like /.. where we try to backup to a
- point above the absolute root of the logical file
- system. */
-
- notice ("%s: invalid file name: %s\n",
- pname, rel_filename);
- exit (FATAL_EXIT_CODE);
- }
- *++outp = '\0';
- continue;
- }
- }
- *outp++ = *inp++;
- }
-
- /* On exit, make sure that there is a trailing null, and make sure that
- the last character of the returned string is *not* a slash. */
-
- *outp = '\0';
- if (IS_DIR_SEPARATOR (outp[-1]))
- *--outp = '\0';
-
- /* Make a copy (in the heap) of the stuff left in the absolutization
- buffer and return a pointer to the copy. */
-
- return savestring (abs_buffer, outp - abs_buffer);
-}
-
-/* Given a filename (and possibly a directory name from which the filename
- is relative) return a string which is the shortest possible
- equivalent for the corresponding full (absolutized) filename. The
- shortest possible equivalent may be constructed by converting the
- absolutized filename to be a relative filename (i.e. relative to
- the actual current working directory). However if a relative filename
- is longer, then the full absolute filename is returned.
-
- KNOWN BUG:
-
- Note that "simple-minded" conversion of any given type of filename (either
- relative or absolute) may not result in a valid equivalent filename if any
- subpart of the original filename is actually a symbolic link. */
-
-static const char *
-shortpath (const char *cwd, const char *filename)
-{
- char *rel_buffer;
- char *rel_buf_p;
- char *cwd_p = cwd_buffer;
- char *path_p;
- int unmatched_slash_count = 0;
- size_t filename_len = strlen (filename);
-
- path_p = abspath (cwd, filename);
- rel_buf_p = rel_buffer = xmalloc (filename_len);
-
- while (*cwd_p && IS_SAME_PATH_CHAR (*cwd_p, *path_p))
- {
- cwd_p++;
- path_p++;
- }
- if (!*cwd_p && (!*path_p || IS_DIR_SEPARATOR (*path_p)))
- {
- /* whole pwd matched */
- if (!*path_p) /* input *is* the current path! */
- return ".";
- else
- return ++path_p;
- }
- else
- {
- if (*path_p)
- {
- --cwd_p;
- --path_p;
- while (! IS_DIR_SEPARATOR (*cwd_p)) /* backup to last slash */
- {
- --cwd_p;
- --path_p;
- }
- cwd_p++;
- path_p++;
- unmatched_slash_count++;
- }
-
- /* Find out how many directory levels in cwd were *not* matched. */
- while (*cwd_p++)
- if (IS_DIR_SEPARATOR (*(cwd_p-1)))
- unmatched_slash_count++;
-
- /* Now we know how long the "short name" will be.
- Reject it if longer than the input. */
- if (unmatched_slash_count * 3 + strlen (path_p) >= filename_len)
- return filename;
-
- /* For each of them, put a `../' at the beginning of the short name. */
- while (unmatched_slash_count--)
- {
- /* Give up if the result gets to be longer
- than the absolute path name. */
- if (rel_buffer + filename_len <= rel_buf_p + 3)
- return filename;
- *rel_buf_p++ = '.';
- *rel_buf_p++ = '.';
- *rel_buf_p++ = DIR_SEPARATOR;
- }
-
- /* Then tack on the unmatched part of the desired file's name. */
- do
- {
- if (rel_buffer + filename_len <= rel_buf_p)
- return filename;
- }
- while ((*rel_buf_p++ = *path_p++));
-
- --rel_buf_p;
- if (IS_DIR_SEPARATOR (*(rel_buf_p-1)))
- *--rel_buf_p = '\0';
- return rel_buffer;
- }
-}
-
-/* Lookup the given filename in the hash table for filenames. If it is a
- new one, then the hash table info pointer will be null. In this case,
- we create a new file_info record to go with the filename, and we initialize
- that record with some reasonable values. */
-
-/* FILENAME was const, but that causes a warning on AIX when calling stat.
- That is probably a bug in AIX, but might as well avoid the warning. */
-
-static file_info *
-find_file (const char *filename, int do_not_stat)
-{
- hash_table_entry *hash_entry_p;
-
- hash_entry_p = lookup (filename_primary, filename);
- if (hash_entry_p->fip)
- return hash_entry_p->fip;
- else
- {
- struct stat stat_buf;
- file_info *file_p = xmalloc (sizeof (file_info));
-
- /* If we cannot get status on any given source file, give a warning
- and then just set its time of last modification to infinity. */
-
- if (do_not_stat)
- stat_buf.st_mtime = (time_t) 0;
- else
- {
- if (stat (filename, &stat_buf) == -1)
- {
- int errno_val = errno;
- notice ("%s: %s: can't get status: %s\n",
- pname, shortpath (NULL, filename),
- xstrerror (errno_val));
- stat_buf.st_mtime = (time_t) -1;
- }
- }
-
- hash_entry_p->fip = file_p;
- file_p->hash_entry = hash_entry_p;
- file_p->defs_decs = NULL;
- file_p->mtime = stat_buf.st_mtime;
- return file_p;
- }
-}
-
-/* Generate a fatal error because some part of the aux_info file is
- messed up. */
-
-static void
-aux_info_corrupted (void)
-{
- notice ("\n%s: fatal error: aux info file corrupted at line %d\n",
- pname, current_aux_info_lineno);
- exit (FATAL_EXIT_CODE);
-}
-
-/* ??? This comment is vague. Say what the condition is for. */
-/* Check to see that a condition is true. This is kind of like an assert. */
-
-static void
-check_aux_info (int cond)
-{
- if (! cond)
- aux_info_corrupted ();
-}
-
-/* Given a pointer to the closing right parenthesis for a particular formals
- list (in an aux_info file) find the corresponding left parenthesis and
- return a pointer to it. */
-
-static const char *
-find_corresponding_lparen (const char *p)
-{
- const char *q;
- int paren_depth;
-
- for (paren_depth = 1, q = p-1; paren_depth; q--)
- {
- switch (*q)
- {
- case ')':
- paren_depth++;
- break;
- case '(':
- paren_depth--;
- break;
- }
- }
- return ++q;
-}
-
-/* Given a line from an aux info file, and a time at which the aux info
- file it came from was created, check to see if the item described in
- the line comes from a file which has been modified since the aux info
- file was created. If so, return nonzero, else return zero. */
-
-static int
-referenced_file_is_newer (const char *l, time_t aux_info_mtime)
-{
- const char *p;
- file_info *fi_p;
- char *filename;
-
- check_aux_info (l[0] == '/');
- check_aux_info (l[1] == '*');
- check_aux_info (l[2] == ' ');
-
- {
- const char *filename_start = p = l + 3;
-
- while (*p != ':'
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
- || (*p == ':' && *p && *(p+1) && IS_DIR_SEPARATOR (*(p+1)))
-#endif
- )
- p++;
- filename = alloca ((size_t) (p - filename_start) + 1);
- strncpy (filename, filename_start, (size_t) (p - filename_start));
- filename[p-filename_start] = '\0';
- }
-
- /* Call find_file to find the file_info record associated with the file
- which contained this particular def or dec item. Note that this call
- may cause a new file_info record to be created if this is the first time
- that we have ever known about this particular file. */
-
- fi_p = find_file (abspath (invocation_filename, filename), 0);
-
- return (fi_p->mtime > aux_info_mtime);
-}
-
-/* Given a line of info from the aux_info file, create a new
- def_dec_info record to remember all of the important information about
- a function definition or declaration.
-
- Link this record onto the list of such records for the particular file in
- which it occurred in proper (descending) line number order (for now).
-
- If there is an identical record already on the list for the file, throw
- this one away. Doing so takes care of the (useless and troublesome)
- duplicates which are bound to crop up due to multiple inclusions of any
- given individual header file.
-
- Finally, link the new def_dec record onto the list of such records
- pertaining to this particular function name. */
-
-static void
-save_def_or_dec (const char *l, int is_syscalls)
-{
- const char *p;
- const char *semicolon_p;
- def_dec_info *def_dec_p = xmalloc (sizeof (def_dec_info));
-
-#ifndef UNPROTOIZE
- def_dec_p->written = 0;
-#endif /* !defined (UNPROTOIZE) */
-
- /* Start processing the line by picking off 5 pieces of information from
- the left hand end of the line. These are filename, line number,
- new/old/implicit flag (new = ANSI prototype format), definition or
- declaration flag, and extern/static flag). */
-
- check_aux_info (l[0] == '/');
- check_aux_info (l[1] == '*');
- check_aux_info (l[2] == ' ');
-
- {
- const char *filename_start = p = l + 3;
- char *filename;
-
- while (*p != ':'
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
- || (*p == ':' && *p && *(p+1) && IS_DIR_SEPARATOR (*(p+1)))
-#endif
- )
- p++;
- filename = alloca ((size_t) (p - filename_start) + 1);
- strncpy (filename, filename_start, (size_t) (p - filename_start));
- filename[p-filename_start] = '\0';
-
- /* Call find_file to find the file_info record associated with the file
- which contained this particular def or dec item. Note that this call
- may cause a new file_info record to be created if this is the first time
- that we have ever known about this particular file.
-
- Note that we started out by forcing all of the base source file names
- (i.e. the names of the aux_info files with the .X stripped off) into the
- filenames hash table, and we simultaneously setup file_info records for
- all of these base file names (even if they may be useless later).
- The file_info records for all of these "base" file names (properly)
- act as file_info records for the "original" (i.e. un-included) files
- which were submitted to gcc for compilation (when the -aux-info
- option was used). */
-
- def_dec_p->file = find_file (abspath (invocation_filename, filename), is_syscalls);
- }
-
- {
- const char *line_number_start = ++p;
- char line_number[10];
-
- while (*p != ':'
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
- || (*p == ':' && *p && *(p+1) && IS_DIR_SEPARATOR (*(p+1)))
-#endif
- )
- p++;
- strncpy (line_number, line_number_start, (size_t) (p - line_number_start));
- line_number[p-line_number_start] = '\0';
- def_dec_p->line = atoi (line_number);
- }
-
- /* Check that this record describes a new-style, old-style, or implicit
- definition or declaration. */
-
- p++; /* Skip over the `:'. */
- check_aux_info ((*p == 'N') || (*p == 'O') || (*p == 'I'));
-
- /* Is this a new style (ANSI prototyped) definition or declaration? */
-
- def_dec_p->prototyped = (*p == 'N');
-
-#ifndef UNPROTOIZE
-
- /* Is this an implicit declaration? */
-
- def_dec_p->is_implicit = (*p == 'I');
-
-#endif /* !defined (UNPROTOIZE) */
-
- p++;
-
- check_aux_info ((*p == 'C') || (*p == 'F'));
-
- /* Is this item a function definition (F) or a declaration (C). Note that
- we treat item taken from the syscalls file as though they were function
- definitions regardless of what the stuff in the file says. */
-
- def_dec_p->is_func_def = ((*p++ == 'F') || is_syscalls);
-
-#ifndef UNPROTOIZE
- def_dec_p->definition = 0; /* Fill this in later if protoizing. */
-#endif /* !defined (UNPROTOIZE) */
-
- check_aux_info (*p++ == ' ');
- check_aux_info (*p++ == '*');
- check_aux_info (*p++ == '/');
- check_aux_info (*p++ == ' ');
-
-#ifdef UNPROTOIZE
- check_aux_info ((!strncmp (p, "static", 6)) || (!strncmp (p, "extern", 6)));
-#else /* !defined (UNPROTOIZE) */
- if (!strncmp (p, "static", 6))
- def_dec_p->is_static = -1;
- else if (!strncmp (p, "extern", 6))
- def_dec_p->is_static = 0;
- else
- check_aux_info (0); /* Didn't find either `extern' or `static'. */
-#endif /* !defined (UNPROTOIZE) */
-
- {
- const char *ansi_start = p;
-
- p += 6; /* Pass over the "static" or "extern". */
-
- /* We are now past the initial stuff. Search forward from here to find
- the terminating semicolon that should immediately follow the entire
- ANSI format function declaration. */
-
- while (*++p != ';')
- continue;
-
- semicolon_p = p;
-
- /* Make a copy of the ansi declaration part of the line from the aux_info
- file. */
-
- def_dec_p->ansi_decl
- = dupnstr (ansi_start, (size_t) ((semicolon_p+1) - ansi_start));
-
- /* Backup and point at the final right paren of the final argument list. */
-
- p--;
-
-#ifndef UNPROTOIZE
- def_dec_p->f_list_chain = NULL;
-#endif /* !defined (UNPROTOIZE) */
-
- while (p != ansi_start && (p[-1] == ' ' || p[-1] == '\t')) p--;
- if (*p != ')')
- {
- free_def_dec (def_dec_p);
- return;
- }
- }
-
- /* Now isolate a whole set of formal argument lists, one-by-one. Normally,
- there will only be one list to isolate, but there could be more. */
-
- def_dec_p->f_list_count = 0;
-
- for (;;)
- {
- const char *left_paren_p = find_corresponding_lparen (p);
-#ifndef UNPROTOIZE
- {
- f_list_chain_item *cip = xmalloc (sizeof (f_list_chain_item));
-
- cip->formals_list
- = dupnstr (left_paren_p + 1, (size_t) (p - (left_paren_p+1)));
-
- /* Add the new chain item at the head of the current list. */
-
- cip->chain_next = def_dec_p->f_list_chain;
- def_dec_p->f_list_chain = cip;
- }
-#endif /* !defined (UNPROTOIZE) */
- def_dec_p->f_list_count++;
-
- p = left_paren_p - 2;
-
- /* p must now point either to another right paren, or to the last
- character of the name of the function that was declared/defined.
- If p points to another right paren, then this indicates that we
- are dealing with multiple formals lists. In that case, there
- really should be another right paren preceding this right paren. */
-
- if (*p != ')')
- break;
- else
- check_aux_info (*--p == ')');
- }
-
-
- {
- const char *past_fn = p + 1;
-
- check_aux_info (*past_fn == ' ');
-
- /* Scan leftwards over the identifier that names the function. */
-
- while (is_id_char (*p))
- p--;
- p++;
-
- /* p now points to the leftmost character of the function name. */
-
- {
- char *fn_string = alloca (past_fn - p + 1);
-
- strncpy (fn_string, p, (size_t) (past_fn - p));
- fn_string[past_fn-p] = '\0';
- def_dec_p->hash_entry = lookup (function_name_primary, fn_string);
- }
- }
-
- /* Look at all of the defs and decs for this function name that we have
- collected so far. If there is already one which is at the same
- line number in the same file, then we can discard this new def_dec_info
- record.
-
- As an extra assurance that any such pair of (nominally) identical
- function declarations are in fact identical, we also compare the
- ansi_decl parts of the lines from the aux_info files just to be on
- the safe side.
-
- This comparison will fail if (for instance) the user was playing
- messy games with the preprocessor which ultimately causes one
- function declaration in one header file to look differently when
- that file is included by two (or more) other files. */
-
- {
- const def_dec_info *other;
-
- for (other = def_dec_p->hash_entry->ddip; other; other = other->next_for_func)
- {
- if (def_dec_p->line == other->line && def_dec_p->file == other->file)
- {
- if (strcmp (def_dec_p->ansi_decl, other->ansi_decl))
- {
- notice ("%s:%d: declaration of function '%s' takes different forms\n",
- def_dec_p->file->hash_entry->symbol,
- def_dec_p->line,
- def_dec_p->hash_entry->symbol);
- exit (FATAL_EXIT_CODE);
- }
- free_def_dec (def_dec_p);
- return;
- }
- }
- }
-
-#ifdef UNPROTOIZE
-
- /* If we are doing unprotoizing, we must now setup the pointers that will
- point to the K&R name list and to the K&R argument declarations list.
-
- Note that if this is only a function declaration, then we should not
- expect to find any K&R style formals list following the ANSI-style
- formals list. This is because GCC knows that such information is
- useless in the case of function declarations (function definitions
- are a different story however).
-
- Since we are unprotoizing, we don't need any such lists anyway.
- All we plan to do is to delete all characters between ()'s in any
- case. */
-
- def_dec_p->formal_names = NULL;
- def_dec_p->formal_decls = NULL;
-
- if (def_dec_p->is_func_def)
- {
- p = semicolon_p;
- check_aux_info (*++p == ' ');
- check_aux_info (*++p == '/');
- check_aux_info (*++p == '*');
- check_aux_info (*++p == ' ');
- check_aux_info (*++p == '(');
-
- {
- const char *kr_names_start = ++p; /* Point just inside '('. */
-
- while (*p++ != ')')
- continue;
- p--; /* point to closing right paren */
-
- /* Make a copy of the K&R parameter names list. */
-
- def_dec_p->formal_names
- = dupnstr (kr_names_start, (size_t) (p - kr_names_start));
- }
-
- check_aux_info (*++p == ' ');
- p++;
-
- /* p now points to the first character of the K&R style declarations
- list (if there is one) or to the star-slash combination that ends
- the comment in which such lists get embedded. */
-
- /* Make a copy of the K&R formal decls list and set the def_dec record
- to point to it. */
-
- if (*p == '*') /* Are there no K&R declarations? */
- {
- check_aux_info (*++p == '/');
- def_dec_p->formal_decls = "";
- }
- else
- {
- const char *kr_decls_start = p;
-
- while (p[0] != '*' || p[1] != '/')
- p++;
- p--;
-
- check_aux_info (*p == ' ');
-
- def_dec_p->formal_decls
- = dupnstr (kr_decls_start, (size_t) (p - kr_decls_start));
- }
-
- /* Handle a special case. If we have a function definition marked as
- being in "old" style, and if its formal names list is empty, then
- it may actually have the string "void" in its real formals list
- in the original source code. Just to make sure, we will get setup
- to convert such things anyway.
-
- This kludge only needs to be here because of an insurmountable
- problem with generating .X files. */
-
- if (!def_dec_p->prototyped && !*def_dec_p->formal_names)
- def_dec_p->prototyped = 1;
- }
-
- /* Since we are unprotoizing, if this item is already in old (K&R) style,
- we can just ignore it. If that is true, throw away the item now. */
-
- if (!def_dec_p->prototyped)
- {
- free_def_dec (def_dec_p);
- return;
- }
-
-#endif /* defined (UNPROTOIZE) */
-
- /* Add this record to the head of the list of records pertaining to this
- particular function name. */
-
- def_dec_p->next_for_func = def_dec_p->hash_entry->ddip;
- def_dec_p->hash_entry->ddip = def_dec_p;
-
- /* Add this new def_dec_info record to the sorted list of def_dec_info
- records for this file. Note that we don't have to worry about duplicates
- (caused by multiple inclusions of header files) here because we have
- already eliminated duplicates above. */
-
- if (!def_dec_p->file->defs_decs)
- {
- def_dec_p->file->defs_decs = def_dec_p;
- def_dec_p->next_in_file = NULL;
- }
- else
- {
- int line = def_dec_p->line;
- const def_dec_info *prev = NULL;
- const def_dec_info *curr = def_dec_p->file->defs_decs;
- const def_dec_info *next = curr->next_in_file;
-
- while (next && (line < curr->line))
- {
- prev = curr;
- curr = next;
- next = next->next_in_file;
- }
- if (line >= curr->line)
- {
- def_dec_p->next_in_file = curr;
- if (prev)
- ((NONCONST def_dec_info *) prev)->next_in_file = def_dec_p;
- else
- def_dec_p->file->defs_decs = def_dec_p;
- }
- else /* assert (next == NULL); */
- {
- ((NONCONST def_dec_info *) curr)->next_in_file = def_dec_p;
- /* assert (next == NULL); */
- def_dec_p->next_in_file = next;
- }
- }
-}
-
-/* Set up the vector COMPILE_PARAMS which is the argument list for running GCC.
- Also set input_file_name_index and aux_info_file_name_index
- to the indices of the slots where the file names should go. */
-
-/* We initialize the vector by removing -g, -O, -S, -c, and -o options,
- and adding '-aux-info AUXFILE -S -o /dev/null INFILE' at the end. */
-
-static void
-munge_compile_params (const char *params_list)
-{
- /* Build up the contents in a temporary vector
- that is so big that to has to be big enough. */
- const char **temp_params
- = alloca ((strlen (params_list) + 8) * sizeof (char *));
- int param_count = 0;
- const char *param;
- struct stat st;
-
- temp_params[param_count++] = compiler_file_name;
- for (;;)
- {
- while (ISSPACE ((const unsigned char)*params_list))
- params_list++;
- if (!*params_list)
- break;
- param = params_list;
- while (*params_list && !ISSPACE ((const unsigned char)*params_list))
- params_list++;
- if (param[0] != '-')
- temp_params[param_count++]
- = dupnstr (param, (size_t) (params_list - param));
- else
- {
- switch (param[1])
- {
- case 'g':
- case 'O':
- case 'S':
- case 'c':
- break; /* Don't copy these. */
- case 'o':
- while (ISSPACE ((const unsigned char)*params_list))
- params_list++;
- while (*params_list
- && !ISSPACE ((const unsigned char)*params_list))
- params_list++;
- break;
- default:
- temp_params[param_count++]
- = dupnstr (param, (size_t) (params_list - param));
- }
- }
- if (!*params_list)
- break;
- }
- temp_params[param_count++] = "-aux-info";
-
- /* Leave room for the aux-info file name argument. */
- aux_info_file_name_index = param_count;
- temp_params[param_count++] = NULL;
-
- temp_params[param_count++] = "-S";
- temp_params[param_count++] = "-o";
-
- if ((stat (HOST_BIT_BUCKET, &st) == 0)
- && (!S_ISDIR (st.st_mode))
- && (access (HOST_BIT_BUCKET, W_OK) == 0))
- temp_params[param_count++] = HOST_BIT_BUCKET;
- else
- /* FIXME: This is hardly likely to be right, if HOST_BIT_BUCKET is not
- writable. But until this is rejigged to use make_temp_file(), this
- is the best we can do. */
- temp_params[param_count++] = "/dev/null";
-
- /* Leave room for the input file name argument. */
- input_file_name_index = param_count;
- temp_params[param_count++] = NULL;
- /* Terminate the list. */
- temp_params[param_count++] = NULL;
-
- /* Make a copy of the compile_params in heap space. */
-
- compile_params = xmalloc (sizeof (char *) * (param_count+1));
- memcpy (compile_params, temp_params, sizeof (char *) * param_count);
-}
-
-/* Do a recompilation for the express purpose of generating a new aux_info
- file to go with a specific base source file.
-
- The result is a boolean indicating success. */
-
-static int
-gen_aux_info_file (const char *base_filename)
-{
- if (!input_file_name_index)
- munge_compile_params ("");
-
- /* Store the full source file name in the argument vector. */
- compile_params[input_file_name_index] = shortpath (NULL, base_filename);
- /* Add .X to source file name to get aux-info file name. */
- compile_params[aux_info_file_name_index] =
- concat (compile_params[input_file_name_index], aux_info_suffix, NULL);
-
- if (!quiet_flag)
- notice ("%s: compiling '%s'\n",
- pname, compile_params[input_file_name_index]);
-
- {
- char *errmsg_fmt, *errmsg_arg;
- int wait_status, pid;
-
- pid = pexecute (compile_params[0], (char * const *) compile_params,
- pname, NULL, &errmsg_fmt, &errmsg_arg,
- PEXECUTE_FIRST | PEXECUTE_LAST | PEXECUTE_SEARCH);
-
- if (pid == -1)
- {
- int errno_val = errno;
- fprintf (stderr, "%s: ", pname);
- fprintf (stderr, errmsg_fmt, errmsg_arg);
- fprintf (stderr, ": %s\n", xstrerror (errno_val));
- return 0;
- }
-
- pid = pwait (pid, &wait_status, 0);
- if (pid == -1)
- {
- notice ("%s: wait: %s\n", pname, xstrerror (errno));
- return 0;
- }
- if (WIFSIGNALED (wait_status))
- {
- notice ("%s: subprocess got fatal signal %d\n",
- pname, WTERMSIG (wait_status));
- return 0;
- }
- if (WIFEXITED (wait_status))
- {
- if (WEXITSTATUS (wait_status) != 0)
- {
- notice ("%s: %s exited with status %d\n",
- pname, compile_params[0], WEXITSTATUS (wait_status));
- return 0;
- }
- return 1;
- }
- gcc_unreachable ();
- }
-}
-
-/* Read in all of the information contained in a single aux_info file.
- Save all of the important stuff for later. */
-
-static void
-process_aux_info_file (const char *base_source_filename, int keep_it,
- int is_syscalls)
-{
- size_t base_len = strlen (base_source_filename);
- char * aux_info_filename = alloca (base_len + strlen (aux_info_suffix) + 1);
- char *aux_info_base;
- char *aux_info_limit;
- char *aux_info_relocated_name;
- const char *aux_info_second_line;
- time_t aux_info_mtime;
- size_t aux_info_size;
- int must_create;
-
- /* Construct the aux_info filename from the base source filename. */
-
- strcpy (aux_info_filename, base_source_filename);
- strcat (aux_info_filename, aux_info_suffix);
-
- /* Check that the aux_info file exists and is readable. If it does not
- exist, try to create it (once only). */
-
- /* If file doesn't exist, set must_create.
- Likewise if it exists and we can read it but it is obsolete.
- Otherwise, report an error. */
- must_create = 0;
-
- /* Come here with must_create set to 1 if file is out of date. */
-start_over: ;
-
- if (access (aux_info_filename, R_OK) == -1)
- {
- if (errno == ENOENT)
- {
- if (is_syscalls)
- {
- notice ("%s: warning: missing SYSCALLS file '%s'\n",
- pname, aux_info_filename);
- return;
- }
- must_create = 1;
- }
- else
- {
- int errno_val = errno;
- notice ("%s: can't read aux info file '%s': %s\n",
- pname, shortpath (NULL, aux_info_filename),
- xstrerror (errno_val));
- errors++;
- return;
- }
- }
-#if 0 /* There is code farther down to take care of this. */
- else
- {
- struct stat s1, s2;
- stat (aux_info_file_name, &s1);
- stat (base_source_file_name, &s2);
- if (s2.st_mtime > s1.st_mtime)
- must_create = 1;
- }
-#endif /* 0 */
-
- /* If we need a .X file, create it, and verify we can read it. */
- if (must_create)
- {
- if (!gen_aux_info_file (base_source_filename))
- {
- errors++;
- return;
- }
- if (access (aux_info_filename, R_OK) == -1)
- {
- int errno_val = errno;
- notice ("%s: can't read aux info file '%s': %s\n",
- pname, shortpath (NULL, aux_info_filename),
- xstrerror (errno_val));
- errors++;
- return;
- }
- }
-
- {
- struct stat stat_buf;
-
- /* Get some status information about this aux_info file. */
-
- if (stat (aux_info_filename, &stat_buf) == -1)
- {
- int errno_val = errno;
- notice ("%s: can't get status of aux info file '%s': %s\n",
- pname, shortpath (NULL, aux_info_filename),
- xstrerror (errno_val));
- errors++;
- return;
- }
-
- /* Check on whether or not this aux_info file is zero length. If it is,
- then just ignore it and return. */
-
- if ((aux_info_size = stat_buf.st_size) == 0)
- return;
-
- /* Get the date/time of last modification for this aux_info file and
- remember it. We will have to check that any source files that it
- contains information about are at least this old or older. */
-
- aux_info_mtime = stat_buf.st_mtime;
-
- if (!is_syscalls)
- {
- /* Compare mod time with the .c file; update .X file if obsolete.
- The code later on can fail to check the .c file
- if it did not directly define any functions. */
-
- if (stat (base_source_filename, &stat_buf) == -1)
- {
- int errno_val = errno;
- notice ("%s: can't get status of aux info file '%s': %s\n",
- pname, shortpath (NULL, base_source_filename),
- xstrerror (errno_val));
- errors++;
- return;
- }
- if (stat_buf.st_mtime > aux_info_mtime)
- {
- must_create = 1;
- goto start_over;
- }
- }
- }
-
- {
- int aux_info_file;
- int fd_flags;
-
- /* Open the aux_info file. */
-
- fd_flags = O_RDONLY;
-#ifdef O_BINARY
- /* Use binary mode to avoid having to deal with different EOL characters. */
- fd_flags |= O_BINARY;
-#endif
- if ((aux_info_file = open (aux_info_filename, fd_flags, 0444 )) == -1)
- {
- int errno_val = errno;
- notice ("%s: can't open aux info file '%s' for reading: %s\n",
- pname, shortpath (NULL, aux_info_filename),
- xstrerror (errno_val));
- return;
- }
-
- /* Allocate space to hold the aux_info file in memory. */
-
- aux_info_base = xmalloc (aux_info_size + 1);
- aux_info_limit = aux_info_base + aux_info_size;
- *aux_info_limit = '\0';
-
- /* Read the aux_info file into memory. */
-
- if (safe_read (aux_info_file, aux_info_base, aux_info_size) !=
- (int) aux_info_size)
- {
- int errno_val = errno;
- notice ("%s: error reading aux info file '%s': %s\n",
- pname, shortpath (NULL, aux_info_filename),
- xstrerror (errno_val));
- free (aux_info_base);
- close (aux_info_file);
- return;
- }
-
- /* Close the aux info file. */
-
- if (close (aux_info_file))
- {
- int errno_val = errno;
- notice ("%s: error closing aux info file '%s': %s\n",
- pname, shortpath (NULL, aux_info_filename),
- xstrerror (errno_val));
- free (aux_info_base);
- close (aux_info_file);
- return;
- }
- }
-
- /* Delete the aux_info file (unless requested not to). If the deletion
- fails for some reason, don't even worry about it. */
-
- if (must_create && !keep_it)
- if (unlink (aux_info_filename) == -1)
- {
- int errno_val = errno;
- notice ("%s: can't delete aux info file '%s': %s\n",
- pname, shortpath (NULL, aux_info_filename),
- xstrerror (errno_val));
- }
-
- /* Save a pointer into the first line of the aux_info file which
- contains the filename of the directory from which the compiler
- was invoked when the associated source file was compiled.
- This information is used later to help create complete
- filenames out of the (potentially) relative filenames in
- the aux_info file. */
-
- {
- char *p = aux_info_base;
-
- while (*p != ':'
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
- || (*p == ':' && *p && *(p+1) && IS_DIR_SEPARATOR (*(p+1)))
-#endif
- )
- p++;
- p++;
- while (*p == ' ')
- p++;
- invocation_filename = p; /* Save a pointer to first byte of path. */
- while (*p != ' ')
- p++;
- *p++ = DIR_SEPARATOR;
- *p++ = '\0';
- while (*p++ != '\n')
- continue;
- aux_info_second_line = p;
- aux_info_relocated_name = 0;
- if (! IS_ABSOLUTE_PATH (invocation_filename))
- {
- /* INVOCATION_FILENAME is relative;
- append it to BASE_SOURCE_FILENAME's dir. */
- char *dir_end;
- aux_info_relocated_name = xmalloc (base_len + (p-invocation_filename));
- strcpy (aux_info_relocated_name, base_source_filename);
- dir_end = strrchr (aux_info_relocated_name, DIR_SEPARATOR);
-#ifdef DIR_SEPARATOR_2
- {
- char *slash;
-
- slash = strrchr (dir_end ? dir_end : aux_info_relocated_name,
- DIR_SEPARATOR_2);
- if (slash)
- dir_end = slash;
- }
-#endif
- if (dir_end)
- dir_end++;
- else
- dir_end = aux_info_relocated_name;
- strcpy (dir_end, invocation_filename);
- invocation_filename = aux_info_relocated_name;
- }
- }
-
-
- {
- const char *aux_info_p;
-
- /* Do a pre-pass on the lines in the aux_info file, making sure that all
- of the source files referenced in there are at least as old as this
- aux_info file itself. If not, go back and regenerate the aux_info
- file anew. Don't do any of this for the syscalls file. */
-
- if (!is_syscalls)
- {
- current_aux_info_lineno = 2;
-
- for (aux_info_p = aux_info_second_line; *aux_info_p; )
- {
- if (referenced_file_is_newer (aux_info_p, aux_info_mtime))
- {
- free (aux_info_base);
- free (aux_info_relocated_name);
- if (keep_it && unlink (aux_info_filename) == -1)
- {
- int errno_val = errno;
- notice ("%s: can't delete file '%s': %s\n",
- pname, shortpath (NULL, aux_info_filename),
- xstrerror (errno_val));
- return;
- }
- must_create = 1;
- goto start_over;
- }
-
- /* Skip over the rest of this line to start of next line. */
-
- while (*aux_info_p != '\n')
- aux_info_p++;
- aux_info_p++;
- current_aux_info_lineno++;
- }
- }
-
- /* Now do the real pass on the aux_info lines. Save their information in
- the in-core data base. */
-
- current_aux_info_lineno = 2;
-
- for (aux_info_p = aux_info_second_line; *aux_info_p;)
- {
- char *unexpanded_line = unexpand_if_needed (aux_info_p);
-
- if (unexpanded_line)
- {
- save_def_or_dec (unexpanded_line, is_syscalls);
- free (unexpanded_line);
- }
- else
- save_def_or_dec (aux_info_p, is_syscalls);
-
- /* Skip over the rest of this line and get to start of next line. */
-
- while (*aux_info_p != '\n')
- aux_info_p++;
- aux_info_p++;
- current_aux_info_lineno++;
- }
- }
-
- free (aux_info_base);
- free (aux_info_relocated_name);
-}
-
-#ifndef UNPROTOIZE
-
-/* Check an individual filename for a .c suffix. If the filename has this
- suffix, rename the file such that its suffix is changed to .C. This
- function implements the -C option. */
-
-static void
-rename_c_file (const hash_table_entry *hp)
-{
- const char *filename = hp->symbol;
- int last_char_index = strlen (filename) - 1;
- char *const new_filename = alloca (strlen (filename)
- + strlen (cplus_suffix) + 1);
-
- /* Note that we don't care here if the given file was converted or not. It
- is possible that the given file was *not* converted, simply because there
- was nothing in it which actually required conversion. Even in this case,
- we want to do the renaming. Note that we only rename files with the .c
- suffix (except for the syscalls file, which is left alone). */
-
- if (filename[last_char_index] != 'c' || filename[last_char_index-1] != '.'
- || IS_SAME_PATH (syscalls_absolute_filename, filename))
- return;
-
- strcpy (new_filename, filename);
- strcpy (&new_filename[last_char_index], cplus_suffix);
-
- if (rename (filename, new_filename) == -1)
- {
- int errno_val = errno;
- notice ("%s: warning: can't rename file '%s' to '%s': %s\n",
- pname, shortpath (NULL, filename),
- shortpath (NULL, new_filename), xstrerror (errno_val));
- errors++;
- return;
- }
-}
-
-#endif /* !defined (UNPROTOIZE) */
-
-/* Take the list of definitions and declarations attached to a particular
- file_info node and reverse the order of the list. This should get the
- list into an order such that the item with the lowest associated line
- number is nearest the head of the list. When these lists are originally
- built, they are in the opposite order. We want to traverse them in
- normal line number order later (i.e. lowest to highest) so reverse the
- order here. */
-
-static void
-reverse_def_dec_list (const hash_table_entry *hp)
-{
- file_info *file_p = hp->fip;
- def_dec_info *prev = NULL;
- def_dec_info *current = (def_dec_info *) file_p->defs_decs;
-
- if (!current)
- return; /* no list to reverse */
-
- prev = current;
- if (! (current = (def_dec_info *) current->next_in_file))
- return; /* can't reverse a single list element */
-
- prev->next_in_file = NULL;
-
- while (current)
- {
- def_dec_info *next = (def_dec_info *) current->next_in_file;
-
- current->next_in_file = prev;
- prev = current;
- current = next;
- }
-
- file_p->defs_decs = prev;
-}
-
-#ifndef UNPROTOIZE
-
-/* Find the (only?) extern definition for a particular function name, starting
- from the head of the linked list of entries for the given name. If we
- cannot find an extern definition for the given function name, issue a
- warning and scrounge around for the next best thing, i.e. an extern
- function declaration with a prototype attached to it. Note that we only
- allow such substitutions for extern declarations and never for static
- declarations. That's because the only reason we allow them at all is
- to let un-prototyped function declarations for system-supplied library
- functions get their prototypes from our own extra SYSCALLS.c.X file which
- contains all of the correct prototypes for system functions. */
-
-static const def_dec_info *
-find_extern_def (const def_dec_info *head, const def_dec_info *user)
-{
- const def_dec_info *dd_p;
- const def_dec_info *extern_def_p = NULL;
- int conflict_noted = 0;
-
- /* Don't act too stupid here. Somebody may try to convert an entire system
- in one swell fwoop (rather than one program at a time, as should be done)
- and in that case, we may find that there are multiple extern definitions
- of a given function name in the entire set of source files that we are
- converting. If however one of these definitions resides in exactly the
- same source file as the reference we are trying to satisfy then in that
- case it would be stupid for us to fail to realize that this one definition
- *must* be the precise one we are looking for.
-
- To make sure that we don't miss an opportunity to make this "same file"
- leap of faith, we do a prescan of the list of records relating to the
- given function name, and we look (on this first scan) *only* for a
- definition of the function which is in the same file as the reference
- we are currently trying to satisfy. */
-
- for (dd_p = head; dd_p; dd_p = dd_p->next_for_func)
- if (dd_p->is_func_def && !dd_p->is_static && dd_p->file == user->file)
- return dd_p;
-
- /* Now, since we have not found a definition in the same file as the
- reference, we scan the list again and consider all possibilities from
- all files. Here we may get conflicts with the things listed in the
- SYSCALLS.c.X file, but if that happens it only means that the source
- code being converted contains its own definition of a function which
- could have been supplied by libc.a. In such cases, we should avoid
- issuing the normal warning, and defer to the definition given in the
- user's own code. */
-
- for (dd_p = head; dd_p; dd_p = dd_p->next_for_func)
- if (dd_p->is_func_def && !dd_p->is_static)
- {
- if (!extern_def_p) /* Previous definition? */
- extern_def_p = dd_p; /* Remember the first definition found. */
- else
- {
- /* Ignore definition just found if it came from SYSCALLS.c.X. */
-
- if (is_syscalls_file (dd_p->file))
- continue;
-
- /* Quietly replace the definition previously found with the one
- just found if the previous one was from SYSCALLS.c.X. */
-
- if (is_syscalls_file (extern_def_p->file))
- {
- extern_def_p = dd_p;
- continue;
- }
-
- /* If we get here, then there is a conflict between two function
- declarations for the same function, both of which came from the
- user's own code. */
-
- if (!conflict_noted) /* first time we noticed? */
- {
- conflict_noted = 1;
- notice ("%s: conflicting extern definitions of '%s'\n",
- pname, head->hash_entry->symbol);
- if (!quiet_flag)
- {
- notice ("%s: declarations of '%s' will not be converted\n",
- pname, head->hash_entry->symbol);
- notice ("%s: conflict list for '%s' follows:\n",
- pname, head->hash_entry->symbol);
- fprintf (stderr, "%s: %s(%d): %s\n",
- pname,
- shortpath (NULL, extern_def_p->file->hash_entry->symbol),
- extern_def_p->line, extern_def_p->ansi_decl);
- }
- }
- if (!quiet_flag)
- fprintf (stderr, "%s: %s(%d): %s\n",
- pname,
- shortpath (NULL, dd_p->file->hash_entry->symbol),
- dd_p->line, dd_p->ansi_decl);
- }
- }
-
- /* We want to err on the side of caution, so if we found multiple conflicting
- definitions for the same function, treat this as being that same as if we
- had found no definitions (i.e. return NULL). */
-
- if (conflict_noted)
- return NULL;
-
- if (!extern_def_p)
- {
- /* We have no definitions for this function so do the next best thing.
- Search for an extern declaration already in prototype form. */
-
- for (dd_p = head; dd_p; dd_p = dd_p->next_for_func)
- if (!dd_p->is_func_def && !dd_p->is_static && dd_p->prototyped)
- {
- extern_def_p = dd_p; /* save a pointer to the definition */
- if (!quiet_flag)
- notice ("%s: warning: using formals list from %s(%d) for function '%s'\n",
- pname,
- shortpath (NULL, dd_p->file->hash_entry->symbol),
- dd_p->line, dd_p->hash_entry->symbol);
- break;
- }
-
- /* Gripe about unprototyped function declarations that we found no
- corresponding definition (or other source of prototype information)
- for.
-
- Gripe even if the unprototyped declaration we are worried about
- exists in a file in one of the "system" include directories. We
- can gripe about these because we should have at least found a
- corresponding (pseudo) definition in the SYSCALLS.c.X file. If we
- didn't, then that means that the SYSCALLS.c.X file is missing some
- needed prototypes for this particular system. That is worth telling
- the user about! */
-
- if (!extern_def_p)
- {
- const char *file = user->file->hash_entry->symbol;
-
- if (!quiet_flag)
- if (in_system_include_dir (file))
- {
- /* Why copy this string into `needed' at all?
- Why not just use user->ansi_decl without copying? */
- char *needed = alloca (strlen (user->ansi_decl) + 1);
- char *p;
-
- strcpy (needed, user->ansi_decl);
- p = strstr (needed, user->hash_entry->symbol)
- + strlen (user->hash_entry->symbol) + 2;
- /* Avoid having ??? in the string. */
- *p++ = '?';
- *p++ = '?';
- *p++ = '?';
- strcpy (p, ");");
-
- notice ("%s: %d: '%s' used but missing from SYSCALLS\n",
- shortpath (NULL, file), user->line,
- needed+7); /* Don't print "extern " */
- }
-#if 0
- else
- notice ("%s: %d: warning: no extern definition for '%s'\n",
- shortpath (NULL, file), user->line,
- user->hash_entry->symbol);
-#endif
- }
- }
- return extern_def_p;
-}
-
-/* Find the (only?) static definition for a particular function name in a
- given file. Here we get the function-name and the file info indirectly
- from the def_dec_info record pointer which is passed in. */
-
-static const def_dec_info *
-find_static_definition (const def_dec_info *user)
-{
- const def_dec_info *head = user->hash_entry->ddip;
- const def_dec_info *dd_p;
- int num_static_defs = 0;
- const def_dec_info *static_def_p = NULL;
-
- for (dd_p = head; dd_p; dd_p = dd_p->next_for_func)
- if (dd_p->is_func_def && dd_p->is_static && (dd_p->file == user->file))
- {
- static_def_p = dd_p; /* save a pointer to the definition */
- num_static_defs++;
- }
- if (num_static_defs == 0)
- {
- if (!quiet_flag)
- notice ("%s: warning: no static definition for '%s' in file '%s'\n",
- pname, head->hash_entry->symbol,
- shortpath (NULL, user->file->hash_entry->symbol));
- }
- else if (num_static_defs > 1)
- {
- notice ("%s: multiple static defs of '%s' in file '%s'\n",
- pname, head->hash_entry->symbol,
- shortpath (NULL, user->file->hash_entry->symbol));
- return NULL;
- }
- return static_def_p;
-}
-
-/* Find good prototype style formal argument lists for all of the function
- declarations which didn't have them before now.
-
- To do this we consider each function name one at a time. For each function
- name, we look at the items on the linked list of def_dec_info records for
- that particular name.
-
- Somewhere on this list we should find one (and only one) def_dec_info
- record which represents the actual function definition, and this record
- should have a nice formal argument list already associated with it.
-
- Thus, all we have to do is to connect up all of the other def_dec_info
- records for this particular function name to the special one which has
- the full-blown formals list.
-
- Of course it is a little more complicated than just that. See below for
- more details. */
-
-static void
-connect_defs_and_decs (const hash_table_entry *hp)
-{
- const def_dec_info *dd_p;
- const def_dec_info *extern_def_p = NULL;
- int first_extern_reference = 1;
-
- /* Traverse the list of definitions and declarations for this particular
- function name. For each item on the list, if it is a function
- definition (either old style or new style) then GCC has already been
- kind enough to produce a prototype for us, and it is associated with
- the item already, so declare the item as its own associated "definition".
-
- Also, for each item which is only a function declaration, but which
- nonetheless has its own prototype already (obviously supplied by the user)
- declare the item as its own definition.
-
- Note that when/if there are multiple user-supplied prototypes already
- present for multiple declarations of any given function, these multiple
- prototypes *should* all match exactly with one another and with the
- prototype for the actual function definition. We don't check for this
- here however, since we assume that the compiler must have already done
- this consistency checking when it was creating the .X files. */
-
- for (dd_p = hp->ddip; dd_p; dd_p = dd_p->next_for_func)
- if (dd_p->prototyped)
- ((NONCONST def_dec_info *) dd_p)->definition = dd_p;
-
- /* Traverse the list of definitions and declarations for this particular
- function name. For each item on the list, if it is an extern function
- declaration and if it has no associated definition yet, go try to find
- the matching extern definition for the declaration.
-
- When looking for the matching function definition, warn the user if we
- fail to find one.
-
- If we find more that one function definition also issue a warning.
-
- Do the search for the matching definition only once per unique function
- name (and only when absolutely needed) so that we can avoid putting out
- redundant warning messages, and so that we will only put out warning
- messages when there is actually a reference (i.e. a declaration) for
- which we need to find a matching definition. */
-
- for (dd_p = hp->ddip; dd_p; dd_p = dd_p->next_for_func)
- if (!dd_p->is_func_def && !dd_p->is_static && !dd_p->definition)
- {
- if (first_extern_reference)
- {
- extern_def_p = find_extern_def (hp->ddip, dd_p);
- first_extern_reference = 0;
- }
- ((NONCONST def_dec_info *) dd_p)->definition = extern_def_p;
- }
-
- /* Traverse the list of definitions and declarations for this particular
- function name. For each item on the list, if it is a static function
- declaration and if it has no associated definition yet, go try to find
- the matching static definition for the declaration within the same file.
-
- When looking for the matching function definition, warn the user if we
- fail to find one in the same file with the declaration, and refuse to
- convert this kind of cross-file static function declaration. After all,
- this is stupid practice and should be discouraged.
-
- We don't have to worry about the possibility that there is more than one
- matching function definition in the given file because that would have
- been flagged as an error by the compiler.
-
- Do the search for the matching definition only once per unique
- function-name/source-file pair (and only when absolutely needed) so that
- we can avoid putting out redundant warning messages, and so that we will
- only put out warning messages when there is actually a reference (i.e. a
- declaration) for which we actually need to find a matching definition. */
-
- for (dd_p = hp->ddip; dd_p; dd_p = dd_p->next_for_func)
- if (!dd_p->is_func_def && dd_p->is_static && !dd_p->definition)
- {
- const def_dec_info *dd_p2;
- const def_dec_info *static_def;
-
- /* We have now found a single static declaration for which we need to
- find a matching definition. We want to minimize the work (and the
- number of warnings), so we will find an appropriate (matching)
- static definition for this declaration, and then distribute it
- (as the definition for) any and all other static declarations
- for this function name which occur within the same file, and which
- do not already have definitions.
-
- Note that a trick is used here to prevent subsequent attempts to
- call find_static_definition for a given function-name & file
- if the first such call returns NULL. Essentially, we convert
- these NULL return values to -1, and put the -1 into the definition
- field for each other static declaration from the same file which
- does not already have an associated definition.
- This makes these other static declarations look like they are
- actually defined already when the outer loop here revisits them
- later on. Thus, the outer loop will skip over them. Later, we
- turn the -1's back to NULL's. */
-
- ((NONCONST def_dec_info *) dd_p)->definition =
- (static_def = find_static_definition (dd_p))
- ? static_def
- : (const def_dec_info *) -1;
-
- for (dd_p2 = dd_p->next_for_func; dd_p2; dd_p2 = dd_p2->next_for_func)
- if (!dd_p2->is_func_def && dd_p2->is_static
- && !dd_p2->definition && (dd_p2->file == dd_p->file))
- ((NONCONST def_dec_info *) dd_p2)->definition = dd_p->definition;
- }
-
- /* Convert any dummy (-1) definitions we created in the step above back to
- NULL's (as they should be). */
-
- for (dd_p = hp->ddip; dd_p; dd_p = dd_p->next_for_func)
- if (dd_p->definition == (def_dec_info *) -1)
- ((NONCONST def_dec_info *) dd_p)->definition = NULL;
-}
-
-#endif /* !defined (UNPROTOIZE) */
-
-/* Give a pointer into the clean text buffer, return a number which is the
- original source line number that the given pointer points into. */
-
-static int
-identify_lineno (const char *clean_p)
-{
- int line_num = 1;
- const char *scan_p;
-
- for (scan_p = clean_text_base; scan_p <= clean_p; scan_p++)
- if (*scan_p == '\n')
- line_num++;
- return line_num;
-}
-
-/* Issue an error message and give up on doing this particular edit. */
-
-static void
-declare_source_confusing (const char *clean_p)
-{
- if (!quiet_flag)
- {
- if (clean_p == 0)
- notice ("%s: %d: warning: source too confusing\n",
- shortpath (NULL, convert_filename), last_known_line_number);
- else
- notice ("%s: %d: warning: source too confusing\n",
- shortpath (NULL, convert_filename),
- identify_lineno (clean_p));
- }
- longjmp (source_confusion_recovery, 1);
-}
-
-/* Check that a condition which is expected to be true in the original source
- code is in fact true. If not, issue an error message and give up on
- converting this particular source file. */
-
-static void
-check_source (int cond, const char *clean_p)
-{
- if (!cond)
- declare_source_confusing (clean_p);
-}
-
-/* If we think of the in-core cleaned text buffer as a memory mapped
- file (with the variable last_known_line_start acting as sort of a
- file pointer) then we can imagine doing "seeks" on the buffer. The
- following routine implements a kind of "seek" operation for the in-core
- (cleaned) copy of the source file. When finished, it returns a pointer to
- the start of a given (numbered) line in the cleaned text buffer.
-
- Note that protoize only has to "seek" in the forward direction on the
- in-core cleaned text file buffers, and it never needs to back up.
-
- This routine is made a little bit faster by remembering the line number
- (and pointer value) supplied (and returned) from the previous "seek".
- This prevents us from always having to start all over back at the top
- of the in-core cleaned buffer again. */
-
-static const char *
-seek_to_line (int n)
-{
- gcc_assert (n >= last_known_line_number);
-
- while (n > last_known_line_number)
- {
- while (*last_known_line_start != '\n')
- check_source (++last_known_line_start < clean_text_limit, 0);
- last_known_line_start++;
- last_known_line_number++;
- }
- return last_known_line_start;
-}
-
-/* Given a pointer to a character in the cleaned text buffer, return a pointer
- to the next non-whitespace character which follows it. */
-
-static const char *
-forward_to_next_token_char (const char *ptr)
-{
- for (++ptr; ISSPACE ((const unsigned char)*ptr);
- check_source (++ptr < clean_text_limit, 0))
- continue;
- return ptr;
-}
-
-/* Copy a chunk of text of length `len' and starting at `str' to the current
- output buffer. Note that all attempts to add stuff to the current output
- buffer ultimately go through here. */
-
-static void
-output_bytes (const char *str, size_t len)
-{
- if ((repl_write_ptr + 1) + len >= repl_text_limit)
- {
- size_t new_size = (repl_text_limit - repl_text_base) << 1;
- char *new_buf = xrealloc (repl_text_base, new_size);
-
- repl_write_ptr = new_buf + (repl_write_ptr - repl_text_base);
- repl_text_base = new_buf;
- repl_text_limit = new_buf + new_size;
- }
- memcpy (repl_write_ptr + 1, str, len);
- repl_write_ptr += len;
-}
-
-/* Copy all bytes (except the trailing null) of a null terminated string to
- the current output buffer. */
-
-static void
-output_string (const char *str)
-{
- output_bytes (str, strlen (str));
-}
-
-/* Copy some characters from the original text buffer to the current output
- buffer.
-
- This routine takes a pointer argument `p' which is assumed to be a pointer
- into the cleaned text buffer. The bytes which are copied are the `original'
- equivalents for the set of bytes between the last value of `clean_read_ptr'
- and the argument value `p'.
-
- The set of bytes copied however, comes *not* from the cleaned text buffer,
- but rather from the direct counterparts of these bytes within the original
- text buffer.
-
- Thus, when this function is called, some bytes from the original text
- buffer (which may include original comments and preprocessing directives)
- will be copied into the output buffer.
-
- Note that the request implied when this routine is called includes the
- byte pointed to by the argument pointer `p'. */
-
-static void
-output_up_to (const char *p)
-{
- size_t copy_length = (size_t) (p - clean_read_ptr);
- const char *copy_start = orig_text_base+(clean_read_ptr-clean_text_base)+1;
-
- if (copy_length == 0)
- return;
-
- output_bytes (copy_start, copy_length);
- clean_read_ptr = p;
-}
-
-/* Given a pointer to a def_dec_info record which represents some form of
- definition of a function (perhaps a real definition, or in lieu of that
- perhaps just a declaration with a full prototype) return true if this
- function is one which we should avoid converting. Return false
- otherwise. */
-
-static int
-other_variable_style_function (const char *ansi_header)
-{
-#ifdef UNPROTOIZE
-
- /* See if we have a stdarg function, or a function which has stdarg style
- parameters or a stdarg style return type. */
-
- return strstr (ansi_header, "...") != 0;
-
-#else /* !defined (UNPROTOIZE) */
-
- /* See if we have a varargs function, or a function which has varargs style
- parameters or a varargs style return type. */
-
- const char *p;
- int len = strlen (varargs_style_indicator);
-
- for (p = ansi_header; p; )
- {
- const char *candidate;
-
- if ((candidate = strstr (p, varargs_style_indicator)) == 0)
- return 0;
- else
- if (!is_id_char (candidate[-1]) && !is_id_char (candidate[len]))
- return 1;
- else
- p = candidate + 1;
- }
- return 0;
-#endif /* !defined (UNPROTOIZE) */
-}
-
-/* Do the editing operation specifically for a function "declaration". Note
- that editing for function "definitions" are handled in a separate routine
- below. */
-
-static void
-edit_fn_declaration (const def_dec_info *def_dec_p,
- const char *volatile clean_text_p)
-{
- const char *start_formals;
- const char *end_formals;
- const char *function_to_edit = def_dec_p->hash_entry->symbol;
- size_t func_name_len = strlen (function_to_edit);
- const char *end_of_fn_name;
-
-#ifndef UNPROTOIZE
-
- const f_list_chain_item *this_f_list_chain_item;
- const def_dec_info *definition = def_dec_p->definition;
-
- /* If we are protoizing, and if we found no corresponding definition for
- this particular function declaration, then just leave this declaration
- exactly as it is. */
-
- if (!definition)
- return;
-
- /* If we are protoizing, and if the corresponding definition that we found
- for this particular function declaration defined an old style varargs
- function, then we want to issue a warning and just leave this function
- declaration unconverted. */
-
- if (other_variable_style_function (definition->ansi_decl))
- {
- if (!quiet_flag)
- notice ("%s: %d: warning: varargs function declaration not converted\n",
- shortpath (NULL, def_dec_p->file->hash_entry->symbol),
- def_dec_p->line);
- return;
- }
-
-#endif /* !defined (UNPROTOIZE) */
-
- /* Setup here to recover from confusing source code detected during this
- particular "edit". */
-
- save_pointers ();
- if (setjmp (source_confusion_recovery))
- {
- restore_pointers ();
- notice ("%s: declaration of function '%s' not converted\n",
- pname, function_to_edit);
- return;
- }
-
- /* We are editing a function declaration. The line number we did a seek to
- contains the comma or semicolon which follows the declaration. Our job
- now is to scan backwards looking for the function name. This name *must*
- be followed by open paren (ignoring whitespace, of course). We need to
- replace everything between that open paren and the corresponding closing
- paren. If we are protoizing, we need to insert the prototype-style
- formals lists. If we are unprotoizing, we need to just delete everything
- between the pairs of opening and closing parens. */
-
- /* First move up to the end of the line. */
-
- while (*clean_text_p != '\n')
- check_source (++clean_text_p < clean_text_limit, 0);
- clean_text_p--; /* Point to just before the newline character. */
-
- /* Now we can scan backwards for the function name. */
-
- do
- {
- for (;;)
- {
- /* Scan leftwards until we find some character which can be
- part of an identifier. */
-
- while (!is_id_char (*clean_text_p))
- check_source (--clean_text_p > clean_read_ptr, 0);
-
- /* Scan backwards until we find a char that cannot be part of an
- identifier. */
-
- while (is_id_char (*clean_text_p))
- check_source (--clean_text_p > clean_read_ptr, 0);
-
- /* Having found an "id break", see if the following id is the one
- that we are looking for. If so, then exit from this loop. */
-
- if (!strncmp (clean_text_p+1, function_to_edit, func_name_len))
- {
- char ch = *(clean_text_p + 1 + func_name_len);
-
- /* Must also check to see that the name in the source text
- ends where it should (in order to prevent bogus matches
- on similar but longer identifiers. */
-
- if (! is_id_char (ch))
- break; /* exit from loop */
- }
- }
-
- /* We have now found the first perfect match for the function name in
- our backward search. This may or may not be the actual function
- name at the start of the actual function declaration (i.e. we could
- have easily been mislead). We will try to avoid getting fooled too
- often by looking forward for the open paren which should follow the
- identifier we just found. We ignore whitespace while hunting. If
- the next non-whitespace byte we see is *not* an open left paren,
- then we must assume that we have been fooled and we start over
- again accordingly. Note that there is no guarantee, that even if
- we do see the open paren, that we are in the right place.
- Programmers do the strangest things sometimes! */
-
- end_of_fn_name = clean_text_p + strlen (def_dec_p->hash_entry->symbol);
- start_formals = forward_to_next_token_char (end_of_fn_name);
- }
- while (*start_formals != '(');
-
- /* start_of_formals now points to the opening left paren which immediately
- follows the name of the function. */
-
- /* Note that there may be several formals lists which need to be modified
- due to the possibility that the return type of this function is a
- pointer-to-function type. If there are several formals lists, we
- convert them in left-to-right order here. */
-
-#ifndef UNPROTOIZE
- this_f_list_chain_item = definition->f_list_chain;
-#endif /* !defined (UNPROTOIZE) */
-
- for (;;)
- {
- {
- int depth;
-
- end_formals = start_formals + 1;
- depth = 1;
- for (; depth; check_source (++end_formals < clean_text_limit, 0))
- {
- switch (*end_formals)
- {
- case '(':
- depth++;
- break;
- case ')':
- depth--;
- break;
- }
- }
- end_formals--;
- }
-
- /* end_formals now points to the closing right paren of the formals
- list whose left paren is pointed to by start_formals. */
-
- /* Now, if we are protoizing, we insert the new ANSI-style formals list
- attached to the associated definition of this function. If however
- we are unprotoizing, then we simply delete any formals list which
- may be present. */
-
- output_up_to (start_formals);
-#ifndef UNPROTOIZE
- if (this_f_list_chain_item)
- {
- output_string (this_f_list_chain_item->formals_list);
- this_f_list_chain_item = this_f_list_chain_item->chain_next;
- }
- else
- {
- if (!quiet_flag)
- notice ("%s: warning: too many parameter lists in declaration of '%s'\n",
- pname, def_dec_p->hash_entry->symbol);
- check_source (0, end_formals); /* leave the declaration intact */
- }
-#endif /* !defined (UNPROTOIZE) */
- clean_read_ptr = end_formals - 1;
-
- /* Now see if it looks like there may be another formals list associated
- with the function declaration that we are converting (following the
- formals list that we just converted. */
-
- {
- const char *another_r_paren = forward_to_next_token_char (end_formals);
-
- if ((*another_r_paren != ')')
- || (*(start_formals = forward_to_next_token_char (another_r_paren)) != '('))
- {
-#ifndef UNPROTOIZE
- if (this_f_list_chain_item)
- {
- if (!quiet_flag)
- notice ("\n%s: warning: too few parameter lists in declaration of '%s'\n",
- pname, def_dec_p->hash_entry->symbol);
- check_source (0, start_formals); /* leave the decl intact */
- }
-#endif /* !defined (UNPROTOIZE) */
- break;
-
- }
- }
-
- /* There does appear to be yet another formals list, so loop around
- again, and convert it also. */
- }
-}
-
-/* Edit a whole group of formals lists, starting with the rightmost one
- from some set of formals lists. This routine is called once (from the
- outside) for each function declaration which is converted. It is
- recursive however, and it calls itself once for each remaining formal
- list that lies to the left of the one it was originally called to work
- on. Thus, a whole set gets done in right-to-left order.
-
- This routine returns nonzero if it thinks that it should not be trying
- to convert this particular function definition (because the name of the
- function doesn't match the one expected). */
-
-static int
-edit_formals_lists (const char *end_formals, unsigned int f_list_count,
- const def_dec_info *def_dec_p)
-{
- const char *start_formals;
- int depth;
-
- start_formals = end_formals - 1;
- depth = 1;
- for (; depth; check_source (--start_formals > clean_read_ptr, 0))
- {
- switch (*start_formals)
- {
- case '(':
- depth--;
- break;
- case ')':
- depth++;
- break;
- }
- }
- start_formals++;
-
- /* start_formals now points to the opening left paren of the formals list. */
-
- f_list_count--;
-
- if (f_list_count)
- {
- const char *next_end;
-
- /* There should be more formal lists to the left of here. */
-
- next_end = start_formals - 1;
- check_source (next_end > clean_read_ptr, 0);
- while (ISSPACE ((const unsigned char)*next_end))
- check_source (--next_end > clean_read_ptr, 0);
- check_source (*next_end == ')', next_end);
- check_source (--next_end > clean_read_ptr, 0);
- check_source (*next_end == ')', next_end);
- if (edit_formals_lists (next_end, f_list_count, def_dec_p))
- return 1;
- }
-
- /* Check that the function name in the header we are working on is the same
- as the one we would expect to find. If not, issue a warning and return
- nonzero. */
-
- if (f_list_count == 0)
- {
- const char *expected = def_dec_p->hash_entry->symbol;
- const char *func_name_start;
- const char *func_name_limit;
- size_t func_name_len;
-
- for (func_name_limit = start_formals-1;
- ISSPACE ((const unsigned char)*func_name_limit); )
- check_source (--func_name_limit > clean_read_ptr, 0);
-
- for (func_name_start = func_name_limit++;
- is_id_char (*func_name_start);
- func_name_start--)
- check_source (func_name_start > clean_read_ptr, 0);
- func_name_start++;
- func_name_len = func_name_limit - func_name_start;
- if (func_name_len == 0)
- check_source (0, func_name_start);
- if (func_name_len != strlen (expected)
- || strncmp (func_name_start, expected, func_name_len))
- {
- notice ("%s: %d: warning: found '%s' but expected '%s'\n",
- shortpath (NULL, def_dec_p->file->hash_entry->symbol),
- identify_lineno (func_name_start),
- dupnstr (func_name_start, func_name_len),
- expected);
- return 1;
- }
- }
-
- output_up_to (start_formals);
-
-#ifdef UNPROTOIZE
- if (f_list_count == 0)
- output_string (def_dec_p->formal_names);
-#else /* !defined (UNPROTOIZE) */
- {
- unsigned f_list_depth;
- const f_list_chain_item *flci_p = def_dec_p->f_list_chain;
-
- /* At this point, the current value of f_list count says how many
- links we have to follow through the f_list_chain to get to the
- particular formals list that we need to output next. */
-
- for (f_list_depth = 0; f_list_depth < f_list_count; f_list_depth++)
- flci_p = flci_p->chain_next;
- output_string (flci_p->formals_list);
- }
-#endif /* !defined (UNPROTOIZE) */
-
- clean_read_ptr = end_formals - 1;
- return 0;
-}
-
-/* Given a pointer to a byte in the clean text buffer which points to
- the beginning of a line that contains a "follower" token for a
- function definition header, do whatever is necessary to find the
- right closing paren for the rightmost formals list of the function
- definition header. */
-
-static const char *
-find_rightmost_formals_list (const char *clean_text_p)
-{
- const char *end_formals;
-
- /* We are editing a function definition. The line number we did a seek
- to contains the first token which immediately follows the entire set of
- formals lists which are part of this particular function definition
- header.
-
- Our job now is to scan leftwards in the clean text looking for the
- right-paren which is at the end of the function header's rightmost
- formals list.
-
- If we ignore whitespace, this right paren should be the first one we
- see which is (ignoring whitespace) immediately followed either by the
- open curly-brace beginning the function body or by an alphabetic
- character (in the case where the function definition is in old (K&R)
- style and there are some declarations of formal parameters). */
-
- /* It is possible that the right paren we are looking for is on the
- current line (together with its following token). Just in case that
- might be true, we start out here by skipping down to the right end of
- the current line before starting our scan. */
-
- for (end_formals = clean_text_p; *end_formals != '\n'; end_formals++)
- continue;
- end_formals--;
-
-#ifdef UNPROTOIZE
-
- /* Now scan backwards while looking for the right end of the rightmost
- formals list associated with this function definition. */
-
- {
- char ch;
- const char *l_brace_p;
-
- /* Look leftward and try to find a right-paren. */
-
- while (*end_formals != ')')
- {
- if (ISSPACE ((unsigned char)*end_formals))
- while (ISSPACE ((unsigned char)*end_formals))
- check_source (--end_formals > clean_read_ptr, 0);
- else
- check_source (--end_formals > clean_read_ptr, 0);
- }
-
- ch = *(l_brace_p = forward_to_next_token_char (end_formals));
- /* Since we are unprotoizing an ANSI-style (prototyped) function
- definition, there had better not be anything (except whitespace)
- between the end of the ANSI formals list and the beginning of the
- function body (i.e. the '{'). */
-
- check_source (ch == '{', l_brace_p);
- }
-
-#else /* !defined (UNPROTOIZE) */
-
- /* Now scan backwards while looking for the right end of the rightmost
- formals list associated with this function definition. */
-
- while (1)
- {
- char ch;
- const char *l_brace_p;
-
- /* Look leftward and try to find a right-paren. */
-
- while (*end_formals != ')')
- {
- if (ISSPACE ((const unsigned char)*end_formals))
- while (ISSPACE ((const unsigned char)*end_formals))
- check_source (--end_formals > clean_read_ptr, 0);
- else
- check_source (--end_formals > clean_read_ptr, 0);
- }
-
- ch = *(l_brace_p = forward_to_next_token_char (end_formals));
-
- /* Since it is possible that we found a right paren before the starting
- '{' of the body which IS NOT the one at the end of the real K&R
- formals list (say for instance, we found one embedded inside one of
- the old K&R formal parameter declarations) we have to check to be
- sure that this is in fact the right paren that we were looking for.
-
- The one we were looking for *must* be followed by either a '{' or
- by an alphabetic character, while others *cannot* validly be followed
- by such characters. */
-
- if ((ch == '{') || ISALPHA ((unsigned char) ch))
- break;
-
- /* At this point, we have found a right paren, but we know that it is
- not the one we were looking for, so backup one character and keep
- looking. */
-
- check_source (--end_formals > clean_read_ptr, 0);
- }
-
-#endif /* !defined (UNPROTOIZE) */
-
- return end_formals;
-}
-
-#ifndef UNPROTOIZE
-
-/* Insert into the output file a totally new declaration for a function
- which (up until now) was being called from within the current block
- without having been declared at any point such that the declaration
- was visible (i.e. in scope) at the point of the call.
-
- We need to add in explicit declarations for all such function calls
- in order to get the full benefit of prototype-based function call
- parameter type checking. */
-
-static void
-add_local_decl (const def_dec_info *def_dec_p, const char *clean_text_p)
-{
- const char *start_of_block;
- const char *function_to_edit = def_dec_p->hash_entry->symbol;
-
- /* Don't insert new local explicit declarations unless explicitly requested
- to do so. */
-
- if (!local_flag)
- return;
-
- /* Setup here to recover from confusing source code detected during this
- particular "edit". */
-
- save_pointers ();
- if (setjmp (source_confusion_recovery))
- {
- restore_pointers ();
- notice ("%s: local declaration for function '%s' not inserted\n",
- pname, function_to_edit);
- return;
- }
-
- /* We have already done a seek to the start of the line which should
- contain *the* open curly brace which begins the block in which we need
- to insert an explicit function declaration (to replace the implicit one).
-
- Now we scan that line, starting from the left, until we find the
- open curly brace we are looking for. Note that there may actually be
- multiple open curly braces on the given line, but we will be happy
- with the leftmost one no matter what. */
-
- start_of_block = clean_text_p;
- while (*start_of_block != '{' && *start_of_block != '\n')
- check_source (++start_of_block < clean_text_limit, 0);
-
- /* Note that the line from the original source could possibly
- contain *no* open curly braces! This happens if the line contains
- a macro call which expands into a chunk of text which includes a
- block (and that block's associated open and close curly braces).
- In cases like this, we give up, issue a warning, and do nothing. */
-
- if (*start_of_block != '{')
- {
- if (!quiet_flag)
- notice ("\n%s: %d: warning: can't add declaration of '%s' into macro call\n",
- def_dec_p->file->hash_entry->symbol, def_dec_p->line,
- def_dec_p->hash_entry->symbol);
- return;
- }
-
- /* Figure out what a nice (pretty) indentation would be for the new
- declaration we are adding. In order to do this, we must scan forward
- from the '{' until we find the first line which starts with some
- non-whitespace characters (i.e. real "token" material). */
-
- {
- const char *ep = forward_to_next_token_char (start_of_block) - 1;
- const char *sp;
-
- /* Now we have ep pointing at the rightmost byte of some existing indent
- stuff. At least that is the hope.
-
- We can now just scan backwards and find the left end of the existing
- indentation string, and then copy it to the output buffer. */
-
- for (sp = ep; ISSPACE ((const unsigned char)*sp) && *sp != '\n'; sp--)
- continue;
-
- /* Now write out the open { which began this block, and any following
- trash up to and including the last byte of the existing indent that
- we just found. */
-
- output_up_to (ep);
-
- /* Now we go ahead and insert the new declaration at this point.
-
- If the definition of the given function is in the same file that we
- are currently editing, and if its full ANSI declaration normally
- would start with the keyword `extern', suppress the `extern'. */
-
- {
- const char *decl = def_dec_p->definition->ansi_decl;
-
- if ((*decl == 'e') && (def_dec_p->file == def_dec_p->definition->file))
- decl += 7;
- output_string (decl);
- }
-
- /* Finally, write out a new indent string, just like the preceding one
- that we found. This will typically include a newline as the first
- character of the indent string. */
-
- output_bytes (sp, (size_t) (ep - sp) + 1);
- }
-}
-
-/* Given a pointer to a file_info record, and a pointer to the beginning
- of a line (in the clean text buffer) which is assumed to contain the
- first "follower" token for the first function definition header in the
- given file, find a good place to insert some new global function
- declarations (which will replace scattered and imprecise implicit ones)
- and then insert the new explicit declaration at that point in the file. */
-
-static void
-add_global_decls (const file_info *file_p, const char *clean_text_p)
-{
- const def_dec_info *dd_p;
- const char *scan_p;
-
- /* Setup here to recover from confusing source code detected during this
- particular "edit". */
-
- save_pointers ();
- if (setjmp (source_confusion_recovery))
- {
- restore_pointers ();
- notice ("%s: global declarations for file '%s' not inserted\n",
- pname, shortpath (NULL, file_p->hash_entry->symbol));
- return;
- }
-
- /* Start by finding a good location for adding the new explicit function
- declarations. To do this, we scan backwards, ignoring whitespace
- and comments and other junk until we find either a semicolon, or until
- we hit the beginning of the file. */
-
- scan_p = find_rightmost_formals_list (clean_text_p);
- for (;; --scan_p)
- {
- if (scan_p < clean_text_base)
- break;
- check_source (scan_p > clean_read_ptr, 0);
- if (*scan_p == ';')
- break;
- }
-
- /* scan_p now points either to a semicolon, or to just before the start
- of the whole file. */
-
- /* Now scan forward for the first non-whitespace character. In theory,
- this should be the first character of the following function definition
- header. We will put in the added declarations just prior to that. */
-
- scan_p++;
- while (ISSPACE ((const unsigned char)*scan_p))
- scan_p++;
- scan_p--;
-
- output_up_to (scan_p);
-
- /* Now write out full prototypes for all of the things that had been
- implicitly declared in this file (but only those for which we were
- actually able to find unique matching definitions). Avoid duplicates
- by marking things that we write out as we go. */
-
- {
- int some_decls_added = 0;
-
- for (dd_p = file_p->defs_decs; dd_p; dd_p = dd_p->next_in_file)
- if (dd_p->is_implicit && dd_p->definition && !dd_p->definition->written)
- {
- const char *decl = dd_p->definition->ansi_decl;
-
- /* If the function for which we are inserting a declaration is
- actually defined later in the same file, then suppress the
- leading `extern' keyword (if there is one). */
-
- if (*decl == 'e' && (dd_p->file == dd_p->definition->file))
- decl += 7;
-
- output_string ("\n");
- output_string (decl);
- some_decls_added = 1;
- ((NONCONST def_dec_info *) dd_p->definition)->written = 1;
- }
- if (some_decls_added)
- output_string ("\n\n");
- }
-
- /* Unmark all of the definitions that we just marked. */
-
- for (dd_p = file_p->defs_decs; dd_p; dd_p = dd_p->next_in_file)
- if (dd_p->definition)
- ((NONCONST def_dec_info *) dd_p->definition)->written = 0;
-}
-
-#endif /* !defined (UNPROTOIZE) */
-
-/* Do the editing operation specifically for a function "definition". Note
- that editing operations for function "declarations" are handled by a
- separate routine above. */
-
-static void
-edit_fn_definition (const def_dec_info *def_dec_p,
- const char *volatile clean_text_p)
-{
- const char *end_formals;
- const char *function_to_edit = def_dec_p->hash_entry->symbol;
-
- /* Setup here to recover from confusing source code detected during this
- particular "edit". */
-
- save_pointers ();
- if (setjmp (source_confusion_recovery))
- {
- restore_pointers ();
- notice ("%s: definition of function '%s' not converted\n",
- pname, function_to_edit);
- return;
- }
-
- end_formals = find_rightmost_formals_list (clean_text_p);
-
- /* end_of_formals now points to the closing right paren of the rightmost
- formals list which is actually part of the `header' of the function
- definition that we are converting. */
-
- /* If the header of this function definition looks like it declares a
- function with a variable number of arguments, and if the way it does
- that is different from that way we would like it (i.e. varargs vs.
- stdarg) then issue a warning and leave the header unconverted. */
-
- if (other_variable_style_function (def_dec_p->ansi_decl))
- {
- if (!quiet_flag)
- notice ("%s: %d: warning: definition of %s not converted\n",
- shortpath (NULL, def_dec_p->file->hash_entry->symbol),
- identify_lineno (end_formals),
- other_var_style);
- output_up_to (end_formals);
- return;
- }
-
- if (edit_formals_lists (end_formals, def_dec_p->f_list_count, def_dec_p))
- {
- restore_pointers ();
- notice ("%s: definition of function '%s' not converted\n",
- pname, function_to_edit);
- return;
- }
-
- /* Have to output the last right paren because this never gets flushed by
- edit_formals_list. */
-
- output_up_to (end_formals);
-
-#ifdef UNPROTOIZE
- {
- const char *decl_p;
- const char *semicolon_p;
- const char *limit_p;
- const char *scan_p;
- int had_newlines = 0;
-
- /* Now write out the K&R style formal declarations, one per line. */
-
- decl_p = def_dec_p->formal_decls;
- limit_p = decl_p + strlen (decl_p);
- for (;decl_p < limit_p; decl_p = semicolon_p + 2)
- {
- for (semicolon_p = decl_p; *semicolon_p != ';'; semicolon_p++)
- continue;
- output_string ("\n");
- output_string (indent_string);
- output_bytes (decl_p, (size_t) ((semicolon_p + 1) - decl_p));
- }
-
- /* If there are no newlines between the end of the formals list and the
- start of the body, we should insert one now. */
-
- for (scan_p = end_formals+1; *scan_p != '{'; )
- {
- if (*scan_p == '\n')
- {
- had_newlines = 1;
- break;
- }
- check_source (++scan_p < clean_text_limit, 0);
- }
- if (!had_newlines)
- output_string ("\n");
- }
-#else /* !defined (UNPROTOIZE) */
- /* If we are protoizing, there may be some flotsam & jetsam (like comments
- and preprocessing directives) after the old formals list but before
- the following { and we would like to preserve that stuff while effectively
- deleting the existing K&R formal parameter declarations. We do so here
- in a rather tricky way. Basically, we white out any stuff *except*
- the comments/pp-directives in the original text buffer, then, if there
- is anything in this area *other* than whitespace, we output it. */
- {
- const char *end_formals_orig;
- const char *start_body;
- const char *start_body_orig;
- const char *scan;
- const char *scan_orig;
- int have_flotsam = 0;
- int have_newlines = 0;
-
- for (start_body = end_formals + 1; *start_body != '{';)
- check_source (++start_body < clean_text_limit, 0);
-
- end_formals_orig = orig_text_base + (end_formals - clean_text_base);
- start_body_orig = orig_text_base + (start_body - clean_text_base);
- scan = end_formals + 1;
- scan_orig = end_formals_orig + 1;
- for (; scan < start_body; scan++, scan_orig++)
- {
- if (*scan == *scan_orig)
- {
- have_newlines |= (*scan_orig == '\n');
- /* Leave identical whitespace alone. */
- if (!ISSPACE ((const unsigned char)*scan_orig))
- *((NONCONST char *) scan_orig) = ' '; /* identical - so whiteout */
- }
- else
- have_flotsam = 1;
- }
- if (have_flotsam)
- output_bytes (end_formals_orig + 1,
- (size_t) (start_body_orig - end_formals_orig) - 1);
- else
- if (have_newlines)
- output_string ("\n");
- else
- output_string (" ");
- clean_read_ptr = start_body - 1;
- }
-#endif /* !defined (UNPROTOIZE) */
-}
-
-/* Clean up the clean text buffer. Do this by converting comments and
- preprocessing directives into spaces. Also convert line continuations
- into whitespace. Also, whiteout string and character literals. */
-
-static void
-do_cleaning (char *new_clean_text_base, const char *new_clean_text_limit)
-{
- char *scan_p;
- int non_whitespace_since_newline = 0;
-
- for (scan_p = new_clean_text_base; scan_p < new_clean_text_limit; scan_p++)
- {
- switch (*scan_p)
- {
- case '/': /* Handle comments. */
- if (scan_p[1] != '*')
- goto regular;
- non_whitespace_since_newline = 1;
- scan_p[0] = ' ';
- scan_p[1] = ' ';
- scan_p += 2;
- while (scan_p[1] != '/' || scan_p[0] != '*')
- {
- if (!ISSPACE ((const unsigned char)*scan_p))
- *scan_p = ' ';
- ++scan_p;
- gcc_assert (scan_p < new_clean_text_limit);
- }
- *scan_p++ = ' ';
- *scan_p = ' ';
- break;
-
- case '#': /* Handle pp directives. */
- if (non_whitespace_since_newline)
- goto regular;
- *scan_p = ' ';
- while (scan_p[1] != '\n' || scan_p[0] == '\\')
- {
- if (!ISSPACE ((const unsigned char)*scan_p))
- *scan_p = ' ';
- ++scan_p;
- gcc_assert (scan_p < new_clean_text_limit);
- }
- *scan_p++ = ' ';
- break;
-
- case '\'': /* Handle character literals. */
- non_whitespace_since_newline = 1;
- while (scan_p[1] != '\'' || scan_p[0] == '\\')
- {
- if (scan_p[0] == '\\'
- && !ISSPACE ((const unsigned char) scan_p[1]))
- scan_p[1] = ' ';
- if (!ISSPACE ((const unsigned char)*scan_p))
- *scan_p = ' ';
- ++scan_p;
- gcc_assert (scan_p < new_clean_text_limit);
- }
- *scan_p++ = ' ';
- break;
-
- case '"': /* Handle string literals. */
- non_whitespace_since_newline = 1;
- while (scan_p[1] != '"' || scan_p[0] == '\\')
- {
- if (scan_p[0] == '\\'
- && !ISSPACE ((const unsigned char) scan_p[1]))
- scan_p[1] = ' ';
- if (!ISSPACE ((const unsigned char)*scan_p))
- *scan_p = ' ';
- ++scan_p;
- gcc_assert (scan_p < new_clean_text_limit);
- }
- if (!ISSPACE ((const unsigned char)*scan_p))
- *scan_p = ' ';
- scan_p++;
- break;
-
- case '\\': /* Handle line continuations. */
- if (scan_p[1] != '\n')
- goto regular;
- *scan_p = ' ';
- break;
-
- case '\n':
- non_whitespace_since_newline = 0; /* Reset. */
- break;
-
- case ' ':
- case '\v':
- case '\t':
- case '\r':
- case '\f':
- case '\b':
- break; /* Whitespace characters. */
-
- default:
-regular:
- non_whitespace_since_newline = 1;
- break;
- }
- }
-}
-
-/* Given a pointer to the closing right parenthesis for a particular formals
- list (in the clean text buffer) find the corresponding left parenthesis
- and return a pointer to it. */
-
-static const char *
-careful_find_l_paren (const char *p)
-{
- const char *q;
- int paren_depth;
-
- for (paren_depth = 1, q = p-1; paren_depth; check_source (--q >= clean_text_base, 0))
- {
- switch (*q)
- {
- case ')':
- paren_depth++;
- break;
- case '(':
- paren_depth--;
- break;
- }
- }
- return ++q;
-}
-
-/* Scan the clean text buffer for cases of function definitions that we
- don't really know about because they were preprocessed out when the
- aux info files were created.
-
- In this version of protoize/unprotoize we just give a warning for each
- one found. A later version may be able to at least unprotoize such
- missed items.
-
- Note that we may easily find all function definitions simply by
- looking for places where there is a left paren which is (ignoring
- whitespace) immediately followed by either a left-brace or by an
- upper or lower case letter. Whenever we find this combination, we
- have also found a function definition header.
-
- Finding function *declarations* using syntactic clues is much harder.
- I will probably try to do this in a later version though. */
-
-static void
-scan_for_missed_items (const file_info *file_p)
-{
- static const char *scan_p;
- const char *limit = clean_text_limit - 3;
- static const char *backup_limit;
-
- backup_limit = clean_text_base - 1;
-
- for (scan_p = clean_text_base; scan_p < limit; scan_p++)
- {
- if (*scan_p == ')')
- {
- static const char *last_r_paren;
- const char *ahead_p;
-
- last_r_paren = scan_p;
-
- for (ahead_p = scan_p + 1; ISSPACE ((const unsigned char)*ahead_p); )
- check_source (++ahead_p < limit, limit);
-
- scan_p = ahead_p - 1;
-
- if (ISALPHA ((const unsigned char)*ahead_p) || *ahead_p == '{')
- {
- const char *last_l_paren;
- const int lineno = identify_lineno (ahead_p);
-
- if (setjmp (source_confusion_recovery))
- continue;
-
- /* We know we have a function definition header. Now skip
- leftwards over all of its associated formals lists. */
-
- do
- {
- last_l_paren = careful_find_l_paren (last_r_paren);
- for (last_r_paren = last_l_paren-1;
- ISSPACE ((const unsigned char)*last_r_paren); )
- check_source (--last_r_paren >= backup_limit, backup_limit);
- }
- while (*last_r_paren == ')');
-
- if (is_id_char (*last_r_paren))
- {
- const char *id_limit = last_r_paren + 1;
- const char *id_start;
- size_t id_length;
- const def_dec_info *dd_p;
-
- for (id_start = id_limit-1; is_id_char (*id_start); )
- check_source (--id_start >= backup_limit, backup_limit);
- id_start++;
- backup_limit = id_start;
- if ((id_length = (size_t) (id_limit - id_start)) == 0)
- goto not_missed;
-
- {
- char *func_name = alloca (id_length + 1);
- static const char * const stmt_keywords[]
- = { "if", "else", "do", "while", "for", "switch", "case", "return", 0 };
- const char * const *stmt_keyword;
-
- strncpy (func_name, id_start, id_length);
- func_name[id_length] = '\0';
-
- /* We must check here to see if we are actually looking at
- a statement rather than an actual function call. */
-
- for (stmt_keyword = stmt_keywords; *stmt_keyword; stmt_keyword++)
- if (!strcmp (func_name, *stmt_keyword))
- goto not_missed;
-
-#if 0
- notice ("%s: found definition of '%s' at %s(%d)\n",
- pname,
- func_name,
- shortpath (NULL, file_p->hash_entry->symbol),
- identify_lineno (id_start));
-#endif /* 0 */
- /* We really should check for a match of the function name
- here also, but why bother. */
-
- for (dd_p = file_p->defs_decs; dd_p; dd_p = dd_p->next_in_file)
- if (dd_p->is_func_def && dd_p->line == lineno)
- goto not_missed;
-
- /* If we make it here, then we did not know about this
- function definition. */
-
- notice ("%s: %d: warning: '%s' excluded by preprocessing\n",
- shortpath (NULL, file_p->hash_entry->symbol),
- identify_lineno (id_start), func_name);
- notice ("%s: function definition not converted\n",
- pname);
- }
- not_missed: ;
- }
- }
- }
- }
-}
-
-/* Do all editing operations for a single source file (either a "base" file
- or an "include" file). To do this we read the file into memory, keep a
- virgin copy there, make another cleaned in-core copy of the original file
- (i.e. one in which all of the comments and preprocessing directives have
- been replaced with whitespace), then use these two in-core copies of the
- file to make a new edited in-core copy of the file. Finally, rename the
- original file (as a way of saving it), and then write the edited version
- of the file from core to a disk file of the same name as the original.
-
- Note that the trick of making a copy of the original sans comments &
- preprocessing directives make the editing a whole lot easier. */
-
-static void
-edit_file (const hash_table_entry *hp)
-{
- struct stat stat_buf;
- const file_info *file_p = hp->fip;
- char *new_orig_text_base;
- char *new_orig_text_limit;
- char *new_clean_text_base;
- char *new_clean_text_limit;
- size_t orig_size;
- size_t repl_size;
- int first_definition_in_file;
-
- /* If we are not supposed to be converting this file, or if there is
- nothing in there which needs converting, just skip this file. */
-
- if (!needs_to_be_converted (file_p))
- return;
-
- convert_filename = file_p->hash_entry->symbol;
-
- /* Convert a file if it is in a directory where we want conversion
- and the file is not excluded. */
-
- if (!directory_specified_p (convert_filename)
- || file_excluded_p (convert_filename))
- {
- if (!quiet_flag
-#ifdef UNPROTOIZE
- /* Don't even mention "system" include files unless we are
- protoizing. If we are protoizing, we mention these as a
- gentle way of prodding the user to convert his "system"
- include files to prototype format. */
- && !in_system_include_dir (convert_filename)
-#endif /* defined (UNPROTOIZE) */
- )
- notice ("%s: '%s' not converted\n",
- pname, shortpath (NULL, convert_filename));
- return;
- }
-
- /* Let the user know what we are up to. */
-
- if (nochange_flag)
- notice ("%s: would convert file '%s'\n",
- pname, shortpath (NULL, convert_filename));
- else
- notice ("%s: converting file '%s'\n",
- pname, shortpath (NULL, convert_filename));
- fflush (stderr);
-
- /* Find out the size (in bytes) of the original file. */
-
- /* The cast avoids an erroneous warning on AIX. */
- if (stat (convert_filename, &stat_buf) == -1)
- {
- int errno_val = errno;
- notice ("%s: can't get status for file '%s': %s\n",
- pname, shortpath (NULL, convert_filename),
- xstrerror (errno_val));
- return;
- }
- orig_size = stat_buf.st_size;
-
- /* Allocate a buffer to hold the original text. */
-
- orig_text_base = new_orig_text_base = xmalloc (orig_size + 2);
- orig_text_limit = new_orig_text_limit = new_orig_text_base + orig_size;
-
- /* Allocate a buffer to hold the cleaned-up version of the original text. */
-
- clean_text_base = new_clean_text_base = xmalloc (orig_size + 2);
- clean_text_limit = new_clean_text_limit = new_clean_text_base + orig_size;
- clean_read_ptr = clean_text_base - 1;
-
- /* Allocate a buffer that will hopefully be large enough to hold the entire
- converted output text. As an initial guess for the maximum size of the
- output buffer, use 125% of the size of the original + some extra. This
- buffer can be expanded later as needed. */
-
- repl_size = orig_size + (orig_size >> 2) + 4096;
- repl_text_base = xmalloc (repl_size + 2);
- repl_text_limit = repl_text_base + repl_size - 1;
- repl_write_ptr = repl_text_base - 1;
-
- {
- int input_file;
- int fd_flags;
-
- /* Open the file to be converted in READ ONLY mode. */
-
- fd_flags = O_RDONLY;
-#ifdef O_BINARY
- /* Use binary mode to avoid having to deal with different EOL characters. */
- fd_flags |= O_BINARY;
-#endif
- if ((input_file = open (convert_filename, fd_flags, 0444)) == -1)
- {
- int errno_val = errno;
- notice ("%s: can't open file '%s' for reading: %s\n",
- pname, shortpath (NULL, convert_filename),
- xstrerror (errno_val));
- return;
- }
-
- /* Read the entire original source text file into the original text buffer
- in one swell fwoop. Then figure out where the end of the text is and
- make sure that it ends with a newline followed by a null. */
-
- if (safe_read (input_file, new_orig_text_base, orig_size) !=
- (int) orig_size)
- {
- int errno_val = errno;
- close (input_file);
- notice ("\n%s: error reading input file '%s': %s\n",
- pname, shortpath (NULL, convert_filename),
- xstrerror (errno_val));
- return;
- }
-
- close (input_file);
- }
-
- if (orig_size == 0 || orig_text_limit[-1] != '\n')
- {
- *new_orig_text_limit++ = '\n';
- orig_text_limit++;
- }
-
- /* Create the cleaned up copy of the original text. */
-
- memcpy (new_clean_text_base, orig_text_base,
- (size_t) (orig_text_limit - orig_text_base));
- do_cleaning (new_clean_text_base, new_clean_text_limit);
-
-#if 0
- {
- int clean_file;
- size_t clean_size = orig_text_limit - orig_text_base;
- char *const clean_filename = alloca (strlen (convert_filename) + 6 + 1);
-
- /* Open (and create) the clean file. */
-
- strcpy (clean_filename, convert_filename);
- strcat (clean_filename, ".clean");
- if ((clean_file = creat (clean_filename, 0666)) == -1)
- {
- int errno_val = errno;
- notice ("%s: can't create/open clean file '%s': %s\n",
- pname, shortpath (NULL, clean_filename),
- xstrerror (errno_val));
- return;
- }
-
- /* Write the clean file. */
-
- safe_write (clean_file, new_clean_text_base, clean_size, clean_filename);
-
- close (clean_file);
- }
-#endif /* 0 */
-
- /* Do a simplified scan of the input looking for things that were not
- mentioned in the aux info files because of the fact that they were
- in a region of the source which was preprocessed-out (via #if or
- via #ifdef). */
-
- scan_for_missed_items (file_p);
-
- /* Setup to do line-oriented forward seeking in the clean text buffer. */
-
- last_known_line_number = 1;
- last_known_line_start = clean_text_base;
-
- /* Now get down to business and make all of the necessary edits. */
-
- {
- const def_dec_info *def_dec_p;
-
- first_definition_in_file = 1;
- def_dec_p = file_p->defs_decs;
- for (; def_dec_p; def_dec_p = def_dec_p->next_in_file)
- {
- const char *clean_text_p = seek_to_line (def_dec_p->line);
-
- /* clean_text_p now points to the first character of the line which
- contains the `terminator' for the declaration or definition that
- we are about to process. */
-
-#ifndef UNPROTOIZE
-
- if (global_flag && def_dec_p->is_func_def && first_definition_in_file)
- {
- add_global_decls (def_dec_p->file, clean_text_p);
- first_definition_in_file = 0;
- }
-
- /* Don't edit this item if it is already in prototype format or if it
- is a function declaration and we have found no corresponding
- definition. */
-
- if (def_dec_p->prototyped
- || (!def_dec_p->is_func_def && !def_dec_p->definition))
- continue;
-
-#endif /* !defined (UNPROTOIZE) */
-
- if (def_dec_p->is_func_def)
- edit_fn_definition (def_dec_p, clean_text_p);
- else
-#ifndef UNPROTOIZE
- if (def_dec_p->is_implicit)
- add_local_decl (def_dec_p, clean_text_p);
- else
-#endif /* !defined (UNPROTOIZE) */
- edit_fn_declaration (def_dec_p, clean_text_p);
- }
- }
-
- /* Finalize things. Output the last trailing part of the original text. */
-
- output_up_to (clean_text_limit - 1);
-
- /* If this is just a test run, stop now and just deallocate the buffers. */
-
- if (nochange_flag)
- {
- free (new_orig_text_base);
- free (new_clean_text_base);
- free (repl_text_base);
- return;
- }
-
- /* Change the name of the original input file. This is just a quick way of
- saving the original file. */
-
- if (!nosave_flag)
- {
- char *new_filename
- = xmalloc (strlen (convert_filename) + strlen (save_suffix) + 2);
-
- strcpy (new_filename, convert_filename);
-#ifdef __MSDOS__
- /* MSDOS filenames are restricted to 8.3 format, so we save `foo.c'
- as `foo.<save_suffix>'. */
- new_filename[(strlen (convert_filename) - 1] = '\0';
-#endif
- strcat (new_filename, save_suffix);
-
- /* Don't overwrite existing file. */
- if (access (new_filename, F_OK) == 0)
- {
- if (!quiet_flag)
- notice ("%s: warning: file '%s' already saved in '%s'\n",
- pname,
- shortpath (NULL, convert_filename),
- shortpath (NULL, new_filename));
- }
- else if (rename (convert_filename, new_filename) == -1)
- {
- int errno_val = errno;
- notice ("%s: can't link file '%s' to '%s': %s\n",
- pname,
- shortpath (NULL, convert_filename),
- shortpath (NULL, new_filename),
- xstrerror (errno_val));
- return;
- }
- }
-
- if (unlink (convert_filename) == -1)
- {
- int errno_val = errno;
- /* The file may have already been renamed. */
- if (errno_val != ENOENT)
- {
- notice ("%s: can't delete file '%s': %s\n",
- pname, shortpath (NULL, convert_filename),
- xstrerror (errno_val));
- return;
- }
- }
-
- {
- int output_file;
-
- /* Open (and create) the output file. */
-
- if ((output_file = creat (convert_filename, 0666)) == -1)
- {
- int errno_val = errno;
- notice ("%s: can't create/open output file '%s': %s\n",
- pname, shortpath (NULL, convert_filename),
- xstrerror (errno_val));
- return;
- }
-#ifdef O_BINARY
- /* Use binary mode to avoid changing the existing EOL character. */
- setmode (output_file, O_BINARY);
-#endif
-
- /* Write the output file. */
-
- {
- unsigned int out_size = (repl_write_ptr + 1) - repl_text_base;
-
- safe_write (output_file, repl_text_base, out_size, convert_filename);
- }
-
- close (output_file);
- }
-
- /* Deallocate the conversion buffers. */
-
- free (new_orig_text_base);
- free (new_clean_text_base);
- free (repl_text_base);
-
- /* Change the mode of the output file to match the original file. */
-
- /* The cast avoids an erroneous warning on AIX. */
- if (chmod (convert_filename, stat_buf.st_mode) == -1)
- {
- int errno_val = errno;
- notice ("%s: can't change mode of file '%s': %s\n",
- pname, shortpath (NULL, convert_filename),
- xstrerror (errno_val));
- }
-
- /* Note: We would try to change the owner and group of the output file
- to match those of the input file here, except that may not be a good
- thing to do because it might be misleading. Also, it might not even
- be possible to do that (on BSD systems with quotas for instance). */
-}
-
-/* Do all of the individual steps needed to do the protoization (or
- unprotoization) of the files referenced in the aux_info files given
- in the command line. */
-
-static void
-do_processing (void)
-{
- const char * const *base_pp;
- const char * const * const end_pps
- = &base_source_filenames[n_base_source_files];
-
-#ifndef UNPROTOIZE
- int syscalls_len;
-#endif /* !defined (UNPROTOIZE) */
-
- /* One-by-one, check (and create if necessary), open, and read all of the
- stuff in each aux_info file. After reading each aux_info file, the
- aux_info_file just read will be automatically deleted unless the
- keep_flag is set. */
-
- for (base_pp = base_source_filenames; base_pp < end_pps; base_pp++)
- process_aux_info_file (*base_pp, keep_flag, 0);
-
-#ifndef UNPROTOIZE
-
- /* Also open and read the special SYSCALLS.c aux_info file which gives us
- the prototypes for all of the standard system-supplied functions. */
-
- if (nondefault_syscalls_dir)
- {
- syscalls_absolute_filename
- = xmalloc (strlen (nondefault_syscalls_dir) + 1
- + sizeof (syscalls_filename));
- strcpy (syscalls_absolute_filename, nondefault_syscalls_dir);
- }
- else
- {
- GET_ENVIRONMENT (default_syscalls_dir, "GCC_EXEC_PREFIX");
- if (!default_syscalls_dir)
- {
- default_syscalls_dir = standard_exec_prefix;
- }
- syscalls_absolute_filename
- = xmalloc (strlen (default_syscalls_dir) + 0
- + strlen (target_machine) + 1
- + strlen (target_version) + 1
- + sizeof (syscalls_filename));
- strcpy (syscalls_absolute_filename, default_syscalls_dir);
- strcat (syscalls_absolute_filename, target_machine);
- strcat (syscalls_absolute_filename, "/");
- strcat (syscalls_absolute_filename, target_version);
- strcat (syscalls_absolute_filename, "/");
- }
-
- syscalls_len = strlen (syscalls_absolute_filename);
- if (! IS_DIR_SEPARATOR (*(syscalls_absolute_filename + syscalls_len - 1)))
- {
- *(syscalls_absolute_filename + syscalls_len++) = DIR_SEPARATOR;
- *(syscalls_absolute_filename + syscalls_len) = '\0';
- }
- strcat (syscalls_absolute_filename, syscalls_filename);
-
- /* Call process_aux_info_file in such a way that it does not try to
- delete the SYSCALLS aux_info file. */
-
- process_aux_info_file (syscalls_absolute_filename, 1, 1);
-
-#endif /* !defined (UNPROTOIZE) */
-
- /* When we first read in all of the information from the aux_info files
- we saved in it descending line number order, because that was likely to
- be faster. Now however, we want the chains of def & dec records to
- appear in ascending line number order as we get further away from the
- file_info record that they hang from. The following line causes all of
- these lists to be rearranged into ascending line number order. */
-
- visit_each_hash_node (filename_primary, reverse_def_dec_list);
-
-#ifndef UNPROTOIZE
-
- /* Now do the "real" work. The following line causes each declaration record
- to be "visited". For each of these nodes, an attempt is made to match
- up the function declaration with a corresponding function definition,
- which should have a full prototype-format formals list with it. Once
- these match-ups are made, the conversion of the function declarations
- to prototype format can be made. */
-
- visit_each_hash_node (function_name_primary, connect_defs_and_decs);
-
-#endif /* !defined (UNPROTOIZE) */
-
- /* Now convert each file that can be converted (and needs to be). */
-
- visit_each_hash_node (filename_primary, edit_file);
-
-#ifndef UNPROTOIZE
-
- /* If we are working in cplusplus mode, try to rename all .c files to .C
- files. Don't panic if some of the renames don't work. */
-
- if (cplusplus_flag && !nochange_flag)
- visit_each_hash_node (filename_primary, rename_c_file);
-
-#endif /* !defined (UNPROTOIZE) */
-}
-
-static const struct option longopts[] =
-{
- {"version", 0, 0, 'V'},
- {"file_name", 0, 0, 'p'},
- {"quiet", 0, 0, 'q'},
- {"silent", 0, 0, 'q'},
- {"force", 0, 0, 'f'},
- {"keep", 0, 0, 'k'},
- {"nosave", 0, 0, 'N'},
- {"nochange", 0, 0, 'n'},
- {"compiler-options", 1, 0, 'c'},
- {"exclude", 1, 0, 'x'},
- {"directory", 1, 0, 'd'},
-#ifdef UNPROTOIZE
- {"indent", 1, 0, 'i'},
-#else
- {"local", 0, 0, 'l'},
- {"global", 0, 0, 'g'},
- {"c++", 0, 0, 'C'},
- {"syscalls-dir", 1, 0, 'B'},
-#endif
- {0, 0, 0, 0}
-};
-
-extern int main (int, char **const);
-
-int
-main (int argc, char **const argv)
-{
- int longind;
- int c;
- const char *params = "";
-
- pname = strrchr (argv[0], DIR_SEPARATOR);
-#ifdef DIR_SEPARATOR_2
- {
- char *slash;
-
- slash = strrchr (pname ? pname : argv[0], DIR_SEPARATOR_2);
- if (slash)
- pname = slash;
- }
-#endif
- pname = pname ? pname+1 : argv[0];
-
-#ifdef SIGCHLD
- /* We *MUST* set SIGCHLD to SIG_DFL so that the wait4() call will
- receive the signal. A different setting is inheritable */
- signal (SIGCHLD, SIG_DFL);
-#endif
-
- /* Unlock the stdio streams. */
- unlock_std_streams ();
-
- gcc_init_libintl ();
-
- cwd_buffer = getpwd ();
- if (!cwd_buffer)
- {
- notice ("%s: cannot get working directory: %s\n",
- pname, xstrerror(errno));
- return (FATAL_EXIT_CODE);
- }
-
- /* By default, convert the files in the current directory. */
- directory_list = string_list_cons (cwd_buffer, NULL);
-
- while ((c = getopt_long (argc, argv,
-#ifdef UNPROTOIZE
- "c:d:i:knNp:qvVx:",
-#else
- "B:c:Cd:gklnNp:qvVx:",
-#endif
- longopts, &longind)) != EOF)
- {
- if (c == 0) /* Long option. */
- c = longopts[longind].val;
- switch (c)
- {
- case 'p':
- compiler_file_name = optarg;
- break;
- case 'd':
- directory_list
- = string_list_cons (abspath (NULL, optarg), directory_list);
- break;
- case 'x':
- exclude_list = string_list_cons (optarg, exclude_list);
- break;
-
- case 'v':
- case 'V':
- version_flag = 1;
- break;
- case 'q':
- quiet_flag = 1;
- break;
-#if 0
- case 'f':
- force_flag = 1;
- break;
-#endif
- case 'n':
- nochange_flag = 1;
- keep_flag = 1;
- break;
- case 'N':
- nosave_flag = 1;
- break;
- case 'k':
- keep_flag = 1;
- break;
- case 'c':
- params = optarg;
- break;
-#ifdef UNPROTOIZE
- case 'i':
- indent_string = optarg;
- break;
-#else /* !defined (UNPROTOIZE) */
- case 'l':
- local_flag = 1;
- break;
- case 'g':
- global_flag = 1;
- break;
- case 'C':
- cplusplus_flag = 1;
- break;
- case 'B':
- nondefault_syscalls_dir = optarg;
- break;
-#endif /* !defined (UNPROTOIZE) */
- default:
- usage ();
- }
- }
-
- /* Set up compile_params based on -p and -c options. */
- munge_compile_params (params);
-
- n_base_source_files = argc - optind;
-
- /* Now actually make a list of the base source filenames. */
-
- base_source_filenames
- = xmalloc ((n_base_source_files + 1) * sizeof (char *));
- n_base_source_files = 0;
- for (; optind < argc; optind++)
- {
- const char *path = abspath (NULL, argv[optind]);
- int len = strlen (path);
-
- if (path[len-1] == 'c' && path[len-2] == '.')
- base_source_filenames[n_base_source_files++] = path;
- else
- {
- notice ("%s: input file names must have .c suffixes: %s\n",
- pname, shortpath (NULL, path));
- errors++;
- }
- }
-
-#ifndef UNPROTOIZE
- /* We are only interested in the very first identifier token in the
- definition of `va_list', so if there is more junk after that first
- identifier token, delete it from the `varargs_style_indicator'. */
- {
- const char *cp;
-
- for (cp = varargs_style_indicator; ISIDNUM (*cp); cp++)
- continue;
- if (*cp != 0)
- varargs_style_indicator = savestring (varargs_style_indicator,
- cp - varargs_style_indicator);
- }
-#endif /* !defined (UNPROTOIZE) */
-
- if (errors)
- usage ();
- else
- {
- if (version_flag)
- fprintf (stderr, "%s %s%s\n", pname, pkgversion_string,
- version_string);
- do_processing ();
- }
-
- return (errors ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
-}
diff --git a/gcc/recog.c b/gcc/recog.c
index 7c22faec6de..70370e3ad81 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -379,6 +379,16 @@ verify_changes (int num)
if (! memory_address_p (GET_MODE (object), XEXP (object, 0)))
break;
}
+ else if (REG_P (changes[i].old)
+ && asm_noperands (PATTERN (object)) > 0
+ && REG_EXPR (changes[i].old) != NULL_TREE
+ && DECL_ASSEMBLER_NAME_SET_P (REG_EXPR (changes[i].old))
+ && DECL_REGISTER (REG_EXPR (changes[i].old)))
+ {
+ /* Don't allow changes of hard register operands to inline
+ assemblies if they have been defined as register asm ("x"). */
+ break;
+ }
else if (insn_invalid_p (object))
{
rtx pat = PATTERN (object);
diff --git a/gcc/reginfo.c b/gcc/reginfo.c
index 51e69f7f79e..e579c281aa3 100644
--- a/gcc/reginfo.c
+++ b/gcc/reginfo.c
@@ -875,6 +875,8 @@ globalize_reg (int i)
SET_HARD_REG_BIT (fixed_reg_set, i);
SET_HARD_REG_BIT (call_used_reg_set, i);
SET_HARD_REG_BIT (call_fixed_reg_set, i);
+
+ reinit_regs ();
}
diff --git a/gcc/regmove.c b/gcc/regmove.c
index 8ce0ea00da7..bdbd74722fd 100644
--- a/gcc/regmove.c
+++ b/gcc/regmove.c
@@ -45,7 +45,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "df.h"
-static int perhaps_ends_bb_p (rtx);
static int optimize_reg_copy_1 (rtx, rtx, rtx);
static void optimize_reg_copy_2 (rtx, rtx, rtx);
static void optimize_reg_copy_3 (rtx, rtx, rtx);
@@ -208,30 +207,6 @@ try_auto_increment (rtx insn, rtx inc_insn, rtx inc_insn_set, rtx reg,
static int *regno_src_regno;
-
-/* Return 1 if INSN might end a basic block. */
-
-static int perhaps_ends_bb_p (rtx insn)
-{
- switch (GET_CODE (insn))
- {
- case CODE_LABEL:
- case JUMP_INSN:
- /* These always end a basic block. */
- return 1;
-
- case CALL_INSN:
- /* A CALL_INSN might be the last insn of a basic block, if it is inside
- an EH region or if there are nonlocal gotos. Note that this test is
- very conservative. */
- if (nonlocal_goto_handler_labels)
- return 1;
- /* Fall through. */
- default:
- return can_throw_internal (insn);
- }
-}
-
/* INSN is a copy from SRC to DEST, both registers, and SRC does not die
in INSN.
@@ -251,6 +226,7 @@ optimize_reg_copy_1 (rtx insn, rtx dest, rtx src)
rtx dest_death = 0;
int sregno = REGNO (src);
int dregno = REGNO (dest);
+ basic_block bb = BLOCK_FOR_INSN (insn);
/* We don't want to mess with hard regs if register classes are small. */
if (sregno == dregno
@@ -264,12 +240,10 @@ optimize_reg_copy_1 (rtx insn, rtx dest, rtx src)
for (p = NEXT_INSN (insn); p; p = NEXT_INSN (p))
{
- /* ??? We can't scan past the end of a basic block without updating
- the register lifetime info (REG_DEAD/basic_block_live_at_start). */
- if (perhaps_ends_bb_p (p))
- break;
- else if (! INSN_P (p))
+ if (! INSN_P (p))
continue;
+ if (BLOCK_FOR_INSN (p) != bb)
+ break;
if (reg_set_p (src, p) || reg_set_p (dest, p)
/* If SRC is an asm-declared register, it must not be replaced
@@ -457,15 +431,14 @@ optimize_reg_copy_2 (rtx insn, rtx dest, rtx src)
rtx set;
int sregno = REGNO (src);
int dregno = REGNO (dest);
+ basic_block bb = BLOCK_FOR_INSN (insn);
for (p = NEXT_INSN (insn); p; p = NEXT_INSN (p))
{
- /* ??? We can't scan past the end of a basic block without updating
- the register lifetime info (REG_DEAD/basic_block_live_at_start). */
- if (perhaps_ends_bb_p (p))
- break;
- else if (! INSN_P (p))
+ if (! INSN_P (p))
continue;
+ if (BLOCK_FOR_INSN (p) != bb)
+ break;
set = single_set (p);
if (set && SET_SRC (set) == dest && SET_DEST (set) == src
@@ -530,6 +503,7 @@ optimize_reg_copy_3 (rtx insn, rtx dest, rtx src)
int dst_no = REGNO (dest);
rtx p, set;
enum machine_mode old_mode;
+ basic_block bb = BLOCK_FOR_INSN (insn);
if (src_no < FIRST_PSEUDO_REGISTER
|| dst_no < FIRST_PSEUDO_REGISTER
@@ -537,13 +511,12 @@ optimize_reg_copy_3 (rtx insn, rtx dest, rtx src)
|| REG_N_DEATHS (src_no) != 1
|| REG_N_SETS (src_no) != 1)
return;
+
for (p = PREV_INSN (insn); p && ! reg_set_p (src_reg, p); p = PREV_INSN (p))
- /* ??? We can't scan past the end of a basic block without updating
- the register lifetime info (REG_DEAD/basic_block_live_at_start). */
- if (perhaps_ends_bb_p (p))
+ if (INSN_P (p) && BLOCK_FOR_INSN (p) != bb)
break;
-
- if (! p)
+
+ if (! p || BLOCK_FOR_INSN (p) != bb)
return;
if (! (set = single_set (p))
@@ -767,6 +740,7 @@ fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset)
{
rtx p, dst_death = 0;
int length, num_calls = 0, freq_calls = 0;
+ basic_block bb = BLOCK_FOR_INSN (insn);
/* If SRC dies in INSN, we'd have to move the death note. This is
considered to be very unlikely, so we just skip the optimization
@@ -780,12 +754,10 @@ fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset)
{
rtx pset;
- /* ??? We can't scan past the end of a basic block without updating
- the register lifetime info (REG_DEAD/basic_block_live_at_start). */
- if (perhaps_ends_bb_p (p))
- break;
- else if (! INSN_P (p))
+ if (! INSN_P (p))
continue;
+ if (BLOCK_FOR_INSN (p) != bb)
+ break;
if (find_regno_note (p, REG_DEAD, REGNO (dst)))
dst_death = p;
@@ -821,11 +793,10 @@ fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset)
#ifdef AUTO_INC_DEC
for (p = PREV_INSN (insn); p; p = PREV_INSN (p))
{
- if (LABEL_P (p)
- || JUMP_P (p))
- break;
if (! INSN_P (p))
continue;
+ if (BLOCK_FOR_INSN (p) != bb)
+ break;
if (reg_overlap_mentioned_p (dst, PATTERN (p)))
{
if (try_auto_increment (p, insn, 0, dst, newconst, 0))
@@ -835,11 +806,10 @@ fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset)
}
for (p = NEXT_INSN (insn); p; p = NEXT_INSN (p))
{
- if (LABEL_P (p)
- || JUMP_P (p))
- break;
if (! INSN_P (p))
continue;
+ if (BLOCK_FOR_INSN (p) != bb)
+ break;
if (reg_overlap_mentioned_p (dst, PATTERN (p)))
{
try_auto_increment (p, insn, 0, dst, newconst, 1);
@@ -882,40 +852,23 @@ fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset)
return 0;
}
-/* Main entry for the register move optimization. */
+/* A forward pass. Replace output operands with input operands. */
-static unsigned int
-regmove_optimize (void)
+static void
+regmove_forward_pass (void)
{
+ basic_block bb;
rtx insn;
- struct match match;
- int i;
- rtx copy_src, copy_dst;
- int nregs = max_reg_num ();
- /* ??? Hack. Regmove doesn't examine the CFG, and gets mightily
- confused by non-call exceptions ending blocks. */
- if (flag_non_call_exceptions)
- return 0;
-
- df_note_add_problem ();
- df_analyze ();
-
- regstat_init_n_sets_and_refs ();
- regstat_compute_ri ();
-
- regno_src_regno = XNEWVEC (int, nregs);
- for (i = nregs; --i >= 0; )
- regno_src_regno[i] = -1;
+ if (! flag_expensive_optimizations)
+ return;
- /* A forward pass. Replace output operands with input operands. */
+ if (dump_file)
+ fprintf (dump_file, "Starting forward pass...\n");
- if (flag_expensive_optimizations)
+ FOR_EACH_BB (bb)
{
- if (dump_file)
- fprintf (dump_file, "Starting forward pass...\n");
-
- for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
+ FOR_BB_INSNS (bb, insn)
{
rtx set = single_set (insn);
if (! set)
@@ -952,19 +905,33 @@ regmove_optimize (void)
}
}
}
+}
- /* A backward pass. Replace input operands with output operands. */
+/* A backward pass. Replace input operands with output operands. */
+
+static void
+regmove_backward_pass (void)
+{
+ basic_block bb;
+ rtx insn, prev;
if (dump_file)
fprintf (dump_file, "Starting backward pass...\n");
- for (insn = get_last_insn (); insn; insn = PREV_INSN (insn))
+ FOR_EACH_BB_REVERSE (bb)
{
- if (INSN_P (insn))
+ /* ??? Use the safe iterator because fixup_match_2 can remove
+ insns via try_auto_increment. */
+ FOR_BB_INSNS_REVERSE_SAFE (bb, insn, prev)
{
+ struct match match;
+ rtx copy_src, copy_dst;
int op_no, match_no;
int success = 0;
+ if (! INSN_P (insn))
+ continue;
+
if (! find_matches (insn, &match))
continue;
@@ -1117,13 +1084,10 @@ regmove_optimize (void)
{
rtx pset;
- /* ??? We can't scan past the end of a basic block without
- updating the register lifetime info
- (REG_DEAD/basic_block_live_at_start). */
- if (perhaps_ends_bb_p (p))
- break;
- else if (! INSN_P (p))
+ if (! INSN_P (p))
continue;
+ if (BLOCK_FOR_INSN (p) != bb)
+ break;
length++;
@@ -1231,6 +1195,31 @@ regmove_optimize (void)
copy_src_to_dest (insn, copy_src, copy_dst);
}
}
+}
+
+/* Main entry for the register move optimization. */
+
+static unsigned int
+regmove_optimize (void)
+{
+ int i;
+ int nregs = max_reg_num ();
+
+ df_note_add_problem ();
+ df_analyze ();
+
+ regstat_init_n_sets_and_refs ();
+ regstat_compute_ri ();
+
+ regno_src_regno = XNEWVEC (int, nregs);
+ for (i = nregs; --i >= 0; )
+ regno_src_regno[i] = -1;
+
+ /* A forward pass. Replace output operands with input operands. */
+ regmove_forward_pass ();
+
+ /* A backward pass. Replace input operands with output operands. */
+ regmove_backward_pass ();
/* Clean up. */
free (regno_src_regno);
diff --git a/gcc/reload.h b/gcc/reload.h
index 17d8a3e04b2..3789680f7ca 100644
--- a/gcc/reload.h
+++ b/gcc/reload.h
@@ -205,10 +205,22 @@ struct insn_chain
all insns that need reloading. */
struct insn_chain *next_need_reload;
- /* The basic block this insn is in. */
- int block;
/* The rtx of the insn. */
rtx insn;
+
+ /* The basic block this insn is in. */
+ int block;
+
+ /* Nonzero if find_reloads said the insn requires reloading. */
+ unsigned int need_reload:1;
+ /* Nonzero if find_reloads needs to be run during reload_as_needed to
+ perform modifications on any operands. */
+ unsigned int need_operand_change:1;
+ /* Nonzero if eliminate_regs_in_insn said it requires eliminations. */
+ unsigned int need_elim:1;
+ /* Nonzero if this insn was inserted by perform_caller_saves. */
+ unsigned int is_caller_save_insn:1;
+
/* Register life information: record all live hard registers, and
all live pseudos that have a hard register. This set also
contains pseudos spilled by IRA. */
@@ -221,16 +233,6 @@ struct insn_chain
/* Indicates which registers have already been used for spills. */
HARD_REG_SET used_spill_regs;
-
- /* Nonzero if find_reloads said the insn requires reloading. */
- unsigned int need_reload:1;
- /* Nonzero if find_reloads needs to be run during reload_as_needed to
- perform modifications on any operands. */
- unsigned int need_operand_change:1;
- /* Nonzero if eliminate_regs_in_insn said it requires eliminations. */
- unsigned int need_elim:1;
- /* Nonzero if this insn was inserted by perform_caller_saves. */
- unsigned int is_caller_save_insn:1;
};
/* A chain of insn_chain structures to describe all non-note insns in
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 9a485f08300..fcf0bd3fc4d 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -4367,29 +4367,39 @@ reload_as_needed (int live_known)
SET_REGNO_REG_SET (&reg_has_output_reload,
REGNO (XEXP (in_reg, 0)));
}
- else if ((code == PRE_INC || code == PRE_DEC
- || code == POST_INC || code == POST_DEC))
+ else if (code == PRE_INC || code == PRE_DEC
+ || code == POST_INC || code == POST_DEC)
{
- int in_hard_regno;
int in_regno = REGNO (XEXP (in_reg, 0));
if (reg_last_reload_reg[in_regno] != NULL_RTX)
{
+ int in_hard_regno;
+ bool forget_p = true;
+
in_hard_regno = REGNO (reg_last_reload_reg[in_regno]);
- gcc_assert (TEST_HARD_REG_BIT (reg_reloaded_valid,
- in_hard_regno));
- for (x = old_prev ? NEXT_INSN (old_prev) : insn;
- x != old_next;
- x = NEXT_INSN (x))
- if (x == reg_reloaded_insn[in_hard_regno])
- break;
+ if (TEST_HARD_REG_BIT (reg_reloaded_valid,
+ in_hard_regno))
+ {
+ for (x = old_prev ? NEXT_INSN (old_prev) : insn;
+ x != old_next;
+ x = NEXT_INSN (x))
+ if (x == reg_reloaded_insn[in_hard_regno])
+ {
+ forget_p = false;
+ break;
+ }
+ }
/* If for some reasons, we didn't set up
reg_last_reload_reg in this insn,
invalidate inheritance from previous
insns for the incremented/decremented
register. Such registers will be not in
- reg_has_output_reload. */
- if (x == old_next)
+ reg_has_output_reload. Invalidate it
+ also if the corresponding element in
+ reg_reloaded_insn is also
+ invalidated. */
+ if (forget_p)
forget_old_reloads_1 (XEXP (in_reg, 0),
NULL_RTX, NULL);
}
diff --git a/gcc/rtl.def b/gcc/rtl.def
index 33bf6bd1879..662a9f0c8b7 100644
--- a/gcc/rtl.def
+++ b/gcc/rtl.def
@@ -1088,7 +1088,11 @@ DEF_RTL_EXPR(FINAL_ABSENCE_SET, "final_absence_set", "ss", RTX_EXTRA)
guard for the bypass. The function will get the two insns as
parameters. If the function returns zero the bypass will be
ignored for this case. Additional guard is necessary to recognize
- complicated bypasses, e.g. when consumer is load address. */
+ complicated bypasses, e.g. when consumer is load address. If there
+ are more one bypass with the same output and input insns, the
+ chosen bypass is the first bypass with a guard in description whose
+ guard function returns nonzero. If there is no such bypass, then
+ bypass without the guard function is chosen. */
DEF_RTL_EXPR(DEFINE_BYPASS, "define_bypass", "issS", RTX_EXTRA)
/* (define_automaton string) describes names of automata generated and
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 7e80603dd53..bdb41d62b55 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -141,10 +141,10 @@ typedef struct
stricter alignment; OFFSET is the offset of the MEM within that object. */
typedef struct mem_attrs GTY(())
{
- alias_set_type alias; /* Memory alias set. */
tree expr; /* expr corresponding to MEM. */
rtx offset; /* Offset from start of DECL, as CONST_INT. */
rtx size; /* Size in bytes, as a CONST_INT. */
+ alias_set_type alias; /* Memory alias set. */
unsigned int align; /* Alignment of MEM in bits. */
} mem_attrs;
@@ -1806,6 +1806,22 @@ extern rtx canonicalize_condition (rtx, rtx, int, rtx *, rtx, int, int);
being made. */
extern rtx get_condition (rtx, rtx *, int, int);
+/* Information about a subreg of a hard register. */
+struct subreg_info
+{
+ /* Offset of first hard register involved in the subreg. */
+ int offset;
+ /* Number of hard registers involved in the subreg. */
+ int nregs;
+ /* Whether this subreg can be represented as a hard reg with the new
+ mode. */
+ bool representable_p;
+};
+
+extern void subreg_get_info (unsigned int, enum machine_mode,
+ unsigned int, enum machine_mode,
+ struct subreg_info *);
+
/* lists.c */
extern void free_EXPR_LIST_list (rtx *);
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 26f69b09300..73d3b08d940 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -39,18 +39,6 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "tree.h"
-/* Information about a subreg of a hard register. */
-struct subreg_info
-{
- /* Offset of first hard register involved in the subreg. */
- int offset;
- /* Number of hard registers involved in the subreg. */
- int nregs;
- /* Whether this subreg can be represented as a hard reg with the new
- mode. */
- bool representable_p;
-};
-
/* Forward declarations */
static void set_of_1 (rtx, const_rtx, void *);
static bool covers_regno_p (const_rtx, unsigned int);
@@ -58,9 +46,6 @@ static bool covers_regno_no_parallel_p (const_rtx, unsigned int);
static int rtx_referenced_p_1 (rtx *, void *);
static int computed_jump_p_1 (const_rtx);
static void parms_set (rtx, const_rtx, void *);
-static void subreg_get_info (unsigned int, enum machine_mode,
- unsigned int, enum machine_mode,
- struct subreg_info *);
static unsigned HOST_WIDE_INT cached_nonzero_bits (const_rtx, enum machine_mode,
const_rtx, enum machine_mode,
@@ -3090,7 +3075,7 @@ subreg_lsb (const_rtx x)
offset - The byte offset.
ymode - The mode of a top level SUBREG (or what may become one).
info - Pointer to structure to fill in. */
-static void
+void
subreg_get_info (unsigned int xregno, enum machine_mode xmode,
unsigned int offset, enum machine_mode ymode,
struct subreg_info *info)
@@ -4061,7 +4046,8 @@ nonzero_bits1 (const_rtx x, enum machine_mode mode, const_rtx known_x,
low-order bits by left shifts. */
if (GET_CODE (XEXP (x, 1)) == CONST_INT
&& INTVAL (XEXP (x, 1)) >= 0
- && INTVAL (XEXP (x, 1)) < HOST_BITS_PER_WIDE_INT)
+ && INTVAL (XEXP (x, 1)) < HOST_BITS_PER_WIDE_INT
+ && INTVAL (XEXP (x, 1)) < GET_MODE_BITSIZE (GET_MODE (x)))
{
enum machine_mode inner_mode = GET_MODE (x);
unsigned int width = GET_MODE_BITSIZE (inner_mode);
@@ -4542,7 +4528,8 @@ num_sign_bit_copies1 (const_rtx x, enum machine_mode mode, const_rtx known_x,
num0 = cached_num_sign_bit_copies (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
if (GET_CODE (XEXP (x, 1)) == CONST_INT
- && INTVAL (XEXP (x, 1)) > 0)
+ && INTVAL (XEXP (x, 1)) > 0
+ && INTVAL (XEXP (x, 1)) < GET_MODE_BITSIZE (GET_MODE (x)))
num0 = MIN ((int) bitwidth, num0 + INTVAL (XEXP (x, 1)));
return num0;
@@ -4551,7 +4538,8 @@ num_sign_bit_copies1 (const_rtx x, enum machine_mode mode, const_rtx known_x,
/* Left shifts destroy copies. */
if (GET_CODE (XEXP (x, 1)) != CONST_INT
|| INTVAL (XEXP (x, 1)) < 0
- || INTVAL (XEXP (x, 1)) >= (int) bitwidth)
+ || INTVAL (XEXP (x, 1)) >= (int) bitwidth
+ || INTVAL (XEXP (x, 1)) >= GET_MODE_BITSIZE (GET_MODE (x)))
return 1;
num0 = cached_num_sign_bit_copies (XEXP (x, 0), mode,
diff --git a/gcc/scan-decls.c b/gcc/scan-decls.c
deleted file mode 100644
index c0e2009150f..00000000000
--- a/gcc/scan-decls.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/* scan-decls.c - Extracts declarations from cpp output.
- Copyright (C) 1993, 1995, 1997, 1998,
- 1999, 2000, 2003, 2004, 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 3, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>.
-
- Written by Per Bothner <bothner@cygnus.com>, July 1993. */
-
-#include "bconfig.h"
-#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-#include "cpplib.h"
-#include "scan.h"
-
-static void skip_to_closing_brace (cpp_reader *);
-static const cpp_token *get_a_token (cpp_reader *);
-
-int brace_nesting = 0;
-
-/* The first extern_C_braces_length elements of extern_C_braces
- indicate the (brace nesting levels of) left braces that were
- prefixed by extern "C". */
-int extern_C_braces_length = 0;
-/* 20 is not enough anymore on Solaris 9. */
-#define MAX_EXTERN_C_BRACES 200
-char extern_C_braces[MAX_EXTERN_C_BRACES];
-#define in_extern_C_brace (extern_C_braces_length>0)
-
-/* True if the function declaration currently being scanned is
- prefixed by extern "C". */
-int current_extern_C = 0;
-
-/* Get a token but skip padding. */
-static const cpp_token *
-get_a_token (cpp_reader *pfile)
-{
- for (;;)
- {
- const cpp_token *result = cpp_get_token (pfile);
- if (result->type != CPP_PADDING)
- return result;
- }
-}
-
-static void
-skip_to_closing_brace (cpp_reader *pfile)
-{
- int nesting = 1;
- for (;;)
- {
- enum cpp_ttype token = get_a_token (pfile)->type;
-
- if (token == CPP_EOF)
- break;
- if (token == CPP_OPEN_BRACE)
- nesting++;
- if (token == CPP_CLOSE_BRACE && --nesting == 0)
- break;
- }
-}
-
-/* This function scans a C source file (actually, the output of cpp),
- reading from FP. It looks for function declarations, and
- external variable declarations.
-
- The following grammar (as well as some extra stuff) is recognized:
-
- declaration:
- (decl-specifier)* declarator ("," declarator)* ";"
- decl-specifier:
- identifier
- keyword
- extern "C"
- declarator:
- (ptr-operator)* dname [ "(" argument-declaration-list ")" ]
- ptr-operator:
- ("*" | "&") ("const" | "volatile")*
- dname:
- identifier
-
-Here dname is the actual name being declared.
-*/
-
-int
-scan_decls (cpp_reader *pfile, int argc ATTRIBUTE_UNUSED,
- char **argv ATTRIBUTE_UNUSED)
-{
- int saw_extern, saw_inline;
- cpp_token prev_id;
- const cpp_token *token;
-
- new_statement:
- token = get_a_token (pfile);
-
- handle_statement:
- current_extern_C = 0;
- saw_extern = 0;
- saw_inline = 0;
- if (token->type == CPP_OPEN_BRACE)
- {
- /* Pop an 'extern "C"' nesting level, if appropriate. */
- if (extern_C_braces_length
- && extern_C_braces[extern_C_braces_length - 1] == brace_nesting)
- extern_C_braces_length--;
- brace_nesting--;
- goto new_statement;
- }
- if (token->type == CPP_OPEN_BRACE)
- {
- brace_nesting++;
- goto new_statement;
- }
-
- if (token->type == CPP_EOF)
- return 0;
-
- if (token->type == CPP_SEMICOLON)
- goto new_statement;
- if (token->type != CPP_NAME)
- goto new_statement;
-
- prev_id.type = CPP_EOF;
- for (;;)
- {
- switch (token->type)
- {
- default:
- goto handle_statement;
- case CPP_MULT:
- case CPP_AND:
- /* skip */
- break;
-
- case CPP_COMMA:
- case CPP_SEMICOLON:
- if (prev_id.type != CPP_EOF && saw_extern)
- {
- recognized_extern (&prev_id);
- }
- if (token->type == CPP_COMMA)
- break;
- /* ... fall through ... */
- case CPP_OPEN_BRACE: case CPP_CLOSE_BRACE:
- goto new_statement;
-
- case CPP_EOF:
- return 0;
-
- case CPP_OPEN_PAREN:
- /* Looks like this is the start of a formal parameter list. */
- if (prev_id.type != CPP_EOF)
- {
- int nesting = 1;
- int have_arg_list = 0;
- const struct line_map *map;
- unsigned int line;
- for (;;)
- {
- token = get_a_token (pfile);
- if (token->type == CPP_OPEN_PAREN)
- nesting++;
- else if (token->type == CPP_CLOSE_PAREN)
- {
- nesting--;
- if (nesting == 0)
- break;
- }
- else if (token->type == CPP_EOF)
- break;
- else if (token->type == CPP_NAME
- || token->type == CPP_ELLIPSIS)
- have_arg_list = 1;
- }
- map = linemap_lookup (&line_table, token->src_loc);
- line = SOURCE_LINE (map, token->src_loc);
- recognized_function (&prev_id, line,
- (saw_inline ? 'I'
- : in_extern_C_brace || current_extern_C
- ? 'F' : 'f'), have_arg_list);
- token = get_a_token (pfile);
- if (token->type == CPP_OPEN_BRACE)
- {
- /* skip body of (normally) inline function */
- skip_to_closing_brace (pfile);
- goto new_statement;
- }
-
- /* skip a possible __attribute__ or throw expression after the
- parameter list */
- while (token->type != CPP_SEMICOLON && token->type != CPP_EOF)
- token = get_a_token (pfile);
- if (token->type == CPP_EOF)
- return 0;
- goto new_statement;
- }
- break;
- case CPP_NAME:
- /* "inline" and "extern" are recognized but skipped */
- if (cpp_ideq (token, "inline"))
- {
- saw_inline = 1;
- }
- else if (cpp_ideq (token, "extern"))
- {
- saw_extern = 1;
- token = get_a_token (pfile);
- if (token->type == CPP_STRING
- && token->val.str.len == 1
- && token->val.str.text[0] == 'C')
- {
- current_extern_C = 1;
- token = get_a_token (pfile);
- if (token->type == CPP_OPEN_BRACE)
- {
- brace_nesting++;
- extern_C_braces[extern_C_braces_length++]
- = brace_nesting;
- if (extern_C_braces_length >= MAX_EXTERN_C_BRACES)
- {
- fprintf (stderr,
- "Internal error: out-of-bounds index\n");
- exit (FATAL_EXIT_CODE);
- }
- goto new_statement;
- }
- }
- else
- continue;
- break;
- }
- /* This may be the name of a variable or function. */
- prev_id = *token;
- break;
- }
- token = get_a_token (pfile);
- }
-}
diff --git a/gcc/scan-types.sh b/gcc/scan-types.sh
deleted file mode 100755
index 59d786a9fd0..00000000000
--- a/gcc/scan-types.sh
+++ /dev/null
@@ -1,142 +0,0 @@
-#! /bin/sh
-# Deduce values of standard ANSI and POSIX types (e.g. size_t, pid_t).
-# Emits macros definitions for these, and some other types.
-# Intended to be used to massage the sys-protos.h file.
-# Expects one arg, which is the GCC source directory.
-
-CC=${CC-"./xgcc -B$1/"}
-CPP=${CPP-`echo ${CC} -E -I"$1/"`}
-SED=sed
-
-# Generate definitions for the standard types (such as mode_t)
-# compatible with those in the standard C header files.
-# It works by a dummy program through the C pre-processor, and then
-# using sed to search for typedefs in the output.
-
-cat >st-dummy.c <<!EOF!
-#include <sys/types.h>
-#include <stddef.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <time.h>
-#include <signal.h>
-#ifdef size_t
-typedef size_t Xsize_t;
-#elif defined(__SIZE_TYPE__)
-typedef __SIZE_TYPE__ Xsize_t;
-#endif
-#ifdef va_list
-typedef va_list XXXva_list;
-#endif
-!EOF!
-
-if ${CPP} st-dummy.c >TMP ; then true
-else
- echo "scan-types: could not invoke ${CPP} on st-dummy.c" 1>&2 ; exit 1
-fi
-tr ' ' ' ' <TMP >st-dummy.out
-
-for TYPE in dev_t clock_t fpos_t gid_t ino_t mode_t nlink_t off_t pid_t size_t ssize_t time_t uid_t va_list int32_t uint_32_t ; do
- IMPORTED=`eval 'echo $'"$TYPE"`
- if [ -n "${IMPORTED}" ] ; then
- eval "$TYPE='$IMPORTED"
- else
- # Search st-dummy.out for a typedef for $TYPE, and write it out
- # to TMP in #define syntax.
- rm -f TMP
- ${SED} -n -e "s|.*typedef *\(.*\) X*$TYPE *;.*|\1|w TMP" <st-dummy.out>/dev/null
- # Now select the first definition.
- if [ -s TMP ]; then
- # VALUE is now the typedef'd definition of $TYPE.
- eval "VALUE='`${SED} -e 's| *$||' -e '2,$d' <TMP`'"
- # Unless VALUE contains a blank, look for a typedef for it
- # in turn (this could be a loop, but that would be over-kill).
- # Ensure $VALUE is double quoted to protect cases where it
- # contains an asterisk and would cause filename expansion.
- # E.g. when va_list is "char *".
- if echo "$VALUE" | grep " " >/dev/null ; then true
- else
- rm -f TMP
- ${SED} -n -e "s|.*typedef[ ][ ]*\(.*[^a-zA-Z0-9_]\)${VALUE}[ ]*;.*|\1|w TMP" <st-dummy.out>/dev/null
- if [ -s TMP ]; then
- eval "VALUE='`${SED} -e '2,$d' -e 's|[ ]*$||' <TMP`'"
- fi
- fi
- eval "$TYPE='$VALUE'"
- fi
- fi
-done
-
-cat <<!EOF!
-#define ${macro_prefix}clock_t ${clock_t-int /* default */}
-#define ${macro_prefix}dev_t ${dev_t-int /* default */}
-#define ${macro_prefix}fpos_t ${fpos_t-long /* default */}
-#define ${macro_prefix}gid_t ${gid_t-int /* default */}
-#define ${macro_prefix}ino_t ${ino_t-int /* default */}
-#define ${macro_prefix}mode_t ${mode_t-int /* default */}
-#define ${macro_prefix}nlink_t ${nlink_t-int /* default */}
-#define ${macro_prefix}off_t ${off_t-long /* default */}
-#define ${macro_prefix}pid_t ${pid_t-int /* default */}
-#define ${macro_prefix}ptrdiff_t __PTRDIFF_TYPE__
-#define ${macro_prefix}size_t __SIZE_TYPE__
-#define ${macro_prefix}time_t ${time_t-int /* default */}
-#define ${macro_prefix}uid_t ${uid_t-int /* default */}
-#define ${macro_prefix}wchar_t __WCHAR_TYPE__
-#define ${macro_prefix}int32_t ${int32_t-int /* default */}
-#define ${macro_prefix}uint32_t ${uint32_t-unsigned int /* default */}
-!EOF!
-
-# (wait_arg_t*) should be (int*), according to Posix, but
-# BSD traditionally used (union wait*). Use (void*) to allow either usage.
-echo "#define ${macro_prefix}wait_arg_t void"
-
-# ssize_t is the signed version of size_t
-if [ -n "${ssize_t}" ] ; then
- echo "#define ${macro_prefix}ssize_t ${ssize_t}"
-elif [ -z "${size_t}" ] ; then
- echo "#define ${macro_prefix}ssize_t long"
-else
- # Remove "unsigned" from ${size_t} to get ${ssize_t}.
- tmp="`echo ${size_t} | ${SED} -e 's|unsigned||g' -e 's| | |g'`"
- if [ -z "$tmp" ] ; then
- tmp=int
- else
- # check $tmp doesn't conflict with <unistd.h>
- echo "#include <unistd.h>
- extern $tmp read();" >st-dummy.c
- ${CC} -c st-dummy.c >/dev/null 2>&1 || tmp=int
- fi
- echo "#define ${macro_prefix}ssize_t $tmp /* default */"
-fi
-
-# va_list can cause problems (e.g. some systems have va_list as a struct).
-# Check to see if ${va_list-char*} really is compatible with stdarg.h.
-cat >st-dummy.c <<!EOF!
-#define X_va_list ${va_list-char* /* default */}
-extern long foo(X_va_list ap); /* Check that X_va_list compiles on its own */
-#include <stdarg.h>
-long foo(X_va_list ap) { return va_arg(ap, long); }
-long bar(int i, ...)
-{ va_list ap; long j; va_start(ap, i); j = foo(ap); va_end(ap); return j; }
-!EOF!
-if ${CC} -c st-dummy.c >/dev/null 2>&1 ; then
- # Ok: We have something that works.
- echo "#define ${macro_prefix}va_list ${va_list-char* /* default */}"
-else
- # No, it breaks. Indicate that <stdarg.h> must be included.
- echo "#define ${macro_prefix}NEED_STDARG_H
-#define ${macro_prefix}va_list va_list"
-fi
-
-# stuff needed for curses.h
-
-# This isn't correct for SVR4 (for example). However, we only
-# use this when adding a missing prototype, so it shouldn't matter.
-echo "#define chtype int"
-# sys-protos.h uses non-standard names (due to the CHTYPE argument problem).
-echo "#define box32 box"
-echo "#define initscr32 initscr"
-echo "#define w32addch waddch"
-echo "#define w32insch winsch"
-
-rm -f st-dummy.c st-dummy.o TMP st-dummy.out
diff --git a/gcc/scan.c b/gcc/scan.c
deleted file mode 100644
index a66107933a4..00000000000
--- a/gcc/scan.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/* Utility functions for scan-decls and fix-header programs.
- Copyright (C) 1993, 1994, 1998, 2002, 2003, 2007, 2008
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 3, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
-
-#include "bconfig.h"
-#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-#include "scan.h"
-
-int lineno = 1;
-int source_lineno = 1;
-sstring source_filename;
-
-void
-make_sstring_space (sstring *str, int count)
-{
- int cur_pos = str->ptr - str->base;
- int cur_size = str->limit - str->base;
- int new_size = cur_pos + count + 100;
-
- if (new_size <= cur_size)
- return;
-
- str->base = (char *) xrealloc (str->base, new_size);
- str->ptr = str->base + cur_size;
- str->limit = str->base + new_size;
-}
-
-void
-sstring_append (sstring *dst, sstring *src)
-{
- char *d, *s;
- int count = SSTRING_LENGTH (src);
-
- MAKE_SSTRING_SPACE (dst, count + 1);
- d = dst->ptr;
- s = src->base;
- while (--count >= 0) *d++ = *s++;
- dst->ptr = d;
- *d = 0;
-}
-
-int
-scan_ident (FILE *fp, sstring *s, int c)
-{
- s->ptr = s->base;
- if (ISIDST (c))
- {
- for (;;)
- {
- SSTRING_PUT (s, c);
- c = getc (fp);
- if (c == EOF || ! ISIDNUM (c))
- break;
- }
- }
- MAKE_SSTRING_SPACE (s, 1);
- *s->ptr = 0;
- return c;
-}
-
-int
-scan_string (FILE *fp, sstring *s, int init)
-{
- int c;
-
- for (;;)
- {
- c = getc (fp);
- if (c == EOF || c == '\n')
- break;
- if (c == init)
- {
- c = getc (fp);
- break;
- }
- if (c == '\\')
- {
- c = getc (fp);
- if (c == EOF)
- break;
- if (c == '\n')
- continue;
- }
- SSTRING_PUT (s, c);
- }
- MAKE_SSTRING_SPACE (s, 1);
- *s->ptr = 0;
- return c;
-}
-
-/* Skip horizontal white spaces (spaces, tabs, and C-style comments). */
-
-int
-skip_spaces (FILE *fp, int c)
-{
- for (;;)
- {
- if (c == ' ' || c == '\t')
- c = getc (fp);
- else if (c == '/')
- {
- c = getc (fp);
- if (c != '*')
- {
- ungetc (c, fp);
- return '/';
- }
- c = getc (fp);
- for (;;)
- {
- if (c == EOF)
- return EOF;
- else if (c != '*')
- {
- if (c == '\n')
- source_lineno++, lineno++;
- c = getc (fp);
- }
- else if ((c = getc (fp)) == '/')
- return getc (fp);
- }
- }
- else
- break;
- }
- return c;
-}
-
-int
-read_upto (FILE *fp, sstring *str, int delim)
-{
- int ch;
-
- for (;;)
- {
- ch = getc (fp);
- if (ch == EOF || ch == delim)
- break;
- SSTRING_PUT (str, ch);
- }
- MAKE_SSTRING_SPACE (str, 1);
- *str->ptr = 0;
- return ch;
-}
-
-int
-get_token (FILE *fp, sstring *s)
-{
- int c;
-
- s->ptr = s->base;
- retry:
- c = ' ';
- c = skip_spaces (fp, c);
- if (c == '\n')
- {
- source_lineno++;
- lineno++;
- goto retry;
- }
- if (c == '#')
- {
- c = get_token (fp, s);
- if (c == INT_TOKEN)
- {
- source_lineno = atoi (s->base) - 1; /* '\n' will add 1 */
- get_token (fp, &source_filename);
- }
- for (;;)
- {
- c = getc (fp);
- if (c == EOF)
- return EOF;
- if (c == '\n')
- {
- source_lineno++;
- lineno++;
- goto retry;
- }
- }
- }
- if (c == EOF)
- return EOF;
- if (ISDIGIT (c))
- {
- do
- {
- SSTRING_PUT (s, c);
- c = getc (fp);
- } while (c != EOF && ISDIGIT (c));
- ungetc (c, fp);
- c = INT_TOKEN;
- goto done;
- }
- if (ISIDST (c))
- {
- c = scan_ident (fp, s, c);
- ungetc (c, fp);
- return IDENTIFIER_TOKEN;
- }
- if (c == '\'' || c == '"')
- {
- c = scan_string (fp, s, c);
- ungetc (c, fp);
- return c == '\'' ? CHAR_TOKEN : STRING_TOKEN;
- }
- SSTRING_PUT (s, c);
- done:
- MAKE_SSTRING_SPACE (s, 1);
- *s->ptr = 0;
- return c;
-}
-
-unsigned int
-hashstr (const char *str, unsigned int len)
-{
- unsigned int n = len;
- unsigned int r = 0;
- const unsigned char *s = (const unsigned char *) str;
-
- do
- r = r * 67 + (*s++ - 113);
- while (--n);
- return r + len;
-}
diff --git a/gcc/scan.h b/gcc/scan.h
deleted file mode 100644
index 0a1b1af9647..00000000000
--- a/gcc/scan.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* scan.h - Utility declarations for scan-decls and fix-header programs.
- Copyright (C) 1993, 1998, 1999, 2003, 2004, 2007, 2008 Free Software
- Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 3, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
-
-#include <stdio.h>
-
-typedef struct sstring
-{
- char *base;
- char *ptr;
- char *limit;
-} sstring;
-
-#define INIT_SSTRING(STR) ((STR)->base = 0, (STR)->ptr = 0, (STR)->limit = 0)
-#define FREE_SSTRING(STR) do { if ((STR)->base) free (STR)->base; } while(0)
-#define SSTRING_PUT(STR, C) do {\
- if ((STR)->limit <= (STR)->ptr) make_sstring_space (STR, 1); \
- *(STR)->ptr++ = (C); } while (0)
-#define SSTRING_LENGTH(STR) ((STR)->ptr - (STR)->base)
-#define MAKE_SSTRING_SPACE(STR, COUNT) \
- if ((STR)->limit - (STR)->ptr < (COUNT)) make_sstring_space (STR, COUNT);
-
-struct partial_proto;
-struct fn_decl
-{
- const char *fname;
- const char *rtype;
- const char *params;
- struct partial_proto *partial;
-};
-
-struct cpp_token;
-
-extern void sstring_append (sstring *, sstring *);
-extern void make_sstring_space (sstring *, int);
-extern int skip_spaces (FILE *, int);
-extern int scan_ident (FILE *, sstring *, int);
-extern int scan_string (FILE *, sstring *, int);
-extern int read_upto (FILE *, sstring *, int);
-extern unsigned long hash (const char *);
-extern void recognized_function (const struct cpp_token *,
- unsigned int, int, int);
-extern void recognized_extern (const struct cpp_token *);
-extern unsigned int hashstr (const char *, unsigned int);
-
-extern int scan_decls (struct cpp_reader *, int, char **);
-
-/* get_token is a simple C lexer. */
-#define IDENTIFIER_TOKEN 300
-#define CHAR_TOKEN 301
-#define STRING_TOKEN 302
-#define INT_TOKEN 303
-extern int get_token (FILE *, sstring *);
-
-/* Current file and line number, taking #-directives into account */
-extern int source_lineno;
-extern sstring source_filename;
-/* Current physical line number */
-extern int lineno;
-
-extern struct line_maps line_table;
diff --git a/gcc/sort-protos b/gcc/sort-protos
deleted file mode 100755
index 493e9f08a8f..00000000000
--- a/gcc/sort-protos
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-# Sort the sys-protos.h file in its usual order.
-# Invoke as `sort-protos sys-protos.h'.
-
-input=$1
-
-sed 's/\(.*[ \*]\)\([a-zA-Z0-9_][a-zA-Z0-9_]*\)[ ]*\(([^\*].*\)$/\2%\1%\3/' $input | sort -u | awk -F% '{printf "%-30.30s%s%s\n", $2, $1, $3}' > tmp.$input
-
-mv -f tmp.$input $input
diff --git a/gcc/sys-protos.h b/gcc/sys-protos.h
deleted file mode 100644
index 3f06f274e15..00000000000
--- a/gcc/sys-protos.h
+++ /dev/null
@@ -1,1353 +0,0 @@
-extern int TLappend(/* ??? */);
-extern int TLassign(/* ??? */);
-extern int TLclose(/* ??? */);
-extern int TLdelete(/* ??? */);
-extern int TLfreeentry(/* ??? */);
-extern ENTRY TLgetentry(/* ??? */);
-extern unsigned char * TLgetfield(/* ??? */);
-extern int TLopen(/* ??? */);
-extern int TLread(/* ??? */);
-extern int TLsearch1(/* ??? */);
-extern int TLsubst(/* ??? */);
-extern int TLsync(/* ??? */);
-extern int TLwrite(/* ??? */);
-extern int __acancel(int, const long int *, int);
-extern int __aread(int, int, char *, uint, ecb_t *);
-extern void __assert(const char *, const char *, int);
-extern int __asyncio(int, aioop_t *, int);
-extern int __awrite(int, int, char *, uint, ecb_t *);
-extern int __evcntl(evver_t, evcntlcmds_t, long int, long int);
-extern int __evexit(evver_t, idtype_t, id_t, const ecb_t *);
-extern int __evexitset(evver_t, const procset_t *, hostid_t, const ecb_t *);
-extern int __evpoll(evver_t, evpollcmds_t, event_t *, int, const hrtime_t *);
-extern int __evpollmore(evver_t, event_t *, int);
-extern int __evpost(evver_t, event_t *, int, int);
-extern int __evqcntl(evver_t, int, evqcntlcmds_t, long int);
-extern int __evsig(evver_t, const sigset_t *, const ecb_t *, evsiginfo_t *, int);
-extern int __evtrap(evver_t, evpollcmds_t, event_t *, int, long int, void (*) (event_t *, int, long int, evcontext_t *), const evta_t *);
-extern int __evtrapcancel(evver_t, long int *, int);
-extern int __filbuf(FILE *);
-extern int __flsbuf(int, FILE *);
-extern major_t __major(int, dev_t);
-extern dev_t __makedev(int, major_t, minor_t);
-extern minor_t __minor(int, dev_t);
-extern long int __priocntl(/* ??? */);
-extern long int __priocntlset(/* ??? */);
-extern void _exit(int);
-extern int _filbuf(FILE *);
-extern int _flsbuf(unsigned int, FILE *);
-extern int _fxstat(int, int, struct stat *);
-extern u_long _getlong(/* ??? */);
-extern u_short _getshort(/* ??? */);
-extern int _getsyx(int *, int *);
-extern int _longjmp(jmp_buf, int);
-extern int _lxstat(int, const char *, struct stat *);
-extern int _meta(int);
-extern struct nd_hostservlist _netdir_getbyaddr(struct netconfig *, struct netbuf *);
-extern struct nd_addrlist * _netdir_getbyname(struct netconfig *, struct nd_hostserv *);
-extern int _overlay(WINDOW *, WINDOW *, int);
-extern int _ring(int);
-extern int _rpc_dtbsize(/* ??? */);
-extern int _rpc_endconf(/* ??? */);
-extern u_int _rpc_get_a_size(/* ??? */);
-extern u_int _rpc_get_t_size(/* ??? */);
-extern struct netconfig * _rpc_getconf(/* ??? */);
-extern struct netconfig * _rpc_getconfip(/* ??? */);
-extern char * _rpc_gethostname(/* ??? */);
-extern int _rpc_setconf(/* ??? */);
-extern void _s_aligned_copy(/* ??? */);
-extern struct _si_user * _s_checkfd(/* ??? */);
-extern void _s_close(/* ??? */);
-extern int _s_do_ioctl(/* ??? */);
-extern int _s_getfamily(/* ??? */);
-extern int _s_getudata(/* ??? */);
-extern int _s_is_ok(/* ??? */);
-extern struct netconfig * _s_match(/* ??? */);
-extern int _s_max(/* ??? */);
-extern int _s_min(/* ??? */);
-extern struct _si_user * _s_open(/* ??? */);
-extern int _s_soreceive(/* ??? */);
-extern int _s_sosend(/* ??? */);
-extern int _s_uxpathlen(/* ??? */);
-extern int _setecho(int);
-extern int _setjmp(jmp_buf);
-extern int _setnonl(int);
-extern void _setqiflush(int);
-extern char * _taddr2uaddr(struct netconfig *, struct netbuf *);
-extern int _tolower(int);
-extern int _toupper(int);
-extern struct netbuf * _uaddr2taddr(struct netconfig *, char *);
-extern bool _xdr_yprequest(/* ??? */);
-extern bool _xdr_ypresponse(/* ??? */);
-extern int _xftw(int, const char *, int (*) (const char *, const struct stat *, int), int);
-extern int _xmknod(int, const char *, mode_t, dev_t);
-extern int _xstat(int, const char *, struct stat *);
-extern int _yp_dobind(/* ??? */);
-extern long int a64l(const char *);
-extern char * aatos(char *, struct address *, int);
-extern void abort(void);
-extern int abs(int);
-extern int access(const char *, int);
-extern int acct(const char *);
-extern double acos(double);
-extern float acosf(float);
-extern double acosh(double);
-extern int addexportent(FILE *, char *, char *);
-extern int addseverity(int, const char *);
-extern int adjtime(struct timeval *, struct timeval *);
-extern int advance(const char *, const char *);
-extern unsigned int alarm(unsigned int);
-extern void * alloca(size_t);
-extern int and(void);
-extern int ascftime(char *, const char *, const struct tm *);
-extern char * asctime(const struct tm *);
-extern double asin(double);
-extern float asinf(float);
-extern double asinh(double);
-extern struct address * astoa(char *, struct address *);
-extern double atan(double);
-extern double atan2(double, double);
-extern float atan2f(float, float);
-extern float atanf(float);
-extern double atanh(double);
-extern int atexit(void (*) (void));
-extern double atof(const char *);
-extern int atoi(const char *);
-extern long int atol(const char *);
-extern char * atos(char *, struct netbuf *, int);
-extern void auth_destroy(AUTH *);
-extern AUTH * authdes_create(/* ??? */);
-extern void authdes_getcred(struct authdes_cred *, short *, short *, short *, int *);
-extern AUTH * authdes_seccreate(/* ??? */);
-extern AUTH * authnone_create(void);
-extern AUTH * authsys_create(char *, int, int, int, int *);
-extern AUTH * authsys_create_default(void);
-extern AUTH * authunix_create(char *, int, int, int, int *);
-extern AUTH * authunix_create_default(void);
-extern char * basename(char *);
-extern int baudrate(void);
-extern int bcmp(const void *, const void *, size_t);
-extern void bcopy(const void *, void *, size_t);
-extern int beep(void);
-extern void (* berk_signal(int, void (*) (int, ...))) (int, ...);
-extern char * bgets(char *, size_t, FILE *, char *);
-extern int bottom_panel(PANEL *);
-extern int box32(WINDOW *, chtype, chtype);
-extern int brk(void *);
-extern void * bsearch(const void *, const void *, size_t, size_t, int (*) (const void *, const void *));
-extern size_t bufsplit(char *, size_t, char *);
-extern void bzero(void *, size_t);
-extern long int calchash(/* ??? */);
-extern void * calloc(size_t, size_t);
-extern void callrpc(char *, unsigned long, unsigned long, unsigned long, xdrproc_t, char *, xdrproc_t, char *);
-extern bool can_change_color(void);
-extern int catclose(nl_catd);
-extern char * catgets(nl_catd, int, int, char *);
-extern nl_catd catopen(const char *, int);
-extern int cbreak(void);
-extern double cbrt(double);
-extern double ceil(double);
-extern float ceilf(float);
-extern speed_t cfgetispeed(const struct termios *);
-extern speed_t cfgetospeed(const struct termios *);
-extern void cfree(void *);
-extern int cfsetispeed(struct termios *, speed_t);
-extern int cfsetospeed(struct termios *, speed_t);
-extern int cftime(char *, char *, const time_t *);
-extern int chdir(const char *);
-extern int chmod(const char *, mode_t);
-extern int chown(const char *, uid_t, gid_t);
-extern int chroot(const char *);
-extern void clean_GEN_rd(/* ??? */);
-extern void cleanup(/* ??? */);
-extern void clearerr(FILE *);
-extern int clearok(WINDOW *, int);
-extern enum clnt_stat clnt_broadcast(unsigned long, unsigned long, unsigned long, xdrproc_t, char *, xdrproc_t, char *, resultproc_t);
-extern enum clnt_stat clnt_call(CLIENT *, unsigned long, xdrproc_t, char *, xdrproc_t, char *, struct timeval);
-extern bool_t clnt_control(CLIENT *, int, char *);
-extern CLIENT * clnt_create(char *, unsigned long, unsigned long, char *);
-extern void clnt_destroy(CLIENT *);
-extern int clnt_freeres(CLIENT *, xdrproc_t, char *);
-extern void clnt_geterr(CLIENT *, struct rpc_err *);
-extern void clnt_pcreateerror(char *);
-extern void clnt_perrno(enum clnt_stat);
-extern void clnt_perror(CLIENT *, char *);
-extern char * clnt_spcreateerror(char *);
-extern char * clnt_sperrno(enum clnt_stat);
-extern char * clnt_sperror(CLIENT *, char *);
-extern CLIENT * clnt_tli_create(/* ??? */);
-extern CLIENT * clnt_tp_create(/* ??? */);
-extern CLIENT * clnt_vc_create(/* ??? */);
-extern CLIENT * clntraw_create(unsigned long, unsigned long);
-extern CLIENT * clnttcp_create(struct sockaddr_in *, unsigned long, unsigned long, int *, unsigned int, unsigned int *);
-extern CLIENT * clntudp_bufcreate(struct sockaddr_in *, unsigned long, unsigned long, struct timeval, int *, unsigned int, unsigned int);
-extern CLIENT * clntudp_create(struct sockaddr_in *, unsigned long, unsigned long, struct timeval, int *);
-extern clock_t clock(void);
-extern int close(int);
-extern int closedir(DIR *);
-extern int color_content(int, short int *, short int *, short int *);
-extern char * compile(const char *, char *, char *);
-extern char * copylist(const char *, off_t *);
-extern double copysign(double, double);
-extern int copywin(WINDOW *, WINDOW *, int, int, int, int, int, int, int);
-extern double cos(double);
-extern float cosf(float);
-extern double cosh(double);
-extern float coshf(float);
-extern struct rd_user * cr_rduser(/* ??? */);
-extern int creat(const char *, mode_t);
-extern int crmode(void);
-extern char * crypt(const char *, const char *);
-extern int crypt_close(int *);
-extern char * ctermid(char *);
-extern char * ctime(const time_t *);
-extern FIELD * current_field(FORM *);
-extern ITEM * current_item(MENU *);
-extern int curs_set(int);
-extern void curserr(void);
-extern char * cuserid(char *);
-extern int data_ahead(FORM *);
-extern int data_behind(FORM *);
-extern void dbmclose(void);
-extern void dbminit(const char *);
-extern int def_prog_mode(void);
-extern int def_shell_mode(void);
-extern char * defread(/* ??? */);
-extern int del_panel(PANEL *);
-extern void del_rduser(/* ??? */);
-extern void delay(long int);
-extern int delay_output(int);
-extern void delete(datum);
-extern void delscreen(SCREEN *);
-extern int delterm(TERMINAL *);
-extern int delwin(WINDOW *);
-extern WINDOW * derwin(WINDOW *, int, int, int, int);
-extern char * des_crypt(const char *, const char *);
-extern void des_encrypt(char *, int);
-extern void des_setkey(const char *);
-extern char * devattr(/* ??? */);
-extern int devfree(/* ??? */);
-extern char ** devreserv(/* ??? */);
-extern int dial(CALL);
-extern double difftime(time_t, time_t);
-extern char * dirname(char *);
-extern div_t div(int, int);
-extern int dlclose(void *);
-extern char * dlerror(void);
-extern void * dlopen(char *, int);
-extern void * dlsym(void *, char *);
-extern void dma_access(u_char, u_int, u_int, u_char, u_char);
-extern int doupdate(void);
-extern int drainio(int);
-extern double drand48(void);
-extern double drem(double, double);
-extern int drv_getevtoken(/* ??? */);
-extern void drv_relevtoken(/* ??? */);
-extern int dup(int);
-extern int dup2(int, int);
-extern FIELD * dup_field(FIELD *, int, int);
-extern WINDOW * dupwin(WINDOW *);
-extern int dynamic_field_info(FIELD *, int *, int *, int *);
-extern int dysize(int);
-extern int eaccess(const char *, int);
-extern int echo(void);
-extern char * ecvt(double, int, int *, int *);
-extern size_t elf32_fsize(Elf_Type, size_t, unsigned int);
-extern Elf32_Ehdr * elf32_getehdr(Elf *);
-extern Elf32_Phdr * elf32_getphdr(Elf *);
-extern Elf32_Shdr * elf32_getshdr(Elf_Scn *);
-extern Elf32_Ehdr * elf32_newehdr(Elf *);
-extern Elf32_Phdr * elf32_newphdr(Elf *, size_t);
-extern Elf_Data * elf32_xlatetof(Elf_Data *, const Elf_Data *, unsigned int);
-extern Elf_Data * elf32_xlatetom(Elf_Data *, const Elf_Data *, unsigned int);
-extern Elf * elf_begin(int, Elf_Cmd, Elf *);
-extern int elf_cntl(Elf *, Elf_Cmd);
-extern int elf_end(Elf *);
-extern const char * elf_errmsg(int);
-extern int elf_errno(void);
-extern void elf_fill(int);
-extern unsigned int elf_flagdata(Elf_Data *, Elf_Cmd, unsigned int);
-extern unsigned int elf_flagehdr(Elf *, Elf_Cmd, unsigned int);
-extern unsigned int elf_flagelf(Elf *, Elf_Cmd, unsigned int);
-extern unsigned int elf_flagphdr(Elf *, Elf_Cmd, unsigned int);
-extern unsigned int elf_flagscn(Elf_Scn *, Elf_Cmd, unsigned int);
-extern unsigned int elf_flagshdr(Elf_Scn *, Elf_Cmd, unsigned int);
-extern Elf_Arhdr * elf_getarhdr(Elf *);
-extern Elf_Arsym * elf_getarsym(Elf *, size_t *);
-extern off_t elf_getbase(Elf *);
-extern Elf_Data * elf_getdata(Elf_Scn *, Elf_Data *);
-extern char * elf_getident(Elf *, size_t *);
-extern Elf_Scn * elf_getscn(Elf *, size_t);
-extern long unsigned int elf_hash(const char *);
-extern Elf_Kind elf_kind(Elf *);
-extern size_t elf_ndxscn(Elf_Scn *);
-extern Elf_Data * elf_newdata(Elf_Scn *);
-extern Elf_Scn * elf_newscn(Elf *);
-extern Elf_Cmd elf_next(Elf *);
-extern Elf_Scn * elf_nextscn(Elf *, Elf_Scn *);
-extern size_t elf_rand(Elf *, size_t);
-extern Elf_Data * elf_rawdata(Elf_Scn *, Elf_Data *);
-extern char * elf_rawfile(Elf *, size_t *);
-extern char * elf_strptr(Elf *, size_t, size_t);
-extern off_t elf_update(Elf *, Elf_Cmd);
-extern unsigned int elf_version(unsigned int);
-extern void encrypt(char *, int);
-extern void endgrent(void);
-extern int endnetconfig(void *);
-extern int endnetpath(void *);
-extern void endpwent(void);
-extern void endrpcent(void);
-extern void endspent(void);
-extern void endutent(void);
-extern void endutxent(void);
-extern int endwin(void);
-extern double erand(short *);
-extern double erand48(short unsigned int *);
-extern char erasechar(void);
-extern double erf(double);
-extern double erfc(double);
-extern int execl(const char *, const char *, ...);
-extern int execle(const char *, const char *, ...);
-extern int execlp(const char *, const char *, ...);
-extern int exect(const char *, const char **, char **);
-extern int execv(const char *, char *const *);
-extern int execve(const char *, char *const *, char *const *);
-extern int execvp(const char *, char *const *);
-extern void exit(int);
-extern double exp(double);
-extern float expf(float);
-extern double fabs(double);
-extern float fabsf(float);
-extern int fattach(int, const char *);
-extern int fchdir(int);
-extern int fchmod(int, mode_t);
-extern int fchown(int, uid_t, gid_t);
-extern int fclose(FILE *);
-extern int fcntl(int, int, ...);
-extern char * fcvt(double, int, int *, int *);
-extern int fdetach(const char *);
-extern FILE * fdopen(int, const char *);
-extern int feof(FILE *);
-extern int ferror(FILE *);
-extern datum fetch(datum);
-extern int fflush(FILE *);
-extern int ffs(int);
-extern int fgetc(FILE *);
-extern struct group * fgetgrent(FILE *);
-extern int fgetpos(FILE *, fpos_t *);
-extern struct passwd * fgetpwent(FILE *);
-extern char * fgets(char *, int, FILE *);
-extern struct spwd * fgetspent(FILE *);
-extern char * field_arg(FIELD *);
-extern chtype field_back(FIELD *);
-extern char * field_buffer(FIELD *, int);
-extern int field_count(FORM *);
-extern chtype field_fore(FIELD *);
-extern int field_index(FIELD *);
-extern int field_info(FIELD *, int *, int *, int *, int *, int *, int *);
-extern PTF_void field_init(FORM *);
-extern int field_just(FIELD *);
-extern OPTIONS field_opts(FIELD *);
-extern int field_opts_off(FIELD *, OPTIONS);
-extern int field_opts_on(FIELD *, OPTIONS);
-extern int field_pad(FIELD *);
-extern int field_status(FIELD *);
-extern PTF_void field_term(FORM *);
-extern FIELDTYPE * field_type(FIELD *);
-extern char * field_userptr(FIELD *);
-extern int fileno(FILE *);
-extern int filter(void);
-extern int finite(double);
-extern datum firsthash(/* ??? */);
-extern datum firstkey(void);
-extern int flash(void);
-extern int flock(int, int);
-extern double floor(double);
-extern float floorf(float);
-extern int flushinp(void);
-extern double fmod(double, double);
-extern float fmodf(float, float);
-extern int fmtmsg(long int, const char *, int, const char *, const char *, const char *);
-extern FILE * fopen(const char *, const char *);
-extern pid_t fork(void);
-extern int form_driver(FORM *, int);
-extern FIELD ** form_fields(FORM *);
-extern PTF_void form_init(FORM *);
-extern OPTIONS form_opts(FORM *);
-extern int form_opts_off(FORM *, OPTIONS);
-extern int form_opts_on(FORM *, OPTIONS);
-extern int form_page(FORM *);
-extern WINDOW * form_sub(FORM *);
-extern PTF_void form_term(FORM *);
-extern char * form_userptr(FORM *);
-extern WINDOW * form_win(FORM *);
-extern long int fpathconf(int, int);
-extern fpclass_t fpclass(double);
-extern int fpgetmask(void);
-extern fp_rnd fpgetround(void);
-extern int fpgetsticky(void);
-extern int fprintf(FILE *, const char *, ...);
-extern int fpsetmask(int);
-extern fp_rnd fpsetround(fp_rnd);
-extern int fpsetsticky(int);
-extern int fputc(int, FILE *);
-extern int fputs(const char *, FILE *);
-extern size_t fread(void *, size_t, size_t, FILE *);
-extern void free(void *);
-extern int free_field(FIELD *);
-extern int free_fieldtype(FIELDTYPE *);
-extern int free_form(FORM *);
-extern int free_item(ITEM *);
-extern int free_menu(MENU *);
-extern void freenetconfigent(struct netconfig *);
-extern FILE * freopen(const char *, const char *, FILE *);
-extern double frexp(double, int *);
-extern int fscanf(FILE *, const char *, ...);
-extern int fseek(FILE *, long int, int);
-extern int fsetpos(FILE *, const fpos_t *);
-extern int fstat(int, struct stat *);
-extern int fstatfs(int, struct statfs *, int, int);
-extern int fstatvfs(int, struct statvfs *);
-extern int fsync(int);
-extern long int ftell(FILE *);
-extern key_t ftok(const char *, int);
-extern int ftruncate(int, off_t);
-extern int ftw(const char *, int (*) (const char *, const struct stat *, int), int);
-extern size_t fwrite(const void *, size_t, size_t, FILE *);
-extern double gamma(double);
-extern char * gcvt(double, int, char *);
-extern int get_error(/* ??? */);
-extern chtype getattrs(WINDOW *);
-extern int getbegx(WINDOW *);
-extern int getbegy(WINDOW *);
-extern chtype getbkgd(WINDOW *);
-extern long unsigned int getbmap(void);
-extern int getc(FILE *);
-extern char * getcap(/* ??? */);
-extern int getchar(void);
-extern int getcontext(ucontext_t *);
-extern int getcurx(WINDOW *);
-extern int getcury(WINDOW *);
-extern char * getcwd(char *, size_t);
-extern struct tm * getdate(const char *);
-extern int getdents(int, struct dirent *, unsigned int);
-extern char ** getdev(/* ??? */);
-extern char ** getdgrp(/* ??? */);
-extern int getdomainname(char *, int);
-extern int getdtablesize(void);
-extern gid_t getegid(void);
-extern char * getenv(const char *);
-extern struct errhdr * geterec(/* ??? */);
-extern struct errhdr * geteslot(/* ??? */);
-extern uid_t geteuid(void);
-extern gid_t getgid(void);
-extern struct group * getgrent(void);
-extern struct group * getgrgid(gid_t);
-extern struct group * getgrnam(const char *);
-extern int getgroups(int, TARGET_GETGROUPS_T []);
-extern struct hostent * gethostbyaddr(/* ??? */);
-extern struct hostent * gethostbyname(/* ??? */);
-extern struct hostent * gethostent(/* ??? */);
-#ifdef __alpha__
-extern int gethostid(void);
-#else
-extern long gethostid(void);
-#endif
-extern int gethostname(char *, size_t);
-extern int getitimer(int, struct itimerval *);
-extern char * getlogin(void);
-extern int getmaxx(WINDOW *);
-extern int getmaxy(WINDOW *);
-extern int getmntany(FILE *, struct mnttab *, struct mnttab *);
-extern int getmntent(/* ??? */);
-extern long unsigned int getmouse(void);
-extern int getmsg(int, struct strbuf *, struct strbuf *, int *);
-extern struct netent * getnetbyaddr(/* ??? */);
-extern struct netent * getnetbyname(/* ??? */);
-extern struct netconfig * getnetconfig(void *);
-extern struct netconfig * getnetconfigent(char *);
-extern struct netent * getnetent(/* ??? */);
-extern struct netconfig * getnetpath(void *);
-extern int getopt(int, char *const *, const char *);
-extern int getpagesize(void);
-extern int getparx(WINDOW *);
-extern int getpary(WINDOW *);
-extern char * getpass(const char *);
-extern pid_t getpgid(pid_t);
-extern pid_t getpgrp(void);
-extern pid_t getpgrp2(pid_t);
-extern pid_t getpid(void);
-extern int getpmsg(int, struct strbuf *, struct strbuf *, int *, int *);
-extern pid_t getppid(void);
-extern int getpriority(int, int);
-extern struct protoent * getprotobyname(/* ??? */);
-extern struct protoent * getprotobynumber(/* ??? */);
-extern struct protoent * getprotoent(/* ??? */);
-extern int getpw(int, char *);
-extern struct passwd * getpwent(void);
-extern struct passwd * getpwnam(const char *);
-extern struct passwd * getpwuid(uid_t);
-extern int getrlimit(int, struct rlimit *);
-extern int getrnge(char *);
-extern struct rpcent * getrpcbyname(const char *);
-extern struct rpcent * getrpcbynumber(int);
-extern struct rpcent * getrpcent(void);
-extern int getrusage(int, struct rusage *);
-extern char * gets(char *);
-extern struct servent * getservbyname(/* ??? */);
-extern struct servent * getservbyport(/* ??? */);
-extern struct servent * getservent(/* ??? */);
-extern pid_t getsid(pid_t);
-extern struct spwd * getspent(void);
-extern struct spwd * getspnam(const char *);
-extern int getsubopt(char **, char *const *, char **);
-extern int gettmode(void);
-extern char * gettxt(const char *, const char *);
-extern uid_t getuid(void);
-extern struct utmp * getutent(void);
-extern struct utmp * getutid(const struct utmp *);
-extern struct utmp * getutline(const struct utmp *);
-extern void getutmp(const struct utmpx *, struct utmp *);
-extern void getutmpx(const struct utmp *, struct utmpx *);
-extern struct utmpx * getutxent(void);
-extern struct utmpx * getutxid(const struct utmpx *);
-extern struct utmpx * getutxline(const struct utmpx *);
-extern int getvfsany(FILE *, struct vfstab *, struct vfstab *);
-extern int getvfsent(FILE *, struct vfstab *);
-extern int getvfsfile(FILE *, struct vfstab *, char *);
-extern int getvfsspec(FILE *, struct vfstab *, char *);
-extern int getvol(/* ??? */);
-extern int getw(FILE *);
-extern char * getwd(char *);
-extern void getwidth(eucwidth_t *);
-extern WINDOW * getwin(FILE *);
-extern int gmatch(const char *, const char *);
-extern struct tm * gmtime(const time_t *);
-extern int gsignal(int);
-extern int halfdelay(int);
-extern bool has_colors(void);
-extern int has_ic(void);
-extern int has_il(void);
-extern long int hashinc(/* ??? */);
-extern char * hasmntopt(/* ??? */);
-extern int hcreate(size_t);
-extern void hdestroy(void);
-extern int hide_panel(PANEL *);
-extern int host2netname(char *, char *, char *);
-extern int hrtalarm(hrtcmd_t *, int);
-extern int hrtcancel(const long int *, int);
-extern int hrtcntl(int, int, interval_t *, hrtime_t *);
-extern int hrtsleep(hrtcmd_t *);
-extern ENTRY * hsearch(ENTRY, ACTION);
-extern long unsigned int htonl(long unsigned int);
-extern short unsigned int htons(unsigned int);
-extern double hypot(double, double);
-extern void idcok(WINDOW *, int);
-extern int idlok(WINDOW *, int);
-extern void immedok(WINDOW *, int);
-extern char * index(const char *, int);
-extern long unsigned int inet_addr(/* ??? */);
-extern struct in_addr inet_makeaddr(/* ??? */);
-extern long unsigned int inet_network(/* ??? */);
-extern char * inet_ntoa(/* ??? */);
-extern int init_color(int, int, int, int);
-extern int init_pair(int, int, int);
-extern int initgroups(const char *, gid_t);
-extern WINDOW * initscr(/* ??? */);
-extern WINDOW * initscr32(void);
-extern char * initstate(unsigned, char *, int);
-extern void insque(struct qelem *, struct qelem *);
-extern int intrflush(WINDOW *, int);
-extern int ioctl(int, int, ...);
-extern int is_linetouched(WINDOW *, int);
-extern int is_wintouched(WINDOW *);
-extern int isalnum(int);
-extern int isalpha(int);
-extern int isascii(int);
-extern int isatty(int);
-extern int iscntrl(int);
-extern int isdigit(int);
-extern int isencrypt(const char *, size_t);
-extern int isendwin(void);
-extern int isgraph(int);
-extern int isinf(double);
-extern int islower(int);
-extern int isnan(double);
-extern int isnand(double);
-extern int isnanf(float);
-extern int isprint(int);
-extern int ispunct(int);
-extern int isspace(int);
-extern int isupper(int);
-extern int isxdigit(int);
-extern int item_count(MENU *);
-extern char * item_description(ITEM *);
-extern int item_index(ITEM *);
-extern PTF_void item_init(MENU *);
-extern char * item_name(ITEM *);
-extern OPTIONS item_opts(ITEM *);
-extern int item_opts_off(ITEM *, OPTIONS);
-extern int item_opts_on(ITEM *, OPTIONS);
-extern PTF_void item_term(MENU *);
-extern char * item_userptr(ITEM *);
-extern int item_value(ITEM *);
-extern int item_visible(ITEM *);
-extern long int itol(/* ??? */);
-extern double j0(double);
-extern double j1(double);
-extern double jn(int, double);
-extern long int jrand48(short unsigned int *);
-extern char * keyname(int);
-extern int keypad(WINDOW *, int);
-extern int kill(pid_t, int);
-extern char killchar(void);
-extern int killpg(int, int);
-extern void l3tol(long int *, const char *, int);
-extern char * l64a(long int);
-extern long int labs(long int);
-extern dl_t ladd(/* ??? */);
-extern int lchown(const char *, uid_t, gid_t);
-extern int lckpwdf(void);
-extern void lcong48(short unsigned int *);
-extern int ldaclose(struct ldfile *);
-extern int ldahread(struct ldfile *, archdr *);
-extern struct ldfile * ldaopen(const char *, struct ldfile *);
-extern int ldclose(struct ldfile *);
-extern double ldexp(double, int);
-extern int ldfhread(struct ldfile *, struct filehdr *);
-extern char * ldgetname(struct ldfile *, const struct syment *);
-extern ldiv_t ldiv(long int, long int);
-extern dl_t ldivide(/* ??? */);
-extern int ldlinit(struct ldfile *, long int);
-extern int ldlitem(struct ldfile *, unsigned int, struct lineno *);
-extern int ldlread(struct ldfile *, long int, unsigned int, struct lineno *);
-extern int ldlseek(struct ldfile *, unsigned int);
-extern int ldnlseek(struct ldfile *, const char *);
-extern int ldnrseek(struct ldfile *, const char *);
-extern int ldnshread(struct ldfile *, const char *, struct scnhdr *);
-extern int ldnsseek(struct ldfile *, const char *);
-extern int ldohseek(struct ldfile *);
-extern struct ldfile * ldopen(const char *, struct ldfile *);
-extern int ldrseek(struct ldfile *, unsigned int);
-extern int ldshread(struct ldfile *, unsigned int, struct scnhdr *);
-extern int ldsseek(struct ldfile *, unsigned int);
-extern long int ldtbindex(struct ldfile *);
-extern int ldtbread(struct ldfile *, long int, struct syment *);
-extern int ldtbseek(struct ldfile *);
-extern int leaveok(WINDOW *, int);
-extern dl_t lexp10(/* ??? */);
-extern void * lfind(const void *, const void *, size_t *, size_t, int (*) (const void *, const void *));
-extern double lgamma(double);
-extern int link(const char *, const char *);
-extern FIELD * link_field(FIELD *, int, int);
-extern FIELDTYPE * link_fieldtype(FIELDTYPE *, FIELDTYPE *);
-extern char ** listdev(/* ??? */);
-extern char ** listdgrp(/* ??? */);
-extern dl_t llog10(/* ??? */);
-extern dl_t lmul(/* ??? */);
-extern struct lconv * localeconv(void);
-extern struct tm * localtime(const time_t *);
-extern int lock(int, int, long);
-extern int lockf(int, int, off_t);
-extern double log(double);
-extern double log10(double);
-extern float log10f(float);
-extern double logb(double);
-extern float logf(float);
-extern char * logname(void);
-extern void longjmp(jmp_buf, int);
-extern char * longname(void);
-extern long int lrand48(void);
-extern void * lsearch(const void *, void *, size_t *, size_t, int (*) (const void *, const void *));
-extern off_t lseek(int, off_t, int);
-extern dl_t lshiftl(/* ??? */);
-extern int lstat(const char *, struct stat *);
-extern dl_t lsub(/* ??? */);
-extern void ltol3(char *, const long int *, int);
-extern int m_addch(int);
-extern int m_addstr(char *);
-extern int m_clear(void);
-extern int m_erase(void);
-extern WINDOW * m_initscr(void);
-extern int m_move(int, int);
-extern SCREEN * m_newterm(char *, FILE *, FILE *);
-extern int m_refresh(void);
-extern int maillock(char *, int);
-extern int mailunlock(void);
-extern major_t major(dev_t);
-extern datum makdatum(/* ??? */);
-extern void makecontext(ucontext_t *, void (*) (/* ??? */), int, ...);
-extern dev_t makedev(major_t, minor_t);
-extern struct utmpx * makeutx(const struct utmpx *);
-extern struct mallinfo mallinfo(void);
-extern void * malloc(size_t);
-extern int mallopt(int, int);
-extern int map_button(long unsigned int);
-extern int matherr(struct exception *);
-extern int mbftowc(char *, wchar_t *, int (*) (/* ??? */), int *);
-extern int mblen(const char *, size_t);
-extern size_t mbstowcs(wchar_t *, const char *, size_t);
-extern int mbtowc(wchar_t *, const char *, size_t);
-extern void * memalign(size_t, size_t);
-extern void * memccpy(void *, const void *, int, size_t);
-extern void * memchr(const void *, int, size_t);
-extern int memcmp(const void *, const void *, size_t);
-extern void * memcpy(void *, const void *, size_t);
-extern int memlock(/* ??? */);
-extern int memlocked(/* ??? */);
-extern void * memmove(void *, const void *, size_t);
-extern void * memset(void *, int, size_t);
-extern int memunlock(/* ??? */);
-extern chtype menu_back(MENU *);
-extern int menu_driver(MENU *, int);
-extern chtype menu_fore(MENU *);
-extern void menu_format(MENU *, int *, int *);
-extern chtype menu_grey(MENU *);
-extern PTF_void menu_init(MENU *);
-extern ITEM ** menu_items(MENU *);
-extern char * menu_mark(MENU *);
-extern OPTIONS menu_opts(MENU *);
-extern int menu_opts_off(MENU *, OPTIONS);
-extern int menu_opts_on(MENU *, OPTIONS);
-extern int menu_pad(MENU *);
-extern char * menu_pattern(MENU *);
-extern WINDOW * menu_sub(MENU *);
-extern PTF_void menu_term(MENU *);
-extern char * menu_userptr(MENU *);
-extern WINDOW * menu_win(MENU *);
-extern int meta(WINDOW *, int);
-extern void mfree(struct map *, size_t, u_long);
-extern int mincore(caddr_t, size_t, char *);
-extern minor_t minor(dev_t);
-extern int mkdir(const char *, mode_t);
-extern int mkdirp(const char *, mode_t);
-extern int mkfifo(const char *, mode_t);
-extern int mknod(const char *, mode_t, dev_t);
-extern int mkstemp(char *);
-extern char * mktemp(char *);
-extern time_t mktime(struct tm *);
-extern caddr_t mmap(/* ??? */);
-extern double modf(double, double *);
-extern float modff(float, float *);
-extern struct utmpx * modutx(const struct utmpx *);
-extern void monitor(int (*) (/* ??? */), int (*) (/* ??? */), WORD *, int, int);
-extern int mount(const char *, const char *, int, ...);
-extern int mouse_off(long int);
-extern int mouse_on(long int);
-extern int mouse_set(long int);
-extern int move_field(FIELD *, int, int);
-extern int move_panel(PANEL *, int, int);
-extern int mprotect(/* ??? */);
-extern long int mrand48(void);
-extern int msgctl(int, int, ...);
-extern int msgget(key_t, int);
-extern int msgrcv(int, void *, size_t, long int, int);
-extern int msgsnd(int, const void *, size_t, int);
-extern int munmap(/* ??? */);
-extern int mvcur(int, int, int, int);
-extern int mvderwin(WINDOW *, int, int);
-extern int mvprintw(int, int, ...);
-extern int mvscanw(int, int, ...);
-extern int mvwin(WINDOW *, int, int);
-extern int mvwprintw(WINDOW *, int, int, ...);
-extern int mvwscanw(WINDOW *, int, int, ...);
-extern int napms(int);
-extern void netdir_free(char *, int);
-extern int netdir_getbyaddr(struct netconfig *, struct nd_hostservlist **, struct netbuf *);
-extern int netdir_getbyname(struct netconfig *, struct nd_hostserv *, struct nd_addrlist **);
-extern int netdir_options(struct netconfig *, int, int, char *);
-extern void netdir_perror(char *);
-extern char * netdir_sperror(/* ??? */);
-extern FIELD * new_field(int, int, int, int, int, int);
-extern FIELDTYPE * new_fieldtype(PTF_int, PTF_int);
-extern FORM * new_form(FIELD **);
-extern ITEM * new_item(char *, char *);
-extern MENU * new_menu(ITEM **);
-extern int new_page(FIELD *);
-extern PANEL * new_panel(WINDOW *);
-extern int newkey(char *, int, int);
-extern WINDOW * newpad(int, int);
-extern SCREEN * newscreen(char *, int, int, int, FILE *, FILE *);
-extern SCREEN * newterm32(char *, FILE *, FILE *);
-extern WINDOW * newwin(int, int, int, int);
-extern double nextafter(double, double);
-extern datum nextkey(datum);
-extern int nftw(const char *, int (*) (const char *, const struct stat *, int, struct FTW *), int, int);
-extern int nice(int);
-extern int nl(void);
-extern char * nl_langinfo(nl_item);
-extern int nlist(const char *, struct nlist *);
-extern int nocbreak(void);
-extern int nocrmode(void);
-extern int nodelay(WINDOW *, int);
-extern int noecho(void);
-extern int nonl(void);
-extern int noraw(void);
-extern int notimeout(WINDOW *, int);
-extern long int nrand48(short unsigned int *);
-extern int ns_close(/* ??? */);
-extern struct nssend * ns_rcv(/* ??? */);
-extern int ns_send(/* ??? */);
-extern int ns_setup(/* ??? */);
-extern long unsigned int ntohl(long unsigned int);
-extern short unsigned int ntohs(unsigned int);
-extern int nuname(struct utsname *);
-extern int open(const char *, int, ...);
-extern DIR * opendir(const char *);
-extern int openprivwait(/* ??? */);
-extern int openwait(/* ??? */);
-extern int overlay(WINDOW *, WINDOW *);
-extern int overwrite(WINDOW *, WINDOW *);
-extern int p2close(FILE **);
-extern int p2open(const char *, FILE **);
-extern int p32echochar(WINDOW *, chtype);
-extern char * p_cdname(/* ??? */);
-extern char * p_class(/* ??? */);
-extern char * p_rr(/* ??? */);
-extern char * p_type(/* ??? */);
-extern int pair_content(int, short int *, short int *);
-extern PANEL * panel_above(PANEL *);
-extern PANEL * panel_below(PANEL *);
-extern char * panel_userptr(PANEL *);
-extern WINDOW * panel_window(PANEL *);
-extern long int pathconf(const char *, int);
-extern char * pathfind(const char *, const char *, const char *);
-extern int pause(void);
-extern int pclose(FILE *);
-extern void perror(const char *);
-extern struct pfdat * pfind(/* ??? */);
-extern int pglstlk(/* ??? */);
-extern int pglstunlk(/* ??? */);
-extern int pid_slot(proc_t *);
-extern int pipe(int *);
-extern int plock(int);
-extern struct pmaplist * pmap_getmaps(/* ??? */);
-extern u_short pmap_getport(/* ??? */);
-extern enum clnt_stat pmap_rmtcall(/* ??? */);
-extern int pmap_set(/* ??? */);
-extern int pmap_unset(/* ??? */);
-extern int pnoutrefresh(WINDOW *, int, int, int, int, int, int);
-extern int poll(struct pollfd *, long unsigned int, int);
-extern FILE * popen(const char *, const char *);
-extern int pos_form_cursor(FORM *);
-extern int pos_menu_cursor(MENU *);
-extern int post_form(FORM *);
-extern int post_menu(MENU *);
-extern double pow(double, double);
-extern float powf(float, float);
-extern int prefresh(WINDOW *, int, int, int, int, int, int);
-extern int printf(const char *, ...);
-extern int printw(char *, ...);
-extern void privsig(/* ??? */);
-extern void profil(short unsigned int *, size_t, int, unsigned int);
-extern void psiginfo(siginfo_t *, char *);
-extern void psignal(int, const char *);
-extern int ptrace(int, pid_t, int, int);
-extern int putc(int, FILE *);
-extern int putchar(int);
-extern int putenv(char *);
-extern int putmsg(int, const struct strbuf *, const struct strbuf *, int);
-extern int putp(char *);
-extern int putpmsg(int, const struct strbuf *, const struct strbuf *, int, int);
-extern int putpwent(const struct passwd *, FILE *);
-extern int puts(const char *);
-extern int putspent(const struct spwd *, FILE *);
-extern struct utmp * pututline(const struct utmp *);
-extern struct utmpx * pututxline(const struct utmpx *);
-extern int putw(int, FILE *);
-extern int putwin(WINDOW *, FILE *);
-extern void qsort(void *, size_t, size_t, int (*) (const void *, const void *));
-extern int raise(int);
-extern int rand(void);
-extern long random(void);
-extern int raw(void);
-extern ssize_t read(int, void *, size_t);
-extern struct dirent * readdir(DIR *);
-extern ssize_t readlink(const char *, char *, size_t);
-extern void * realloc(void *, size_t);
-extern char * realpath(char *, char *);
-extern int redrawwin(WINDOW *);
-extern char * regcmp(const char *, ...);
-extern char * regex(const char *, const char *, ...);
-extern double remainder(double, double);
-extern int remio(/* ??? */);
-extern int remove(const char *);
-extern void remque(struct qelem *);
-extern int rename(const char *, const char *);
-extern int replace_panel(PANEL *, WINDOW *);
-extern int request_mouse_pos(void);
-extern struct reservdev ** reservdev(/* ??? */);
-extern int reset_prog_mode(void);
-extern int reset_shell_mode(void);
-extern int resetty(void);
-extern int restartterm(char *, int, int *);
-extern void rewind(FILE *);
-extern void rewinddir(DIR *);
-extern int rf_falloc(/* ??? */);
-extern char * rindex(const char *, int);
-extern double rint(double);
-extern int ripoffline(int, int (*) (WINDOW *, int));
-extern int rmdir(const char *);
-extern int rmdirp(char *, char *);
-extern enum clnt_stat rpc_broadcast(/* ??? */);
-extern enum clnt_stat rpc_call(/* ??? */);
-extern int rpcb_getaddr(/* ??? */);
-extern RPCBLIST * rpcb_getmaps(/* ??? */);
-extern int rpcb_gettime(/* ??? */);
-extern enum clnt_stat rpcb_rmtcall(/* ??? */);
-extern int rpcb_set(/* ??? */);
-extern char * rpcb_taddr2uaddr(/* ??? */);
-extern struct netbuf * rpcb_uaddr2taddr(/* ??? */);
-extern int rpcb_unset(/* ??? */);
-extern void rpctest_service(/* ??? */);
-extern int run_crypt(long int, char *, unsigned int, int *);
-extern int run_setkey(int *, const char *);
-extern int savetty(void);
-extern void * sbrk(int);
-extern double scalb(double, double);
-extern int scale_form(FORM *, int *, int *);
-extern int scale_menu(MENU *, int *, int *);
-extern int scanf(const char *, ...);
-extern int scanw(char *, ...);
-extern int scr_dump(char *);
-extern int scr_init(char *);
-extern int scr_restore(char *);
-extern int scroll(WINDOW *);
-extern int scrollok(WINDOW *, int);
-extern int scrwidth(wchar_t);
-extern int sdfree(char *);
-extern char * sdget(char *, int, ...);
-extern short unsigned int * seed48(short unsigned int *);
-extern void seekdir(DIR *, long int);
-extern int semctl(int, int, int, ...);
-extern int semget(key_t, int, int);
-extern int semop(int, struct sembuf *, unsigned int);
-extern int send(int, char *, int, int);
-extern int set_current_field(FORM *, FIELD *);
-extern int set_current_item(MENU *, ITEM *);
-extern int set_field_back(FIELD *, chtype);
-extern int set_field_buffer(FIELD *, int, char *);
-extern int set_field_fore(FIELD *, chtype);
-extern int set_field_init(FORM *, PTF_void);
-extern int set_field_just(FIELD *, int);
-extern int set_field_opts(FIELD *, OPTIONS);
-extern int set_field_pad(FIELD *, int);
-extern int set_field_status(FIELD *, int);
-extern int set_field_term(FORM *, PTF_void);
-extern int set_field_type(FIELD *, FIELDTYPE *, ...);
-extern int set_field_userptr(FIELD *, char *);
-extern int set_fieldtype_arg(FIELDTYPE *, PTF_charP, PTF_charP, PTF_void);
-extern int set_fieldtype_choice(FIELDTYPE *, PTF_int, PTF_int);
-extern int set_form_fields(FORM *, FIELD **);
-extern int set_form_init(FORM *, PTF_void);
-extern int set_form_opts(FORM *, OPTIONS);
-extern int set_form_page(FORM *, int);
-extern int set_form_sub(FORM *, WINDOW *);
-extern int set_form_term(FORM *, PTF_void);
-extern int set_form_userptr(FORM *, char *);
-extern int set_form_win(FORM *, WINDOW *);
-extern int set_item_init(MENU *, PTF_void);
-extern int set_item_opts(ITEM *, OPTIONS);
-extern int set_item_term(MENU *, PTF_void);
-extern int set_item_userptr(ITEM *, char *);
-extern int set_item_value(ITEM *, int);
-extern int set_max_field(FIELD *, int);
-extern int set_menu_back(MENU *, chtype);
-extern int set_menu_fore(MENU *, chtype);
-extern int set_menu_format(MENU *, int, int);
-extern int set_menu_grey(MENU *, chtype);
-extern int set_menu_init(MENU *, PTF_void);
-extern int set_menu_items(MENU *, ITEM **);
-extern int set_menu_mark(MENU *, char *);
-extern int set_menu_opts(MENU *, OPTIONS);
-extern int set_menu_pad(MENU *, int);
-extern int set_menu_pattern(MENU *, char *);
-extern int set_menu_sub(MENU *, WINDOW *);
-extern int set_menu_term(MENU *, PTF_void);
-extern int set_menu_userptr(MENU *, char *);
-extern int set_menu_win(MENU *, WINDOW *);
-extern int set_new_page(FIELD *, int);
-extern int set_panel_userptr(PANEL *, char *);
-extern int set_top_row(MENU *, int);
-extern void setbuf(FILE *, char *);
-extern int setcontext(ucontext_t *);
-extern SCREEN * setcurscreen(SCREEN *);
-extern TERMINAL * setcurterm(TERMINAL *);
-extern FILE * setexportent(void);
-extern int setgid(gid_t);
-extern void setgrent(void);
-extern int setgroups(int, const gid_t *);
-extern int sethostname(char *, int);
-extern int setitimer(int, struct itimerval *, struct itimerval *);
-extern int setjmp(jmp_buf);
-extern void setkey(const char *);
-extern char * setlocale(int, const char *);
-extern FILE * setmntent(char *, char *);
-extern void * setnetconfig(void);
-extern void * setnetpath(void);
-extern int setpgid(pid_t, pid_t);
-extern pid_t setpgrp(void);
-extern int setpgrp2(pid_t, pid_t);
-extern int setpriority(int, int, int);
-extern int setprivwait(/* ??? */);
-extern void setpwent(void);
-extern int setregid(gid_t, gid_t);
-extern int setreuid(uid_t, uid_t);
-extern int setrlimit(int, struct rlimit *);
-extern int setrpcent(int);
-extern pid_t setsid(void);
-extern void setspent(void);
-extern char * setstate(char *);
-extern int setsyx(int, int);
-extern int setterm(char *);
-extern int setuid(uid_t);
-extern int setupterm(char *, int, int *);
-extern void setutent(void);
-extern void setutxent(void);
-extern int setvbuf(FILE *, char *, int, size_t);
-extern long int sgetl(const char *);
-extern void * shmat(int, void *, int);
-extern int shmctl(int, int, ...);
-extern int shmdt(void *);
-extern int shmget(key_t, int, int);
-extern int show_panel(PANEL *);
-extern int sigaction(int, const struct sigaction *, struct sigaction *);
-extern int sigaddset(sigset_t *, int);
-extern int sigaltstack(const stack_t *, stack_t *);
-extern int sigblock(int);
-extern int sigdelset(sigset_t *, int);
-extern int sigemptyset(sigset_t *);
-extern int sigfillset(sigset_t *);
-extern int sighold(int);
-extern int sigignore(int);
-extern int siginterrupt(int, int);
-extern int sigismember(const sigset_t *, int);
-extern void siglongjmp(sigjmp_buf, int);
-extern signal_ret_t (* signal(int, signal_ret_t (*) (int))) (int);
-extern int sigpause(int);
-extern int sigpending(sigset_t *);
-extern int sigprocmask(int, const sigset_t *, sigset_t *);
-extern int sigrelse(int);
-extern int sigsend(idtype_t, id_t, int);
-extern int sigsendset(const procset_t *, int);
-extern void (* sigset(int, void (*) (int))) (int);
-extern int sigsetjmp(sigjmp_buf, int);
-extern int sigsetmask(int);
-extern int sigsuspend(sigset_t *);
-extern double sin(double);
-extern float sinf(float);
-extern double sinh(double);
-extern float sinhf(float);
-extern unsigned int sleep(unsigned int);
-extern int slk_attroff(chtype);
-extern int slk_attron(chtype);
-extern int slk_attrset(chtype);
-extern int slk_clear(void);
-extern int slk_init(int);
-extern char * slk_label(int);
-extern int slk_noutrefresh(void);
-extern int slk_refresh(void);
-extern int slk_restore(void);
-extern int slk_set(int, char *, int);
-extern int slk_start(int, int *);
-extern int slk_touch(void);
-extern int socket (int, int, int);
-extern void * sprayproc_clear_1(/* ??? */);
-extern spraycumul * sprayproc_get_1(/* ??? */);
-extern void * sprayproc_spray_1(/* ??? */);
-extern int sprintf(char *, const char *, ...);
-extern void sputl(long int, char *);
-extern double sqrt(double);
-extern float sqrtf(float);
-extern void srand(unsigned int);
-extern void srand48(long int);
-extern void srandom(int);
-extern int sscanf(const char *, const char *, ...);
-extern int (* ssignal(int, int (*) (int))) (int);
-extern int start_color(void);
-extern int stat(const char *, struct stat *);
-extern int statfs(const char *, struct statfs *, int, int);
-extern int statvfs(const char *, struct statvfs *);
-extern int step(const char *, const char *);
-extern int stime(const time_t *);
-extern struct netbuf * stoa(char *, struct netbuf *);
-extern void store(datum, datum);
-extern char * strcadd(char *, const char *);
-extern int strcasecmp(const char *, const char *);
-extern char * strcat(char *, const char *);
-extern char * strccpy(char *, const char *);
-extern char * strchr(const char *, int);
-extern void strclearctty(/* ??? */);
-extern void strclearpg(/* ??? */);
-extern void strclearsid(/* ??? */);
-extern int strcmp(const char *, const char *);
-extern int strcoll(const char *, const char *);
-extern char * strcpy(char *, const char *);
-extern size_t strcspn(const char *, const char *);
-extern char * strdup(const char *);
-extern char * streadd(char *, const char *, const char *);
-extern char * strecpy(char *, const char *, const char *);
-extern char * strerror(int);
-extern int strfind(const char *, const char *);
-extern size_t strftime(char *, size_t, const char *, const struct tm *);
-extern size_t strlen(const char *);
-extern int strncasecmp(const char *, const char *, size_t);
-extern char * strncat(char *, const char *, size_t);
-extern int strncmp(const char *, const char *, size_t);
-extern char * strncpy(char *, const char *, size_t);
-extern char * strpbrk(const char *, const char *);
-extern char * strrchr(const char *, int);
-extern char * strrspn(const char *, const char *);
-extern size_t strspn(const char *, const char *);
-extern char * strstr(const char *, const char *);
-extern double strtod(const char *, char **);
-extern char * strtok(char *, const char *);
-extern long int strtol(const char *, char **, int);
-extern long unsigned int strtoul(const char *, char **, int);
-extern char * strtrns(const char *, const char *, const char *, char *);
-extern size_t strxfrm(char *, const char *, size_t);
-extern WINDOW * subpad(WINDOW *, int, int, int, int);
-extern WINDOW * subwin(WINDOW *, int, int, int, int);
-extern int svc_create(/* ??? */);
-extern SVCXPRT * svc_fd_create(/* ??? */);
-extern void svc_getreqset(/* ??? */);
-extern SVCXPRT * svc_raw_create(/* ??? */);
-extern int svc_reg(/* ??? */);
-extern SVCXPRT * svc_tli_create(/* ??? */);
-extern SVCXPRT * svc_tp_create(/* ??? */);
-extern void svc_unreg(/* ??? */);
-extern SVCXPRT * svc_vc_create(/* ??? */);
-extern void svcerr_systemerr(/* ??? */);
-extern SVCXPRT * svcfd_create(/* ??? */);
-extern SVCXPRT * svcraw_create(/* ??? */);
-extern SVCXPRT * svctcp_create(/* ??? */);
-extern SVCXPRT * svcudp_bufcreate(/* ??? */);
-extern SVCXPRT * svcudp_create(/* ??? */);
-extern void swab(const char *, char *, int);
-extern int swapcontext(ucontext_t *, ucontext_t *);
-extern int symlink(const char *, const char *);
-extern void sync(void);
-extern int syncok(WINDOW *, int);
-extern int syscall(int, ...);
-extern long int sysconf(int);
-extern int sysfs(int, ...);
-extern int sysinfo(int, char *, long int);
-extern int system(const char *);
-extern char * taddr2uaddr(struct netconfig *, struct netbuf *);
-extern double tan(double);
-extern float tanf(float);
-extern double tanh(double);
-extern float tanhf(float);
-extern int tcdrain(int);
-extern int tcflow(int, int);
-extern int tcflush(int, int);
-extern int tcgetattr(int, struct termios *);
-extern pid_t tcgetpgrp(int);
-extern pid_t tcgetsid(int);
-extern int tcsendbreak(int, int);
-extern int tcsetattr(int, int, const struct termios *);
-extern int tcsetpgrp(int, pid_t);
-extern void * tdelete(const void *, void **, int (*) (const void *, const void *));
-extern long int telldir(DIR *);
-extern char * tempnam(const char *, const char *);
-extern chtype termattrs(void);
-extern void termerr(void);
-extern char * termname(void);
-extern void * tfind(const void *, void *const *, int (*) (const void *, const void *));
-extern int tgetent(char *, char *);
-extern int tgetflag(char *);
-extern int tgetnum(char *);
-extern char * tgetstr(char *, char **);
-extern char * tgoto(char *, int, int);
-extern char * tigetstr(char *);
-extern time_t time(time_t *);
-extern clock_t times(struct tms *);
-extern char * timezone(int, int);
-extern void tinputfd(int);
-extern FILE * tmpfile(void);
-extern char * tmpnam(char *);
-extern int toascii(int);
-extern int tolower(int);
-extern int top_panel(PANEL *);
-extern int top_row(MENU *);
-extern int touchline(WINDOW *, int, int);
-extern int touchwin(WINDOW *);
-extern int toupper(int);
-extern char * tparm(/* ??? */);
-extern int tputs(char *, int, int (*) (char));
-extern int traceoff(void);
-extern int traceon(void);
-extern int truncate(const char *, off_t);
-extern void * tsearch(const void *, void **, int (*) (const void *, const void *));
-extern char * ttyname(int);
-extern int ttyslot(void);
-extern void twalk(void *, void (*) (void *, VISIT, int));
-extern int typeahead(int);
-extern void tzset(void);
-extern struct netbuf * uaddr2taddr(struct netconfig *, char *);
-extern int uadmin(int, int, int);
-extern unsigned ualarm(unsigned, unsigned);
-extern int ulckpwdf(void);
-extern long int ulimit(int, ...);
-extern mode_t umask(mode_t);
-extern int umount(const char *);
-extern int uname(struct utsname *);
-extern char * unctrl(int);
-extern void undial(int);
-extern int ungetc(int, FILE *);
-extern int ungetch(int);
-extern int unlink(const char *);
-extern int unordered(double, double);
-extern int unpost_form(FORM *);
-extern int unpost_menu(MENU *);
-extern int unremio(/* ??? */);
-extern int untouchwin(WINDOW *);
-extern void update_panels(void);
-extern void updwtmp(const char *, struct utmp *);
-extern void updwtmpx(const char *, struct utmpx *);
-extern void use_env(int);
-extern unsigned usleep(unsigned);
-extern int ustat(dev_t, struct ustat *);
-extern int utime(const char *, const struct utimbuf *);
-extern int utmpname(const char *);
-extern int utmpxname(const char *);
-extern void va_end(__gnuc_va_list);
-extern int vadvise(int);
-extern void * valloc(size_t);
-extern pid_t vfork(void);
-extern int vfprintf(FILE *, const char *, __gnuc_va_list);
-extern int vhangup(void);
-extern int vid32attr(chtype);
-extern int vid32puts(chtype, int (*) (char));
-extern void vidupdate(chtype, chtype, int (*) (char));
-extern int vn_close(/* ??? */);
-extern int vprintf(const char *, __gnuc_va_list);
-extern int vsprintf(char *, const char *, __gnuc_va_list);
-extern int vwprintw(WINDOW *, char *, void *);
-extern int vwscanw(WINDOW *, char *, void *);
-extern int w32addch(WINDOW *, chtype);
-extern int w32attroff(WINDOW *, chtype);
-extern int w32attron(WINDOW *, chtype);
-extern int w32attrset(WINDOW *, chtype);
-extern int w32echochar(WINDOW *, chtype);
-extern int w32insch(WINDOW *, chtype);
-extern int waddchnstr(WINDOW *, chtype *, int);
-extern int waddnstr(WINDOW *, char *, int);
-extern int waddstr(WINDOW *, char *);
-extern pid_t wait(wait_arg_t *);
-extern pid_t wait3(union wait *, int, struct rusage *);
-extern int waitid(idtype_t, id_t, siginfo_t *, int);
-extern pid_t waitpid(pid_t, int *, int);
-extern void * wallproc_wall_1(/* ??? */);
-extern int wbkgd(WINDOW *, chtype);
-extern void wbkgdset(WINDOW *, chtype);
-extern int wborder(WINDOW *, chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype);
-extern int wclear(WINDOW *);
-extern int wclrtobot(WINDOW *);
-extern int wclrtoeol(WINDOW *);
-extern size_t wcstombs(char *, const wchar_t *, size_t);
-extern int wctomb(char *, wchar_t);
-extern void wcursyncup(WINDOW *);
-extern int wdelch(WINDOW *);
-extern int wdeleteln(WINDOW *);
-extern int werase(WINDOW *);
-extern int wgetch(WINDOW *);
-extern int wgetnstr(WINDOW *, char *, int);
-extern int wgetstr(WINDOW *, char *);
-extern int whline(WINDOW *, chtype, int);
-extern chtype winch(WINDOW *);
-extern int winchnstr(WINDOW *, chtype *, int);
-extern int winchstr(WINDOW *, chtype *);
-extern int winnstr(WINDOW *, char *, int);
-extern int winsdelln(WINDOW *, int);
-extern int winsertln(WINDOW *);
-extern int winsnstr(WINDOW *, char *, int);
-extern int winstr(WINDOW *, char *);
-extern int wisprint(wchar_t);
-extern void wmouse_position(WINDOW *, int *, int *);
-extern int wmove(WINDOW *, int, int);
-extern int wnoutrefresh(WINDOW *);
-extern int wprintw(WINDOW *, ...);
-extern int wredrawln(WINDOW *, int, int);
-extern int wrefresh(WINDOW *);
-extern ssize_t write(int, const void *, size_t);
-extern int wscanw(WINDOW *, ...);
-extern int wscrl(WINDOW *, int);
-extern int wsetscrreg(WINDOW *, int, int);
-extern int wstandend(WINDOW *);
-extern int wstandout(WINDOW *);
-extern void wsyncdown(WINDOW *);
-extern void wsyncup(WINDOW *);
-extern void wtimeout(WINDOW *, int);
-extern int wtouchln(WINDOW *, int, int, int);
-extern int wvline(WINDOW *, chtype, int);
-extern bool xdr_datum(/* ??? */);
-extern int xdr_double(/* ??? */);
-extern int xdr_exports(/* ??? */);
-extern int xdr_fhstatus(/* ??? */);
-extern int xdr_float(/* ??? */);
-extern int xdr_keybuf(/* ??? */);
-extern int xdr_mountlist(/* ??? */);
-extern int xdr_netbuf(/* ??? */);
-extern int xdr_path(/* ??? */);
-extern int xdr_pmap(/* ??? */);
-extern int xdr_pmaplist(/* ??? */);
-extern int xdr_pointer(/* ??? */);
-extern int xdr_reference(/* ??? */);
-extern int xdr_rmtcall_args(/* ??? */);
-extern int xdr_rmtcallres(/* ??? */);
-extern int xdr_rpcb(/* ??? */);
-extern int xdr_rpcb_rmtcallargs(/* ??? */);
-extern int xdr_rpcb_rmtcallres(/* ??? */);
-extern int xdr_rpcblist(/* ??? */);
-extern int xdr_sprayarr(/* ??? */);
-extern int xdr_spraycumul(/* ??? */);
-extern int xdr_spraytimeval(/* ??? */);
-extern int xdr_u_char(/* ??? */);
-extern int xdr_utmparr(/* ??? */);
-extern int xdr_utmpidlearr(/* ??? */);
-extern int xdr_vector(/* ??? */);
-extern int xdr_yp_buf(/* ??? */);
-extern bool xdr_yp_inaddr(/* ??? */);
-extern bool xdr_ypall(/* ??? */);
-extern int xdr_ypdelete_args(/* ??? */);
-extern bool xdr_ypdomain_wrap_string(/* ??? */);
-extern bool xdr_ypmap_parms(/* ??? */);
-extern bool xdr_ypmap_wrap_string(/* ??? */);
-extern bool xdr_ypowner_wrap_string(/* ??? */);
-extern bool xdr_yppushresp_xfr(/* ??? */);
-extern bool xdr_ypreq_key(/* ??? */);
-extern bool xdr_ypreq_newxfr(/* ??? */);
-extern bool xdr_ypreq_nokey(/* ??? */);
-extern bool xdr_ypreq_xfr(/* ??? */);
-extern bool xdr_ypresp_key_val(/* ??? */);
-extern bool xdr_ypresp_maplist(/* ??? */);
-extern bool xdr_ypresp_master(/* ??? */);
-extern bool xdr_ypresp_order(/* ??? */);
-extern bool xdr_ypresp_val(/* ??? */);
-extern int xdr_ypupdate_args(/* ??? */);
-extern void xdrrec_create(/* ??? */);
-extern int xdrrec_endofrecord(/* ??? */);
-extern int xdrrec_eof(/* ??? */);
-extern int xdrrec_skiprecord(/* ??? */);
-extern void xdrstdio_create(/* ??? */);
-extern void xprt_register(/* ??? */);
-extern void xprt_unregister(/* ??? */);
-extern double y0(double);
-extern double y1(double);
-extern double yn(int, double);
-extern int yp_all(char *, char *, struct ypall_callback *);
-extern int yp_bind(const char *);
-extern int yp_first(char *, char *, char **, int *, char **, int *);
-extern int yp_get_default_domain(char **);
-extern int yp_master(char *, char *, char **);
-extern int yp_match(char *, char *, char *, int, char **, int *);
-extern int yp_next(char *, char *, char *, int, char **, int *, char **, int *);
-extern int yp_order(char *, char *, int *);
-extern void yp_unbind(const char *);
-extern char * yperr_string(int);
-extern int ypprot_err(unsigned int);
-extern u_int * ypu_change_1(/* ??? */);
-extern u_int * ypu_delete_1(/* ??? */);
-extern u_int * ypu_insert_1(/* ??? */);
-extern u_int * ypu_store_1(/* ??? */);
diff --git a/gcc/sys-types.h b/gcc/sys-types.h
deleted file mode 100644
index 7db46f112c5..00000000000
--- a/gcc/sys-types.h
+++ /dev/null
@@ -1,240 +0,0 @@
-enum clnt_stat { ___fake1 };
-enum auth_stat { ___fake2 };
-
-struct netconfig;
-struct netbuf;
-struct address;
-struct tm;
-struct ldfile;
-struct syment;
-struct stat;
-struct timeval;
-struct termios;
-struct tms;
-struct dma_cb;
-struct cred;
-struct vnode;
-struct vattr;
-struct uarg;
-struct statfs;
-struct statvfs;
-struct dirent;
-struct itimerval;
-struct mnttab;
-struct strbuf;
-struct vfstab;
-struct ldfile;
-struct syment;
-struct scnhdr;
-struct exception;
-struct nd_hostservlist;
-struct nd_hostserv;
-struct utsname;
-struct uio;
-struct pid;
-struct pollfd;
-struct nlist;
-struct passwd;
-struct spwd;
-struct flock;
-struct seg;
-struct sembuf;
-struct sigaction;
-struct utimbuf;
-struct map;
-struct filehdr;
-struct lineno;
-struct nd_addrlist;
-struct FTW;
-struct buf;
-struct ustat;
-struct qelem;
-struct prpsinfo;
-struct user;
-struct qelem;
-struct execenv;
-struct utmpx;
-
-struct direct;
-struct tm;
-struct stat;
-struct rlimit;
-struct rusage;
-struct sockaddr;
-struct sockaddr_in;
-struct timeval { int i; };
-struct exportent;
-struct fstab;
-struct hostent;
-struct in_addr { int i; };
-struct ldfile;
-struct mallinfo { int i; };
-struct mint;
-struct nmtent;
-struct netent;
-struct pmaplist;
-struct protoent;
-struct rpcent;
-struct servent;
-struct authdes_cred;
-struct rpc_err;
-struct ypall_callback;
-
-union wait;
-
-/* Get size_t and wchar_t. */
-#include <stddef.h>
-
-/* #include "sys/types.h" */
-#define ssize_t int
-
-/* The actual types used here are mostly wrong,
- but it is not supposed to matter what types we use here. */
-
-typedef int dev_t;
-typedef int pid_t;
-typedef int gid_t;
-typedef int off_t;
-typedef int mode_t;
-typedef int uid_t;
-
-typedef int proc_t;
-typedef int time_t;
-typedef int addr_t;
-typedef int caddr_t;
-typedef int clock_t;
-typedef int div_t;
-typedef int ldiv_t;
-typedef int dl_t;
-typedef int major_t;
-typedef int minor_t;
-typedef int emcp_t;
-typedef int fpclass_t;
-typedef int index_t;
-typedef int ecb_t;
-typedef int aioop_t;
-typedef int evver_t;
-typedef int evcntlcmds_t;
-typedef int idtype_t;
-typedef int id_t;
-typedef int procset_t;
-typedef int hostid_t;
-typedef int evpollcmds_t;
-typedef int event_t;
-typedef int hrtime_t;
-typedef int evqcntlcmds_t;
-typedef int sigset_t;
-typedef int evsiginfo_t;
-typedef int evcontext_t;
-typedef int evta_t;
-typedef int speed_t;
-typedef int rlim_t;
-typedef int cred_t;
-typedef int file_t;
-typedef int vnode_t;
-typedef int vfs_t;
-typedef int fpos_t;
-typedef int exhda_t;
-typedef int ucontext_t;
-typedef int sess_t;
-typedef int hrtcmd_t;
-typedef int interval_t;
-typedef int key_t;
-typedef int daddr_t;
-typedef int stack_t;
-typedef int sigaction_t;
-typedef int siginfo_t;
-typedef int mblk_t;
-typedef int paddr_t;
-typedef int qband_t;
-typedef int queue_t;
-typedef int rf_resource_t;
-typedef int sr_mount_t;
-typedef int timer_t;
-typedef int fpregset_t;
-typedef int prstatus_t;
-typedef int vfssw_t;
-typedef int eucwidth_t;
-typedef int page_t;
-
-typedef int u_int;
-typedef int u_short;
-typedef int u_long;
-typedef int u_char;
-
-typedef int ushort;
-typedef int ulong;
-typedef int uint;
-
-typedef int __gnuc_va_list;
-
-typedef int archdr;
-typedef int AUTH;
-typedef int CLIENT;
-typedef int DIR;
-typedef int ENTRY;
-typedef int Elf;
-typedef int Elf32_Ehdr;
-typedef int Elf32_Phdr;
-typedef int Elf32_Shdr;
-typedef int Elf_Arhdr;
-typedef int Elf_Arsym;
-typedef int Elf_Cmd;
-typedef int Elf_Data;
-typedef int Elf_Scn;
-typedef int Elf_Type;
-typedef int Elf_Kind;
-typedef int FIELD;
-typedef int FIELDTYPE;
-typedef int PTF_int;
-typedef int PTF_void;
-typedef int PTF_charP;
-typedef int FILE;
-typedef int FORM;
-typedef int ITEM;
-typedef int MENU;
-typedef int OPTIONS;
-typedef int PANEL;
-typedef int FTP_void;
-typedef int RPCBLIST;
-typedef int SCREEN;
-typedef int SVCXPRT;
-typedef int TERMINAL;
-typedef int WINDOW;
-typedef int bool;
-typedef int nl_catd;
-typedef int nl_item;
-typedef int chtype;
-typedef int datum;
-typedef int fp_rnd;
-typedef int spraycumul;
-typedef int WORD;
-typedef int VISIT;
-typedef int ACTION;
-
-typedef int *jmp_buf;
-typedef int *sigjmp_buf;
-typedef int xdrproc_t;
-typedef int CALL;
-typedef int bool_t;
-typedef int DBM;
-typedef int des_block;
-typedef int resultproc_t;
-
-
-#ifdef BSD
-
-#define mode_t int
-#define uid_t int
-#define gid_t int
-#define time_t long
-#define pid_t int
-#define signal_ret_t int
-#define wait_arg_t union wait
-
-#else
-
-#define signal_ret_t void
-#define wait_arg_t int
-
-#endif
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d86d2d56fd3..37dcc216915 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,7 +1,758 @@
+2009-03-30 Joseph Myers <joseph@codesourcery.com>
+
+ PR rtl-optimization/323
+ * gcc.target/i386/excess-precision-1.c,
+ gcc.target/i386/excess-precision-2.c,
+ gcc.target/i386/excess-precision-3.c,
+ gcc.target/i386/excess-precision-4.c,
+ gcc.target/i386/excess-precision-5.c,
+ gcc.target/i386/excess-precision-6.c: New tests.
+
+2009-03-30 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/35235
+ * gcc.dg/c99-array-lval-8.c: New test.
+
+2009-03-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR preprocessor/34695
+ * gcc.dg/builtin-redefine.c, gcc.dg/cpp/redef2.c,
+ gcc.dg/cpp/redef3.c, gcc.dg/cpp/trad/redef2.c: Use dg-message
+ instead of dg-warning for "previous definition" messages.
+ * gcc.dg/cpp/Wvariadic-1.c, gcc.dg/cpp/Wvariadic-3.c: Expect
+ "warnings being treated as errors" message.
+ * gcc.dg/fltconst-1.c: Use -fshow-column.
+
+2009-03-29 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/38823
+ * gfortran.dg/power1.f90: New test.
+
+2009-03-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/456
+ PR c/5675
+ PR c/19976
+ PR c/29116
+ PR c/31871
+ PR c/35198
+ * gcc.c-torture/compile/20081108-1.c,
+ gcc.c-torture/compile/20081108-2.c,
+ gcc.c-torture/compile/20081108-3.c, gcc.dg/bconstp-2.c,
+ gcc.dg/bconstp-3.c, gcc.dg/bconstp-4.c, gcc.dg/c90-const-expr-6.c,
+ gcc.dg/c90-const-expr-7.c, gcc.dg/c90-const-expr-8.c,
+ gcc.dg/c90-const-expr-9.c, gcc.dg/c90-const-expr-10.c,
+ gcc.dg/c90-const-expr-11.c, gcc.dg/c99-const-expr-6.c,
+ gcc.dg/c99-const-expr-7.c, gcc.dg/c99-const-expr-8.c,
+ gcc.dg/c99-const-expr-9.c, gcc.dg/c99-const-expr-10.c,
+ gcc.dg/c99-const-expr-11.c, gcc.dg/c99-const-expr-12.c,
+ gcc.dg/c99-const-expr-13.c, gcc.dg/compare10.c,
+ gcc.dg/gnu89-const-expr-1.c, gcc.dg/gnu89-const-expr-2.c,
+ gcc.dg/gnu99-const-expr-1.c, gcc.dg/gnu99-const-expr-2.c,
+ gcc.dg/gnu99-const-expr-3.c, gcc.dg/vla-12.c, gcc.dg/vla-13.c,
+ gcc.dg/vla-14.c, gcc.dg/vla-15.c, gcc.dg/vla-16.c: New tests.
+ * gcc.dg/c90-const-expr-1.c, gcc.dg/c90-const-expr-2.c,
+ gcc.dg/c90-const-expr-3.c, gcc.dg/c99-const-expr-2.c,
+ gcc.dg/c99-const-expr-3.c, gcc.dg/c99-static-1.c: Remove XFAILs.
+ * gcc.dg/c90-const-expr-2.c: Use ZERO in place of 0 in another
+ case.
+ * gcc.dg/overflow-warn-1.c, gcc.dg/overflow-warn-2.c,
+ gcc.dg/overflow-warn-3.c, gcc.dg/overflow-warn-4.c: Remove
+ XFAILs. Update expected messages.
+ * gcc.dg/pr14649-1.c, gcc.dg/pr19984.c, gcc.dg/pr25682.c: Update
+ expected messages.
+ * gcc.dg/real-const-1.c: Replace with test from original PR.
+ * gcc.dg/vect/pr32230.c: Use intermediate cast to __PTRDIFF_TYPE__
+ when casting from non-constant integer to pointer.
+
+2009-03-29 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/forwprop-11.c: New testcase.
+
+2009-03-29 Daniel Kraft <d@domob.eu>
+
+ PR fortran/37423
+ * gfortran.dg/typebound_proc_4.f03: Remove not-implemented check for
+ DEFERRED bindings.
+ * gfortran.dg/typebound_proc_9.f03: New test.
+ * gfortran.dg/typebound_proc_10.f03: New test.
+ * gfortran.dg/typebound_proc_11.f03: New test.
+ * gfortran.dg/abstract_type_5.f03: New test.
+
+2008-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
+
+ PR fortran/38507
+ * gfortran.dg/do_4.f: New.
+ * gfortran.dg/goto_2.f90: Correct expected warnings.
+ * gfortran.dg/goto_4.f90: Likewise.
+ * gfortran.dg/goto_5.f90: New.
+
+2009-03-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39545
+ * gcc.c-torture/compile/pr16566-2.c: Add -Wno-psabi for x86-64.
+
+ * gcc.target/i386/pr39545-1.c: New.
+ * gcc.target/i386/pr39545-2.c: Likewise.
+
+ * gcc.target/x86_64/abi/test_passing_structs.c (flex1_struct): New.
+ (flex2_struct): Likewise.
+ (check_struct_passing7): Likewise.
+ (check_struct_passing8): Likewise.
+ (f1s): Likewise.
+ (f2s): Likewise.
+ (main): Call check_struct_passing7 and check_struct_passing8.
+
+2009-03-29 Richard Guenther <rguenther@suse.de>
+
+ * gcc.c-torture/execute/20090113-1.c: New testcase.
+ * gcc.c-torture/execute/20090113-2.c: Likewise.
+ * gcc.c-torture/execute/20090113-3.c: Likewise.
+ * gcc.c-torture/execute/20090207-1.c: Likewise.
+ * gcc.c-torture/compile/20090114-1.c: Likewise.
+ * gcc.c-torture/compile/20090328-1.c: Likewise.
+ * gcc.dg/noncompile/920507-1.c: Fix out-of-bounds array access.
+
+2009-03-29 David Ayers <ayers@fsfe.org>
+
+ PR objc/27377
+ * objc.dg/conditional-1.m: New tests.
+
+2009-03-28 Adam Nemet <anemet@caviumnetworks.com>
+
+ * gcc.dg/winline-10.c: New test.
+
+2009-03-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/34656
+ * gfortran.dg/do_check_1.f90: Add test.
+ * gfortran.dg/do_check_2.f90: Add test.
+ * gfortran.dg/do_check_3.f90: Add test.
+ * gfortran.dg/do_check_4.f90: Add test.
+
+2009-03-28 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/attr-noinline.c: Avoid pure-const optimization.
+ * gcc.dg/pr33826.c: Update dump files.
+ * gcc.dg/ipa/ipa-3.c: Avoid pure-const optimization.
+ * gcc.dg/ipa/ipa-5.c: Avoid pure-const optimization.
+
+2009-03-28 Martin Jambor <mjambor@suse.cz>
+
+ * g++.dg/tree-ssa/fwprop-align.C: New test.
+
+2009-03-28 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/powerpc/altivec-28.c: New test.
+
+ PR c++/39554
+ * gcc.dg/wdisallowed-functions-1.c: Removed.
+ * gcc.dg/wdisallowed-functions-2.c: Removed.
+ * gcc.dg/wdisallowed-functions-3.c: Removed.
+ * g++.dg/warn/Wdisallowed-functions-1.C: Removed.
+ * g++.dg/warn/Wdisallowed-functions-2.C: Removed.
+ * g++.dg/warn/Wdisallowed-functions-3.C: Removed.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38723
+ * gcc.dg/tree-ssa/ssa-fre-22.c: New testcase.
+
+2009-03-28 Paul Thomas <pault@gcc.gnu.org
+
+ PR fortran/38538
+ * gfortran.dg/char_result_13.f90: New test.
+
+2009-03-28 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/38765
+ * gfortran.dg/alloc_comp_assign_9.f90: New test.
+
+2009-03-28 Daniel Kraft <d@domob.eu>
+
+ * gfortran.dg/trim_1.f90: New test.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/Warray-bounds.c: Do not use redundant stores.
+ * g++.dg/warn/Warray-bounds.C: Likewise.
+
+2009-03-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/32626
+ * gfortran.dg/recursive_check_7.f90: New test.
+
+2009-03-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/38432
+ * gfortran.dg/do_check_5.f90: New test.
+ * gfortran.dg/array_constructor_11.f90: Add dg-warning.
+ * gfortran.dg/array_constructor_18.f90: Ditto.
+ * gfortran.dg/array_constructor_22.f90: Ditto.
+ * gfortran.dg/do_3.F90: Ditto.
+ * gfortran.dg/do_1.f90: Ditto.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38180
+ * gcc.dg/tree-ssa/ssa-ccp-24.c: New testcase.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38513
+ * gcc.dg/tree-ssa/ssa-fre-21.c: New testcase.
+ * gcc.dg/tree-ssa/ssa-dse-11.c: Adjust.
+ * gcc.dg/vect/vect-reduc-dot-u8a.c: Likewise.
+ * gcc.dg/vect/vect-reduc-dot-u8b.c: Likewise.
+ * gcc.dg/vect/slp-widen-mult-u8.c: Likewise.
+ * gcc.dg/vect/vect-multitypes-16.c: Likewise.
+ * gcc.dg/vect/vect-35.c: Likewise.
+ * gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise.
+ * gcc.dg/vect/vect-multitypes-17.c: Likewise.
+ * gcc.dg/vect/slp-widen-mult-s16.c: Likewise.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38968
+ * gfortran.dg/vect/fast-math-pr38968.f90: New testcase.
+
+2009-03-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/37795
+ * gcc.dg/tree-ssa/ssa-ifcombine-7.c: New testcase.
+
+2009-03-28 Joseph Myers <joseph@codesourcery.com>
+
+ * g++.old-deja/g++.ext/attrib5.C, g++.old-deja/g++.jason/thunk3.C,
+ gcc.c-torture/compile/981006-1.c: Don't XFAIL or add special
+ options for removed targets.
+
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39120
+ * gcc.c-torture/execute/pr39120.c: New testcase.
+
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39120
+ * gcc.dg/torture/pta-callused-1.c: New testcase.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/39315
+ * gcc.target/i386/pr39315-1.c: New.
+ * gcc.target/i386/pr39315-2.c: Likewise.
+ * gcc.target/i386/pr39315-3.c: Likewise.
+ * gcc.target/i386/pr39315-4.c: Likewise.
+ * gcc.target/i386/pr39315-check.c: Likewise.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR c/39323
+ * gcc.dg/pr39323-1.c: New.
+ * gcc.dg/pr39323-2.c: Likewise.
+ * gcc.dg/pr39323-3.c: Likewise.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/38034
+ * gcc.target/ia64/sync-1.c: New.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39472
+ * gcc.target/x86_64/abi/callabi/func-2a.c: New.
+ * gcc.target/x86_64/abi/callabi/func-2b.c: Likewise.
+ * gcc.target/x86_64/abi/callabi/func-indirect-2a.c: Likewise.
+ * gcc.target/x86_64/abi/callabi/func-indirect-2b.c: Likewise.
+ * gcc.target/x86_64/abi/callabi/vaarg-4a.c: Likewise.
+ * gcc.target/x86_64/abi/callabi/vaarg-4b.c: Likewise.
+ * gcc.target/x86_64/abi/callabi/vaarg-5a.c: Likewise.
+ * gcc.target/x86_64/abi/callabi/vaarg-5b.c: Likewise.
+
+2009-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.dg/torture/builtin-explog-1.c: Remove tests that aren't true
+ for low precision (i.e. float).
+
+2009-03-27 Dodji Seketeli <dodji@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/37959
+ * g++.dg/debug/dwarf2/explicit-constructor.C: New test.
+
+2009-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/memmove-2.c: New test.
+ * gcc.dg/memmove-3.c: New test.
+
+ * gcc.dg/ipa/ipacost-1.c: Adjust match pattern for change
+ in clone naming.
+
+2009-03-27 Xinliang David Li <davidxl@google.com>
+
+ PR tree-optimization/39557
+ * g++.dg/tree-ssa/dom-invalid.C: New test.
+
+2009-03-27 Xinliang David Li <davidxl@google.com>
+
+ PR tree-optimization/39548
+ * g++.dg/tree-ssa/copyprop.C: New test.
+
+2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR c++/38638
+ * g++.dg/template/typename17.C: New testcase.
+ * g++.dg/template/typename18.C: New testcase.
+
+2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR c++/36799
+ * g++.dg/other/var_copy-1.C: New test.
+
+2009-03-27 Simon Martin <simartin@users.sourceforge.net>
+
+ PR c++/37647
+ * g++.dg/parse/ctor9.C: New test.
+
+2009-03-27 Simon Martin <simartin@users.sourceforge.net>
+
+ PR c++/29727
+ * g++.dg/init/error2.C: New test.
+
+2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ PR c++/35652
+ * gcc.dg/pr35652.C: New.
+ * g++.dg/warn/pr35652.C: New.
+ * gcc.dg/format/plus-1.c: Adjust message.
+
+2009-03-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/39554
+ * gcc.dg/wdisallowed-functions-3.c: New test.
+ * g++.dg/warn/Wdisallowed-functions-3.C: New test.
+
+2009-03-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.dg/inline-33.c: Fix when pic.
+
+2009-03-25 Alexander Monakov <amonakov@ispras.ru>
+
+ * gcc.target/ia64/20090324-1.c: New test.
+
+2009-03-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/27898
+ * gcc.dg/pr27898.c: New test.
+
+ PR tree-optimization/32139
+ * gcc.c-torture/compile/pr32139.c: New test.
+
+2009-03-24 Jason Merrill <jason@redhat.com>
+
+ PR c++/28274
+ * g++.dg/parse/defarg14.C: New test.
+
+2009-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/39528
+ * gfortran.dg/read_repeat.f90: New test.
+
+2009-03-24 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/39529
+ * gcc.dg/vect/pr39529.c: New test.
+
+2009-03-24 Dodji Seketeli <dodji@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/39524
+ * g++.dg/debug/dwarf2/imported-decl-1.C: New test.
+
+2009-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/39495
+ * gcc.dg/gomp/pr39495-2.c: Remove xfails.
+
+2009-03-23 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/auto12.C: Add variadic test.
+
+ PR c++/39526
+ * g++.dg/warn/Wshadow-4.C: New test.
+
+2009-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/39516
+ * gfortran.dg/pr39516.f: New test.
+
+2009-03-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * lib/target-libpath.exp (set_ld_library_path_env_vars):
+ Correct TEST_GCC_EXEC_PREFIX test to check existence as a tcl
+ variable, not environment variable.
+
+2009-03-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/28879
+ * g++.dg/ext/vla6.C: New test.
+
+2009-03-20 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/initlist5.C: Add additional test.
+
+2009-03-19 Jakub Jelinek <jakub@redhat.com>
+ Janis Johnson <janis187@us.ibm.com>
+
+ * lib/compat.exp (compat-get-options-main, compat-get-options):
+ Handle dg-prune-output in source file.
+ * lib/gcc-defs.exp (${tool}_check_compile): Process prune requests.
+ * gcc.dg/compat/struct-layout-1_main.c: Use dg-prune for warning.
+ * gcc.dg/compat/struct-layout-1_generate.c: Use -Wno-abi, prune
+ two warnings.
+
+2009-03-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/39495
+ * gcc.dg/gomp/pr39495-1.c: New test.
+ * gcc.dg/gomp/pr39495-2.c: New test.
+ * g++.dg/gomp/pr39495-1.C: New test.
+ * g++.dg/gomp/pr39495-2.C: New test.
+
+ PR target/39496
+ * gcc.target/i386/pr39496.c: New test.
+ * g++.dg/other/pr39496.C: New test.
+
+2009-03-19 Li Feng <nemokingdom@gmail.com>
+
+ PR middle-end/39500
+ * gcc.dg/autopar/pr39500-1.c: New.
+ * gcc.dg/autopar/pr39500-2.c: New.
+
+2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * g++.dg/dg.exp: Prune graphite.
+
+2009-03-18 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/39447
+ * g++.dg/graphite: New.
+ * g++.dg/graphite/graphite.exp: New.
+ * g++.dg/graphite/pr39447.C: New.
+
+2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR c++/39425
+ * g++.dg/template/pr39425.C: New.
+
+ * g++.dg/template/spec33.C: Updated.
+
+2009-03-17 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/auto6.C, auto12.C: Update mangling.
+
+2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/39475
+ * g++.dg/ext/unary_trait_incomplete.C: New.
+
+2009-03-17 Jing Yu <jingyu@google.com>
+
+ PR middle-end/39378
+ * g++.dg/inherit/thunk10.C: New test.
+
+2009-03-17 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/39482
+ * gcc.target/i386/pr39482.c: New test.
+
+2009-03-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/39471
+ * g++.dg/debug/dwarf2/imported-module-2.C: Expect
+ DW_TAG_imported_module, not just any DW_TAG_imported prefixed tag.
+ * g++.dg/debug/dwarf2/imported-module-3.C: Likewise.
+ * g++.dg/debug/dwarf2/imported-module-4.C: Likewise.
+
+ PR middle-end/39443
+ * gcc.dg/pr39443.c: New test.
+
+ PR debug/39412
+ * gcc.dg/debug/pr39412.c: New test.
+
+2009-03-17 Janis Johnson <janis187@us.ibm.com>
+
+ PR testsuite/38526
+ * lib/target-libpath.exp (set_ld_library_path_env_vars): Save
+ existing GCC_EXEC_PREFIX, set to TEST_GCC_EXEC_PREFIX if that
+ is defined.
+ (restore_ld_library_path_env_vars): Restore GCC_EXEC_PREFIX to
+ its original value, or unset if it was not defined.
+ * gcc.dg/compat/struct-layout-1.exp: Use set/restore library
+ path procs around use of HOSTCC.
+ * g++.dg/compat/struct-layout-1.exp: Ditto.
+ * objc.dg/gnu-encoding/gnu-encoding.exp: Ditto.
+
+2009-03-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/x86_64/abi/callabi/func-indirect.c (main): Return 0.
+
+2009-03-16 Janis Johnson <janis187@us.ibm.com>
+
+ Revert patch for PR testsuite/37630.
+
+ PR testsuite/37960
+ * gcc.dg/pr11492.c: Replace constant and remove xfail.
+
+ PR testsuite/37630
+ * lib/target-supports.exp (check_effective_target_ieee): New.
+ * gcc.c-torture/execute/ieee/ieee.exp: Use it.
+ * gcc.dg/20001012-1.c: Require ieee.
+
+ PR testsuite/37628
+ * gcc.c-torture/execute/pr35456.x: New, skip test for vax.
+
+2009-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/39455
+ * gcc.dg/pr39455.c: New test.
+
+2009-03-13 David Ayers <ayers@fsfe.org>
+
+ * objc/execute/trivial.m. New test.
+
+2009-03-13 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR target/39137
+ * testsuite/gcc.target/i386/stackalign/longlong-2.c: Skip on darwin.
+
+2009-03-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR testsuite/39451
+ * gcc.dg/asm-b.c: Use "Q" constraint on %b1/%h1 and "R"
+ constraint on (%2).
+
+2009-03-12 David Ayers <ayers@fsfe.org>
+
+ PR libobjc/27466
+ * objc/execute/exceptions/handler-1.m. New test.
+
+2008-03-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/39431
+ * gcc.target/i386/pr39431.c: New test.
+
+2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39445
+ * gcc.target/i386/pr39445.c: New.
+
+ * gcc.target/i386/push-1.c: XFAIL.
+
+2009-03-11 Adam Nemet <anemet@caviumnetworks.com>
+
+ * gcc.dg/inline-33.c: New test.
+
+2009-03-11 Nathan Froyd <froydnj@codesourcery.com>
+
+ * gcc.dg/vect/vect-82.c: Combine dg-do and
+ dg-require-effective-target into dg-skip-if.
+ * gcc.dg/vect/vect-83.c: Likewise.
+
+2009-03-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/39137
+ * gcc.target/i386/stackalign/longlong-1.c: New test.
+ * gcc.target/i386/stackalign/longlong-2.c: New test.
+
+2009-03-11 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * g++.old-deja/g++.jason/thunk2.C: Skip on SPU.
+
+2009-03-11 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc.c-torture/execute/ieee/inf-3.c: New test.
+ * gcc.c-torture/execute/ieee/inf-2.c: Fix typo.
+
+2009-03-11 Olivier Hainque <hainque@adacore.com>
+
+ * gnat.dg/slice_enum.adb: New test.
+
+2009-03-11 Jason Merrill <jason@redhat.com>
+
+ PR debug/39086
+ * g++.dg/opt/nrv15.C: New test.
+
+2009-03-10 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/39422
+ * gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c: Move
+ constant array with static initialization to global memory.
+ * gcc.dg/vect/costmodel/spu/costmodel-vect-76c.c: Likewise.
+
+2009-03-10 Hariharan Sandanagobalane <hariharan@picochip.com>
+
+ * gcc.c-torture/execute/pr39339.c: Bitfield sizes changed to avoid
+ padding.
+
+2009-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/39371
+ * g++.dg/opt/switch2.C: Add -w to dg-options.
+ * g++.dg/warn/Wswitch-1.C: Adjust expected warnings.
+ * g++.dg/warn/switch1.C: New test.
+ * g++.dg/other/switch3.C: New test.
+
+ PR tree-optimization/39394
+ * gcc.c-torture/compile/pr39394.c: New test.
+
+2009-03-09 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.target/s390/20090223-1.c: New testcase.
+
+2009-03-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/39402
+ * gfortran.dg/fmt_f0_1.f90: New test.
+
+2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR c++/39060
+ * g++.dg/other/new1.C: Adjusted.
+ * g++.dg/parse/crash40.C: Likewise.
+ * g++.dg/parse/defarg12.C: Likewise.
+ * g++.dg/template/error15.C: Likewise.
+
+ * g++.dg/other/pr39060.C: New.
+
+2009-03-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/39367
+ * g++.dg/opt/new1.C: New.
+
+2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/33492
+ * g++.dg/other/error32.C: New.
+
+2009-03-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/39360
+ * gcc.c-torture/compile/pr39360.c: New test.
+
+ PR debug/39372
+ * g++.dg/debug/dwarf2/static-local-var-in-ctor.C: New test.
+
+2009-03-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/38908
+ * g++.dg/warn/Wuninitialized-3.C: New test.
+
+2009-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/39379
+ * g++.dg/debug/dwarf2/imported-module-3.C: New test.
+ * g++.dg/debug/dwarf2/imported-module-4.C: New test.
+
+2009-03-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/13549
+ * g++.dg/template/koenig7.C: New test.
+
+2009-03-04 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.dg/torture/predcom-1.C: New test.
+
+2009-03-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39362
+ * g++.dg/torture/pr39362.C: New testcase.
+
+2009-03-04 Jason Merrill <jason@redhat.com>
+ Giovanni Bajo <giovannibajo@gcc.gnu.org>
+
+ PR c++/9634
+ PR c++/29469
+ PR c++/29607
+ * g++.dg/template/dependent-name5.C: New test.
+
+2009-03-04 Steve Ellcey <sje@cup.hp.com>
+
+ PR testsuite/39357
+ * gcc.dg/vect-iv-6.c (dg-require-effective-target): Change from
+ vect_int to vect_int_mult.
+
+2009-03-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39358
+ * g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C: New testcase.
+ * g++.dg/warn/Wstrict-aliasing-bogus-escape-3.C: Likewise.
+
+2009-03-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39339
+ * gcc.c-torture/execute/pr39339.c: New testcase.
+
+2009-03-03 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.c-torture/compile/20090303-1.c,
+ gcc.c-torture/compile/20090303-2.c: New tests.
+
+2009-03-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/39354
+ * gfortran.dg/gomp/pr39354.f90: New test.
+
+ PR tree-optimization/39343
+ * gcc.dg/pr39343.c: New test.
+
+2009-03-03 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/39248
+ * gcc.dg/vect/vect-complex-1.c: Add attribute aligned to the arrays.
+ * gcc.dg/vect/vect-iv-6.c: Don't expect to fail to vectorize
+ on targets without vector misalignment support.
+ * lib/target-supports.exp
+ (check_effective_target_vect_short_mult): Add
+ check_effective_target_arm32.
+
+2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/39335
+ * testsuite/gcc.dg/graphite/pr39335_1.c: New.
+ * testsuite/gcc.dg/graphite/pr39335.c: New.
+
+2009-03-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/stackalign/return-4.c: Scan andl/andq instead
+ of andl.
+ * gcc.target/i386/stackalign/return-5.c: Likewise.
+ * gcc.target/i386/stackalign/return-6.c: Likewise.
+
+2009-03-02 Richard Guenther <rguenther@suse.de>
+ Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/39318
+ * gfortran.dg/vect/pr39318.f90: New test.
+
+2009-03-01 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/debug/dwarf2/ipa-cp1.c: New testcase.
+
+2009-03-01 Jan Hubicka <jh@suse.cz>
+
+ PR debug/39267
+ * gcc.dg/debug/dwarf2/inline1.c: New testcase.
+
+2009-03-01 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/pack12.adb: New test.
+
2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
PR c++/37789
- * other/pr37789.C: New.
+ * g++.dg/other/pr37789.C: New.
2009-02-26 Paul Thomas <pault@gcc.gnu.org>
diff --git a/gcc/testsuite/g++.dg/compat/struct-layout-1.exp b/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
index 1ebb83be541..7fa89470e16 100644
--- a/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
+++ b/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
@@ -129,20 +129,11 @@ set generator_src "$generator_src $srcdir/$subdir/../../gcc.dg/compat/generate-r
set generator_src "$generator_src $srcdir/$subdir/../../gcc.dg/compat/generate-random_r.c"
set generator_cmd "-o $generator $generator_src"
-# Temporarily unset GCC_EXEC_PREFIX from environment, as that might
-# confuse the $HOSTCC.
-set orig_gcc_exec_prefix_saved 0
-if [info exists env(GCC_EXEC_PREFIX)] {
- set orig_gcc_exec_prefix "$env(GCC_EXEC_PREFIX)"
- set orig_gcc_exec_prefix_saved 1
- unsetenv GCC_EXEC_PREFIX
-}
+# Temporarily switch to the environment of the host compiler.
+restore_ld_library_path_env_vars
set status [remote_exec build "$HOSTCC $HOSTCFLAGS $generator_cmd"]
set status [lindex $status 0]
-if { $orig_gcc_exec_prefix_saved } {
- set orig_gcc_exec_prefix_saved 0
- setenv GCC_EXEC_PREFIX "$orig_gcc_exec_prefix"
-}
+set_ld_library_path_env_vars
if { $status == 0 } then {
file delete -force $tstobjdir
file mkdir $tstobjdir
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto12.C b/gcc/testsuite/g++.dg/cpp0x/auto12.C
index 437088d654c..34dc8c90b84 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto12.C
@@ -35,18 +35,29 @@ auto A<T>::f(U u) -> decltype (u + i)
return u + i;
}
+template <class... Args>
+int f (Args... args);
+
+template <class... Args>
+auto g (Args... args) -> decltype (f ((args+1)...))
+{
+ return (f ((args+1)...));
+}
+
int main()
{
- // { dg-final { scan-assembler "_ZN1AIiE1fIiEEDTplsTT_sTiES2_" } }
+ // { dg-final { scan-assembler "_ZN1AIiE1fIiEEDTplfp_L_ZNS0_1iEEET_" } }
A<int>().f(1);
- // { dg-final { scan-assembler "_ZN1AIiE2frIiEEDTplsTT_sTiES2_" } }
+ // { dg-final { scan-assembler "_ZN1AIiE2frIiEEDTplfp_L_ZNS0_2irEEET_" } }
A<int>().fr(1);
- // { dg-final { scan-assembler "_ZN1AIiE3frrIiEEDTplsTT_sTiES2_" } }
+ // { dg-final { scan-assembler "_ZN1AIiE3frrIiEEDTplfp_L_ZNS0_3irrEEET_" } }
A<int>().frr(1);
- // { dg-final { scan-assembler "_ZN1AIiE1gIiEEDTplsTT_sR.ES2_" } }
+ // { dg-final { scan-assembler "_ZN1AIiE1gIiEEDTplfp_szL_ZNS0_1iEEET_" } }
A<int>().g(1);
- // { dg-final { scan-assembler "_ZN1AIiE1hIiEEDTplsTT_sr1BIS2_E1iES2_" } }
+ // { dg-final { scan-assembler "_ZN1AIiE1hIiEEDTplfp_sr1BIT_E1iES3_" } }
A<int>().h(1);
- // { dg-final { scan-assembler "_ZN1AIiE1jIiEEDTplsTT_sRiES2_" } }
+ // { dg-final { scan-assembler "_ZN1AIiE1jIiEEDTplfp_clL_Z1xvEEET_" } }
A<int>().j(1);
+ // { dg-final { scan-assembler "_Z1gIIidEEDTclL_Z1fEspplfp_Li1EEEDpT_" } }
+ g(42, 1.0);
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto6.C b/gcc/testsuite/g++.dg/cpp0x/auto6.C
index 7d659c7236a..dfd6a202698 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto6.C
@@ -95,21 +95,21 @@ A<int> a, *p;
int main()
{
- // { dg-final { scan-assembler "_Z3addIidEDTplsTT_sTT0_ES0_S1_" } }
+ // { dg-final { scan-assembler "_Z3addIidEDTplfp_fp0_ET_T0_" } }
auto i = add(1, 2.0);
- // { dg-final { scan-assembler "_Z4add4IidEDTplsTT_sTT0_ES0_S1_" } }
+ // { dg-final { scan-assembler "_Z4add4IidEDTpldecvPT_Li0EdecvPT0_Li0EES0_S2_" } }
auto i4 = add4(1, 2.0);
- // { dg-final { scan-assembler "_Z4add2IidEDTplsRT_sRT0_ES0_S1_" } }
+ // { dg-final { scan-assembler "_Z4add2IidEDTplcvT__EcvT0__EES0_S1_" } }
auto i2 = add2(1, 2.0);
- // { dg-final { scan-assembler "_Z4add3IidEDTclL_Z2agEsTT_sTT0_EES0_S1_" } }
+ // { dg-final { scan-assembler "_Z4add3IidEDTclL_Z2agEfp_fp0_EET_T0_" } }
auto i3 = add3(1, 2.0);
- // { dg-final { scan-assembler "_Z1fI1AIiEEDTclptsTPT_1fEES3_" } }
+ // { dg-final { scan-assembler "_Z1fI1AIiEEDTclptfp_1fEEPT_" } }
f(p);
- // { dg-final { scan-assembler "_Z1gI1AIiEEDTcldtsTT_1fEES2_" } }
+ // { dg-final { scan-assembler "_Z1gI1AIiEEDTcldtfp_1fEET_" } }
g(a);
- // { dg-final { scan-assembler "_Z1hI1AIiEdEDTcldtsTT_1gIT0_EEES2_S3_" } }
+ // { dg-final { scan-assembler "_Z1hI1AIiEdEDTcldtfp_1gIT0_EEET_S2_" } }
h(a,1.0);
- // { dg-final { scan-assembler "_Z1kI1C1AIiE1DEDtdtsTT_srNT0_1BIT1_EE3MEMES4_S5_S7_" } }
+ // { dg-final { scan-assembler "_Z1kI1C1AIiE1DEDtdtfp_srNT0_1BIT1_EE3MEMET_S4_S6_" } }
k( C(), A<int>(), D() );
// { dg-final { scan-assembler "_Z1lIiET_S0_" } }
l(1);
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist5.C b/gcc/testsuite/g++.dg/cpp0x/initlist5.C
index fbdc673948f..958007c9bd8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist5.C
@@ -20,6 +20,8 @@ C c2 = { 1.1, 2 }; // { dg-error "narrowing" }
int j { 1 }; // initialize to 1
int k {}; // initialize to 0
-// PR c++/39693
+// PR c++/36963
double d = 1.1;
float fa[] = { d, 1.1 }; // { dg-error "narrowing conversion of 'd'" }
+const double d2 = 1.1;
+float fa2[] = { d2, 1.1 };
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C b/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C
new file mode 100644
index 00000000000..42fd26455f9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C
@@ -0,0 +1,19 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin: PR c++
+// { dg-do compile }
+// { dg-options "-O -g -dA" }
+// { dg-final { scan-assembler-times "DW_AT_explicit" 2 } }
+
+struct Foo
+{
+ Foo () {}
+ explicit Foo (int) {}
+ Foo (char) {}
+ ~Foo () {};
+};
+
+void
+bar ()
+{
+ Foo foo;
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/imported-decl-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/imported-decl-1.C
new file mode 100644
index 00000000000..bfdb4f8f5a0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/imported-decl-1.C
@@ -0,0 +1,17 @@
+// PR debug/39524
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -O0 -fno-merge-debug-strings" }
+
+namespace A
+{
+ static int var2 = 2;
+}
+
+int
+func ()
+{
+ using A::var2;
+ return var2;
+}
+
+// { dg-final { scan-assembler-times "var2\[^\n\r\]*DW_AT_name" 1 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-2.C
index 86128975b47..9a4821ab54a 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-2.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-2.C
@@ -2,7 +2,7 @@
// Origin: PR debug/38390
// { dg-do compile }
// { dg-options "-g -dA" }
-// { dg-final { scan-assembler "DW_TAG_imported" } }
+// { dg-final { scan-assembler "DW_TAG_imported_module" } }
namespace A
{
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-3.C b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-3.C
new file mode 100644
index 00000000000..9559bcb4ce2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-3.C
@@ -0,0 +1,17 @@
+// PR debug/39379
+// { dg-do compile }
+// { dg-options "-g -dA" }
+// { dg-final { scan-assembler "DW_TAG_imported_module" } }
+
+namespace A
+{
+ int v;
+}
+
+int
+main ()
+{
+ using namespace A;
+ v++;
+ return v - 1;
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-4.C
new file mode 100644
index 00000000000..7ac6bab498d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/imported-module-4.C
@@ -0,0 +1,21 @@
+// PR debug/39379
+// { dg-do compile }
+// { dg-options "-g -dA" }
+// { dg-final { scan-assembler "DW_TAG_imported_module" } }
+
+namespace A
+{
+ int v;
+}
+
+int
+f ()
+{
+ int i;
+ {
+ using namespace A;
+ v++;
+ i = v - 1;
+ }
+ return i;
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/static-local-var-in-ctor.C b/gcc/testsuite/g++.dg/debug/dwarf2/static-local-var-in-ctor.C
new file mode 100644
index 00000000000..a1bf6b53cd4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/static-local-var-in-ctor.C
@@ -0,0 +1,37 @@
+// PR debug/39372
+// { dg-do compile }
+// { dg-options "-O0 -g -dA" }
+// { dg-final { scan-assembler "DW_OP_addr\[^\n\r\]*\[\n\r\]*\[^\n\r\]*staticvar1" } }
+// { dg-final { scan-assembler "DW_OP_addr\[^\n\r\]*\[\n\r\]*\[^\n\r\]*staticvar2" } }
+
+extern void f (int *);
+
+struct A
+{
+ A(int i);
+ void foo(int i);
+};
+
+A::A(int i)
+{
+ static int *staticvar1 = new int(i);
+ f (staticvar1);
+}
+
+void A::foo(int i)
+{
+ static int *staticvar2 = new int(i);
+ f (staticvar2);
+}
+
+void f (int *)
+{
+}
+
+int
+main (void)
+{
+ A a(42);
+ a.foo(42);
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/dg.exp b/gcc/testsuite/g++.dg/dg.exp
index 92d6eec6908..86565a98a1e 100644
--- a/gcc/testsuite/g++.dg/dg.exp
+++ b/gcc/testsuite/g++.dg/dg.exp
@@ -43,6 +43,7 @@ set tests [prune $tests $srcdir/$subdir/vect/*]
set tests [prune $tests $srcdir/$subdir/gomp/*]
set tests [prune $tests $srcdir/$subdir/tree-prof/*]
set tests [prune $tests $srcdir/$subdir/torture/*]
+set tests [prune $tests $srcdir/$subdir/graphite/*]
# Main loop.
dg-runtest $tests "" $DEFAULT_CXXFLAGS
diff --git a/gcc/testsuite/g++.dg/ext/unary_trait_incomplete.C b/gcc/testsuite/g++.dg/ext/unary_trait_incomplete.C
new file mode 100644
index 00000000000..d5148bebbc6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/unary_trait_incomplete.C
@@ -0,0 +1,76 @@
+// PR c++/39475
+
+struct I;
+struct C { };
+
+bool nas1 = __has_nothrow_assign(I); // { dg-error "incomplete type" }
+bool nas2 = __has_nothrow_assign(C[]);
+bool nas3 = __has_nothrow_assign(I[]);
+bool nas4 = __has_nothrow_assign(void);
+bool nas5 = __has_nothrow_assign(const void);
+
+bool tas1 = __has_trivial_assign(I); // { dg-error "incomplete type" }
+bool tas2 = __has_trivial_assign(C[]);
+bool tas3 = __has_trivial_assign(I[]);
+bool tas4 = __has_trivial_assign(void);
+bool tas5 = __has_trivial_assign(const void);
+
+bool nco1 = __has_nothrow_constructor(I); // { dg-error "incomplete type" }
+bool nco2 = __has_nothrow_constructor(C[]);
+bool nco3 = __has_nothrow_constructor(I[]);
+bool nco4 = __has_nothrow_constructor(void);
+bool nco5 = __has_nothrow_constructor(const void);
+
+bool tco1 = __has_trivial_constructor(I); // { dg-error "incomplete type" }
+bool tco2 = __has_trivial_constructor(C[]);
+bool tco3 = __has_trivial_constructor(I[]);
+bool tco4 = __has_trivial_constructor(void);
+bool tco5 = __has_trivial_constructor(const void);
+
+bool ncp1 = __has_nothrow_copy(I); // { dg-error "incomplete type" }
+bool ncp2 = __has_nothrow_copy(C[]);
+bool ncp3 = __has_nothrow_copy(I[]);
+bool ncp4 = __has_nothrow_copy(void);
+bool ncp5 = __has_nothrow_copy(const void);
+
+bool tcp1 = __has_trivial_copy(I); // { dg-error "incomplete type" }
+bool tcp2 = __has_trivial_copy(C[]);
+bool tcp3 = __has_trivial_copy(I[]);
+bool tcp4 = __has_trivial_copy(void);
+bool tcp5 = __has_trivial_copy(const void);
+
+bool vde1 = __has_virtual_destructor(I); // { dg-error "incomplete type" }
+bool vde2 = __has_virtual_destructor(C[]);
+bool vde3 = __has_virtual_destructor(I[]);
+bool vde4 = __has_virtual_destructor(void);
+bool vde5 = __has_virtual_destructor(const void);
+
+bool tde1 = __has_trivial_destructor(I); // { dg-error "incomplete type" }
+bool tde2 = __has_trivial_destructor(C[]);
+bool tde3 = __has_trivial_destructor(I[]);
+bool tde4 = __has_trivial_destructor(void);
+bool tde5 = __has_trivial_destructor(const void);
+
+bool abs1 = __is_abstract(I); // { dg-error "incomplete type" }
+bool abs2 = __is_abstract(C[]);
+bool abs3 = __is_abstract(I[]);
+bool abs4 = __is_abstract(void);
+bool abs5 = __is_abstract(const void);
+
+bool pod1 = __is_pod(I); // { dg-error "incomplete type" }
+bool pod2 = __is_pod(C[]);
+bool pod3 = __is_pod(I[]);
+bool pod4 = __is_pod(void);
+bool pod5 = __is_pod(const void);
+
+bool emp1 = __is_empty(I); // { dg-error "incomplete type" }
+bool emp2 = __is_empty(C[]);
+bool emp3 = __is_empty(I[]);
+bool emp4 = __is_empty(void);
+bool emp5 = __is_empty(const void);
+
+bool pol1 = __is_polymorphic(I); // { dg-error "incomplete type" }
+bool pol2 = __is_polymorphic(C[]);
+bool pol3 = __is_polymorphic(I[]);
+bool pol4 = __is_polymorphic(void);
+bool pol5 = __is_polymorphic(const void);
diff --git a/gcc/testsuite/g++.dg/ext/vla6.C b/gcc/testsuite/g++.dg/ext/vla6.C
new file mode 100644
index 00000000000..83011f2f0ab
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vla6.C
@@ -0,0 +1,18 @@
+// PR c++/28879
+// { dg-options "" }
+
+struct A
+{
+ int i;
+ A(): i(1) {}
+};
+
+template<int> void foo()
+{
+ int x[A().i];
+}
+
+void f()
+{
+ foo<1>();
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr39495-1.C b/gcc/testsuite/g++.dg/gomp/pr39495-1.C
new file mode 100644
index 00000000000..8563e684fff
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr39495-1.C
@@ -0,0 +1,95 @@
+// PR c/39495
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+#define INT_MIN (-__INT_MAX__ - 1)
+#define INT_MAX __INT_MAX__
+#define UINT_MAX (2U * __INT_MAX__ + 1)
+
+int
+foo (void)
+{
+ int i;
+ unsigned int u;
+
+#pragma omp for
+ for (i = INT_MIN + 6; i > INT_MIN + 1; i--)
+ ;
+#pragma omp for
+ for (i = INT_MIN + 6; i >= INT_MIN + 1; i--)
+ ;
+#pragma omp for
+ for (i = INT_MIN + 6; i > INT_MIN; i--)
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i < INT_MAX - 1; i++)
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i <= INT_MAX - 1; i++)
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i < INT_MAX; i++)
+ ;
+#pragma omp for
+ for (u = 6; u > 1; u--)
+ ;
+#pragma omp for
+ for (u = 6; u >= 1; u--)
+ ;
+#pragma omp for
+ for (u = 6; u > 0; u--)
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u < UINT_MAX - 1; u++)
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u <= UINT_MAX - 1; u++)
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u < UINT_MAX; u++)
+ ;
+}
+
+int
+bar (void)
+{
+ int i;
+ unsigned int u;
+
+#pragma omp for
+ for (i = INT_MIN + 6; i > INT_MIN + 1; i -= 2)
+ ;
+#pragma omp for
+ for (i = INT_MIN + 6; i >= INT_MIN + 1; i -= 2)
+ ;
+#pragma omp for
+ for (i = INT_MIN + 6; i > INT_MIN; i -= 2)
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i < INT_MAX - 1; i += 2)
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i <= INT_MAX - 1; i += 2)
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i < INT_MAX; i += 2)
+ ;
+#pragma omp for
+ for (u = 6; u > 1; u -= 2)
+ ;
+#pragma omp for
+ for (u = 6; u >= 1; u -= 2)
+ ;
+#pragma omp for
+ for (u = 6; u > 0; u -= 2)
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u < UINT_MAX - 1; u += 2)
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u <= UINT_MAX - 1; u += 2)
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u < UINT_MAX; u += 2)
+ ;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr39495-2.C b/gcc/testsuite/g++.dg/gomp/pr39495-2.C
new file mode 100644
index 00000000000..c0b4d5dbdee
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr39495-2.C
@@ -0,0 +1,39 @@
+// PR c/39495
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+#define INT_MIN (-__INT_MAX__ - 1)
+#define INT_MAX __INT_MAX__
+#define UINT_MAX (2U * __INT_MAX__ + 1)
+
+int
+foo (void)
+{
+ int i;
+ unsigned int u;
+
+#pragma omp for
+ for (i = INT_MIN + 6; i != INT_MIN; i--) // { dg-error "invalid controlling predicate" }
+ ;
+#pragma omp for
+ for (i = INT_MIN + 6; i == INT_MIN; i--) // { dg-error "invalid controlling predicate" }
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i != INT_MAX; i++) // { dg-error "invalid controlling predicate" }
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i == INT_MAX; i++) // { dg-error "invalid controlling predicate" }
+ ;
+#pragma omp for
+ for (u = 6; u != 0; u--) // { dg-error "invalid controlling predicate" }
+ ;
+#pragma omp for
+ for (u = 6; u == 0; u--) // { dg-error "invalid controlling predicate" }
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u != UINT_MAX; u++) // { dg-error "invalid controlling predicate" }
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u == UINT_MAX; u++) // { dg-error "invalid controlling predicate" }
+ ;
+}
diff --git a/gcc/testsuite/g++.dg/graphite/graphite.exp b/gcc/testsuite/g++.dg/graphite/graphite.exp
new file mode 100644
index 00000000000..d1993a2e805
--- /dev/null
+++ b/gcc/testsuite/g++.dg/graphite/graphite.exp
@@ -0,0 +1,48 @@
+# Copyright (C) 2009 Free Software Foundation, Inc.
+
+# This program 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 of the License, or
+# (at your option) any later version.
+#
+# This program 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/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib g++-dg.exp
+
+if ![check_effective_target_fgraphite] {
+ return
+}
+
+# The default action for a test is 'compile'. Save current default.
+global dg-do-what-default
+set save-dg-do-what-default ${dg-do-what-default}
+set dg-do-what-default compile
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] \
+ "" $DEFAULT_CFLAGS
+
+# Clean up.
+set dg-do-what-default ${save-dg-do-what-default}
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/g++.dg/graphite/pr39447.C b/gcc/testsuite/g++.dg/graphite/pr39447.C
new file mode 100644
index 00000000000..a0d09ec2b93
--- /dev/null
+++ b/gcc/testsuite/g++.dg/graphite/pr39447.C
@@ -0,0 +1,34 @@
+/* { dg-options "-O2 -fgraphite-identity" } */
+
+struct Point
+{
+ int line, col;
+
+ Point( int l = -1, int c = 0 ) throw() : line( l ), col( c ) {}
+ bool operator==( const Point & p ) const throw()
+ { return ( line == p.line && col == p.col ); }
+ bool operator<( const Point & p ) const throw()
+ { return ( line < p.line || ( line == p.line && col < p.col ) ); }
+};
+
+class Buffer
+{
+public:
+ int characters( const int line ) const throw();
+ int pgetc( Point & p ) const throw();
+ Point eof() const throw() { return Point( 0, 0 ); }
+ bool pisvalid( const Point & p ) const throw()
+ { return ( ( p.col >= 0 && p.col < characters( p.line ) ) || p == eof() );
+ }
+ bool save( Point p1 = Point(), Point p2 = Point() ) const;
+};
+
+bool Buffer::save( Point p1, Point p2 ) const
+{
+ if( !this->pisvalid( p1 ) ) p1 = eof();
+ if( !this->pisvalid( p2 ) ) p2 = eof();
+ for( Point p = p1; p < p2; ) { pgetc( p ); }
+ return true;
+}
+
+
diff --git a/gcc/testsuite/g++.dg/inherit/thunk10.C b/gcc/testsuite/g++.dg/inherit/thunk10.C
new file mode 100644
index 00000000000..702067749fa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/thunk10.C
@@ -0,0 +1,60 @@
+/* { dg-options "-mthumb" { target arm*-*-* } } */
+/* { dg-do run } */
+/* { dg-timeout 100 } */
+
+/* PR middle-end/39378 */
+/* Check if the thunk target function is emitted correctly. */
+class B1
+{
+public:
+ virtual int foo1(void);
+ int b1;
+};
+
+class B2
+{
+public:
+ virtual int foo2 (void);
+ int b2;
+};
+
+class D : public B1, public B2
+{
+ int foo1(void);
+ int foo2(void);
+ int d;
+};
+
+int B1::foo1(void)
+{
+ return 3;
+}
+
+int B2::foo2(void)
+{
+ return 4;
+}
+
+int D::foo1(void)
+{
+ return 1;
+}
+
+int D::foo2(void)
+{
+ return 2;
+}
+
+__attribute__((noinline)) int test(B2* bp)
+{
+ return bp->foo2();
+}
+
+int main()
+{
+ B2 *bp = new D();
+ if (test(bp) == 2)
+ return 0;
+ else
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/init/error2.C b/gcc/testsuite/g++.dg/init/error2.C
new file mode 100644
index 00000000000..8cf59b368b6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/error2.C
@@ -0,0 +1,15 @@
+/* PR c++/29727 */
+/* { dg-do "compile" } */
+
+template<int> struct A
+{
+ static int a[1];
+};
+template<int N> int A<N>::a[1] = { X:0 }; /* { dg-error "does not allow designated|was not declared|designated initializer for an array" } */
+
+void foo()
+{
+ A<0>::a;
+}
+
+
diff --git a/gcc/testsuite/g++.dg/opt/new1.C b/gcc/testsuite/g++.dg/opt/new1.C
new file mode 100644
index 00000000000..dbcc0f8517a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/new1.C
@@ -0,0 +1,71 @@
+// PR c++/39367
+// { dg-options "-O" }
+
+class QScriptEnginePrivate;
+class QScriptClassInfo;
+namespace QScript {
+ enum Type { InvalidType };
+};
+class QScriptValueImpl {
+public:
+ inline QScriptValueImpl();
+ QScript::Type m_type;
+};
+namespace QScript {
+ namespace Ecma {
+ class Core {
+ public:
+ inline QScriptEnginePrivate *engine() const { }
+ inline QScriptClassInfo *classInfo() const { }
+ QScriptValueImpl publicPrototype;
+ };
+ class Boolean: public Core {
+ void newBoolean(QScriptValueImpl *result, bool value = false);
+ };
+ }
+ template <typename T> class Buffer {
+ public:
+ inline void reserve(int num);
+ inline void resize(int s);
+ T *m_data;
+ int m_capacity;
+ int m_size;
+ };
+}
+template <typename T> void QScript::Buffer<T>::resize(int s) {
+ if (m_capacity < s)
+ reserve (s << 1);
+}
+template <typename T> void QScript::Buffer<T>::reserve(int x) {
+ T *new_data = new T[m_capacity];
+ for (int i=0; i<m_size; ++i)
+ new_data[i] = m_data[i];
+}
+class QScriptObject {
+public:
+ inline void reset();
+ QScript::Buffer<QScriptValueImpl> m_values;
+};
+class QScriptEnginePrivate {
+public:
+ inline QScriptObject *allocObject() { return 0; }
+ inline void newObject(QScriptValueImpl *o, const QScriptValueImpl &proto,
+ QScriptClassInfo *oc = 0);
+};
+inline void QScriptEnginePrivate::newObject(QScriptValueImpl *o,
+ const QScriptValueImpl &proto,
+ QScriptClassInfo *oc)
+{
+ QScriptObject *od = allocObject();
+ od->reset();
+}
+inline QScriptValueImpl::QScriptValueImpl() : m_type(QScript::InvalidType) { }
+inline void QScriptObject::reset() { m_values.resize(0); }
+namespace QScript {
+ namespace Ecma {
+ void Boolean::newBoolean(QScriptValueImpl *result, bool value)
+ {
+ engine()->newObject(result, publicPrototype, classInfo());
+ }
+ }
+}
diff --git a/gcc/testsuite/g++.dg/opt/nrv15.C b/gcc/testsuite/g++.dg/opt/nrv15.C
new file mode 100644
index 00000000000..23511b284b2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/nrv15.C
@@ -0,0 +1,97 @@
+// PR debug/39086
+// { dg-options "-g -O -fno-tree-sra" }
+
+struct A { int v; };
+
+A ax;
+
+struct B
+{
+ static A f1 () { return ax; }
+ static bool f2 ();
+ static A f3 ();
+};
+
+struct C
+{
+ A f4 ()
+ {
+ A x;
+ if (__builtin_expect (this->f6 () < this->f12 (), true))
+ x = B::f1 ();
+ else
+ x = this->f7 ();
+ return x;
+ }
+ A f5 ()
+ {
+ A y;
+ if (this->f6 () < this->f12 ())
+ y = B::f1 ();
+ else
+ y = this->f7 ();
+ return y;
+ }
+ void *f6 () const;
+ void *f12 () const;
+ virtual A f7 ();
+};
+
+C *dx;
+
+struct D
+{
+ C *f8 () const;
+};
+
+class E : virtual public D
+{
+ void f11 ();
+ void f9 ();
+ void f10 ();
+};
+
+struct G
+{
+ explicit G ();
+ operator bool () const;
+};
+
+void
+E::f11 (void)
+{
+ A d = B::f3 ();
+ d = this->f8 ()->f4 ();
+}
+
+void
+E::f9 ()
+{
+ G c;
+ if (c)
+ {
+ const A e = B::f3 ();
+ C * f = this->f8 ();
+ A d = f->f5 ();
+ if (B::f2 ())
+ ;
+ else if (B::f2 ())
+ f->f4 ();
+ }
+}
+
+void
+E::f10 ()
+{
+ G c;
+ if (c)
+ {
+ const A e = B::f3 ();
+ C * f = this->f8 ();
+ A d = f->f5 ();
+ if (B::f2 ())
+ ;
+ else if (B::f2 ())
+ f->f4 ();
+ }
+}
diff --git a/gcc/testsuite/g++.dg/opt/switch2.C b/gcc/testsuite/g++.dg/opt/switch2.C
index 2590273c5d9..f7374cb7474 100644
--- a/gcc/testsuite/g++.dg/opt/switch2.C
+++ b/gcc/testsuite/g++.dg/opt/switch2.C
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-O2" }
+// { dg-options "-O2 -w" }
extern int foo (int);
diff --git a/gcc/testsuite/g++.dg/other/error32.C b/gcc/testsuite/g++.dg/other/error32.C
new file mode 100644
index 00000000000..35c64c4eab9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/error32.C
@@ -0,0 +1,8 @@
+// PR c++/33492
+// { dg-options "" }
+
+void foo()
+{
+ if (throw 0) // { dg-error "could not convert .\\<throw-expression\\>. to .bool." }
+ ;
+}
diff --git a/gcc/testsuite/g++.dg/other/new1.C b/gcc/testsuite/g++.dg/other/new1.C
index 30b651326aa..71383706ea4 100644
--- a/gcc/testsuite/g++.dg/other/new1.C
+++ b/gcc/testsuite/g++.dg/other/new1.C
@@ -10,5 +10,5 @@ struct A
void foo()
{
- new A;
+ new A; // { dg-error "default argument" }
}
diff --git a/gcc/testsuite/g++.dg/other/pr39060.C b/gcc/testsuite/g++.dg/other/pr39060.C
new file mode 100644
index 00000000000..a625aea108e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/pr39060.C
@@ -0,0 +1,19 @@
+// PR c++/39060
+// { dg-do compile }
+
+struct A
+{
+ A(void* i=); // { dg-error "with|specification" }
+ A(void* i=); // { dg-error "overloaded" }
+ A(void* i=); // { dg-error "overloaded" }
+
+ void operator+ (void* i=); // { dg-error "arguments" }
+
+ virtual void foo1(=); // { dg-error "identifier" }
+ void foo2(=); // { dg-error "identifier" }
+ void foo3(=); // { dg-error "identifier" }
+ void foo4(=); // { dg-error "identifier" }
+ void foo5(=); // { dg-error "identifier" }
+}; // { dg-error "primary-expression" }
+
+A::A (void* i=) {} // { dg-error "primary-expression|argument" }
diff --git a/gcc/testsuite/g++.dg/other/pr39496.C b/gcc/testsuite/g++.dg/other/pr39496.C
new file mode 100644
index 00000000000..94e33abbe11
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/pr39496.C
@@ -0,0 +1,35 @@
+// PR target/39496
+// { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && ilp32 } } }
+// { dg-options "-O0 -fverbose-asm -fno-omit-frame-pointer -msse2 -mfpmath=sse" }
+// Verify that {foo,bar}{,2}param are all passed on the stack, using
+// normal calling conventions, when not optimizing.
+// { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*fooparam," } }
+// { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*barparam," } }
+// { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*foo2param," } }
+// { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*bar2param," } }
+
+static inline int foo (int fooparam)
+{
+ return fooparam;
+}
+
+static int bar (int barparam)
+{
+ return foo (barparam);
+}
+
+static inline double foo2 (double foo2param)
+{
+ return foo2param;
+}
+
+static double bar2 (double bar2param)
+{
+ return foo2 (bar2param);
+}
+
+int
+main ()
+{
+ return bar (0) + bar2 (0.0);
+}
diff --git a/gcc/testsuite/g++.dg/other/switch3.C b/gcc/testsuite/g++.dg/other/switch3.C
new file mode 100644
index 00000000000..4f9b5485ef9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/switch3.C
@@ -0,0 +1,25 @@
+// PR c++/39371
+// { dg-do compile }
+
+void
+foo (bool b)
+{
+ switch ((unsigned int) b)
+ {
+ case 1:
+ case 2:
+ break;
+ }
+}
+
+void
+bar (unsigned char b)
+{
+ switch ((unsigned int) b)
+ {
+ case 1:
+ case 257:
+ case 513:
+ break;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/other/var_copy-1.C b/gcc/testsuite/g++.dg/other/var_copy-1.C
new file mode 100644
index 00000000000..2fc6b780e18
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/var_copy-1.C
@@ -0,0 +1,14 @@
+// { dg-options "-std=c++0x" }
+// { dg-do compile }
+
+// Test to allow for va_copy with C++0x standard.
+
+#include <cstdarg>
+
+va_list x;
+va_list y;
+
+int main ()
+{
+ va_copy (y, x);
+}
diff --git a/gcc/testsuite/g++.dg/parse/crash40.C b/gcc/testsuite/g++.dg/parse/crash40.C
index af44fdb695c..6a15228c063 100644
--- a/gcc/testsuite/g++.dg/parse/crash40.C
+++ b/gcc/testsuite/g++.dg/parse/crash40.C
@@ -37,6 +37,6 @@ void bar()
int i;
i.C::foo<0>(); /* { dg-error "which is of non-class type" } */
- S<false> s;
+ S<false> s; /* { dg-error "default argument" } */
SS<false> ss; /* { dg-error "within this context" } */
}
diff --git a/gcc/testsuite/g++.dg/parse/ctor9.C b/gcc/testsuite/g++.dg/parse/ctor9.C
new file mode 100644
index 00000000000..b80f7289253
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/ctor9.C
@@ -0,0 +1,7 @@
+/* PR c++/37647 */
+/* { dg-do "compile" } */
+
+struct A
+{
+ A() { void A(); } /* { dg-error "return type specification for constructor invalid|non-class scope" } */
+};
diff --git a/gcc/testsuite/g++.dg/parse/defarg12.C b/gcc/testsuite/g++.dg/parse/defarg12.C
index 3717ad5db7d..80ef5c38e1f 100644
--- a/gcc/testsuite/g++.dg/parse/defarg12.C
+++ b/gcc/testsuite/g++.dg/parse/defarg12.C
@@ -9,5 +9,5 @@ struct A
void foo()
{
- A().i;
+ A().i; /* { dg-error "default argument" } */
}
diff --git a/gcc/testsuite/g++.dg/parse/defarg14.C b/gcc/testsuite/g++.dg/parse/defarg14.C
new file mode 100644
index 00000000000..0930b45eea4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/defarg14.C
@@ -0,0 +1,6 @@
+// PR c++/28274
+
+extern "C" {
+void foo (int i, int j = 6);
+void foo (int i = 4, int j);
+}
diff --git a/gcc/testsuite/g++.dg/template/dependent-name5.C b/gcc/testsuite/g++.dg/template/dependent-name5.C
new file mode 100644
index 00000000000..681060c7002
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/dependent-name5.C
@@ -0,0 +1,45 @@
+// PR c++/9634, c++/29469, c++/29607
+// Contributed by: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
+// DR224: Make sure that a name is *truly* semantically dependent.
+
+struct D {
+ typedef int K;
+};
+
+template <typename T>
+struct A
+{
+ typedef int Bar;
+
+ template <typename>
+ struct N {};
+
+ typedef Bar type1;
+ typedef A::Bar type2;
+ typedef A<T>::Bar type3;
+ typedef A<T*>::Bar type4; // { dg-error "" }
+ typedef typename A<T*>::Bar type5;
+
+ typedef N<int> type6;
+ typedef A::N<int> type7;
+ typedef A<T>::N<int> type8;
+ typedef A<T*>::template N<int> type9; // { dg-error "" }
+ typedef typename A<T*>::template N<int> type10;
+
+ typedef D Bar2;
+ struct N2 { typedef int K; };
+
+ // Check that A::N2 is still considered dependent (because it
+ // could be specialized), while A::Bar2 (being just ::D) is not.
+ typedef A::Bar2 type11;
+ typedef type11::K k3;
+
+ typedef A::N2 type12;
+ typedef typename type12::K k2;
+ typedef type12::K k1; // { dg-error "" }
+
+ // Check that A::Bar2 is not considered dependent even if we use
+ // the typename keyword.
+ typedef typename A::Bar2 type13;
+ typedef type13::K k4;
+};
diff --git a/gcc/testsuite/g++.dg/template/error15.C b/gcc/testsuite/g++.dg/template/error15.C
index 6bd1f77e874..b7c7bc8ca47 100644
--- a/gcc/testsuite/g++.dg/template/error15.C
+++ b/gcc/testsuite/g++.dg/template/error15.C
@@ -18,7 +18,7 @@ protected:
template <class T>
void B<T>::g(void) {
- f();
+ f(); // { dg-error "default argument" }
}
template class B<long>;
diff --git a/gcc/testsuite/g++.dg/template/koenig7.C b/gcc/testsuite/g++.dg/template/koenig7.C
new file mode 100644
index 00000000000..07f2fcad33d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/koenig7.C
@@ -0,0 +1,11 @@
+// PR c++/13549
+// We need to do arg-dep lookup for g<T>(j) at instantiation time because
+// g<T> is dependent, even though (j) is not; at that point we can find
+// g(h).
+
+template <typename T> int g(int);
+class h{};
+template <typename T> int l(){h j; return g<T>(j);}
+template <typename T> int g(const h&);
+class j{};
+int jj(){return l<j>();}
diff --git a/gcc/testsuite/g++.dg/template/pr39425.C b/gcc/testsuite/g++.dg/template/pr39425.C
new file mode 100644
index 00000000000..a063e05c2c7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/pr39425.C
@@ -0,0 +1,18 @@
+// PR c++/39425
+// { dg-do compile }
+
+class a {
+
+ template<unsigned int s>
+ struct _rec {
+ static const char size = _rec< (s >> 1) >::size;
+ };
+
+ template<> // { dg-error "explicit" }
+ struct _rec <0> {
+ static const char size = 0;
+ };
+
+ static const unsigned int value = _rec < 1 >::size;
+
+} // { dg-error "unqualified-id" }
diff --git a/gcc/testsuite/g++.dg/template/spec33.C b/gcc/testsuite/g++.dg/template/spec33.C
index 809d4f012c1..7b7a7519829 100644
--- a/gcc/testsuite/g++.dg/template/spec33.C
+++ b/gcc/testsuite/g++.dg/template/spec33.C
@@ -3,5 +3,5 @@
struct A
{
template<int> static void foo () {}
- template<> static void foo<0>() {} // { dg-error "explicit" }
+ template<> static void foo<0>() {} // { dg-error "explicit|template" }
};
diff --git a/gcc/testsuite/g++.dg/template/typename17.C b/gcc/testsuite/g++.dg/template/typename17.C
new file mode 100644
index 00000000000..748b1f7ab18
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/typename17.C
@@ -0,0 +1,10 @@
+// { dg-do compile }
+
+// This should fail as A::foo<0> is not a typename at all.
+struct A
+{
+ template<int> void foo(int i)
+ {
+ typename A::foo<0>(i1); // { dg-error "" }
+ }
+};
diff --git a/gcc/testsuite/g++.dg/template/typename18.C b/gcc/testsuite/g++.dg/template/typename18.C
new file mode 100644
index 00000000000..4134ef6f64b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/typename18.C
@@ -0,0 +1,14 @@
+// { dg-do compile }
+
+// These typename should work as they are types.
+struct A
+{
+ typedef int a;
+ template <int>
+ struct f {};
+ template<int> void foo(int i)
+ {
+ typename A::a(i1);
+ typename A::f<0>(i2);
+ }
+};
diff --git a/gcc/testsuite/g++.dg/torture/pr39362.C b/gcc/testsuite/g++.dg/torture/pr39362.C
new file mode 100644
index 00000000000..fb23439f595
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr39362.C
@@ -0,0 +1,105 @@
+/* { dg-do compile } */
+
+void *fastMalloc (int n);
+void fastFree (void *p);
+template <class T> struct C
+{
+ void deref () { delete static_cast <T *>(this); }
+};
+template <typename T>
+struct D
+{
+ D (T *ptr) : m_ptr (ptr) { }
+ ~D () { if (T * ptr = m_ptr) ptr->deref (); }
+ T *operator-> () const;
+ T *m_ptr;
+ typedef T *UnspecifiedBoolType;
+ operator UnspecifiedBoolType () const;
+};
+template <typename T> struct E
+{
+ static void destruct (T * begin, T * end)
+ {
+ for (T * cur = begin; cur != end; ++cur)
+ cur->~T ();
+ }
+};
+template <typename T> class F;
+template <typename T> struct G
+{
+ static void destruct (T * begin, T * end)
+ {
+ E <T>::destruct (begin, end);
+ }
+ static void uninitializedFill (T * dst, T * dstEnd, const T & val)
+ {
+ F<T>::uninitializedFill (dst, dstEnd, val);
+ }
+};
+template <typename T> struct H
+{
+ void allocateBuffer (int newCapacity)
+ {
+ m_buffer = static_cast <T *>(fastMalloc (newCapacity * sizeof (T)));
+ }
+ void deallocateBuffer (T * bufferToDeallocate)
+ {
+ if (m_buffer == bufferToDeallocate)
+ fastFree (bufferToDeallocate);
+ }
+ T *buffer () { }
+ int capacity () const { }
+ T *m_buffer;
+};
+template <typename T, int cap> class I;
+template <typename T> struct I <T, 0> : H <T>
+{
+ I (int capacity) { allocateBuffer (capacity); }
+ ~I () { deallocateBuffer (buffer ()); }
+ using H <T>::allocateBuffer;
+ H <T>::buffer;
+};
+template <typename T, int cap = 0> struct J
+{
+ typedef T *iterator;
+ ~J () { if (m_size) shrink (0); }
+ J (const J &);
+ int capacity () const { m_buffer.capacity (); }
+ T & operator[](int i) { }
+ iterator begin () { }
+ iterator end () { return begin () + m_size; }
+ void shrink (int size);
+ template <typename U> void append (const U &);
+ int m_size;
+ I <T, cap> m_buffer;
+};
+template <typename T, int cap>
+J <T, cap>::J (const J & other) : m_buffer (other.capacity ())
+{
+}
+template <typename T, int cap>
+void J <T, cap>::shrink (int size)
+{
+ G <T>::destruct (begin () + size, end ());
+ m_size = size;
+}
+struct A : public C <A>
+{
+ virtual ~A ();
+ typedef J <D <A> > B;
+ virtual A *firstChild () const;
+ virtual A *nextSibling () const;
+ virtual const B & children (int length);
+ B m_children;
+};
+const A::B &
+A::children (int length)
+{
+ for (D <A> obj = firstChild (); obj; obj = obj->nextSibling ())
+ {
+ B children = obj->children (2);
+ for (unsigned i = 0; i <length; ++i)
+ m_children.append (children[i]);
+ }
+}
+
diff --git a/gcc/testsuite/g++.dg/torture/predcom-1.C b/gcc/testsuite/g++.dg/torture/predcom-1.C
new file mode 100644
index 00000000000..c668cac606d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/predcom-1.C
@@ -0,0 +1,29 @@
+/* Test for ICE in predictive commoning with empty loop header block
+ on arm-none-linux-gnueabi. */
+
+struct Foo
+{
+ double *ptr;
+
+ Foo (double *ptr_)
+ : ptr (ptr_)
+ {
+ }
+
+ Foo PostInc ()
+ {
+ return Foo (ptr++);
+ }
+};
+
+bool Baz (Foo first, double *last)
+{
+ Foo prev (first.ptr);
+
+ first.ptr++;
+
+ while (first.ptr != last)
+ if (*first.PostInc ().ptr < *prev.PostInc ().ptr)
+ return false;
+}
+
diff --git a/gcc/testsuite/g++.dg/tree-ssa/copyprop.C b/gcc/testsuite/g++.dg/tree-ssa/copyprop.C
new file mode 100644
index 00000000000..e785755eb07
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/copyprop.C
@@ -0,0 +1,739 @@
+// PR 39548 verify ssa ICE
+//
+// { dg-do compile { target { lp64 } } }
+// { dg-options "-Wno-error -fno-exceptions -fno-tree-vrp -O2 -fprofile-generate -finline-limit=500" }
+//
+
+#include <map>
+#include <vector>
+#include <iostream>
+using namespace std;
+extern void free (void *);
+template<typename _FIter, typename _Tp> _FIter lower_bound(_FIter, _FIter, _Tp&);
+template<class _Key> struct hash { };
+template<class _Val> struct _Hashtable_node {
+ _Hashtable_node* _M_next;
+ _Val _M_val;
+};
+static const unsigned long __stl_prime_list[] = { 2, 3, 5 };
+inline unsigned long prime(unsigned long __n) {
+ const unsigned long* __first = __stl_prime_list;
+ const unsigned long* __last = __stl_prime_list + 29;
+ const unsigned long* pos = lower_bound(__first, __last, __n);
+ return pos == __last ? *(__last - 1) : *pos;
+}
+template<class _Val, class _Key, class _HashFcn, class _ExtractKey, class _EqualKey, class _Alloc> struct hashtable {
+ typedef _Key key_type;
+ typedef _Val value_type;
+ typedef _HashFcn hasher;
+ typedef _EqualKey key_equal;
+ typedef size_t size_type;
+ typedef value_type& reference;
+ typedef _Hashtable_node<_Val> _Node;
+ typedef typename _Alloc::template rebind<value_type>::other allocator_type;
+ allocator_type get_allocator() const { }
+ typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc;
+ typedef typename _Alloc::template rebind<_Node*>::other _Nodeptr_Alloc;
+ typedef vector<_Node*, _Nodeptr_Alloc> _Vector_type;
+ _Node_Alloc _M_node_allocator;
+ void _M_put_node(_Node* __p) {
+ _M_node_allocator.deallocate(__p, 1);
+ }
+ hasher _M_hash;
+ key_equal _M_equals;
+ _ExtractKey _M_get_key;
+ _Vector_type _M_buckets;
+ size_type _M_num_elements;
+ hashtable(size_type __n, const _HashFcn& __hf, const _EqualKey& __eql, const allocator_type& __a = allocator_type()) : _M_num_elements(0) {
+ _M_initialize_buckets(__n);
+ }
+ ~hashtable() { clear(); }
+ reference find_or_insert(const value_type& __obj);
+ size_type count(const key_type& __key) const {
+ const size_type __n = _M_bkt_num_key(__key);
+ size_type __result = 0;
+ for (const _Node* __cur = _M_buckets[__n]; __cur; __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), __key)) ++__result;
+ }
+ size_type erase(const key_type& __key);
+ void clear();
+ size_type _M_next_size(size_type __n) const { return prime(__n); }
+ void _M_initialize_buckets(size_type __n) {
+ const size_type __n_buckets = _M_next_size(__n);
+ _M_buckets.reserve(__n_buckets);
+ _M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0);
+ }
+ size_type _M_bkt_num_key(const key_type& __key) const {
+ return _M_bkt_num_key(__key, _M_buckets.size());
+ }
+ size_type _M_bkt_num_key(const key_type& __key, size_t __n) const {
+ return _M_hash(__key) % __n;
+ }
+ void _M_delete_node(_Node* __n) {
+ this->get_allocator().destroy(&__n->_M_val);
+ _M_put_node(__n);
+ }
+};
+template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All> typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::size_type hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: erase(const key_type& __key) {
+ const size_type __n = _M_bkt_num_key(__key);
+ _Node* __first = _M_buckets[__n];
+ if (__first) _Node* __cur = __first;
+}
+template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All> void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>:: clear() {
+ for (size_type __i = 0; __i < _M_buckets.size(); ++__i) {
+ _Node* __cur = _M_buckets[__i];
+ while (__cur != 0) { _M_delete_node(__cur); }
+ }
+}
+template<class _Key, class _Tp, class _HashFn = hash<_Key>, class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> > struct hash_map {
+ typedef hashtable<pair<const _Key, _Tp>,_Key, _HashFn, _Select1st<pair<const _Key, _Tp> >, _EqualKey, _Alloc> _Ht;
+ _Ht _M_ht;
+ typedef typename _Ht::key_type key_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::allocator_type allocator_type;
+ hash_map() : _M_ht(100, hasher(), key_equal(), allocator_type()) { }
+ _Tp& operator[](const key_type& __key) {
+ return _M_ht.find_or_insert(value_type(__key, _Tp())).second;
+ }
+ size_type count(const key_type& __key) const { return _M_ht.count(__key); }
+ size_type erase(const key_type& __key) {
+ return _M_ht.erase(__key);
+ }
+};
+extern size_t strlen (__const char *__s);
+template <class C> struct scoped_ptr {
+ explicit scoped_ptr(C* p = __null) : ptr_(p) { delete ptr_; }
+ void reset(C* p = __null) {
+ if (p != ptr_) { delete ptr_; }
+ }
+ C& operator*() const {}
+ C* operator->() const {}
+ bool operator==(C* p) const { return ptr_ == p; }
+ bool operator!=(C* p) const { return ptr_ != p; }
+ C* ptr_;
+};
+namespace std {
+class strstreambuf : public basic_streambuf<char, char_traits<char> > {
+};
+class strstream : public basic_iostream<char> {
+ public: int pcount() const;
+ char* str();
+ strstreambuf _M_buf;
+};
+};
+const int INFO = 0, WARNING = 1, ERROR = 2, FATAL = 3, NUM_SEVERITIES = 4;
+struct foo_1 {
+ foo_1(string* str) : str_(str) { }
+ operator bool() const {
+ return (__builtin_expect(str_ != __null, 0));
+ }
+ string* str_;
+};
+template<class t1, class t2> string* Makefoo_1(const t1& v1, const t2& v2, const char* names) {
+ strstream ss;
+ ss << names << " (" << v1 << " vs. " << v2 << ")";
+ return new string(ss.str(), ss.pcount());
+}
+template <class t1, class t2> inline string* Check_GTImpl(const t1& v1, const t2& v2, const char* names) {
+ if (v1 > v2) return __null;
+ else return Makefoo_1(v1, v2, names);
+}
+struct blah_54 {
+ blah_54(const char* file, int line, int severity);
+ ~blah_54();
+ ostream& stream() { };
+};
+class blah_0 : public blah_54 {
+ public: blah_0(const char* file, int line);
+ blah_0(const char* file, int line, const foo_1& result);
+};
+template <class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc> class dense_hashtable;
+template <class V, class K, class HF, class ExK, class EqK, class A> struct dense_hashtable_iterator {
+ typedef V* pointer;
+ dense_hashtable_iterator(const dense_hashtable<V,K,HF,ExK,EqK,A> *h, pointer it, pointer it_end, bool advance) : ht(h), pos(it), end(it_end) {
+ if (advance) advance_past_empty_and_deleted();
+ }
+ pointer operator->() const { }
+ void advance_past_empty_and_deleted() {
+ while ( pos != end && (ht->test_empty(*this) || ht->test_deleted(*this)) ) ++pos;
+ }
+ const dense_hashtable<V,K,HF,ExK,EqK,A> *ht;
+ pointer pos, end;
+};
+template <class V, class K, class HF, class ExK, class EqK, class A> struct dense_hashtable_const_iterator {
+ typedef dense_hashtable_iterator<V,K,HF,ExK,EqK,A> iterator;
+ typedef dense_hashtable_const_iterator<V,K,HF,ExK,EqK,A> const_iterator;
+ typedef const V& reference;
+ typedef const V* pointer;
+ dense_hashtable_const_iterator(const dense_hashtable<V,K,HF,ExK,EqK,A> *h, pointer it, pointer it_end, bool advance) : ht(h), pos(it), end(it_end) {
+ if (advance) advance_past_empty_and_deleted();
+ }
+ dense_hashtable_const_iterator(const iterator &it) : pos(it.pos), end(it.end) {}
+ reference operator*() const { return *pos; }
+ pointer operator->() const {}
+ void advance_past_empty_and_deleted() {
+ while ( pos != end && (ht->test_empty(*this) || ht->test_deleted(*this))) ++pos;
+ }
+ const_iterator& operator++() { }
+ bool operator!=(const const_iterator& it) const { }
+ const dense_hashtable<V,K,HF,ExK,EqK,A> *ht;
+ pointer pos, end;
+};
+template <class Value, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc> class dense_hashtable {
+ public: typedef Key key_type;
+ typedef Value value_type;
+ typedef HashFcn hasher;
+ typedef EqualKey key_equal;
+ typedef size_t size_type;
+ typedef dense_hashtable_iterator<Value, Key, HashFcn, ExtractKey, EqualKey, Alloc> iterator;
+ typedef dense_hashtable_const_iterator<Value, Key, HashFcn, ExtractKey, EqualKey, Alloc> const_iterator;
+ static const float HT_OCCUPANCY_FLT;
+ static const float HT_EMPTY_FLT;
+ static const size_t HT_MIN_BUCKETS = 32;
+ iterator end() {
+ return iterator(this, table + num_buckets, table + num_buckets, true);
+ }
+ const_iterator end() const {
+ return const_iterator(this, table + num_buckets, table+num_buckets,true);
+ }
+ void set_value(value_type* dst, const value_type& src) {
+ new(dst) value_type(src);
+ }
+ void destroy_buckets(size_type first, size_type last) {
+ for (; first != last; ++first) table[first].~value_type();
+ }
+ private: void squash_deleted() {
+ if ( num_deleted ) {
+ dense_hashtable tmp(*this);
+ swap(tmp);
+ }
+ }
+ public: void set_deleted_key(const value_type &val) { squash_deleted(); }
+ bool test_deleted(size_type bucknum) const {
+ return (use_deleted && num_deleted > 0 && equals(get_key(delval), get_key(table[bucknum])));
+ }
+ bool test_deleted(const const_iterator &it) const {
+ return (use_deleted && num_deleted > 0 && equals(get_key(delval), get_key(*it)));
+ }
+ bool set_deleted(const_iterator &it) {
+ set_value(const_cast<value_type*>(&(*it)), delval);
+ }
+ bool test_empty(size_type bucknum) const {
+ return equals(get_key(emptyval), get_key(table[bucknum]));
+ }
+ bool test_empty(const const_iterator &it) const {
+ return equals(get_key(emptyval), get_key(*it));
+ }
+ void fill_range_with_empty(value_type* table_start, value_type* table_end) {
+ uninitialized_fill(table_start, table_end, emptyval);
+ }
+ void set_empty(size_type buckstart, size_type buckend) {
+ destroy_buckets(buckstart, buckend);
+ fill_range_with_empty(table + buckstart, table + buckend);
+ }
+ size_type size() const {
+ return num_elements - num_deleted;
+ }
+ size_type bucket_count() const { }
+ static const size_type ILLEGAL_BUCKET = size_type(-1);
+ size_type min_size(size_type num_elts, size_type min_buckets_wanted) {
+ size_type sz = HT_MIN_BUCKETS;
+ while ( sz < min_buckets_wanted || num_elts >= sz * enlarge_resize_percent ) sz *= 2;
+ }
+ void maybe_shrink() {
+ if (shrink_threshold > 0 && (num_elements-num_deleted) < shrink_threshold && bucket_count() > HT_MIN_BUCKETS ) {
+ size_type sz = bucket_count() / 2;
+ sz /= 2;
+ dense_hashtable tmp(*this, sz);
+ swap(tmp);
+ }
+ }
+ void resize_delta(size_type delta, size_type min_buckets_wanted = 0) {
+ if ( consider_shrink ) maybe_shrink();
+ const size_type needed_size = min_size(num_elements + delta, min_buckets_wanted);
+ if ( needed_size > bucket_count() ) {
+ const size_type resize_to = min_size(num_elements - num_deleted + delta, min_buckets_wanted);
+ dense_hashtable tmp(*this, resize_to);
+ swap(tmp);
+ }
+ }
+ void copy_from(const dense_hashtable &ht, size_type min_buckets_wanted = 0) {
+ clear();
+ const size_type resize_to = min_size(ht.size(), min_buckets_wanted);
+ num_elements++;
+ }
+ explicit dense_hashtable(size_type n = 0, const HashFcn& hf = HashFcn(), const EqualKey& eql = EqualKey(),const ExtractKey& ext = ExtractKey()) : num_deleted(0), use_deleted(false), use_empty(false), delval(), emptyval(), enlarge_resize_percent(HT_OCCUPANCY_FLT), shrink_resize_percent(HT_EMPTY_FLT), table(__null), num_buckets(min_size(0, n)), num_elements(0) {
+ reset_thresholds();
+ }
+ dense_hashtable(const dense_hashtable& ht, size_type min_buckets_wanted = 0) : num_deleted(0), use_deleted(ht.use_deleted), use_empty(ht.use_empty), delval(ht.delval), emptyval(ht.emptyval), enlarge_resize_percent(ht.enlarge_resize_percent), shrink_resize_percent(ht.shrink_resize_percent), table(__null), num_buckets(0), num_elements(0) {
+ reset_thresholds();
+ copy_from(ht, min_buckets_wanted);
+ set_value(&emptyval, ht.emptyval);
+ enlarge_resize_percent = ht.enlarge_resize_percent;
+ copy_from(ht);
+ }
+ ~dense_hashtable() {
+ if (table) {
+ destroy_buckets(0, num_buckets);
+ free(table);
+ }
+ }
+ void swap(dense_hashtable& ht) {
+ std::swap(equals, ht.equals);
+ {
+ value_type tmp;
+ set_value(&delval, ht.delval);
+ set_value(&ht.delval, tmp);
+ set_value(&ht.emptyval, tmp);
+ }
+ std::swap(table, ht.table);
+ std::swap(num_buckets, ht.num_buckets);
+ reset_thresholds();
+ ht.reset_thresholds();
+ }
+ void clear() {
+ if (table) destroy_buckets(0, num_buckets);
+ num_buckets = min_size(0,0);
+ set_empty(0, num_buckets);
+ }
+ pair<size_type, size_type> find_position(const key_type &key) const {
+ const size_type bucket_count_minus_one = bucket_count() - 1;
+ size_type bucknum = hash(key) & bucket_count_minus_one;
+ size_type insert_pos = ILLEGAL_BUCKET;
+ while ( 1 ) {
+ if ( test_empty(bucknum) ) {
+ if ( insert_pos == ILLEGAL_BUCKET ) return pair<size_type,size_type>(ILLEGAL_BUCKET, insert_pos);
+ }
+ else if ( test_deleted(bucknum) ) {
+ if ( insert_pos == ILLEGAL_BUCKET ) insert_pos = bucknum;
+ }
+ else if ( equals(key, get_key(table[bucknum])) ) {
+ return pair<size_type,size_type>(bucknum, ILLEGAL_BUCKET);
+ }
+ }
+ }
+ iterator find(const key_type& key) {
+ if ( size() == 0 ) return end();
+ pair<size_type, size_type> pos = find_position(key);
+ if ( pos.first == ILLEGAL_BUCKET ) return end();
+ return iterator(this, table + pos.first, table + num_buckets, false);
+ }
+ const_iterator find(const key_type& key) const {
+ if ( size() == 0 ) return end();
+ pair<size_type, size_type> pos = find_position(key);
+ if ( pos.first == ILLEGAL_BUCKET ) return end();
+ return const_iterator(this, table + pos.first, table+num_buckets, false);
+ }
+ size_type count(const key_type &key) const {
+ pair<size_type, size_type> pos = find_position(key); }
+ pair<iterator, bool> insert_noresize(const value_type& obj) {
+ const pair<size_type,size_type> pos = find_position(get_key(obj));
+ if ( pos.first != ILLEGAL_BUCKET) {
+ return pair<iterator,bool>(iterator(this, table + pos.first, table + num_buckets, false), false);
+ }
+ else {
+ if ( test_deleted(pos.second) ) { ++num_elements; }
+ return pair<iterator,bool>(iterator(this, table + pos.second, table + num_buckets, false), true);
+ }
+ }
+ pair<iterator, bool> insert(const value_type& obj) {
+ resize_delta(1);
+ return insert_noresize(obj);
+ }
+ size_type erase(const key_type& key) {
+ const_iterator pos = find(key);
+ if ( pos != end() ) {
+ set_deleted(pos);
+ }
+ }
+ hasher hash;
+ key_equal equals;
+ ExtractKey get_key;
+ size_type num_deleted;
+ bool use_deleted;
+ bool use_empty;
+ value_type delval;
+ value_type emptyval;
+ float enlarge_resize_percent;
+ float shrink_resize_percent;
+ size_type shrink_threshold;
+ size_type enlarge_threshold;
+ value_type *table;
+ size_type num_buckets;
+ size_type num_elements;
+ bool consider_shrink;
+ void reset_thresholds() {
+ enlarge_threshold = static_cast<size_type>(num_buckets * shrink_resize_percent);
+ }
+};
+template<> struct hash<long> {
+ size_t operator()(long x) const {
+ }
+};
+template<> struct hash<unsigned long> {
+ size_t operator()(unsigned long x) const {
+ }
+};
+template <class Key, class T, class HashFcn = hash<Key>, class EqualKey = equal_to<Key>, class Alloc = allocator<T> > class dense_hash_map {
+ struct SelectKey {
+ const Key& operator()(const pair<const Key, T>& p) const {
+ return p.first;
+ }
+ };
+ typedef dense_hashtable<pair<const Key, T>, Key, HashFcn, SelectKey, EqualKey, Alloc> ht;
+ ht rep;
+ public: typedef typename ht::key_type key_type;
+ typedef T data_type;
+ typedef typename ht::value_type value_type;
+ typedef typename ht::size_type size_type;
+ typedef typename ht::iterator iterator;
+ typedef typename ht::const_iterator const_iterator;
+ iterator end() {
+ return rep.end();
+ }
+ iterator find(const key_type& key) { return rep.find(key); }
+ data_type& operator[](const key_type& key) {
+ iterator it = find(key);
+ return insert(value_type(key, data_type())).first->second;
+ }
+ pair<iterator, bool> insert(const value_type& obj) {
+ return rep.insert(obj);
+ }
+ void set_deleted_key(const key_type& key) {
+ rep.set_deleted_key(value_type(key, data_type()));
+ }
+ size_type erase(const key_type& key) { return rep.erase(key); }
+};
+template <class Value, class HashFcn = hash<Value>, class EqualKey = equal_to<Value>, class Alloc = allocator<Value> > class dense_hash_set {
+ struct Identity {
+ const Value& operator()(const Value& v) const { return v; }
+ };
+ typedef dense_hashtable<Value, Value, HashFcn, Identity, EqualKey, Alloc> ht;
+ ht rep;
+ public: typedef typename ht::key_type key_type;
+ typedef typename ht::value_type value_type;
+ typedef typename ht::size_type size_type;
+ typedef typename ht::const_iterator iterator;
+ size_type count(const key_type& key) const {
+ return rep.count(key);
+ }
+ pair<iterator, bool> insert(const value_type& obj) {
+ pair<typename ht::iterator, bool> p = rep.insert(obj);
+ }
+ size_type erase(const key_type& key) {
+ return rep.erase(key);
+ }
+};
+class linked_ptr_internal {
+ public: bool depart() { if (next_ == this) return true; }
+ mutable linked_ptr_internal const* next_;
+};
+template <typename T> class linked_ptr {
+ public: explicit linked_ptr(T* ptr = __null) {
+ }
+ ~linked_ptr() { depart(); }
+ T& operator*() const { }
+ T* value_;
+ linked_ptr_internal link_;
+ void depart() {
+ if (link_.depart()) delete value_;
+ }
+};
+class blah_3 {
+ const char* ptr_;
+ int length_;
+ public: blah_3(const char* str) : ptr_(str), length_((str == __null) ? 0 : static_cast<int>(strlen(str))) { }
+};
+class blah_5;
+class Bitmap {
+ public: Bitmap(unsigned int size) : array_size_(RequiredArraySize(size)) { }
+ static unsigned int RequiredArraySize(unsigned int num_bits) { return (num_bits + 31) >> 5; }
+ unsigned int array_size_;
+};
+enum blah_31 { CREATIVE_FORMAT_TEXT_NARROW, kNumblah_31s };
+enum blah_33 { BLACKLISTED };
+template <typename EnumT> class blah_55;
+typedef blah_55<blah_31> blah_31Set;
+enum blah_36 { APPROVAL_STATUS_APPROVED, APPROVAL_STATUS_UNKNOWN };
+enum blah_37 { hahah_INVALID, hahah_KEYWORD };
+template<typename EnumT> class blah_55 {
+ public: blah_55(int enum_size);
+ bool Insert(EnumT x);
+ const int enum_size_;
+ Bitmap elements_;
+};
+template<typename EnumT> blah_55<EnumT>::blah_55(int enum_size) :enum_size_(enum_size), elements_(enum_size) {
+ while (foo_1 _result = Check_GTImpl(1, 0, "enum_size" " " ">" " " "0")) blah_0(".h", 1902, _result).stream();
+};
+enum blah_38 {
+ ttttttt_9, };
+class blah_46 {
+ public: blah_46() : hahaha_id_(0), type_(hahah_INVALID), approval_status_(APPROVAL_STATUS_APPROVED) {
+ }
+ blah_46(long cid) : hahaha_id_(cid), type_(hahah_INVALID), approval_status_(APPROVAL_STATUS_APPROVED) {
+ }
+ long id() const {
+ return (static_cast<long>(hahaha_id_) << 16) >> 16;
+ }
+ static const blah_46 kBlacklistedID;
+ bool operator == (const blah_46& x) const { return id() == x.id(); }
+ bool operator < (const blah_46& x) const { return id() < x.id(); }
+ long hahaha_id_ : 48;
+ blah_37 type_ : 8;
+ blah_36 approval_status_ : 4;
+};
+template <> struct hash<blah_46> {
+ size_t operator()(const blah_46 &x) const {
+ return size_t(x.id());
+ }
+};
+class blah_57 {
+ public: blah_57();
+ void AddReason(blah_33 reason, const blah_3& debug_str, const blah_46& hahaha_id, bool );
+ void set_collects_multiple_reasons(bool t) { }
+ private: struct foo_3 {
+ string reject_desc;
+ };
+ foo_3 first_reason_;
+};
+template <class T> struct foo_5 : public unary_function<T*, long> {
+ long operator()(const T* p) const {
+ long id = reinterpret_cast<long>(p);
+ if (id < 2) return -id;
+ }
+};
+template <class T> class DensePtrSet : public dense_hashtable<T*, long, hash<long>, foo_5<T>, equal_to<long>, allocator<T*> > {
+ public: DensePtrSet() {
+ this->set_deleted_key(reinterpret_cast<T*>(1));
+ }
+ const T* Find(long key) const {
+ typename DensePtrSet<T>::const_iterator it = this->find(key);
+ return it != this->end() ? *it : __null;
+ }
+};
+struct foo_7 {
+ foo_7(bool spell_correction, bool query_broadening, bool previous_query, bool near_aaaaa, bool same_length, float mult, float exp_score) : shengmo_0(spell_correction), shengmo_1(query_broadening), shengmo_2(previous_query), shengmo_3(near_aaaaa), shengmo_4(same_length), multiplier(mult), expansion_score(exp_score) {
+ }
+ int CompareSameKeywordMatch(const foo_7& compare) const;
+ bool shengmo_0, shengmo_1, shengmo_2, shengmo_3, shengmo_4;
+ float multiplier, expansion_score;
+};
+enum blah_41 {
+ ACP_ECPM_EARLY = 2 };
+struct foo_8 { unsigned int packed_ctr1; };
+struct foo_9 { foo_9() {}};
+class blah_16;
+class blah_17;
+class foo_12 { public: foo_12() {}
+ unsigned long hahaha_id() const {}
+ unsigned int qbb_score() const {}
+ private: static const vector<blah_46> hmmmmh_4;
+ long hahaha_id_ : 40;
+};
+class foo_13 {
+ public: typedef dense_hash_map<long, int> BestMap;
+ foo_13() { best_rrrrrrr_.set_deleted_key(-1); }
+ void erase(long ad_group_id) {
+ best_rrrrrrr_.erase(ad_group_id);
+ }
+ typedef BestMap::iterator iterator;
+ typedef BestMap::const_iterator const_iterator;
+ const_iterator begin() const { }
+ iterator end() { return best_rrrrrrr_.end(); }
+ iterator find(long ad_group_id) { return best_rrrrrrr_.find(ad_group_id); }
+ const foo_12& GetMatch(const_iterator it) const {}
+ void hmmmmh_27(long ad_group_id, const foo_12& addme);
+ private: BestMap best_rrrrrrr_;
+ vector<foo_12> rrrrrrr_buffer_;
+};
+struct foo_10 : public dense_hash_set<blah_46> {};
+class foo_9Set : public DensePtrSet<foo_9> {};
+typedef map<blah_46, foo_7*> foo_6Data;
+typedef hash_map<long, linked_ptr<blah_57> > RejectedAdGroupMap;
+enum blah_43 {};
+class foo_14 {
+ public: foo_14(const unsigned int, const blah_16*, const int*);
+ bool GathersMultipleRejectionReasons() const;
+ void hmmmmh_30(blah_46 hahaha_id, blah_38 type);
+ const foo_7* Insertfoo_6(const blah_46 hahaha_id, bool shengmo_0, bool shengmo_1, bool shengmo_2, bool shengmo_3, bool shengmo_4_rewrite, float multiplier, float context_score);
+ void hmmmmh_7(blah_46 hahaha_id, blah_38 type);
+ foo_9* Insertfoo_9();
+ bool hmmmmh_8(long ad_group_id, const foo_12 &entry);
+ void hmmmmh_9(long ad_group_id);
+ foo_13::iterator hmmmmh_0(long ad_group_id);
+ bool hmmmmh_8(long ad_group_id, foo_13::iterator best, const foo_12& entry);
+ void hmmmmh_5(const blah_46 hahaha_id);
+ void hmmmmh_29(const blah_46 hahaha_id);
+ bool hmmmmh_12(const blah_46 hahaha_id) const;
+ bool hmmmmh_13(const blah_46 hahaha_id) const;
+ const foo_9* Getfoo_9(const blah_46 hahaha_id) const;
+ bool Gathersfoo_9() const {}
+ const foo_10* rrrrrrr_type_data() const {}
+ const foo_10* negative_rrrrrrr_type_data() const {}
+ const foo_10* positive_rrrrrrr_type_data() const {}
+ const foo_9Set* kw_info_set() const { }
+ const foo_6Data* rewrite_data() const {}
+ const vector<blah_17>& query_rectangles() const {}
+ void hmmmmh_14();
+ void AddQueryRectangle(const blah_17& query_rectangle);
+ void hmmmmh_15(long ad_group_id, const blah_46 hahaha_id, blah_33 reject_class, const char* reject_desc = __null);
+ void hmmmmh_16(const vector<long>& rejected_sssr_ids);
+ void Copy(const foo_14& cmi);
+ void hmmmmh_10();
+ private: const blah_16* ad_request_;
+ const int* cr_query_;
+ blah_43 gather_flags_;
+ vector<blah_17> query_rectangles_;
+ foo_10 rrrrrrr_type_data_;
+ foo_9Set kw_info_set_;
+ foo_6Data rewrite_data_;
+ scoped_ptr<RejectedAdGroupMap> rejected_sssr_map_;
+ foo_13 ad_group_rrrrrrr_data_;
+ vector<blah_46> geo_hahaha_;
+ bool geo_hahaha_is_sorted_;
+ foo_10 negative_rrrrrrr_type_data_, positive_rrrrrrr_type_data_;
+ scoped_ptr<foo_10> extra_hahaha_set_;
+ int dimension_id_;
+ blah_31Set creative_formats_;
+ scoped_ptr<dense_hash_set<unsigned long> > near_aaaaa_rrrrrrr_fps_;
+ blah_41 comparison_policy_;
+ blah_46 next_virtual_hahaha_id_;
+ vector<void*>* sub_queries_;
+ bool allow_only_whitelisted_customers_, automatic_hahaha_rrrrrrr_;
+ scoped_ptr<blah_5> kw_arena_, expanded_rrrrrrr_arena_;
+};
+class blah_19 {
+ void hmmmmh_3();
+ enum blah_45 {};
+};
+void blah_19::hmmmmh_3() {}
+class blah_16 {
+ public: int near_aaaaa_rrrrrrr_fps_size() const {}
+ unsigned long near_aaaaa_rrrrrrr_fps(int i) const {}
+};
+class blah_21 {
+ protected: blah_21(char* first_block, const size_t block_size, bool align_to_page);
+ void* GetMemoryFallback(const size_t size, const int align);
+ void* GetMemory(const size_t size, const int align) {
+ if ( size > 0 && size < remaining_ && align == 1 ) {
+ last_alloc_ = freestart_;
+ }
+ return GetMemoryFallback(size, align);
+ }
+ char* freestart_;
+ char* last_alloc_;
+ size_t remaining_;
+};
+class blah_5 : blah_21 {
+ public: char* Alloc(const size_t size) {
+ return reinterpret_cast<char*>(GetMemory(size, 1));
+ }
+};
+class blah_25 {
+ public: virtual ~blah_25();
+};
+class blah_17 : blah_25 { };
+void Fillfoo_8(const foo_12& x2, struct foo_8* out) {
+ out->packed_ctr1 = x2.qbb_score();
+}
+const vector<blah_46> foo_12::hmmmmh_4;
+foo_14::foo_14(const unsigned int gather_flags, const blah_16* ad_request, const int* cr_query): ad_request_(ad_request), cr_query_(cr_query), gather_flags_(static_cast<blah_43>(gather_flags)), geo_hahaha_is_sorted_(false), dimension_id_(0), creative_formats_(kNumblah_31s), comparison_policy_(ACP_ECPM_EARLY), sub_queries_(new vector<void*>()), allow_only_whitelisted_customers_(false), automatic_hahaha_rrrrrrr_(false) {
+ hmmmmh_10();
+}
+void foo_14::hmmmmh_5(const blah_46 hahaha_id) {
+ negative_rrrrrrr_type_data_.insert(hahaha_id);
+}
+void foo_14::hmmmmh_7(blah_46 hahaha_id, blah_38 type) { }
+foo_13::iterator foo_14::hmmmmh_0( long ad_group_id) {
+ return ad_group_rrrrrrr_data_.find(ad_group_id);
+}
+bool foo_14::hmmmmh_8(long ad_group_id, foo_13::iterator best, const foo_12& entry) {
+ rejected_sssr_map_->erase(ad_group_id);
+ ad_group_rrrrrrr_data_.hmmmmh_27(ad_group_id, entry);
+}
+bool foo_14::hmmmmh_8(long ad_group_id, const foo_12& entry) {
+ foo_13::iterator best = hmmmmh_0(ad_group_id);
+}
+void foo_14::hmmmmh_9(long ad_group_id) {
+ ad_group_rrrrrrr_data_.erase(ad_group_id);
+}
+void foo_14::hmmmmh_10() {
+ if (near_aaaaa_rrrrrrr_fps_ != __null) {
+ blah_54(".cc", 226, WARNING).stream() << "";
+ for (int j = 0;
+ j < ad_request_->near_aaaaa_rrrrrrr_fps_size(); j++) {
+ near_aaaaa_rrrrrrr_fps_->insert(ad_request_->near_aaaaa_rrrrrrr_fps(j));
+ }
+ }
+}
+const foo_7* foo_14::Insertfoo_6(const blah_46 hahaha_id, bool shengmo_0, bool shengmo_1, bool shengmo_2, bool shengmo_3, bool shengmo_4_rewrite, float multiplier, float context_score) {
+ if (rrrrrrr_type_data_.count(hahaha_id) > 0) return __null;
+ foo_7* new_info = new(expanded_rrrrrrr_arena_->Alloc(sizeof(foo_7))) foo_7(shengmo_0,shengmo_1, shengmo_2, shengmo_3, shengmo_4_rewrite, multiplier, context_score);
+ pair<foo_6Data::iterator, bool> status = rewrite_data_.insert( make_pair(hahaha_id, new_info));
+ foo_7* inserted = status.first->second;
+ if (!status.second) {
+ if (inserted->CompareSameKeywordMatch(*new_info) < 0) *inserted = *new_info;
+ }
+}
+foo_9* foo_14::Insertfoo_9() {
+ foo_9* info = new(kw_arena_->Alloc(sizeof(foo_9))) foo_9;
+ if (Gathersfoo_9()) kw_info_set_.insert(info);
+ creative_formats_.Insert(CREATIVE_FORMAT_TEXT_NARROW);
+}
+bool foo_14::hmmmmh_12(const blah_46 hahaha_id) const {
+ if (rrrrrrr_type_data_.count(hahaha_id)) return true;
+}
+bool foo_14::hmmmmh_13(const blah_46 hahaha_id) const {
+ if (positive_rrrrrrr_type_data_.count(hahaha_id)) return true;
+}
+const foo_9* foo_14::Getfoo_9(const blah_46 hahaha_id) const {
+ if (Gathersfoo_9()) return kw_info_set_.Find(hahaha_id.id());
+ static int occurrences_383 = 0, occurrences_mod_n_383 = 0;
+ if (++occurrences_mod_n_383 > 1000) occurrences_mod_n_383 -= 1000;
+}
+void foo_14::hmmmmh_15(long ad_group_id, const blah_46 hahaha_id, blah_33 reject_class, const char* reject_desc) {
+ if (rejected_sssr_map_ == __null) {
+ blah_54("a.cc", 413, ERROR).stream() << "re NULL";
+ rejected_sssr_map_.reset(new RejectedAdGroupMap);
+ }
+ if (rejected_sssr_map_->count(ad_group_id) == 0) {
+ blah_57* ad_rejection = new blah_57();
+ ad_rejection->set_collects_multiple_reasons( GathersMultipleRejectionReasons());
+ (*rejected_sssr_map_)[ad_group_id] = linked_ptr<blah_57>(ad_rejection);
+ }
+ blah_57& ad_rejection = *(*rejected_sssr_map_)[ad_group_id];
+ ad_rejection.AddReason(reject_class, reject_desc, hahaha_id, false);
+}
+void foo_14::hmmmmh_16(const vector<long>& rejected_sssr_ids) {
+ for (vector<long>::const_iterator it = rejected_sssr_ids.begin();
+ it != rejected_sssr_ids.end(); ++it) {
+ ad_group_rrrrrrr_data_.erase(*it);
+ for (foo_13::const_iterator it = ad_group_rrrrrrr_data_.begin();
+ it != ad_group_rrrrrrr_data_.end(); ++it) {
+ hmmmmh_15(it->first, ad_group_rrrrrrr_data_.GetMatch(it).hahaha_id(), BLACKLISTED);
+ }
+ }
+ hmmmmh_30(blah_46::kBlacklistedID, ttttttt_9);
+}
+void foo_14::Copy(const foo_14& cmi) {
+ rrrrrrr_type_data_ = *cmi.rrrrrrr_type_data();
+ negative_rrrrrrr_type_data_ = *cmi.negative_rrrrrrr_type_data();
+ positive_rrrrrrr_type_data_ = *cmi.positive_rrrrrrr_type_data();
+ if (cmi.Gathersfoo_9()) {
+ kw_info_set_ = *cmi.kw_info_set();
+ rewrite_data_ = *cmi.rewrite_data();
+ }
+ hmmmmh_14();
+ for (int i = 0; i < cmi.query_rectangles().size();
+ ++i) AddQueryRectangle(cmi.query_rectangles()[i]);
+}
+void foo_13::hmmmmh_27(long ad_group_id, const foo_12& addme) {
+ int& best_index = best_rrrrrrr_[ad_group_id];
+ rrrrrrr_buffer_.push_back(addme);
+}
+void foo_14::hmmmmh_29(const blah_46 hahaha_id) {
+ if (extra_hahaha_set_ != __null) extra_hahaha_set_->erase(hahaha_id);
+}
diff --git a/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C b/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C
new file mode 100644
index 00000000000..5513d3650c6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C
@@ -0,0 +1,52 @@
+// PR tree-optimization/39557
+// invalid post-dom info leads to infinite loop
+// { dg-do run }
+// { dg-options "-Wall -fno-exceptions -O2 -fprofile-use -fno-rtti" }
+
+struct C
+{
+ virtual const char *bar () const;
+};
+
+struct D
+{
+ D () : d1 (0) { }
+ C *d2[4];
+ int d1;
+ inline const C & baz (int i) const { return *d2[i]; }
+};
+
+struct E
+{
+ unsigned char e1[2];
+ D e2;
+ bool foo () const { return (e1[1] & 1) != 0; }
+ virtual const char *bar () const __attribute__ ((noinline));
+};
+
+const char *
+C::bar () const
+{
+ return 0;
+}
+
+C c;
+
+const char *
+E::bar () const
+{
+ const char *e = __null;
+ if (foo () && (e = c.C::bar ()))
+ return e;
+ for (int i = 0, n = e2.d1; i < n; i++)
+ if ((e = e2.baz (i).C::bar ()))
+ return e;
+ return e;
+}
+
+int
+main ()
+{
+ E e;
+ e.bar ();
+} // { dg-message "note: file" "" }
diff --git a/gcc/testsuite/g++.dg/tree-ssa/fwprop-align.C b/gcc/testsuite/g++.dg/tree-ssa/fwprop-align.C
new file mode 100644
index 00000000000..69f26021689
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/fwprop-align.C
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-forwprop2" } */
+
+struct A
+{
+ void foo ()
+ {
+ }
+};
+
+int main()
+{
+ void (A::* const p)() = & A::foo;
+ A a;
+ (a.*p)();
+}
+
+/* We should eliminate the check if p points to a virtual function. */
+/* { dg-final { scan-tree-dump-times "& 1" 0 "forwprop2" } } */
+/* { dg-final { cleanup-tree-dump "forwprop2" } } */
diff --git a/gcc/testsuite/g++.dg/warn/Warray-bounds.C b/gcc/testsuite/g++.dg/warn/Warray-bounds.C
index 0385516abd4..d53af521486 100644
--- a/gcc/testsuite/g++.dg/warn/Warray-bounds.C
+++ b/gcc/testsuite/g++.dg/warn/Warray-bounds.C
@@ -26,10 +26,10 @@ int* f(void) {
a[ 9] = 0;
a[10] = 0; /* { dg-warning "array subscript" } */
a[11] = 0; /* { dg-warning "array subscript" } */
- a[2 * n() - 11] = 0; /* { dg-warning "array subscript" } */
- a[2 * n() - 10] = 0;
- a[2 * n() - 1] = 0;
- a[2 * n() - 0] = 0; /* { dg-warning "array subscript" } */
+ a[2 * n() - 11] = 1; /* { dg-warning "array subscript" } */
+ a[2 * n() - 10] = 1;
+ a[2 * n() - 1] = 1;
+ a[2 * n() - 0] = 1; /* { dg-warning "array subscript" } */
b[-1] = 0; /* { dg-warning "array subscript" } */
b[ 0] = 0;
@@ -37,10 +37,10 @@ int* f(void) {
b[ 9] = 0;
b[10] = 0; /* { dg-warning "array subscript" } */
b[11] = 0; /* { dg-warning "array subscript" } */
- b[2 * n() - 11] = 0; /* { dg-warning "array subscript" } */
- b[2 * n() - 10] = 0;
- b[2 * n() - 1] = 0;
- b[2 * n() - 0] = 0; /* { dg-warning "array subscript" } */
+ b[2 * n() - 11] = 1; /* { dg-warning "array subscript" } */
+ b[2 * n() - 10] = 1;
+ b[2 * n() - 1] = 1;
+ b[2 * n() - 0] = 1; /* { dg-warning "array subscript" } */
c.c[-1] = 0; /* { dg-warning "array subscript" } */
c.c[ 0] = 0;
@@ -48,10 +48,10 @@ int* f(void) {
c.c[ 9] = 0;
c.c[10] = 0; /* { dg-warning "array subscript" } */
c.c[11] = 0; /* { dg-warning "array subscript" } */
- c.c[2 * n() - 11] = 0; /* { dg-warning "array subscript" } */
- c.c[2 * n() - 10] = 0;
- c.c[2 * n() - 1] = 0;
- c.c[2 * n() - 0] = 0; /* { dg-warning "array subscript" } */
+ c.c[2 * n() - 11] = 1; /* { dg-warning "array subscript" } */
+ c.c[2 * n() - 10] = 1;
+ c.c[2 * n() - 1] = 1;
+ c.c[2 * n() - 0] = 1; /* { dg-warning "array subscript" } */
g(&a[8]);
g(&a[9]);
diff --git a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-1.C b/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-1.C
deleted file mode 100644
index 39760950d69..00000000000
--- a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-1.C
+++ /dev/null
@@ -1,7 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-Wdisallowed-function-list=foobar" } */
-
-int foobar (int i)
-{
- return (i * 5);
-}
diff --git a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-2.C b/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-2.C
deleted file mode 100644
index ca5aab0e50d..00000000000
--- a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-2.C
+++ /dev/null
@@ -1,12 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-Wdisallowed-function-list=foo,foobar,bar,foobar" } */
-
-int foobar (int i)
-{
- return (i * 5);
-}
-
-int foobar1 (int i)
-{
- return foobar (i); /* { dg-warning "disallowed call to 'foobar'" } */
-}
diff --git a/gcc/testsuite/g++.dg/warn/Wshadow-4.C b/gcc/testsuite/g++.dg/warn/Wshadow-4.C
new file mode 100644
index 00000000000..16399b2fb60
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wshadow-4.C
@@ -0,0 +1,20 @@
+// PR c++/39526
+// { dg-options "-Wshadow" }
+
+class INetURLObject
+{
+public:
+ INetURLObject(int i);
+ int GetMainURL() const;
+};
+
+int foo(int infoo) // { dg-warning "shadowed declaration" }
+{
+ int outfoo( INetURLObject( infoo ).GetMainURL()); // { dg-bogus "shadows" }
+ extern void f(int infoo);
+ struct A
+ {
+ void f(int infoo) { } // { dg-warning "shadows a parameter" }
+ };
+ return outfoo;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C
new file mode 100644
index 00000000000..29414e00e36
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wstrict-aliasing" } */
+
+#include<list>
+
+struct A
+{
+ virtual ~A();
+};
+
+A* foo();
+
+void bar(std::list<int> x)
+{
+ std::list<int> y = x;
+ if (*y.rbegin())
+ delete foo();
+}
+
diff --git a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-3.C b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-3.C
new file mode 100644
index 00000000000..de6b2c47735
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-3.C
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wstrict-aliasing" } */
+
+struct Node_base {};
+
+struct Node : Node_base
+{
+ int data;
+};
+
+struct List
+{
+ Node_base node, *prev;
+
+ List() : prev(&node) { xyz(); }
+
+ void xyz();
+
+ int back() { return static_cast<Node*>(prev)->data; }
+};
+
+struct A
+{
+ virtual ~A();
+};
+
+A* foo();
+
+void bar()
+{
+ List y;
+ if (y.back())
+ delete foo();
+}
+
diff --git a/gcc/testsuite/g++.dg/warn/Wswitch-1.C b/gcc/testsuite/g++.dg/warn/Wswitch-1.C
index 9b05cd16c5d..6a2094466cf 100644
--- a/gcc/testsuite/g++.dg/warn/Wswitch-1.C
+++ b/gcc/testsuite/g++.dg/warn/Wswitch-1.C
@@ -50,14 +50,14 @@ foo (int i, int j, enum e ei, enum e ej, enum e ek, enum e el,
{
case e1: return 1;
case e2: return 2;
- case 3: return 3; /* { dg-warning "case value '3' not in enumerated type 'e'" "excess 3" } */
+ case 3: return 3; /* { dg-warning "exceeds maximum value" } */
}
switch (ep)
{
case e1: return 1;
case e2: return 2;
- case 3: return 3;
+ case 3: return 3; /* { dg-warning "exceeds maximum value" } */
default: break;
- } /* Since there is a default, no warning about ``case 3'' */
+ }
return 0;
}
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-3.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-3.C
new file mode 100644
index 00000000000..dc3be3f67fa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-3.C
@@ -0,0 +1,17 @@
+// PR C++/38908
+// { dg-options "-Wuninitialized -O" }
+
+struct empty {};
+
+struct dfs_visitor {
+ dfs_visitor() { }
+ empty m_vis;
+};
+
+void bar(const dfs_visitor&);
+void foo(void)
+{
+ dfs_visitor vis;
+ dfs_visitor vis2 = vis;
+ bar (vis2);
+}
diff --git a/gcc/testsuite/g++.dg/warn/pr35652.C b/gcc/testsuite/g++.dg/warn/pr35652.C
new file mode 100644
index 00000000000..7ce9431eb2b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/pr35652.C
@@ -0,0 +1,30 @@
+// PR c++/35652: wrong location and duplicated warning.
+// { dg-do compile }
+// { dg-options "-fshow-column" }
+#include <string>
+int foo() {
+ // blank line padding, could also be code...
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ std::string s = "";
+ s += 'x' + "y"; // { dg-warning "14:offset '120' outside bounds of constant string" }
+ // { dg-bogus "offset '120' outside bounds of constant string.*offset '120' outside bounds of constant string" "duplicated" { target *-*-* } 17 }
+}
+
+int bar()
+{
+ const char *s = 'z' + "y"; /* { dg-warning "25:offset '122' outside bounds of constant string" } */
+}
+
+int g()
+{
+ char str[2];
+ const char *p = str + sizeof(str);
+}
diff --git a/gcc/testsuite/g++.dg/warn/switch1.C b/gcc/testsuite/g++.dg/warn/switch1.C
new file mode 100644
index 00000000000..49c17e9120c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/switch1.C
@@ -0,0 +1,15 @@
+// { dg-do compile { target { int32plus } } }
+
+signed char sc;
+
+void
+foo (void)
+{
+ switch (sc)
+ {
+ case 1:
+ case 2 * __SCHAR_MAX__ + 3: // { dg-warning "case label value exceeds maximum" }
+ case - 2 * __SCHAR_MAX__ - 1: // { dg-warning "case label value is less than minimum" }
+ break;
+ }
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C b/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
index 2a7e145856c..fcc3c61677a 100644
--- a/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
+++ b/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
@@ -1,4 +1,4 @@
-// { dg-do run { xfail alpha*-dec-osf* *-*-hms i?86-pc-cygwin *-*-coff } }
+// { dg-do run { xfail alpha*-dec-osf* i?86-pc-cygwin } }
// Test that attributes weak and alias coexist.
// { dg-require-weak "" }
// { dg-require-alias "" }
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C
index 18bbec8c88a..ad13022ddb3 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C
@@ -1,6 +1,7 @@
// { dg-do run { target fpic } }
// { dg-options "-fPIC" }
// { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))|\[Bb\]ad fixup at .DATA.:" "PIC unsupported" { xfail *-*-netware* } 0 }
+// { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } }
// Test that non-variadic function calls using thunks and PIC work right.
struct A {
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
index d91982f7ed0..612d423be08 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
@@ -1,4 +1,4 @@
-// { dg-do run { xfail rs6000-*-* powerpc-*-eabi m68k-*-coff mn10300-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa*-*-* m32r*-*-* } }
+// { dg-do run { xfail rs6000-*-* powerpc-*-eabi mn10300-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa*-*-* m32r*-*-* } }
// Test that variadic function calls using thunks work right.
// Note that this will break on any target that uses the generic thunk
// support, because it doesn't support variadic functions.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20090114-1.c b/gcc/testsuite/gcc.c-torture/compile/20090114-1.c
new file mode 100644
index 00000000000..692c96f76ba
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20090114-1.c
@@ -0,0 +1,44 @@
+typedef struct {
+ int MbInterlace;
+ int channel_type;
+} InputParameters;
+typedef struct {
+ int type;
+ int NumberofCodedPFrame;
+ int NumberofGOP;
+ int NumberofPPicture;
+ int FieldControl;
+ int Frame_Total_Number_MB;
+ int NumberofCodedMacroBlocks;
+ int BasicUnit;
+} ImageParameters;
+extern InputParameters *input;
+extern ImageParameters *img;
+long T;
+void rc_init_pict(int fieldpic)
+{
+ if(input->MbInterlace)
+ T = img->Frame_Total_Number_MB;
+ img->NumberofCodedMacroBlocks=0;
+ if(input->channel_type==1
+ && img->NumberofCodedPFrame==58)
+ T = 4;
+ if(fieldpic)
+ {
+ switch (img->type)
+ {
+ case 0:
+ if(img->NumberofCodedPFrame>0
+ && img->FieldControl==1)
+ T = 3;
+ if(img->NumberofPPicture==1)
+ T = 2;
+ }
+ if(img->type==0
+ && img->NumberofCodedPFrame>0)
+ T = 0;
+ }
+ if(img->type==0
+ && img->FieldControl==1)
+ T = 1;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20090303-1.c b/gcc/testsuite/gcc.c-torture/compile/20090303-1.c
new file mode 100644
index 00000000000..18a3d91fd1c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20090303-1.c
@@ -0,0 +1,20 @@
+/* The array offset became 0x1ffffffffffffffe via a conversion from
+ signed to unsigned HOST_WIDE_INT, causing an ICE compiling for
+ Thumb. */
+
+int r (unsigned short *);
+void s (unsigned short *, unsigned short *);
+
+int
+f (int x)
+{
+ unsigned short a[1], c[1];
+
+ if (r (a))
+ return x;
+
+ if (c[-1])
+ s (a, c);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20090303-2.c b/gcc/testsuite/gcc.c-torture/compile/20090303-2.c
new file mode 100644
index 00000000000..69cee36e0b9
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20090303-2.c
@@ -0,0 +1,20 @@
+/* The array offset became 0x1ffffffffffffffe via a conversion from
+ signed to unsigned HOST_WIDE_INT, causing an ICE compiling for
+ Thumb. */
+
+int r (unsigned short *);
+void s (unsigned short *, unsigned short *);
+
+int
+f (int x)
+{
+ unsigned short a[1], c[1];
+
+ if (r (a))
+ return x;
+
+ if (c[0x7fffffff])
+ s (a, c);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20090328-1.c b/gcc/testsuite/gcc.c-torture/compile/20090328-1.c
new file mode 100644
index 00000000000..10328ad41c3
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20090328-1.c
@@ -0,0 +1,17 @@
+union loc { unsigned reg; signed offset; };
+void __frame_state_for (volatile char *state_in, int x)
+{
+ /* We should move all the loads out of this loop. Right now, we only
+ move one. It takes two insertions because we insert a cast. */
+ union loc fs;
+ int reg;
+ for (;;) {
+ switch (x) {
+ case 0:
+ *state_in = fs.reg;
+ case 1:
+ *state_in = fs.offset;
+ }
+ }
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/981006-1.c b/gcc/testsuite/gcc.c-torture/compile/981006-1.c
index a8b4cc48cd6..d77c115f214 100644
--- a/gcc/testsuite/gcc.c-torture/compile/981006-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/981006-1.c
@@ -6,7 +6,7 @@
/* { dg-do assemble } */
/* For MIPS at least, pic is needed to trigger the problem. */
/* { dg-options "-w -Wuninitialized -Werror -fpic" } */
-/* { dg-options "-w -Wuninitialized -Werror" { target { { rs6000-*-aix* powerpc*-*-aix* arm*-*-* fr30-*-* sh-*-hms sh-*-coff h8300*-*-* cris-*-elf* mmix-*-* } || { ! fpic } } } } */
+/* { dg-options "-w -Wuninitialized -Werror" { target { { rs6000-*-aix* powerpc*-*-aix* arm*-*-* fr30-*-* sh-*-hms h8300*-*-* cris-*-elf* mmix-*-* } || { ! fpic } } } } */
int foo (int a, int b)
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr16566-2.c b/gcc/testsuite/gcc.c-torture/compile/pr16566-2.c
index c0036f0fc64..2f7a10668a7 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr16566-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr16566-2.c
@@ -1,5 +1,6 @@
/* ICE with flexible arrays in non-lvalue structures. Bug 16566
(comment #5). */
+/* { dg-options "-Wno-psabi" { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
struct A
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32139.c b/gcc/testsuite/gcc.c-torture/compile/pr32139.c
new file mode 100644
index 00000000000..7b8522f5174
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr32139.c
@@ -0,0 +1,11 @@
+/* PR tree-optimization/32139 */
+int foo (void);
+int bar (void) __attribute__ ((const));
+
+int
+test (int x)
+{
+ int a = (x == 10000 ? foo : bar) ();
+ int b = (x == 10000 ? foo : bar) ();
+ return a + b;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39360.c b/gcc/testsuite/gcc.c-torture/compile/pr39360.c
new file mode 100644
index 00000000000..0bd63114431
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr39360.c
@@ -0,0 +1,16 @@
+/* PR middle-end/39360 */
+
+static int a[] = { 1 };
+
+static inline void
+bar (int **x)
+{
+ static int *c[2] = { 0, a };
+ *x = c[1];
+}
+
+int
+foo (int **x)
+{
+ bar (x);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39394.c b/gcc/testsuite/gcc.c-torture/compile/pr39394.c
new file mode 100644
index 00000000000..325a08ff470
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr39394.c
@@ -0,0 +1,28 @@
+/* PR tree-optimization/39394 */
+
+char *p;
+int x;
+
+static inline void
+f1 (int n)
+{
+ asm volatile ("" : "=m" (*(struct { char x[n]; } *) p));
+}
+
+static inline void
+f2 (void)
+{
+ x ? f1 (1) : f1 (2);
+}
+
+static inline void
+f3 (void)
+{
+ f2 ();
+}
+
+void
+f4 (void)
+{
+ f3 ();
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20090113-1.c b/gcc/testsuite/gcc.c-torture/execute/20090113-1.c
new file mode 100644
index 00000000000..9c5f01d71fa
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20090113-1.c
@@ -0,0 +1,61 @@
+typedef struct descriptor_dimension
+{
+ int stride;
+ int lbound;
+ int ubound;
+} descriptor_dimension;
+typedef struct {
+ int *data;
+ int dtype;
+ descriptor_dimension dim[7];
+} gfc_array_i4;
+
+void
+msum_i4 (gfc_array_i4 * const retarray,
+ gfc_array_i4 * const array,
+ const int * const pdim)
+{
+ int count[7];
+ int extent[7];
+ int * dest;
+ const int * base;
+ int dim;
+ int n;
+ int len;
+
+ dim = (*pdim) - 1;
+ len = array->dim[dim].ubound + 1 - array->dim[dim].lbound;
+
+ for (n = 0; n < dim; n++)
+ {
+ extent[n] = array->dim[n].ubound + 1 - array->dim[n].lbound;
+ count[n] = 0;
+ }
+
+ dest = retarray->data;
+ base = array->data;
+
+ do
+ {
+ int result = 0;
+
+ for (n = 0; n < len; n++, base++)
+ result += *base;
+ *dest = result;
+
+ count[0]++;
+ dest += 1;
+ }
+ while (count[0] != extent[0]);
+}
+
+int main()
+{
+ int rdata[3];
+ int adata[9];
+ gfc_array_i4 retarray = { rdata, 265, { { 1, 1, 3 } } };
+ gfc_array_i4 array = { adata, 266, { { 1, 1, 3 }, { 3, 1, 3 } } };
+ int dim = 2;
+ msum_i4 (&retarray, &array, &dim);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20090113-2.c b/gcc/testsuite/gcc.c-torture/execute/20090113-2.c
new file mode 100644
index 00000000000..9871a66ffbc
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20090113-2.c
@@ -0,0 +1,160 @@
+struct obstack {};
+struct bitmap_head_def;
+typedef struct bitmap_head_def *bitmap;
+typedef const struct bitmap_head_def *const_bitmap;
+typedef unsigned long BITMAP_WORD;
+typedef struct bitmap_obstack
+{
+ struct bitmap_element_def *elements;
+ struct bitmap_head_def *heads;
+ struct obstack obstack;
+} bitmap_obstack;
+typedef struct bitmap_element_def
+{
+ struct bitmap_element_def *next;
+ struct bitmap_element_def *prev;
+ unsigned int indx;
+ BITMAP_WORD bits[((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u))];
+} bitmap_element;
+
+struct bitmap_descriptor;
+
+typedef struct bitmap_head_def {
+ bitmap_element *first;
+ bitmap_element *current;
+ unsigned int indx;
+ bitmap_obstack *obstack;
+} bitmap_head;
+
+bitmap_element bitmap_zero_bits;
+
+typedef struct
+{
+ bitmap_element *elt1;
+ bitmap_element *elt2;
+ unsigned word_no;
+ BITMAP_WORD bits;
+} bitmap_iterator;
+
+static void __attribute__((noinline))
+bmp_iter_set_init (bitmap_iterator *bi, const_bitmap map,
+ unsigned start_bit, unsigned *bit_no)
+{
+ bi->elt1 = map->first;
+ bi->elt2 = ((void *)0);
+
+ while (1)
+ {
+ if (!bi->elt1)
+ {
+ bi->elt1 = &bitmap_zero_bits;
+ break;
+ }
+
+ if (bi->elt1->indx >= start_bit / (((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)) * (8 * 8 * 1u)))
+ break;
+ bi->elt1 = bi->elt1->next;
+ }
+
+ if (bi->elt1->indx != start_bit / (((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)) * (8 * 8 * 1u)))
+ start_bit = bi->elt1->indx * (((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)) * (8 * 8 * 1u));
+
+ bi->word_no = start_bit / (8 * 8 * 1u) % ((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u));
+ bi->bits = bi->elt1->bits[bi->word_no];
+ bi->bits >>= start_bit % (8 * 8 * 1u);
+
+ start_bit += !bi->bits;
+
+ *bit_no = start_bit;
+}
+
+static void __attribute__((noinline))
+bmp_iter_next (bitmap_iterator *bi, unsigned *bit_no)
+{
+ bi->bits >>= 1;
+ *bit_no += 1;
+}
+
+static unsigned char __attribute__((noinline))
+bmp_iter_set_tail (bitmap_iterator *bi, unsigned *bit_no)
+{
+ while (!(bi->bits & 1))
+ {
+ bi->bits >>= 1;
+ *bit_no += 1;
+ }
+ return 1;
+}
+
+static __inline__ unsigned char
+bmp_iter_set (bitmap_iterator *bi, unsigned *bit_no)
+{
+ unsigned bno = *bit_no;
+ BITMAP_WORD bits = bi->bits;
+ bitmap_element *elt1;
+
+ if (bits)
+ {
+ while (!(bits & 1))
+ {
+ bits >>= 1;
+ bno += 1;
+ }
+ *bit_no = bno;
+ return 1;
+ }
+
+ *bit_no = ((bno + 64 - 1) / 64 * 64);
+ bi->word_no++;
+
+ elt1 = bi->elt1;
+ while (1)
+ {
+ while (bi->word_no != 2)
+ {
+ bi->bits = elt1->bits[bi->word_no];
+ if (bi->bits)
+ {
+ bi->elt1 = elt1;
+ return bmp_iter_set_tail (bi, bit_no);
+ }
+ *bit_no += 64;
+ bi->word_no++;
+ }
+
+ elt1 = elt1->next;
+ if (!elt1)
+ {
+ bi->elt1 = elt1;
+ return 0;
+ }
+ *bit_no = elt1->indx * (2 * 64);
+ bi->word_no = 0;
+ }
+}
+
+extern void abort (void);
+
+static void __attribute__((noinline)) catchme(int i)
+{
+ if (i != 0 && i != 64)
+ abort ();
+}
+static void __attribute__((noinline)) foobar (bitmap_head *chain)
+{
+ bitmap_iterator rsi;
+ unsigned int regno;
+ for (bmp_iter_set_init (&(rsi), (chain), (0), &(regno));
+ bmp_iter_set (&(rsi), &(regno));
+ bmp_iter_next (&(rsi), &(regno)))
+ catchme(regno);
+}
+
+int main()
+{
+ bitmap_element elem = { (void *)0, (void *)0, 0, { 1, 1 } };
+ bitmap_head live_throughout = { &elem, &elem, 0, (void *)0 };
+ foobar (&live_throughout);
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/20090113-3.c b/gcc/testsuite/gcc.c-torture/execute/20090113-3.c
new file mode 100644
index 00000000000..f67bac24135
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20090113-3.c
@@ -0,0 +1,138 @@
+struct obstack {};
+struct bitmap_head_def;
+typedef struct bitmap_head_def *bitmap;
+typedef const struct bitmap_head_def *const_bitmap;
+typedef unsigned long BITMAP_WORD;
+
+typedef struct bitmap_obstack
+{
+ struct bitmap_element_def *elements;
+ struct bitmap_head_def *heads;
+ struct obstack obstack;
+} bitmap_obstack;
+typedef struct bitmap_element_def
+{
+ struct bitmap_element_def *next;
+ struct bitmap_element_def *prev;
+ unsigned int indx;
+ BITMAP_WORD bits[(2)];
+} bitmap_element;
+
+struct bitmap_descriptor;
+
+typedef struct bitmap_head_def {
+ bitmap_element *first;
+ bitmap_element *current;
+ unsigned int indx;
+ bitmap_obstack *obstack;
+} bitmap_head;
+
+bitmap_element bitmap_zero_bits;
+
+typedef struct
+{
+ bitmap_element *elt1;
+ bitmap_element *elt2;
+ unsigned word_no;
+ BITMAP_WORD bits;
+} bitmap_iterator;
+
+static __attribute__((noinline)) void
+bmp_iter_set_init (bitmap_iterator *bi, const_bitmap map,
+ unsigned start_bit, unsigned *bit_no)
+{
+ bi->elt1 = map->first;
+ bi->elt2 = ((void *)0);
+
+ while (1)
+ {
+ if (!bi->elt1)
+ {
+ bi->elt1 = &bitmap_zero_bits;
+ break;
+ }
+
+ if (bi->elt1->indx >= start_bit / (128u))
+ break;
+ bi->elt1 = bi->elt1->next;
+ }
+
+ if (bi->elt1->indx != start_bit / (128u))
+ start_bit = bi->elt1->indx * (128u);
+
+ bi->word_no = start_bit / 64u % (2);
+ bi->bits = bi->elt1->bits[bi->word_no];
+ bi->bits >>= start_bit % 64u;
+
+ start_bit += !bi->bits;
+
+ *bit_no = start_bit;
+}
+
+static __inline__ __attribute__((always_inline)) void
+bmp_iter_next (bitmap_iterator *bi, unsigned *bit_no)
+{
+ bi->bits >>= 1;
+ *bit_no += 1;
+}
+
+static __inline__ __attribute__((always_inline)) unsigned char
+bmp_iter_set (bitmap_iterator *bi, unsigned *bit_no)
+{
+ if (bi->bits)
+ {
+ while (!(bi->bits & 1))
+ {
+ bi->bits >>= 1;
+ *bit_no += 1;
+ }
+ return 1;
+ }
+
+ *bit_no = ((*bit_no + 64u - 1) / 64u * 64u);
+ bi->word_no++;
+
+ while (1)
+ {
+ while (bi->word_no != (2))
+ {
+ bi->bits = bi->elt1->bits[bi->word_no];
+ if (bi->bits)
+ {
+ while (!(bi->bits & 1))
+ {
+ bi->bits >>= 1;
+ *bit_no += 1;
+ }
+ return 1;
+ }
+ *bit_no += 64u;
+ bi->word_no++;
+ }
+
+ bi->elt1 = bi->elt1->next;
+ if (!bi->elt1)
+ return 0;
+ *bit_no = bi->elt1->indx * (128u);
+ bi->word_no = 0;
+ }
+}
+
+static void __attribute__((noinline))
+foobar (bitmap_head *live_throughout)
+{
+ bitmap_iterator rsi;
+ unsigned int regno;
+ for (bmp_iter_set_init (&(rsi), (live_throughout), (0), &(regno));
+ bmp_iter_set (&(rsi), &(regno));
+ bmp_iter_next (&(rsi), &(regno)))
+ ;
+}
+int main()
+{
+ bitmap_element elem = { (void *)0, (void *)0, 0, { 1, 1 } };
+ bitmap_head live_throughout = { &elem, &elem, 0, (void *)0 };
+ foobar (&live_throughout);
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/20090207-1.c b/gcc/testsuite/gcc.c-torture/execute/20090207-1.c
new file mode 100644
index 00000000000..51a686028ea
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20090207-1.c
@@ -0,0 +1,16 @@
+int foo(int i)
+{
+ int a[32];
+ a[1] = 3;
+ a[0] = 1;
+ a[i] = 2;
+ return a[0];
+}
+extern void abort (void);
+int main()
+{
+ if (foo (0) != 2
+ || foo (1) != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/inf-2.c b/gcc/testsuite/gcc.c-torture/execute/ieee/inf-2.c
index 1823b35ff0f..dafd95835c8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/inf-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/inf-2.c
@@ -77,7 +77,7 @@ int main()
{
test (34.0, __builtin_inf());
testf (34.0f, __builtin_inff());
- testf (34.0l, __builtin_infl());
+ testl (34.0l, __builtin_infl());
return 0;
}
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/inf-3.c b/gcc/testsuite/gcc.c-torture/execute/ieee/inf-3.c
new file mode 100644
index 00000000000..f2ee4806265
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/inf-3.c
@@ -0,0 +1,79 @@
+extern void abort (void);
+
+void test(double f, double i)
+{
+ if (f == __builtin_huge_val())
+ abort ();
+ if (f == -__builtin_huge_val())
+ abort ();
+ if (i == -__builtin_huge_val())
+ abort ();
+ if (i != __builtin_huge_val())
+ abort ();
+
+ if (f >= __builtin_huge_val())
+ abort ();
+ if (f > __builtin_huge_val())
+ abort ();
+ if (i > __builtin_huge_val())
+ abort ();
+ if (f <= -__builtin_huge_val())
+ abort ();
+ if (f < -__builtin_huge_val())
+ abort ();
+}
+
+void testf(float f, float i)
+{
+ if (f == __builtin_huge_valf())
+ abort ();
+ if (f == -__builtin_huge_valf())
+ abort ();
+ if (i == -__builtin_huge_valf())
+ abort ();
+ if (i != __builtin_huge_valf())
+ abort ();
+
+ if (f >= __builtin_huge_valf())
+ abort ();
+ if (f > __builtin_huge_valf())
+ abort ();
+ if (i > __builtin_huge_valf())
+ abort ();
+ if (f <= -__builtin_huge_valf())
+ abort ();
+ if (f < -__builtin_huge_valf())
+ abort ();
+}
+
+void testl(long double f, long double i)
+{
+ if (f == __builtin_huge_vall())
+ abort ();
+ if (f == -__builtin_huge_vall())
+ abort ();
+ if (i == -__builtin_huge_vall())
+ abort ();
+ if (i != __builtin_huge_vall())
+ abort ();
+
+ if (f >= __builtin_huge_vall())
+ abort ();
+ if (f > __builtin_huge_vall())
+ abort ();
+ if (i > __builtin_huge_vall())
+ abort ();
+ if (f <= -__builtin_huge_vall())
+ abort ();
+ if (f < -__builtin_huge_vall())
+ abort ();
+}
+
+int main()
+{
+ test (34.0, __builtin_huge_val());
+ testf (34.0f, __builtin_huge_valf());
+ testl (34.0l, __builtin_huge_vall());
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr35456.x b/gcc/testsuite/gcc.c-torture/execute/pr35456.x
new file mode 100644
index 00000000000..73b18fb7495
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr35456.x
@@ -0,0 +1,3 @@
+# VAX does not support signed zero.
+if [istarget "vax-*-*"] { return 1 }
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr39120.c b/gcc/testsuite/gcc.c-torture/execute/pr39120.c
new file mode 100644
index 00000000000..8859848007b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr39120.c
@@ -0,0 +1,18 @@
+struct X { int *p; } x;
+
+struct X __attribute__((noinline))
+foo(int *p) { struct X x; x.p = p; return x; }
+
+void __attribute((noinline))
+bar() { *x.p = 1; }
+
+extern void abort (void);
+int main()
+{
+ int i = 0;
+ x = foo(&i);
+ bar();
+ if (i != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr39339.c b/gcc/testsuite/gcc.c-torture/execute/pr39339.c
new file mode 100644
index 00000000000..6c1b9e72ede
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr39339.c
@@ -0,0 +1,81 @@
+struct C
+{
+ unsigned int c;
+ struct D
+ {
+ unsigned int columns : 4;
+ unsigned int fore : 12;
+ unsigned int back : 6;
+ unsigned int fragment : 1;
+ unsigned int standout : 1;
+ unsigned int underline : 1;
+ unsigned int strikethrough : 1;
+ unsigned int reverse : 1;
+ unsigned int blink : 1;
+ unsigned int half : 1;
+ unsigned int bold : 1;
+ unsigned int invisible : 1;
+ unsigned int pad : 1;
+ } attr;
+};
+
+struct A
+{
+ struct C *data;
+ unsigned int len;
+};
+
+struct B
+{
+ struct A *cells;
+ unsigned char soft_wrapped : 1;
+};
+
+struct E
+{
+ long row, col;
+ struct C defaults;
+};
+
+__attribute__ ((noinline))
+void foo (struct E *screen, unsigned int c, int columns, struct B *row)
+{
+ struct D attr;
+ long col;
+ int i;
+ col = screen->col;
+ attr = screen->defaults.attr;
+ attr.columns = columns;
+ row->cells->data[col].c = c;
+ row->cells->data[col].attr = attr;
+ col++;
+ attr.fragment = 1;
+ for (i = 1; i < columns; i++)
+ {
+ row->cells->data[col].c = c;
+ row->cells->data[col].attr = attr;
+ col++;
+ }
+}
+
+int
+main (void)
+{
+ struct E e = {.row = 5,.col = 0,.defaults =
+ {6, {-1, -1, -1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0}} };
+ struct C c[4];
+ struct A a = { c, 4 };
+ struct B b = { &a, 1 };
+ struct D d;
+ __builtin_memset (&c, 0, sizeof c);
+ foo (&e, 65, 2, &b);
+ d = e.defaults.attr;
+ d.columns = 2;
+ if (__builtin_memcmp (&d, &c[0].attr, sizeof d))
+ __builtin_abort ();
+ d.fragment = 1;
+ if (__builtin_memcmp (&d, &c[1].attr, sizeof d))
+ __builtin_abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds.c b/gcc/testsuite/gcc.dg/Warray-bounds.c
index bbb5bea65e1..ac384e6bb2f 100644
--- a/gcc/testsuite/gcc.dg/Warray-bounds.c
+++ b/gcc/testsuite/gcc.dg/Warray-bounds.c
@@ -26,10 +26,10 @@ int* f(void) {
a[ 9] = 0;
a[10] = 0; /* { dg-warning "array subscript" } */
a[11] = 0; /* { dg-warning "array subscript" } */
- a[2 * n() - 11] = 0; /* { dg-warning "array subscript" } */
- a[2 * n() - 10] = 0;
- a[2 * n() - 1] = 0;
- a[2 * n() - 0] = 0; /* { dg-warning "array subscript" } */
+ a[2 * n() - 11] = 1; /* { dg-warning "array subscript" } */
+ a[2 * n() - 10] = 1;
+ a[2 * n() - 1] = 1;
+ a[2 * n() - 0] = 1; /* { dg-warning "array subscript" } */
b[-1] = 0; /* { dg-warning "array subscript" } */
b[ 0] = 0;
@@ -37,10 +37,10 @@ int* f(void) {
b[ 9] = 0;
b[10] = 0; /* { dg-warning "array subscript" } */
b[11] = 0; /* { dg-warning "array subscript" } */
- b[2 * n() - 11] = 0; /* { dg-warning "array subscript" } */
- b[2 * n() - 10] = 0;
- b[2 * n() - 1] = 0;
- b[2 * n() - 0] = 0; /* { dg-warning "array subscript" } */
+ b[2 * n() - 11] = 1; /* { dg-warning "array subscript" } */
+ b[2 * n() - 10] = 1;
+ b[2 * n() - 1] = 1;
+ b[2 * n() - 0] = 1; /* { dg-warning "array subscript" } */
c.c[-1] = 0; /* { dg-warning "array subscript" } */
c.c[ 0] = 0;
@@ -48,10 +48,10 @@ int* f(void) {
c.c[ 9] = 0;
c.c[10] = 0; /* { dg-warning "array subscript" } */
c.c[11] = 0; /* { dg-warning "array subscript" } */
- c.c[2 * n() - 11] = 0; /* { dg-warning "array subscript" } */
- c.c[2 * n() - 10] = 0;
- c.c[2 * n() - 1] = 0;
- c.c[2 * n() - 0] = 0; /* { dg-warning "array subscript" } */
+ c.c[2 * n() - 11] = 1; /* { dg-warning "array subscript" } */
+ c.c[2 * n() - 10] = 1;
+ c.c[2 * n() - 1] = 1;
+ c.c[2 * n() - 0] = 1; /* { dg-warning "array subscript" } */
g(&a[8]);
g(&a[9]);
diff --git a/gcc/testsuite/gcc.dg/asm-b.c b/gcc/testsuite/gcc.dg/asm-b.c
index ec9683925c4..beb35f28d8a 100644
--- a/gcc/testsuite/gcc.dg/asm-b.c
+++ b/gcc/testsuite/gcc.dg/asm-b.c
@@ -24,8 +24,8 @@ bar (void)
#if defined (__powerpc__) || defined (__PPC__) || defined (__ppc__) || defined (_POWER) || defined (__ppc64__)
__asm __volatile ("sthbrx %1,0,%2" : "=m" (*z) : "r" (y), "r" (z));
#elif defined __i386__ || defined __x86_64__
- __asm __volatile ("movb %b1,1(%2); movb %h1,(%2)" : "=m" (*z) : "r" (y), "r"
-(z));
+ __asm __volatile ("movb %b1,1(%2)\n\tmovb %h1,(%2)"
+ : "=m" (*z) : "Q" (y), "R" (z));
#endif
return (x & 1) == 0;
}
diff --git a/gcc/testsuite/gcc.dg/attr-noinline.c b/gcc/testsuite/gcc.dg/attr-noinline.c
index 9f7abcd07e8..7d57c0172c5 100644
--- a/gcc/testsuite/gcc.dg/attr-noinline.c
+++ b/gcc/testsuite/gcc.dg/attr-noinline.c
@@ -1,39 +1,41 @@
/* { dg-do compile } */
/* { dg-options "-O2 -finline-functions" } */
-static inline void __attribute__((__noinline__)) function_definition(void) {} /* { dg-warning "inline function \[^\n\]* given attribute noinline" "" } */
+extern int t();
+
+static inline void __attribute__((__noinline__)) function_definition(void) {t();} /* { dg-warning "inline function \[^\n\]* given attribute noinline" "" } */
static inline void __attribute__((__noinline__)) function_declaration_both_before(void); /* { dg-warning "inline function \[^\n\]* given attribute noinline" "" } */
-static void function_declaration_both_before(void) {}
+static void function_declaration_both_before(void) {t();}
static void function_declaration_both_after(void);
static inline void __attribute__((__noinline__)) function_declaration_both_after(void); /* { dg-warning "(inline function \[^\n\]* given attribute noinline|declared inline after its definition)" "" } */
-static void function_declaration_both_after(void) {}
+static void function_declaration_both_after(void) {t();}
static void function_declaration_noinline_before(void) __attribute__((__noinline__)); /* { dg-message "note: previous declaration" "" } */
-static inline void function_declaration_noinline_before(void) {} /* { dg-warning "follows declaration with attribute noinline" "" } */
+static inline void function_declaration_noinline_before(void) {t();} /* { dg-warning "follows declaration with attribute noinline" "" } */
-static inline void function_declaration_noinline_after(void) {} /* { dg-message "note: previous definition" "" } */
+static inline void function_declaration_noinline_after(void) {t();} /* { dg-message "note: previous definition" "" } */
static void function_declaration_noinline_after(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" "" } */
static inline void function_declaration_inline_before(void); /* { dg-message "note: previous declaration" "" } */
-static void __attribute__((__noinline__)) function_declaration_inline_before(void) {} /* { dg-warning "follows inline declaration" "" } */
+static void __attribute__((__noinline__)) function_declaration_inline_before(void) {t();} /* { dg-warning "follows inline declaration" "" } */
static inline void function_declaration_inline_noinline_before(void); /* { dg-message "note: previous declaration" "" } */
static void function_declaration_inline_noinline_before(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" "" } */
-static void function_declaration_inline_noinline_before(void) {}
+static void function_declaration_inline_noinline_before(void) {t();}
static inline void function_declaration_inline_noinline_after(void);
-static void function_declaration_inline_noinline_after(void) {} /* { dg-message "note: previous definition" "" } */
+static void function_declaration_inline_noinline_after(void) {t();} /* { dg-message "note: previous definition" "" } */
static void function_declaration_inline_noinline_after(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" "" } */
@@ -41,7 +43,7 @@ static void function_declaration_noinline_inline_before(void) __attribute__((__n
static inline void function_declaration_noinline_inline_before(void); /* { dg-warning "follows declaration with attribute noinline" "" } */
-static void function_declaration_noinline_inline_before(void) {}
+static void function_declaration_noinline_inline_before(void) {t();}
void f () {
function_definition ();
diff --git a/gcc/testsuite/gcc.dg/autopar/pr39500-1.c b/gcc/testsuite/gcc.dg/autopar/pr39500-1.c
new file mode 100644
index 00000000000..161f31da6a1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/autopar/pr39500-1.c
@@ -0,0 +1,28 @@
+/* pr39500: autopar fails to parallel */
+/* origin: nemokingdom@gmail.com(LiFeng) */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details" } */
+
+void abort (void);
+
+int main (void)
+{
+ int i;
+ int x[1000];
+
+ for (i = 0; i < 100; i++)
+ x[i] = x[i+100];
+
+ for (i = 0; i < 100; i++)
+ {
+ if (x[i] != x[i+100])
+ abort ();
+ }
+
+ return 0;
+}
+
+/* Check that the first loop in parloop got parallelized. */
+
+/* { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 1 "parloops" } } */
+/* { dg-final { cleanup-tree-dump "parloops" } } */
diff --git a/gcc/testsuite/gcc.dg/autopar/pr39500-2.c b/gcc/testsuite/gcc.dg/autopar/pr39500-2.c
new file mode 100644
index 00000000000..eabac3f88c6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/autopar/pr39500-2.c
@@ -0,0 +1,20 @@
+/* pr39500: autopar fails to parallel */
+/* origin: nemokingdom@gmail.com(LiFeng) */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details" } */
+
+int main (void)
+{
+ int i;
+ int x[1000];
+
+ for (i = 0; i < 101; i++)
+ x[i] = x[i+100];
+
+ return x[12];
+}
+
+/* This loop cannot be parallelized due to a dependence. */
+
+/* { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 0 "parloops" } } */
+/* { dg-final { cleanup-tree-dump "parloops" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-redefine.c b/gcc/testsuite/gcc.dg/builtin-redefine.c
index f94d3f3d83d..1d0f29da8da 100644
--- a/gcc/testsuite/gcc.dg/builtin-redefine.c
+++ b/gcc/testsuite/gcc.dg/builtin-redefine.c
@@ -28,7 +28,7 @@
#define __TIME__ "X" /* Re-define while defined. */
#define __TIME__ "Y" /* { dg-warning "\"__TIME__\" redefined" } */
-/* { dg-warning "previous definition" "" { target *-*-* } 28 } */
+/* { dg-message "previous definition" "" { target *-*-* } 28 } */
#undef __TIME__ /* Undefine while defined. */
@@ -39,7 +39,7 @@
#define __DATE__ "X" /* Re-define while defined. */
#define __DATE__ "Y" /* { dg-warning "\"__DATE__\" redefined" } */
-/* { dg-warning "previous definition" "" { target *-*-* } 39 } */
+/* { dg-message "previous definition" "" { target *-*-* } 39 } */
#undef __DATE__ /* Undefine while defined. */
@@ -48,7 +48,7 @@
#define __TIMESTAMP__ "X" /* Re-define while defined. */
#define __TIMESTAMP__ "Y" /* { dg-warning "\"__TIMESTAMP__\" redefined" } */
-/* { dg-warning "previous definition" "" { target *-*-* } 48 } */
+/* { dg-message "previous definition" "" { target *-*-* } 48 } */
#undef __TIMESTAMP__ /* Undefine while defined. */
diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-2.c b/gcc/testsuite/gcc.dg/c90-const-expr-2.c
index 1e868c4b1e3..662d8e790dc 100644
--- a/gcc/testsuite/gcc.dg/c90-const-expr-2.c
+++ b/gcc/testsuite/gcc.dg/c90-const-expr-2.c
@@ -39,5 +39,5 @@ foo (void)
ASSERT_NOT_NPC ((void *)(0, ZERO)); /* { dg-bogus "incompatible" "bogus null pointer constant" } */
ASSERT_NOT_NPC ((void *)(&"Foobar"[0] - &"Foobar"[0])); /* { dg-bogus "incompatible" "bogus null pointer constant" } */
/* This last one is a null pointer constant in C99 only. */
- ASSERT_NOT_NPC ((void *)(1 ? 0 : (0, 0))); /* { dg-bogus "incompatible" "bogus null pointer constant" } */
+ ASSERT_NOT_NPC ((void *)(1 ? ZERO : (0, ZERO))); /* { dg-bogus "incompatible" "bogus null pointer constant" } */
}
diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-6.c b/gcc/testsuite/gcc.dg/c90-const-expr-6.c
index bae3ca459cc..50de3a9525f 100644
--- a/gcc/testsuite/gcc.dg/c90-const-expr-6.c
+++ b/gcc/testsuite/gcc.dg/c90-const-expr-6.c
@@ -8,7 +8,7 @@
int n = 0, p[n * 0 + 1]; /* { dg-error "variabl|can't be evaluated" } */
/* PR 31871. */
-extern int c[1 + ((int) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
+extern int c[1 + ((__PTRDIFF_TYPE__) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
/* Implicit conversions from floating-point constants are not OK,
although explicit ones are. */
@@ -32,7 +32,7 @@ struct s {
};
enum e {
- E = (1 + ((int) (void *) 0)), /* { dg-error "constant" } */
+ E = (1 + ((__PTRDIFF_TYPE__) (void *) 0)), /* { dg-error "constant" } */
E2 = 0
};
@@ -44,7 +44,7 @@ enum f {
void
f (int a)
{
- int v[1 + ((int) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
+ int v[1 + ((__PTRDIFF_TYPE__) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
switch (a)
{
case (n * 0 + 1): /* { dg-error "constant" } */
diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-6.c b/gcc/testsuite/gcc.dg/c99-const-expr-6.c
index 0668baf44da..1a31ddc40c4 100644
--- a/gcc/testsuite/gcc.dg/c99-const-expr-6.c
+++ b/gcc/testsuite/gcc.dg/c99-const-expr-6.c
@@ -8,7 +8,7 @@
int n = 0, p[n * 0 + 1]; /* { dg-error "variabl" } */
/* PR 31871. */
-extern int c[1 + ((int) (void *) 0)]; /* { dg-error "variab" } */
+extern int c[1 + ((__PTRDIFF_TYPE__) (void *) 0)]; /* { dg-error "variab" } */
/* Implicit conversions from floating-point constants are not OK,
although explicit ones are. */
@@ -32,7 +32,7 @@ struct s {
};
enum e {
- E = (1 + ((int) (void *) 0)), /* { dg-error "constant" } */
+ E = (1 + ((__PTRDIFF_TYPE__) (void *) 0)), /* { dg-error "constant" } */
E2 = 0
};
diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp b/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp
index fe42528d56f..e541f6ed3ad 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp
+++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp
@@ -43,6 +43,7 @@ global compat_have_dfp
# Load procedures from common libraries.
load_lib standard.exp
load_lib gcc.exp
+load_lib target-libpath.exp
# Load the language-dependent compabibility support procedures.
load_lib c-compat.exp
@@ -90,20 +91,12 @@ set generator_src "$generator_src $srcdir/$subdir/generate-random.c"
set generator_src "$generator_src $srcdir/$subdir/generate-random_r.c"
set generator_cmd "-o $generator $skip_dfp $generator_src"
-# Temporarily unset GCC_EXEC_PREFIX from environment, as that might
-# confuse the $HOSTCC.
-set orig_gcc_exec_prefix_saved 0
-if [info exists env(GCC_EXEC_PREFIX)] {
- set orig_gcc_exec_prefix "$env(GCC_EXEC_PREFIX)"
- set orig_gcc_exec_prefix_saved 1
- unsetenv GCC_EXEC_PREFIX
-}
+# Temporarily switch to the environment for the host compiler.
+restore_ld_library_path_env_vars
set status [remote_exec build "$HOSTCC $HOSTCFLAGS $generator_cmd"]
set status [lindex $status 0]
-if { $orig_gcc_exec_prefix_saved } {
- set orig_gcc_exec_prefix_saved 0
- setenv GCC_EXEC_PREFIX "$orig_gcc_exec_prefix"
-}
+set_ld_library_path_env_vars
+
if { $status == 0 } then {
file delete -force $tstobjdir
file mkdir $tstobjdir
diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
index 2e2943dd513..f563c2774bd 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
@@ -44,6 +44,7 @@ along with GCC; see the file COPYING3. If not see
const char *dg_options[] = {
"/* { dg-options \"%s-I%s\" } */\n",
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
"/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
"/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* } } */\n",
@@ -789,6 +790,8 @@ switchfiles (int fields)
fprintf (outfile, "/* { dg-require-effective-target int32plus } */\n");
for (i = 0; i < NDG_OPTIONS; i++)
fprintf (outfile, dg_options[i], "", srcdir_safe);
+ fprintf (outfile, "/* { dg-prune-output \".*-Wno-abi.*\" } */\n");
+ fprintf (outfile, "/* { dg-prune-output \".*Offset of packed bit-field.*\" } */\n");
fprintf (outfile, "\
#include \"struct-layout-1.h\"\n\
\n\
diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_main.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_main.c
index 0a2fb42c792..b59453e0b10 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_main.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_main.c
@@ -1,3 +1,5 @@
+/* { dg-prune-output ".*-Wno-abi.*" } */
+
#include "struct-layout-1.h"
#define TX(n, type, attrs, fields, ops) extern void test##n (void);
diff --git a/gcc/testsuite/gcc.dg/cpp/Wvariadic-1.c b/gcc/testsuite/gcc.dg/cpp/Wvariadic-1.c
index 88e27932ef1..b034aacd2fc 100644
--- a/gcc/testsuite/gcc.dg/cpp/Wvariadic-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/Wvariadic-1.c
@@ -4,3 +4,4 @@
#define f(x,...) /* { dg-error "variadic" } */
#define g(x,y...) /* { dg-error "variadic" } */
int not_empty;
+/* { dg-message "warnings being treated as errors" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.dg/cpp/Wvariadic-3.c b/gcc/testsuite/gcc.dg/cpp/Wvariadic-3.c
index 056af8389d3..0317c3c6dff 100644
--- a/gcc/testsuite/gcc.dg/cpp/Wvariadic-3.c
+++ b/gcc/testsuite/gcc.dg/cpp/Wvariadic-3.c
@@ -4,3 +4,4 @@
#define f(x,...)
#define g(x,y...) /* { dg-error "variadic" } */
int not_empty;
+/* { dg-message "warnings being treated as errors" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.dg/cpp/redef2.c b/gcc/testsuite/gcc.dg/cpp/redef2.c
index b0068d91626..57fa3b1930b 100644
--- a/gcc/testsuite/gcc.dg/cpp/redef2.c
+++ b/gcc/testsuite/gcc.dg/cpp/redef2.c
@@ -23,9 +23,9 @@
{ dg-warning "redefined" "redef ro" { target *-*-* } 12 }
{ dg-warning "redefined" "redef va" { target *-*-* } 15 }
- { dg-warning "previous" "prev def mac" { target *-*-* } 6 }
- { dg-warning "previous" "prev def mac" { target *-*-* } 7 }
- { dg-warning "previous" "prev def mac" { target *-*-* } 8 }
- { dg-warning "previous" "prev def ro" { target *-*-* } 11 }
- { dg-warning "previous" "prev def va" { target *-*-* } 14 }
+ { dg-message "previous" "prev def mac" { target *-*-* } 6 }
+ { dg-message "previous" "prev def mac" { target *-*-* } 7 }
+ { dg-message "previous" "prev def mac" { target *-*-* } 8 }
+ { dg-message "previous" "prev def ro" { target *-*-* } 11 }
+ { dg-message "previous" "prev def va" { target *-*-* } 14 }
*/
diff --git a/gcc/testsuite/gcc.dg/cpp/redef3.c b/gcc/testsuite/gcc.dg/cpp/redef3.c
index 78ee71e6598..1c541a45bb1 100644
--- a/gcc/testsuite/gcc.dg/cpp/redef3.c
+++ b/gcc/testsuite/gcc.dg/cpp/redef3.c
@@ -15,7 +15,7 @@
{ dg-warning "redefined" "redef B" { target *-*-* } 9 }
{ dg-warning "redefined" "redef D" { target *-*-* } 11 }
{ dg-warning "redefined" "redef E" { target *-*-* } 12 }
- { dg-warning "previous" "prev def A" { target *-*-* } 6 }
- { dg-warning "previous" "prev def B" { target *-*-* } 8 }
- { dg-warning "previous" "prev def D/E" { target *-*-* } 0 }
+ { dg-message "previous" "prev def A" { target *-*-* } 6 }
+ { dg-message "previous" "prev def B" { target *-*-* } 8 }
+ { dg-message "previous" "prev def D/E" { target *-*-* } 0 }
*/
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/redef2.c b/gcc/testsuite/gcc.dg/cpp/trad/redef2.c
index 269a846266f..5fcd5eb32e8 100644
--- a/gcc/testsuite/gcc.dg/cpp/trad/redef2.c
+++ b/gcc/testsuite/gcc.dg/cpp/trad/redef2.c
@@ -2,31 +2,31 @@
/* { dg-do preprocess } */
-#define foo bar /* { dg-warning "previous def" "foo prev def" } */
+#define foo bar /* { dg-message "previous def" "foo prev def" } */
#define foo barr /* { dg-warning "redefined" "foo redefined" } */
#undef foo
-#define foo bar /* { dg-warning "previous def" "foo prev def 2" } */
+#define foo bar /* { dg-message "previous def" "foo prev def 2" } */
#define foo() bar /* { dg-warning "redefined" "foo redefined 2" } */
#undef foo
-#define foo() bar /* { dg-warning "previous def" "foo prev def" } */
+#define foo() bar /* { dg-message "previous def" "foo prev def" } */
#define foo() barr /* { dg-warning "redefined" "foo redefined" } */
-#define quux(thud) a thud b /* { dg-warning "previous def" "quux prev def" } */
+#define quux(thud) a thud b /* { dg-message "previous def" "quux prev def" } */
#define quux(thu) a thud b /* { dg-warning "redefined" "quux redefined" } */
-#define bar(x, y) x+y /* { dg-warning "previous def" "bar prev def" } */
+#define bar(x, y) x+y /* { dg-message "previous def" "bar prev def" } */
#define bar(x, y) x+x /* { dg-warning "redefined" "bar redefined" } */
-#define bat(x, y) x+y /* { dg-warning "previous def" "bat prev def" } */
+#define bat(x, y) x+y /* { dg-message "previous def" "bat prev def" } */
#define bat(x, y) x+ y /* { dg-warning "redefined" "bat redefined" } */
-#define baz(x, y) x+y /* { dg-warning "previous def" "baz prev def" } */
+#define baz(x, y) x+y /* { dg-message "previous def" "baz prev def" } */
#define baz(x, y) x +y /* { dg-warning "redefined" "baz redefined" } */
-#define f(x, y) "x y" /* { dg-warning "previous def" "f prev def" } */
+#define f(x, y) "x y" /* { dg-message "previous def" "f prev def" } */
#define f(x, y) "x y" /* { dg-warning "redefined" "f redefined" } */
-#define g(x, y) 'x' /* { dg-warning "previous def" "g prev def" } */
+#define g(x, y) 'x' /* { dg-message "previous def" "g prev def" } */
#define g(x, y) ' x' /* { dg-warning "redefined" "g redefined" } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
new file mode 100644
index 00000000000..11c8fad7841
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -gdwarf-2 -dA" } */
+void e(int);
+__attribute__ ((always_inline)) inline int
+t(int function_parameter)
+{
+ e(function_parameter);
+}
+
+void test (int function_parameter2)
+{
+ t(function_parameter2);
+}
+
+/* Verify that we get both function_parameter and function_parameter2 declared
+ in test. Overall we should have 3 variables with location defined (also
+ function_parameter in offline copy of t. */
+/* { dg-final { scan-assembler-times " DW_AT_location" 3 } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
new file mode 100644
index 00000000000..7442dab19f9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -gdwarf-2 -dA" } */
+void q(int p);
+static void
+t(int constant_propagated_par)
+{
+ int local_var = constant_propagated_par + 1;
+ q(local_var);
+ q(local_var);
+ q(local_var);
+ q(local_var);
+ q(local_var);
+ q(local_var);
+ q(local_var);
+ q(local_var);
+ q(local_var);
+ q(local_var);
+ q(local_var);
+}
+main()
+{
+ t(5);
+ t(5);
+ t(5);
+ t(5);
+ t(5);
+ t(5);
+ t(5);
+}
+/* { dg-final { scan-assembler "local_var" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/static1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/static1.c
new file mode 100644
index 00000000000..b9b5d0b3743
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/static1.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -gdwarf-2" } */
+void
+main(void)
+{
+ static int unused_local_var;
+}
+/* { dg-final { scan-assembler "unused_local_var" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/pr39412.c b/gcc/testsuite/gcc.dg/debug/pr39412.c
new file mode 100644
index 00000000000..71b7b5e21a9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/pr39412.c
@@ -0,0 +1,16 @@
+/* PR debug/39412 */
+/* { dg-do compile } */
+
+struct S { int i; };
+
+inline void
+bar (const void *x, unsigned long y)
+{
+ const union { struct S a[y]; } *u = x;
+}
+
+void
+foo (const void *x, unsigned long y)
+{
+ bar (x, y);
+}
diff --git a/gcc/testsuite/gcc.dg/fltconst-1.c b/gcc/testsuite/gcc.dg/fltconst-1.c
index 4b87857cd3e..e8ecf6750a3 100644
--- a/gcc/testsuite/gcc.dg/fltconst-1.c
+++ b/gcc/testsuite/gcc.dg/fltconst-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
+/* { dg-options "-std=gnu99 -fshow-column" } */
double a = 1.ld; /* { dg-error "12:invalid suffix" } */
double b = 1.fd; /* { dg-error "12:invalid suffix" } */
diff --git a/gcc/testsuite/gcc.dg/format/plus-1.c b/gcc/testsuite/gcc.dg/format/plus-1.c
index 02a213d417d..0d8b62cd3c5 100644
--- a/gcc/testsuite/gcc.dg/format/plus-1.c
+++ b/gcc/testsuite/gcc.dg/format/plus-1.c
@@ -15,6 +15,9 @@ foo (int i)
printf (3 + "%d\n"); /* { dg-warning "zero-length" "zero-length string" } */
printf ("%d\n" + i, i); /* { dg-warning "not a string" "non-constant addend" } */
printf ("%d\n" + 10); /* { dg-warning "not a string" "too large addend" } */
+ /* { dg-warning "offset '10' outside bounds of constant string" "offset" { target *-*-* } 17 } */
printf ("%d\n" - 1, i); /* { dg-warning "not a string" "minus constant" } */
+ /* { dg-warning "offset '-1' outside bounds of constant string" "offset" { target *-*-* } 19 } */
printf ("%d\n" + -1, i); /* { dg-warning "not a string" "negative addend" } */
+ /* { dg-warning "offset '-1' outside bounds of constant string" "offset" { target *-*-* } 21 } */
}
diff --git a/gcc/testsuite/gcc.dg/gomp/pr39495-1.c b/gcc/testsuite/gcc.dg/gomp/pr39495-1.c
new file mode 100644
index 00000000000..cc165ca52db
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr39495-1.c
@@ -0,0 +1,95 @@
+/* PR c/39495 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+#define INT_MIN (-__INT_MAX__ - 1)
+#define INT_MAX __INT_MAX__
+#define UINT_MAX (2U * __INT_MAX__ + 1)
+
+int
+foo (void)
+{
+ int i;
+ unsigned int u;
+
+#pragma omp for
+ for (i = INT_MIN + 6; i > INT_MIN + 1; i--)
+ ;
+#pragma omp for
+ for (i = INT_MIN + 6; i >= INT_MIN + 1; i--)
+ ;
+#pragma omp for
+ for (i = INT_MIN + 6; i > INT_MIN; i--)
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i < INT_MAX - 1; i++)
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i <= INT_MAX - 1; i++)
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i < INT_MAX; i++)
+ ;
+#pragma omp for
+ for (u = 6; u > 1; u--)
+ ;
+#pragma omp for
+ for (u = 6; u >= 1; u--)
+ ;
+#pragma omp for
+ for (u = 6; u > 0; u--)
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u < UINT_MAX - 1; u++)
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u <= UINT_MAX - 1; u++)
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u < UINT_MAX; u++)
+ ;
+}
+
+int
+bar (void)
+{
+ int i;
+ unsigned int u;
+
+#pragma omp for
+ for (i = INT_MIN + 6; i > INT_MIN + 1; i -= 2)
+ ;
+#pragma omp for
+ for (i = INT_MIN + 6; i >= INT_MIN + 1; i -= 2)
+ ;
+#pragma omp for
+ for (i = INT_MIN + 6; i > INT_MIN; i -= 2)
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i < INT_MAX - 1; i += 2)
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i <= INT_MAX - 1; i += 2)
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i < INT_MAX; i += 2)
+ ;
+#pragma omp for
+ for (u = 6; u > 1; u -= 2)
+ ;
+#pragma omp for
+ for (u = 6; u >= 1; u -= 2)
+ ;
+#pragma omp for
+ for (u = 6; u > 0; u -= 2)
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u < UINT_MAX - 1; u += 2)
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u <= UINT_MAX - 1; u += 2)
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u < UINT_MAX; u += 2)
+ ;
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/pr39495-2.c b/gcc/testsuite/gcc.dg/gomp/pr39495-2.c
new file mode 100644
index 00000000000..a276c24ed98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr39495-2.c
@@ -0,0 +1,39 @@
+/* PR c/39495 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+#define INT_MIN (-__INT_MAX__ - 1)
+#define INT_MAX __INT_MAX__
+#define UINT_MAX (2U * __INT_MAX__ + 1)
+
+int
+foo (void)
+{
+ int i;
+ unsigned int u;
+
+#pragma omp for
+ for (i = INT_MIN + 6; i != INT_MIN; i--) /* { dg-error "invalid controlling predicate" } */
+ ;
+#pragma omp for
+ for (i = INT_MIN + 6; i == INT_MIN; i--) /* { dg-error "invalid controlling predicate" } */
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i != INT_MAX; i++) /* { dg-error "invalid controlling predicate" } */
+ ;
+#pragma omp for
+ for (i = INT_MAX - 6; i == INT_MAX; i++) /* { dg-error "invalid controlling predicate" } */
+ ;
+#pragma omp for
+ for (u = 6; u != 0; u--) /* { dg-error "invalid controlling predicate" } */
+ ;
+#pragma omp for
+ for (u = 6; u == 0; u--) /* { dg-error "invalid controlling predicate" } */
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u != UINT_MAX; u++) /* { dg-error "invalid controlling predicate" } */
+ ;
+#pragma omp for
+ for (u = UINT_MAX - 6; u == UINT_MAX; u++) /* { dg-error "invalid controlling predicate" } */
+ ;
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr39335.c b/gcc/testsuite/gcc.dg/graphite/pr39335.c
new file mode 100644
index 00000000000..c86e03ab73a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr39335.c
@@ -0,0 +1,20 @@
+/* { dg-options "-O2 -floop-interchange" } */
+
+typedef unsigned char byte;
+typedef struct gx_device_s gx_device;
+typedef struct gs_devn_params_s gs_devn_params;
+typedef struct gs_devn_params_s {
+ struct compressed_color_list_s * compressed_color_list;
+} gs_devn_params_t;
+int devn_unpack_row(gx_device * dev, int num_comp,
+ gs_devn_params * pdevn_params, int width, byte * in,
+ byte * out)
+{
+ int i, comp_num, pixel_num;
+ if (pdevn_params->compressed_color_list == ((void *)0))
+ {
+ for (pixel_num = 0; pixel_num < width; pixel_num++)
+ for (i = 0; i < num_comp; i++)
+ *out++ = *in++;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr39335_1.c b/gcc/testsuite/gcc.dg/graphite/pr39335_1.c
new file mode 100644
index 00000000000..257c2c99436
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr39335_1.c
@@ -0,0 +1,9 @@
+/* { dg-options "-O2 -floop-interchange" } */
+
+void crash_me(int num1, int num2, char * in, char * out)
+{
+ int i, j;
+ for (j = 0; j < num1; j++)
+ for (i = 0; i < num2; i++)
+ *out++ = *in++;
+}
diff --git a/gcc/testsuite/gcc.dg/inline-33.c b/gcc/testsuite/gcc.dg/inline-33.c
new file mode 100644
index 00000000000..ac577e3cb88
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/inline-33.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+/* { dg-options "-O3 -fdump-tree-optimized -fpie" { target { ! nonpic } } } */
+
+int i;
+
+int foo ();
+
+main ()
+{
+ return foo (i);
+}
+
+int foo (i)
+ int i;
+{
+ return bar(i);
+}
+
+/* { dg-final { scan-tree-dump-times "bar" 2 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-3.c b/gcc/testsuite/gcc.dg/ipa/ipa-3.c
index c476b925050..6eb3da40a6f 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-3.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-3.c
@@ -6,8 +6,10 @@
/* Double constants. */
#include <stdio.h>
+void t(void);
int g (double b, double c)
{
+ t();
return (int)(b+c);
}
int f (double a)
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-5.c b/gcc/testsuite/gcc.dg/ipa/ipa-5.c
index 9352e19ab65..9e8006a2fef 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-5.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-5.c
@@ -5,12 +5,15 @@
/* Float & short constants. */
#include <stdio.h>
+void t(void);
int g (float b, short c)
{
+ t();
return c + (int)b;
}
int f (float a)
{
+ t();
/* a is modified. */
if (a++ > 0)
g (a, 3);
diff --git a/gcc/testsuite/gcc.dg/ipa/ipacost-1.c b/gcc/testsuite/gcc.dg/ipa/ipacost-1.c
index ac013a72350..1c75c6cfde5 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipacost-1.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipacost-1.c
@@ -53,6 +53,7 @@ main()
/* { dg-final { scan-ipa-dump-times "versioned function i_can_be_propagated_fully " 1 "cp" } } */
/* { dg-final { scan-ipa-dump-not "versioned function i_can_not_be_propagated_fully2" "cp" } } */
/* { dg-final { scan-ipa-dump-not "versioned function i_can_not_be_propagated_fully " "cp" } } */
-/* { dg-final { scan-tree-dump-not "i_can_be_propagated" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "i_can_be_propagated_fully " "optimized" } } */
+/* { dg-final { scan-tree-dump-not "i_can_be_propagated_fully2 " "optimized" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/memmove-2.c b/gcc/testsuite/gcc.dg/memmove-2.c
new file mode 100644
index 00000000000..9c691ef01c3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/memmove-2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-times "memmove" 0 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
+char a[40];
+extern void bar (char *);
+
+void
+foo (void)
+{
+ char b[10];
+ __builtin_memmove (&a[0], &a[20], 20);
+ __builtin_memmove (&b[1], &a[25], 9);
+ bar (b);
+}
diff --git a/gcc/testsuite/gcc.dg/memmove-3.c b/gcc/testsuite/gcc.dg/memmove-3.c
new file mode 100644
index 00000000000..98493b3d42c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/memmove-3.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-times "memmove" 3 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
+char a[40];
+struct A { char a[30]; };
+
+void
+foo (struct A *p, char *q, char *r)
+{
+ char b[10];
+ __builtin_memmove (&a[1], &a[19], 20);
+ __builtin_memmove (&p->a[1], &p->a[9], 10);
+ __builtin_memmove (q, r, 9);
+}
diff --git a/gcc/testsuite/gcc.dg/noncompile/920507-1.c b/gcc/testsuite/gcc.dg/noncompile/920507-1.c
index c1a3523008c..7024a5b03a0 100644
--- a/gcc/testsuite/gcc.dg/noncompile/920507-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/920507-1.c
@@ -3,5 +3,5 @@ x(void)
{
register int *a asm("unknown_register"); /* { dg-error "invalid register" } */
int *v[1] = {a};
- return v[1];
+ return v[0];
}
diff --git a/gcc/testsuite/gcc.dg/pr11492.c b/gcc/testsuite/gcc.dg/pr11492.c
index 4a8b617617f..86630995344 100644
--- a/gcc/testsuite/gcc.dg/pr11492.c
+++ b/gcc/testsuite/gcc.dg/pr11492.c
@@ -5,7 +5,7 @@ int main( void )
{
unsigned int a;
unsigned char b;
- for ( a = 0, b = 2; a > b * 1000; a++ ) /* { dg-bogus "comparison between signed and unsigned integer" "" { xfail { ! int32plus } } } */
+ for ( a = 0, b = 2; a > b * 100; a++ ) /* { dg-bogus "comparison between signed and unsigned integer" "" } */
{ ; }
return 0;
diff --git a/gcc/testsuite/gcc.dg/pr27898.c b/gcc/testsuite/gcc.dg/pr27898.c
new file mode 100644
index 00000000000..bb7cce17550
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr27898.c
@@ -0,0 +1,8 @@
+/* PR c/27898 */
+/* { dg-do compile } */
+/* { dg-options "--combine" } */
+/* { dg-additional-sources "pr27898.c" } */
+
+union u { struct { int i; }; };
+
+extern int foo (union u *);
diff --git a/gcc/testsuite/gcc.dg/pr33826.c b/gcc/testsuite/gcc.dg/pr33826.c
index 3e08b14fa97..c091bbcdb10 100644
--- a/gcc/testsuite/gcc.dg/pr33826.c
+++ b/gcc/testsuite/gcc.dg/pr33826.c
@@ -3,7 +3,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target nonpic } */
-/* { dg-options "-O1 -fdump-ipa-pure-const" } */
+/* { dg-options "-O1 -fdump-tree-local-pure-const1 -fdump-ipa-pure-const" } */
int recurese1 (int i)
{
@@ -30,8 +30,14 @@ int norecurse1b (int i)
return i+1;
}
-/* { dg-final { scan-ipa-dump "found to be const: norecurse1a" "pure-const" } } */
-/* { dg-final { scan-ipa-dump "found to be const: norecurse1b" "pure-const" } } */
+/* { dg-final { scan-tree-dump "found to be const: norecurse1a" "local-pure-const1" } } */
+/* { dg-final { scan-tree-dump "found to be const: norecurse1b" "local-pure-const1" } } */
+/* { dg-final { scan-tree-dump-not "found to be pure: recurse1" "local-pure-const1" } } */
+/* { dg-final { scan-tree-dump-not "found to be pure: recurse2a" "local-pure-const1" } } */
+/* { dg-final { scan-tree-dump-not "found to be pure: recurse2b" "local-pure-const1" } } */
+/* { dg-final { scan-tree-dump-not "found to be const: recurse1" "local-pure-const1" } } */
+/* { dg-final { scan-tree-dump-not "found to be const: recurse2a" "local-pure-const1" } } */
+/* { dg-final { scan-tree-dump-not "found to be const: recurse2b" "local-pure-const1" } } */
/* { dg-final { scan-ipa-dump-not "found to be pure: recurse1" "pure-const" } } */
/* { dg-final { scan-ipa-dump-not "found to be pure: recurse2a" "pure-const" } } */
/* { dg-final { scan-ipa-dump-not "found to be pure: recurse2b" "pure-const" } } */
@@ -39,3 +45,4 @@ int norecurse1b (int i)
/* { dg-final { scan-ipa-dump-not "found to be const: recurse2a" "pure-const" } } */
/* { dg-final { scan-ipa-dump-not "found to be const: recurse2b" "pure-const" } } */
/* { dg-final { cleanup-ipa-dump "pure-const" } } */
+/* { dg-final { cleanup-tree-dump "local-pure-const1" } } */
diff --git a/gcc/testsuite/gcc.dg/pr35652.c b/gcc/testsuite/gcc.dg/pr35652.c
new file mode 100644
index 00000000000..50ec3acf10a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr35652.c
@@ -0,0 +1,13 @@
+/* PR c++/35652: wrong location and duplicated warning.
+ { dg-do compile }
+ { dg-options "" } */
+int bar()
+{
+ const char *s = 'z' + "y"; /* { dg-warning "offset '122' outside bounds of constant string" } */
+}
+
+int g()
+{
+ char str[2];
+ const char *p = str + sizeof(str);
+}
diff --git a/gcc/testsuite/gcc.dg/pr39323-1.c b/gcc/testsuite/gcc.dg/pr39323-1.c
new file mode 100644
index 00000000000..2876bf39aba
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39323-1.c
@@ -0,0 +1,5 @@
+/* PR c/39323 */
+/* { dg-do compile { target *-*-linux* } } */
+
+int foo __attribute__ ((aligned(1 << 29))) = 20; /* { dg-error "requested alignment is too large" } */
+typedef int __attribute__ ((aligned(1 << 29))) int29; /* { dg-error "requested alignment is too large" } */
diff --git a/gcc/testsuite/gcc.dg/pr39323-2.c b/gcc/testsuite/gcc.dg/pr39323-2.c
new file mode 100644
index 00000000000..2eaa6e96e73
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39323-2.c
@@ -0,0 +1,6 @@
+/* PR c/39323 */
+/* { dg-do compile { target *-*-linux* } } */
+
+int bar __attribute__ ((aligned(1 << 28))) = 20;
+
+/* { dg-final { scan-assembler "\.align\[\\t \]*268435456" } } */
diff --git a/gcc/testsuite/gcc.dg/pr39323-3.c b/gcc/testsuite/gcc.dg/pr39323-3.c
new file mode 100644
index 00000000000..cbfed9dbcef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39323-3.c
@@ -0,0 +1,7 @@
+/* PR c/39323 */
+/* { dg-do compile { target *-*-linux* } } */
+
+typedef int __attribute__ ((aligned(1 << 28))) int28;
+int28 foo = 20;
+
+/* { dg-final { scan-assembler "\.align\[\\t \]*268435456" } } */
diff --git a/gcc/testsuite/gcc.dg/pr39343.c b/gcc/testsuite/gcc.dg/pr39343.c
new file mode 100644
index 00000000000..70df59ef098
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39343.c
@@ -0,0 +1,29 @@
+/* PR tree-optimization/39343 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+extern inline __attribute__ ((__always_inline__)) int
+foo (char *dest)
+{
+ return __builtin_object_size (dest, 1);
+}
+
+struct S
+{
+ union
+ {
+ struct { int a, b; char c, d; } f;
+ struct { struct { int a, b; char c, d[255]; } e; } g;
+ } u;
+};
+
+int
+main (void)
+{
+ struct S s;
+ if (foo (s.u.g.e.d) != 255)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr39443.c b/gcc/testsuite/gcc.dg/pr39443.c
new file mode 100644
index 00000000000..1baa63a9985
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39443.c
@@ -0,0 +1,18 @@
+/* PR middle-end/39443 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not "memcmp" } } */
+
+typedef __SIZE_TYPE__ size_t;
+
+extern int memcmp (const void *s1, const void *s2, size_t n)
+ __attribute__ ((__nothrow__, __pure__));
+extern __typeof (memcmp) memcmp __asm__ ("memory_compare");
+
+int
+test (char *s, char *t, int cnt)
+{
+ if (__builtin_expect (cnt, 0))
+ return memcmp (s, t, cnt);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr39455.c b/gcc/testsuite/gcc.dg/pr39455.c
new file mode 100644
index 00000000000..8e8c67034f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39455.c
@@ -0,0 +1,13 @@
+/* PR tree-optimization/39455 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fprefetch-loop-arrays -w" } */
+
+void
+foo (char *x, unsigned long y, unsigned char *z)
+{
+ unsigned int c[256], *d;
+
+ for (d = c + 1; d < c + 256; ++d)
+ *d += d[-1];
+ x[--c[z[y]]] = 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c b/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c
index 4d7de84cbb5..740206153bd 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c
@@ -53,7 +53,6 @@ void test(double d1, double d2, float f1, float f2,
if (LOG(BASE) != 1.0 || LOG##f(BASE##F) != 1.0F || LOG##l(BASE##L) != 1.0L) \
link_failure_##LOG##_N()
- LOG_N(log, M_E);
LOG_N(log2, 2.0);
LOG_N(log10, 10.0);
@@ -74,7 +73,6 @@ void test(double d1, double d2, float f1, float f2,
if (LOG(EXP(d1)) != d1*LOG(BASE) || LOG##f(EXP##f(f1)) != f1*LOG##f(BASE##F) \
|| LOG##l(EXP##l(ld1)) != ld1*LOG##l(BASE##L)) link_failure_##LOG##_##EXP()
- LOGEXP(log,exp,M_E);
LOGEXP(log,exp2,2.0);
LOGEXP(log,exp10,10.0);
LOGEXP(log,pow10,10.0);
diff --git a/gcc/testsuite/gcc.dg/torture/pta-callused-1.c b/gcc/testsuite/gcc.dg/torture/pta-callused-1.c
new file mode 100644
index 00000000000..dfe994b7a84
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pta-callused-1.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-fdump-tree-alias" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
+
+volatile int i;
+int ** __attribute__((noinline,pure)) foo(int **p) { i; return p; }
+int bar(void)
+{
+ int i = 0, j = 1;
+ int *p, **q;
+ p = &i;
+ q = foo(&p);
+ *q = &j;
+ return *p;
+}
+extern void abort (void);
+int main()
+{
+ if (bar() != 1)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "p.._., name memory tag: NMT..., is dereferenced, points-to vars: { i j }" "alias" } } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c
new file mode 100644
index 00000000000..eaaa6dd4e24
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-forwprop1" } */
+
+int f(int *p, int n)
+{
+ int (*a)[n] = (int (*)[n])p;
+ int *q = &(*a)[0];
+ return q[1];
+}
+
+int g(int *p, int n)
+{
+ int (*a)[n] = (int (*)[n])p;
+ int *q = &(*a)[2];
+ return q[-1];
+}
+
+/* { dg-final { scan-tree-dump-times "= \\\(\\\*a_..\\\)\\\[1\\\];" 2 "forwprop1" } } */
+/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-24.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-24.c
new file mode 100644
index 00000000000..84f69e9d3bd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-24.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-ccp1" } */
+
+static const int x;
+int foo()
+{
+ const int *p = &x;
+ int y = *p;
+ return y + 1;
+}
+
+static const int x2[3] = { 1, 0, 2 };
+int bar()
+{
+ int i = 1;
+ const int *p = &x2[i];
+ int y = *p;
+ return y + 1;
+}
+
+/* { dg-final { scan-tree-dump-times "return 1;" 2 "ccp1" } } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-11.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-11.c
index bd66bc2a78e..6e13e187501 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-11.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-11.c
@@ -6,13 +6,13 @@ void foo(int *p)
{
while (1)
{
- *p = 0;
+ *p = 1;
*p = 0;
}
}
void bar(int *p)
{
- *p = 0;
+ *p = 1;
*p = 0;
abort ();
}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-21.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-21.c
new file mode 100644
index 00000000000..aadf32e21bd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-21.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-fre" } */
+
+struct f {
+ float a;
+ float b;
+ float c;
+ float d;
+};
+
+struct f a;
+
+void h(float, float, float, float);
+
+void g(void)
+{
+ float a1 = a.a, b = a.b, c = a.c, d = a.d;
+ a.a = a1;
+ a.b = b;
+ a.c = c;
+ a.d = d;
+ h(a1, b, c, d);
+}
+
+/* { dg-final { scan-tree-dump-not "a\\\.? = " "fre" } } */
+/* { dg-final { cleanup-tree-dump "fre" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-22.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-22.c
new file mode 100644
index 00000000000..ce311b68b9e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-22.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-fre" } */
+
+int i;
+int foo (void)
+{
+ int j;
+ i = j;
+ return i;
+}
+
+/* We should eliminate the redundant load of i. */
+
+/* { dg-final { scan-tree-dump-not "= i;" "fre" } } */
+/* { dg-final { cleanup-tree-dump "fre" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-7.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-7.c
new file mode 100644
index 00000000000..fd202509217
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-7.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+int test1 (int i, int j)
+{
+ if (i >= j)
+ if (i != j)
+ return 0;
+ return -1;
+}
+
+/* The above should be optimized to a i > j test by ifcombine. */
+
+/* { dg-final { scan-tree-dump " > " "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c b/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c
index 3aac4c90005..4969a31e0ab 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76b.c
@@ -11,12 +11,12 @@
more involved than just an ssa_name. */
int ib[N+OFF] __attribute__ ((__aligned__(16))) = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10, 0, 1, 3, 5, 7, 11, 13, 17};
+int ic[N+OFF] = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10, 0, 1, 3, 5, 7, 11, 13, 17};
int main1 (int *pib)
{
int i;
int ia[N+OFF];
- int ic[N+OFF] = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10, 0, 1, 3, 5, 7, 11, 13, 17};
for (i = OFF; i < N; i++)
{
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76c.c b/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76c.c
index f6127ba873b..573d8aacdd4 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76c.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/spu/costmodel-vect-76c.c
@@ -11,12 +11,12 @@
more involved than just an ssa_name. */
int ib[N+OFF] __attribute__ ((__aligned__(16))) = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10};
+int ic[N+OFF] = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10};
int main1 (int *pib)
{
int i;
int ia[N+OFF];
- int ic[N+OFF] = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10};
for (i = OFF; i < N; i++)
{
diff --git a/gcc/testsuite/gcc.dg/vect/pr32230.c b/gcc/testsuite/gcc.dg/vect/pr32230.c
index ed1e7b14614..bdb290ab4ec 100644
--- a/gcc/testsuite/gcc.dg/vect/pr32230.c
+++ b/gcc/testsuite/gcc.dg/vect/pr32230.c
@@ -16,7 +16,7 @@ const_f (filter_buffer_t *buf)
int i;
for (i = 0; i < 10; i++)
- ((float*) (&((sbuf_header_t *) ((buf) == (filter_buffer_t *)&(buf)->buf[0]))->buf[0]))[i] = val;
+ ((float*) (&((sbuf_header_t *) (__PTRDIFF_TYPE__)((buf) == (filter_buffer_t *)&(buf)->buf[0]))->buf[0]))[i] = val;
}
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr39529.c b/gcc/testsuite/gcc.dg/vect/pr39529.c
new file mode 100644
index 00000000000..4853c13503f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr39529.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+void
+foo (void)
+{
+ char a[1024];
+ char *p = &a[0];
+ char *p2;
+
+ p2 = p + 1024;
+ do
+ {
+ p += 2;
+ *(p-2) = 1;
+ *(p-1) = 1;
+ } while (p < p2);
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
+
diff --git a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-s16.c b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-s16.c
index b4ed282d0aa..32853d73a15 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-s16.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-s16.c
@@ -5,8 +5,9 @@
#define N 64
-short X[N] __attribute__ ((__aligned__(16)));
-short Y[N] __attribute__ ((__aligned__(16)));
+short X[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63};
+short Y[N] __attribute__ ((__aligned__(16))) = {64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1};
+
int result[N];
/* short->int widening-mult */
@@ -26,11 +27,6 @@ int main (void)
check_vect ();
- for (i=0; i<N; i++) {
- X[i] = i;
- Y[i] = 64-i;
- }
-
foo1 (N);
for (i=0; i<N; i++) {
diff --git a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-u8.c b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-u8.c
index 16bf5781684..2f80ea085b6 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-u8.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-u8.c
@@ -5,8 +5,9 @@
#define N 64
-unsigned char X[N] __attribute__ ((__aligned__(16)));
-unsigned char Y[N] __attribute__ ((__aligned__(16)));
+unsigned char X[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63};
+unsigned char Y[N] __attribute__ ((__aligned__(16))) = {64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1};
+
unsigned short result[N];
/* char->short widening-mult */
@@ -26,13 +27,6 @@ int main (void)
check_vect ();
- for (i=0; i<N; i++) {
- X[i] = i;
- Y[i] = 64-i;
- if (i % 5)
- X[i] = i;
- }
-
foo1 (N);
for (i=0; i<N; i++) {
diff --git a/gcc/testsuite/gcc.dg/vect/vect-35.c b/gcc/testsuite/gcc.dg/vect/vect-35.c
index d75308f22fe..c6c3bf33860 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-35.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-35.c
@@ -17,9 +17,7 @@ int main1 ()
/* Initialization. */
for (i = 0; i < N; i++)
{
- s.b[i] = 3*i;
- if (i%3 == 0)
- s.b[i] = 3*i;
+ s.b[i] = i;
}
/* Dependence analysis fails cause s.a and s.b may overlap.
@@ -32,7 +30,7 @@ int main1 ()
/* check results: */
for (i = 0; i < N; i++)
{
- if (s.a[i] != 3*i + 1)
+ if (s.a[i] != i + 1)
abort ();
}
@@ -47,6 +45,6 @@ int main (void)
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "can't determine dependence between" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-82.c b/gcc/testsuite/gcc.dg/vect/vect-82.c
index e962f8f61fe..7fbaa92163d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-82.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-82.c
@@ -1,5 +1,4 @@
-/* { dg-do run { target powerpc*-*-* } } */
-/* { dg-require-effective-target vect_int } */
+/* { dg-skip-if "powerpc and integer vectorization only" { ! { powerpc*-*-* && vect_int } } { "*" } { "" } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-83.c b/gcc/testsuite/gcc.dg/vect/vect-83.c
index 4cebd7f1b8a..c031db9df63 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-83.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-83.c
@@ -1,5 +1,4 @@
-/* { dg-do run { target powerpc*-*-* } } */
-/* { dg-require-effective-target vect_int } */
+/* { dg-skip-if "powerpc and integer vectorization only" { ! { powerpc*-*-* && vect_int } } { "*" } { "" } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-complex-1.c b/gcc/testsuite/gcc.dg/vect/vect-complex-1.c
index 9be88644b63..e2d0adcf9fb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-complex-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-complex-1.c
@@ -6,19 +6,19 @@
#define N 16
-_Complex float a[N] =
+_Complex float a[N] __attribute__ ((__aligned__(16))) =
{ 10.0F + 20.0iF, 11.0F + 21.0iF, 12.0F + 22.0iF, 13.0F + 23.0iF,
14.0F + 24.0iF, 15.0F + 25.0iF, 16.0F + 26.0iF, 17.0F + 27.0iF,
18.0F + 28.0iF, 19.0F + 29.0iF, 20.0F + 30.0iF, 21.0F + 31.0iF,
22.0F + 32.0iF, 23.0F + 33.0iF, 24.0F + 34.0iF, 25.0F + 35.0iF };
-_Complex float b[N] =
+_Complex float b[N] __attribute__ ((__aligned__(16))) =
{ 30.0F + 40.0iF, 31.0F + 41.0iF, 32.0F + 42.0iF, 33.0F + 43.0iF,
34.0F + 44.0iF, 35.0F + 45.0iF, 36.0F + 46.0iF, 37.0F + 47.0iF,
38.0F + 48.0iF, 39.0F + 49.0iF, 40.0F + 50.0iF, 41.0F + 51.0iF,
42.0F + 52.0iF, 43.0F + 53.0iF, 44.0F + 54.0iF, 45.0F + 55.0iF };
-_Complex float c[N];
-_Complex float res[N] =
+_Complex float c[N] __attribute__ ((__aligned__(16)));
+_Complex float res[N] __attribute__ ((__aligned__(16))) =
{ 40.0F + 60.0iF, 42.0F + 62.0iF, 44.0F + 64.0iF, 46.0F + 66.0iF,
48.0F + 68.0iF, 50.0F + 70.0iF, 52.0F + 72.0iF, 54.0F + 74.0iF,
56.0F + 76.0iF, 58.0F + 78.0iF, 60.0F + 80.0iF, 62.0F + 82.0iF,
diff --git a/gcc/testsuite/gcc.dg/vect/vect-iv-6.c b/gcc/testsuite/gcc.dg/vect/vect-iv-6.c
index b1a0d53e7e2..f9fa57813ff 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-iv-6.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-iv-6.c
@@ -1,4 +1,4 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_int_mult } */
#include <stdio.h>
#include <stdarg.h>
#include "tree-vect.h"
@@ -46,5 +46,5 @@ int main (void)
return main1 (3);
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-16.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-16.c
index b5347ebecc3..4192e3d19ec 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-16.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-16.c
@@ -5,7 +5,7 @@
#define N 64
-char x[N] __attribute__ ((__aligned__(16)));
+char x[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63};
__attribute__ ((noinline)) int
foo (int len, long long *z) {
@@ -24,12 +24,6 @@ int main (void)
check_vect ();
- for (i=0; i<N; i++) {
- x[i] = i;
- if (i % 5)
- x[i] = i;
- }
-
foo (N,z+2);
for (i=0; i<N; i++) {
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-17.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-17.c
index 61670e6995e..9084fc82a12 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-17.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-17.c
@@ -5,9 +5,9 @@
#define N 64
-unsigned char uX[N] __attribute__ ((__aligned__(16)));
+unsigned char uX[N] __attribute__ ((__aligned__(16))) = {16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1};
unsigned char uresultX[N];
-unsigned long long uY[N] __attribute__ ((__aligned__(16)));
+unsigned long long uY[N] __attribute__ ((__aligned__(16))) = {16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1};
unsigned char uresultY[N];
/* Unsigned type demotion (si->qi) */
@@ -28,13 +28,6 @@ int main (void)
check_vect ();
- for (i=0; i<N; i++) {
- uX[i] = 16-i;
- uY[i] = 16-i;
- if (i%5 == 0)
- uX[i] = 16-i;
- }
-
foo1 (N);
for (i=0; i<N; i++) {
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c
index d8aefdad1a6..1934deb40d1 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c
@@ -7,8 +7,8 @@
#define DOT 43680
-unsigned char X[N] __attribute__ ((__aligned__(16)));
-unsigned char Y[N] __attribute__ ((__aligned__(16)));
+unsigned char X[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63};
+unsigned char Y[N] __attribute__ ((__aligned__(16))) = {64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1};
/* char->short->int dot product.
Detected as a dot-product pattern.
@@ -41,13 +41,6 @@ int main (void)
check_vect ();
- for (i=0; i<N; i++) {
- X[i] = i;
- Y[i] = 64-i;
- if (i%5 == 0)
- X[i] = i;
- }
-
dot = foo (N);
if (dot != DOT)
abort ();
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c
index 5496f6af920..3266d1ca0b5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c
@@ -7,8 +7,8 @@
#define DOT 43680
-unsigned char X[N] __attribute__ ((__aligned__(16)));
-unsigned char Y[N] __attribute__ ((__aligned__(16)));
+unsigned char X[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63};
+unsigned char Y[N] __attribute__ ((__aligned__(16))) = {64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1};
/* char->short->short dot product.
Detected as a dot-product pattern.
@@ -36,14 +36,6 @@ int main (void)
check_vect ();
- for (i=0; i<N; i++) {
- X[i] = i;
- Y[i] = 64-i;
- /* Avoid vectorization. */
- if (i%100 == 0)
- X[i] = i;
- }
-
dot = foo (N);
if (dot != DOT)
abort ();
diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c
index 31eb3f62054..7fc00e21a79 100644
--- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c
+++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c
@@ -7,8 +7,8 @@
#define DOT -21856
-signed char X[N] __attribute__ ((__aligned__(16)));
-signed char Y[N] __attribute__ ((__aligned__(16)));
+signed char X[N] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63};
+signed char Y[N] __attribute__ ((__aligned__(16))) = {64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1};
/* char->short->short dot product.
The dot-product pattern should be detected.
@@ -37,13 +37,6 @@ int main (void)
check_vect ();
- for (i=0; i<N; i++) {
- X[i] = i;
- Y[i] = 64-i;
- if (i%5 == 0)
- X[i] = i;
- }
-
dot = foo (N);
if (dot != DOT)
abort ();
diff --git a/gcc/testsuite/gcc.dg/wdisallowed-functions-1.c b/gcc/testsuite/gcc.dg/wdisallowed-functions-1.c
deleted file mode 100644
index 39760950d69..00000000000
--- a/gcc/testsuite/gcc.dg/wdisallowed-functions-1.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-Wdisallowed-function-list=foobar" } */
-
-int foobar (int i)
-{
- return (i * 5);
-}
diff --git a/gcc/testsuite/gcc.dg/wdisallowed-functions-2.c b/gcc/testsuite/gcc.dg/wdisallowed-functions-2.c
deleted file mode 100644
index ca5aab0e50d..00000000000
--- a/gcc/testsuite/gcc.dg/wdisallowed-functions-2.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-Wdisallowed-function-list=foo,foobar,bar,foobar" } */
-
-int foobar (int i)
-{
- return (i * 5);
-}
-
-int foobar1 (int i)
-{
- return foobar (i); /* { dg-warning "disallowed call to 'foobar'" } */
-}
diff --git a/gcc/testsuite/gcc.dg/winline-10.c b/gcc/testsuite/gcc.dg/winline-10.c
new file mode 100644
index 00000000000..2106253fcf2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/winline-10.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Winline" } */
+
+struct s { int a; };
+
+inline void f (x) /* { dg-warning "inlining .* mismatched arg" "" } */
+ int x;
+{
+ asm ("");
+}
+
+void g (struct s x)
+{
+ f (x); /* { dg-warning "called from here" "" } */
+}
+
+void f (int x); /* { dg-warning "follows non-prototype definition" } */
diff --git a/gcc/testsuite/gcc.target/i386/pr39315-1.c b/gcc/testsuite/gcc.target/i386/pr39315-1.c
new file mode 100644
index 00000000000..16ba5d59fe4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39315-1.c
@@ -0,0 +1,18 @@
+/* PR middle-end/39315 */
+/* { dg-do compile } */
+/* { dg-options "-O -msse2 -mtune=generic" } */
+/* { dg-final { scan-assembler-not "movups" } } */
+/* { dg-final { scan-assembler-not "movlps" } } */
+/* { dg-final { scan-assembler-not "movhps" } } */
+/* { dg-final { scan-assembler "movaps" } } */
+
+typedef float __m128 __attribute__ ((__vector_size__ (16)));
+
+extern void bar (__m128 *);
+
+void
+foo (__m128 *x)
+{
+ __m128 b = *x;
+ bar (&b);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39315-2.c b/gcc/testsuite/gcc.target/i386/pr39315-2.c
new file mode 100644
index 00000000000..ab3dcd0d24a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39315-2.c
@@ -0,0 +1,15 @@
+/* PR middle-end/39315 */
+/* { dg-do run } */
+/* { dg-options "-O -msse2 -mtune=generic" } */
+/* { dg-additional-sources pr39315-check.c } */
+
+typedef float __m128 __attribute__ ((__vector_size__ (16)));
+
+extern void bar (__m128 *, int);
+
+void
+foo (__m128 *x)
+{
+ __m128 b = *x;
+ bar (&b, __alignof__ (x));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39315-3.c b/gcc/testsuite/gcc.target/i386/pr39315-3.c
new file mode 100644
index 00000000000..07862db603a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39315-3.c
@@ -0,0 +1,19 @@
+/* PR middle-end/39315 */
+/* { dg-do compile } */
+/* { dg-options "-O -msse2 -mtune=generic" } */
+/* { dg-final { scan-assembler-not "movups" } } */
+/* { dg-final { scan-assembler-not "movlps" } } */
+/* { dg-final { scan-assembler-not "movhps" } } */
+/* { dg-final { scan-assembler "and\[lq\]?\[\\t \]*\\$-128,\[\\t \]*%\[re\]?sp" } } */
+/* { dg-final { scan-assembler "movaps" } } */
+
+typedef float __m128 __attribute__ ((__vector_size__ (16)));
+
+extern void bar (__m128 *);
+
+void
+foo (__m128 *x)
+{
+ __m128 b __attribute__ ((aligned(128))) = *x;
+ bar (&b);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39315-4.c b/gcc/testsuite/gcc.target/i386/pr39315-4.c
new file mode 100644
index 00000000000..2e55c251b03
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39315-4.c
@@ -0,0 +1,15 @@
+/* PR middle-end/39315 */
+/* { dg-do run } */
+/* { dg-options "-O -msse2 -mtune=generic" } */
+/* { dg-additional-sources pr39315-check.c } */
+
+typedef float __m128 __attribute__ ((__vector_size__ (16)));
+
+extern void bar (__m128 *, int);
+
+void
+foo (__m128 *x)
+{
+ __m128 b __attribute__ ((aligned(128))) = *x;
+ bar (&b, __alignof__ (x));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39315-check.c b/gcc/testsuite/gcc.target/i386/pr39315-check.c
new file mode 100644
index 00000000000..ff926057536
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39315-check.c
@@ -0,0 +1,22 @@
+typedef float __m128 __attribute__ ((__vector_size__ (16)));
+
+extern void foo (__m128 *);
+extern void abort (void);
+
+__m128 y = { 0.0, 1.0, 2.0, 3.0 };
+
+void
+bar (__m128 *x, int align)
+{
+ if ((((__PTRDIFF_TYPE__) x) & (align - 1)) != 0)
+ abort ();
+ if (__builtin_memcmp (x, &y, sizeof (y)) != 0)
+ abort ();
+}
+
+int
+main ()
+{
+ foo (&y);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39431.c b/gcc/testsuite/gcc.target/i386/pr39431.c
new file mode 100644
index 00000000000..756bdb9ebb8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39431.c
@@ -0,0 +1,15 @@
+/* PR target/39431 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-options "-O2 -march=i686 -fpic" { target { ilp32 && fpic } } } */
+
+extern void bar (char *, int);
+
+int
+foo (long long *p, long long oldv, long long *q, int n)
+{
+ char buf[n];
+ bar (buf, n);
+ p[256 + n] = __sync_val_compare_and_swap (p + n, oldv, oldv + 6);
+ return __sync_bool_compare_and_swap (q + n, oldv, oldv + 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39445.c b/gcc/testsuite/gcc.target/i386/pr39445.c
new file mode 100644
index 00000000000..6f0295bc1e0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39445.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-Os -msse2" } */
+
+#include "sse2-check.h"
+
+typedef struct { __m128 f __attribute__((packed)); } packed;
+
+__m128 __attribute__((noinline))
+foo (__m128 a1, __m128 a2, __m128 a3, __m128 a4,
+ __m128 a5, __m128 a6, __m128 a7, __m128 a8,
+ int b1, int b2, int b3, int b4, int b5, int b6, int b7, packed y)
+{
+ return y.f;
+}
+
+void
+sse2_test (void)
+{
+ packed x;
+ __m128 y = { 0 };
+ x.f = y;
+ y = foo (y, y, y, y, y, y, y, y, 1, 2, 3, 4, 5, 6, -1, x);
+ if (__builtin_memcmp (&y, &x.f, sizeof (y)) != 0)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39482.c b/gcc/testsuite/gcc.target/i386/pr39482.c
new file mode 100644
index 00000000000..4e2dfa724a9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39482.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-sse2" } */
+
+extern double log (double __x);
+
+double foo (unsigned long int m_liOutputBufferLen)
+{
+ return log ((double) m_liOutputBufferLen);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39496.c b/gcc/testsuite/gcc.target/i386/pr39496.c
new file mode 100644
index 00000000000..d90a2c7f3ea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39496.c
@@ -0,0 +1,35 @@
+/* PR target/39496 */
+/* { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && ilp32 } } } */
+/* { dg-options "-O0 -fverbose-asm -fno-omit-frame-pointer -msse2 -mfpmath=sse" } */
+/* Verify that {foo,bar}{,2}param are all passed on the stack, using
+ normal calling conventions, when not optimizing. */
+/* { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*fooparam," } } */
+/* { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*barparam," } } */
+/* { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*foo2param," } } */
+/* { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*bar2param," } } */
+
+static inline int foo (int fooparam)
+{
+ return fooparam;
+}
+
+static int bar (int barparam)
+{
+ return foo (barparam);
+}
+
+static inline double foo2 (double foo2param)
+{
+ return foo2param;
+}
+
+static double bar2 (double bar2param)
+{
+ return foo2 (bar2param);
+}
+
+int
+main ()
+{
+ return bar (0) + bar2 (0.0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39545-1.c b/gcc/testsuite/gcc.target/i386/pr39545-1.c
new file mode 100644
index 00000000000..62bc33fa21d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39545-1.c
@@ -0,0 +1,24 @@
+/* PR target/39545 */
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O2" } */
+
+struct flex
+{
+ int i;
+ int flex [];
+};
+
+int
+foo (struct flex s) /* { dg-message "note: The ABI of passing struct with a flexible array member has changed in GCC 4.4" } */
+{
+ return s.i;
+}
+
+struct flex
+bar (int x)
+{
+ struct flex s;
+ s.i = x;
+ return s;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39545-2.c b/gcc/testsuite/gcc.target/i386/pr39545-2.c
new file mode 100644
index 00000000000..143c3827fd6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39545-2.c
@@ -0,0 +1,18 @@
+/* PR target/39545 */
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O2" } */
+
+struct flex
+{
+ int i;
+ int flex [];
+};
+
+struct flex
+foo (int x)
+{ /* { dg-message "note: The ABI of passing struct with a flexible array member has changed in GCC 4.4" } */
+ struct flex s;
+ s.i = x;
+ return s;
+}
diff --git a/gcc/testsuite/gcc.target/i386/push-1.c b/gcc/testsuite/gcc.target/i386/push-1.c
index cf5a1041364..da9b39ec9b5 100644
--- a/gcc/testsuite/gcc.target/i386/push-1.c
+++ b/gcc/testsuite/gcc.target/i386/push-1.c
@@ -12,4 +12,4 @@ bar (void)
foo (x, x, x, x, 5);
}
-/* { dg-final { scan-assembler-not "movups" } } */
+/* { dg-final { scan-assembler-not "movups" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/i386/stackalign/longlong-1.c b/gcc/testsuite/gcc.target/i386/stackalign/longlong-1.c
new file mode 100644
index 00000000000..225d0c5e558
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/stackalign/longlong-1.c
@@ -0,0 +1,15 @@
+/* PR target/39137 */
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O2 -mpreferred-stack-boundary=2" } */
+/* Make sure dynamic stack realignment isn't performed just because there
+ are long long variables. */
+/* { dg-final { scan-assembler-not "and\[lq\]?\[^\\n\]*-8,\[^\\n\]*sp" } } */
+
+void fn (void *);
+
+void f1 (void)
+{
+ unsigned long long a;
+ fn (&a);
+}
diff --git a/gcc/testsuite/gcc.target/i386/stackalign/longlong-2.c b/gcc/testsuite/gcc.target/i386/stackalign/longlong-2.c
new file mode 100644
index 00000000000..ae7f3ee333a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/stackalign/longlong-2.c
@@ -0,0 +1,33 @@
+/* { dg-do compile { target { ! *-*-darwin* } } } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O2 -mpreferred-stack-boundary=2" } */
+/* { dg-final { scan-assembler-times "and\[lq\]?\[^\\n\]*-8,\[^\\n\]*sp" 2 } } */
+/* { dg-final { scan-assembler-times "and\[lq\]?\[^\\n\]*-16,\[^\\n\]*sp" 2 } } */
+
+void fn (void *);
+
+void f2 (void)
+{
+ unsigned long long a __attribute__((aligned (8)));
+ fn (&a);
+}
+
+void f3 (void)
+{
+ typedef unsigned long long L __attribute__((aligned (8)));
+ L a;
+ fn (&a);
+}
+
+void f4 (void)
+{
+ unsigned long long a __attribute__((aligned (16)));
+ fn (&a);
+}
+
+void f5 (void)
+{
+ typedef unsigned long long L __attribute__((aligned (16)));
+ L a;
+ fn (&a);
+}
diff --git a/gcc/testsuite/gcc.target/i386/stackalign/return-4.c b/gcc/testsuite/gcc.target/i386/stackalign/return-4.c
index c66c369c8fc..a1e35dcc213 100644
--- a/gcc/testsuite/gcc.target/i386/stackalign/return-4.c
+++ b/gcc/testsuite/gcc.target/i386/stackalign/return-4.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-mpreferred-stack-boundary=4" } */
-/* { dg-final { scan-assembler-not "andl\[^\\n\]*-64,\[^\\n\]*sp" } } */
+/* { dg-final { scan-assembler-not "and\[lq\]?\[^\\n\]*-64,\[^\\n\]*sp" } } */
/* This compile only test is to detect an assertion failure in stack branch
development. */
diff --git a/gcc/testsuite/gcc.target/i386/stackalign/return-5.c b/gcc/testsuite/gcc.target/i386/stackalign/return-5.c
index 84531ddfe29..208bc0d8ad6 100644
--- a/gcc/testsuite/gcc.target/i386/stackalign/return-5.c
+++ b/gcc/testsuite/gcc.target/i386/stackalign/return-5.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-mpreferred-stack-boundary=4" } */
-/* { dg-final { scan-assembler-not "andl\[^\\n\]*-64,\[^\\n\]*sp" } } */
+/* { dg-final { scan-assembler-not "and\[lq\]?\[^\\n\]*-64,\[^\\n\]*sp" } } */
/* This compile only test is to detect an assertion failure in stack branch
development. */
diff --git a/gcc/testsuite/gcc.target/i386/stackalign/return-6.c b/gcc/testsuite/gcc.target/i386/stackalign/return-6.c
index ceadbad1acf..b1aa1eac888 100644
--- a/gcc/testsuite/gcc.target/i386/stackalign/return-6.c
+++ b/gcc/testsuite/gcc.target/i386/stackalign/return-6.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-mpreferred-stack-boundary=4" } */
-/* { dg-final { scan-assembler-not "andl\[^\\n\]*-64,\[^\\n\]*sp" } } */
+/* { dg-final { scan-assembler-not "and\[lq\]?\[^\\n\]*-64,\[^\\n\]*sp" } } */
/* This compile only test is to detect an assertion failure in stack branch
development. */
diff --git a/gcc/testsuite/gcc.target/ia64/20090324-1.c b/gcc/testsuite/gcc.target/ia64/20090324-1.c
new file mode 100644
index 00000000000..d9aff6a18b4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/ia64/20090324-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fmodulo-sched" } */
+
+static char *place_region_bounds_x, *place_region_bounds_y;
+static void read_place () {
+ char msg[300];
+ update_screen (msg);
+}
+static void alloc_and_load_placement_structs () {
+ int i, j;
+ for (j=0;
+ j<100;
+ j++) {
+ place_region_bounds_x[i] = place_region_bounds_x[i-1];
+ place_region_bounds_y[i] = place_region_bounds_y[i-1];
+ }
+}
+void place_and_route () {
+ read_place ();
+ alloc_and_load_placement_structs ();
+}
diff --git a/gcc/testsuite/gcc.target/ia64/sync-1.c b/gcc/testsuite/gcc.target/ia64/sync-1.c
new file mode 100644
index 00000000000..95f6daeb997
--- /dev/null
+++ b/gcc/testsuite/gcc.target/ia64/sync-1.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "xchg4 .*, r0" } } */
+/* { dg-final { scan-assembler "cmpxchg4.*, r0, .*" } } */
+/* { dg-final { scan-assembler "cmpxchg8.*, r0, .*" } } */
+
+int
+foo1 (int *p)
+{
+ return __sync_lock_test_and_set (p, 0);
+}
+
+int
+foo2 (int *p, int v)
+{
+ return __sync_bool_compare_and_swap (p, v, 0);
+}
+
+long
+foo3 (long *p, long v)
+{
+ return __sync_bool_compare_and_swap (p, v, 0);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-28.c b/gcc/testsuite/gcc.target/powerpc/altivec-28.c
new file mode 100644
index 00000000000..db6c25ac7e8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/altivec-28.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec" } */
+
+#define B bool
+#define P pixel
+#define I int
+#define BI bool int
+#define PI pixel int
+
+vector B int i;
+vector P int j;
+vector B I k;
+vector P I l;
+vector BI m;
+vector PI n;
diff --git a/gcc/testsuite/gcc.target/s390/20090223-1.c b/gcc/testsuite/gcc.target/s390/20090223-1.c
new file mode 100644
index 00000000000..443ccb9aa69
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/20090223-1.c
@@ -0,0 +1,60 @@
+/* The RTL loop optimizer used to replace the output register of the
+ inline assembly with a pseudo although the variable is declared as
+ register asm ("0"). */
+
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+static unsigned char __attribute__ ((always_inline))
+mytoupper (unsigned char c)
+{
+ if (c >= 'a' && c <= 'z')
+ c -= 'a' - 'A';
+ return c;
+}
+
+static unsigned long __attribute__ ((always_inline))
+strlen (const char *s)
+{
+ register unsigned long r0 asm ("0");
+ const char *tmp = s;
+
+ asm (
+#ifdef __s390x__
+ " lghi %0, 0\n"
+#else
+ " lhi %0, 0\n"
+#endif
+ "0:srst %0,%1\n"
+ " jo 0b"
+ : "=d" (r0), "+a" (tmp)
+ :
+ :"cc");
+ return r0 - (unsigned long) s;
+}
+
+char boot_command_line[] = "this is a test";
+
+void __attribute__ ((noinline))
+foo (char *str)
+{
+ if (strcmp (str, "THIS IS A TEST") != 0)
+ abort ();
+}
+
+int
+main ()
+{
+ char upper_command_line[1024];
+ int i;
+
+ for (i = 0; i < strlen (boot_command_line); i++)
+ upper_command_line[i] = mytoupper (boot_command_line[i]);
+
+ upper_command_line[strlen (boot_command_line)] = 0;
+ foo (upper_command_line);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c
new file mode 100644
index 00000000000..048da6e56ac
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c
@@ -0,0 +1,27 @@
+/* Test for cross x86_64<->w64 abi standard calls. */
+/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
+/* { dg-additional-sources "func-2b.c" } */
+
+extern void __attribute__ ((sysv_abi)) abort (void);
+long double func_cross (long double, double, float, long, int, char);
+
+long double __attribute__ ((sysv_abi))
+func_native (long double a, double b, float c, long d, int e, char f)
+{
+ long double ret;
+ ret = a + (long double) b + (long double) c;
+ ret *= (long double) (d + (long) e);
+ if (f>0)
+ ret += func_native (a,b,c,d,e,-f);
+ return ret;
+}
+
+int __attribute__ ((sysv_abi))
+main ()
+{
+ if (func_cross (1.0,2.0,3.0,1,2,3)
+ != func_native (1.0,2.0,3.0,1,2,3))
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2b.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2b.c
new file mode 100644
index 00000000000..fe85dd1860d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2b.c
@@ -0,0 +1,13 @@
+/* Test for cross x86_64<->w64 abi standard calls. */
+/* { dg-options "-mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
+
+long double func_cross (long double a, double b, float c, long d, int e,
+ char f)
+{
+ long double ret;
+ ret = a + (long double) b + (long double) c;
+ ret *= (long double) (d + (long) e);
+ if (f>0)
+ ret += func_cross (a,b,c,d,e,-f);
+ return ret;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c
new file mode 100644
index 00000000000..730b8db9c1f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c
@@ -0,0 +1,17 @@
+/* Test for cross x86_64<->w64 abi standard calls via variable. */
+/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
+/* { dg-additional-sources "func-indirect-2b.c" } */
+
+extern void __attribute__ ((sysv_abi)) abort (void);
+typedef int (*func)(void *, char *, char *, short, long long);
+extern func get_callback (void);
+
+int __attribute__ ((sysv_abi))
+main ()
+{
+ func callme = get_callback ();
+ if (callme (0, 0, 0, 0x1234, 0x1234567890abcdefLL))
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2b.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2b.c
new file mode 100644
index 00000000000..1a9fccd97f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2b.c
@@ -0,0 +1,24 @@
+/* Test for cross x86_64<->w64 abi standard calls via variable. */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
+
+typedef int (*func)(void *, char *, char *, short, long long);
+
+static int
+callback (void *ptr, char *string1, char *string2, short number,
+ long long rand)
+{
+ if (ptr != 0
+ || string1 != 0
+ || string2 != 0
+ || number != 0x1234
+ || rand != 0x1234567890abcdefLL)
+ return 1;
+ else
+ return 0;
+}
+
+func
+get_callback (void)
+{
+ return callback;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect.c
index 8c1cac82e1b..0c0cbb271ca 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect.c
@@ -20,5 +20,5 @@ int main()
volatile func callme = callback;
if(callme(0, 0, 0, 0, 0x1234567890abcdefLL))
abort();
+ return 0;
}
-
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c
new file mode 100644
index 00000000000..a44470431ff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c
@@ -0,0 +1,24 @@
+/* Test for cross x86_64<->w64 abi va_list calls. */
+/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
+/* { dg-additional-sources "vaarg-4b.c" } */
+
+extern __SIZE_TYPE__ __attribute__ ((sysv_abi)) strlen (const char *);
+extern int __attribute__ ((sysv_abi)) sprintf (char *,const char *, ...);
+extern void __attribute__ ((sysv_abi)) abort (void);
+
+extern void do_cpy (char *, ...);
+
+int __attribute__ ((sysv_abi))
+main ()
+{
+ char s[256];
+
+ do_cpy (s, "1","2","3","4", "5", "6", "7", "");
+
+ if (s[0] != '1' || s[1] !='2' || s[2] != '3' || s[3] != '4'
+ || s[4] != '5' || s[5] != '6' || s[6] != '7' || s[7] != 0)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4b.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4b.c
new file mode 100644
index 00000000000..f33906bd293
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4b.c
@@ -0,0 +1,31 @@
+/* Test for cross x86_64<->w64 abi va_list calls. */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
+
+#include <stdarg.h>
+
+extern __SIZE_TYPE__ __attribute__ ((sysv_abi)) strlen (const char *);
+extern int __attribute__ ((sysv_abi)) sprintf (char *, const char *, ...);
+
+static void
+vdo_cpy (char *s, va_list argp)
+{
+ __SIZE_TYPE__ len;
+ char *r = s;
+ char *e;
+ *r = 0;
+ for (;;) {
+ e = va_arg (argp, char *);
+ if (*e == 0) break;
+ sprintf (r,"%s", e);
+ r += strlen (r);
+ }
+}
+
+void
+do_cpy (char *s, ...)
+{
+ va_list argp;
+ va_start (argp, s);
+ vdo_cpy (s, argp);
+ va_end (argp);
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c
new file mode 100644
index 00000000000..e9912957e7c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c
@@ -0,0 +1,17 @@
+/* Test for cross x86_64<->w64 abi va_list calls. */
+/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
+/* { dg-additional-sources "vaarg-5b.c" } */
+
+extern void __attribute__ ((sysv_abi)) abort (void);
+extern int fct2 (int, ...);
+
+#define SZ_ARGS 1ll,2ll,3ll,4ll,5ll,6ll,7ll,0ll
+
+int __attribute__ ((sysv_abi))
+main()
+{
+ if (fct2 (-1, SZ_ARGS) != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5b.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5b.c
new file mode 100644
index 00000000000..e5dd4727bdd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5b.c
@@ -0,0 +1,37 @@
+/* Test for cross x86_64<->w64 abi va_list calls. */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
+
+#include <stdarg.h>
+
+#define SZ_ARGS 1ll,2ll,3ll,4ll,5ll,6ll,7ll,0ll
+
+static int __attribute__ ((sysv_abi))
+fct1 (va_list argp, ...)
+{
+ long long p1,p2;
+ int ret = 1;
+ __builtin_sysv_va_list argp_2;
+
+ __builtin_sysv_va_start (argp_2, argp);
+ do {
+ p1 = va_arg (argp_2, long long);
+ p2 = va_arg (argp, long long);
+ if (p1 != p2)
+ ret = 0;
+ } while (ret && p1 != 0);
+ __builtin_sysv_va_end (argp_2);
+
+ return ret;
+}
+
+int
+fct2 (int dummy, ...)
+{
+ va_list argp;
+ int ret = dummy;
+
+ va_start (argp, dummy);
+ ret += fct1 (argp, SZ_ARGS);
+ va_end (argp);
+ return ret;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c b/gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c
index 3ce0db14652..68eca53a2e4 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c
@@ -92,6 +92,33 @@ check_struct_passing6 (struct m128_2_struct ms ATTRIBUTE_UNUSED)
}
#endif
+struct flex1_struct
+{
+ long i;
+ long flex[];
+};
+
+struct flex2_struct
+{
+ long i;
+ long flex[0];
+};
+
+void
+check_struct_passing7 (struct flex1_struct is ATTRIBUTE_UNUSED)
+{
+ check_int_arguments;
+}
+
+void
+check_struct_passing8 (struct flex2_struct is ATTRIBUTE_UNUSED)
+{
+ check_int_arguments;
+}
+
+static struct flex1_struct f1s = { 60, { } };
+static struct flex2_struct f2s = { 61, { } };
+
int
main (void)
{
@@ -146,5 +173,17 @@ main (void)
WRAP_CALL (check_struct_passing6)(m128_2s);
#endif
+ clear_struct_registers;
+ iregs.I0 = f1s.i;
+ num_iregs = 1;
+ clear_int_hardware_registers;
+ WRAP_CALL (check_struct_passing7)(f1s);
+
+ clear_struct_registers;
+ iregs.I0 = f2s.i;
+ num_iregs = 1;
+ clear_int_hardware_registers;
+ WRAP_CALL (check_struct_passing8)(f2s);
+
return 0;
}
diff --git a/gcc/testsuite/gfortran.dg/abstract_type_5.f03 b/gcc/testsuite/gfortran.dg/abstract_type_5.f03
new file mode 100644
index 00000000000..a0060f81795
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/abstract_type_5.f03
@@ -0,0 +1,45 @@
+! { dg-do "compile" }
+
+! Abstract Types.
+! Check for correct handling of abstract-typed base object references.
+
+MODULE m
+ IMPLICIT NONE
+
+ TYPE, ABSTRACT :: abstract_t
+ INTEGER :: i
+ CONTAINS
+ PROCEDURE, NOPASS :: proc
+ PROCEDURE, NOPASS :: func
+ END TYPE abstract_t
+
+ TYPE, EXTENDS(abstract_t) :: concrete_t
+ END TYPE concrete_t
+
+CONTAINS
+
+ SUBROUTINE proc ()
+ IMPLICIT NONE
+ ! Do nothing
+ END SUBROUTINE proc
+
+ INTEGER FUNCTION func ()
+ IMPLICIT NONE
+ func = 1234
+ END FUNCTION func
+
+ SUBROUTINE test ()
+ IMPLICIT NONE
+ TYPE(concrete_t) :: obj
+
+ ! These are ok.
+ obj%abstract_t%i = 42
+ CALL obj%proc ()
+ PRINT *, obj%func ()
+
+ ! These are errors (even though the procedures are not DEFERRED!).
+ CALL obj%abstract_t%proc () ! { dg-error "is of ABSTRACT type" }
+ PRINT *, obj%abstract_t%func () ! { dg-error "is of ABSTRACT type" }
+ END SUBROUTINE test
+
+END MODULE m
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_assign_9.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_assign_9.f90
new file mode 100644
index 00000000000..9051bafa019
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_assign_9.f90
@@ -0,0 +1,20 @@
+! { dg-do run }
+! Test the fix for PR39519, where the presence of the pointer
+! as the first component was preventing the second from passing
+! the "alloc_comp" attribute to the derived type.
+!
+! Contributed by Gilbert Scott <gilbert.scott@easynet.co.uk>
+!
+PROGRAM X
+ TYPE T
+ INTEGER, POINTER :: P
+ INTEGER, ALLOCATABLE :: A(:)
+ END TYPE T
+ TYPE(T) :: T1,T2
+ ALLOCATE ( T1%A(1) )
+ ALLOCATE ( T2%A(1) )
+ T1%A = 23
+ T2 = T1
+ T1%A = 42
+ if (T2%A(1) .NE. 23) CALL ABORT
+END PROGRAM X
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_11.f90 b/gcc/testsuite/gfortran.dg/array_constructor_11.f90
index 395d2927b9e..bb9f0dddb11 100644
--- a/gcc/testsuite/gfortran.dg/array_constructor_11.f90
+++ b/gcc/testsuite/gfortran.dg/array_constructor_11.f90
@@ -10,20 +10,20 @@ contains
call test (1, 11, 3, (/ (i, i = 1, 11, 3) /))
call test (3, 20, 2, (/ (i, i = 3, 20, 2) /))
- call test (4, 0, 11, (/ (i, i = 4, 0, 11) /))
+ call test (4, 0, 11, (/ (i, i = 4, 0, 11) /)) ! { dg-warning "will be executed zero times" }
call test (110, 10, -3, (/ (i, i = 110, 10, -3) /))
call test (200, 20, -12, (/ (i, i = 200, 20, -12) /))
- call test (29, 30, -6, (/ (i, i = 29, 30, -6) /))
+ call test (29, 30, -6, (/ (i, i = 29, 30, -6) /)) ! { dg-warning "will be executed zero times" }
call test (1, order, 3, (/ (i, i = 1, order, 3) /))
call test (order, 1, -3, (/ (i, i = order, 1, -3) /))
! Triggers compile-time iterator calculations in trans-array.c
call test (1, 1000, 2, (/ (i, i = 1, 1000, 2), (i, i = order, 0, 1) /))
- call test (1, 0, 3, (/ (i, i = 1, 0, 3), (i, i = order, 0, 1) /))
- call test (1, 2000, -5, (/ (i, i = 1, 2000, -5), (i, i = order, 0, 1) /))
- call test (3000, 99, 4, (/ (i, i = 3000, 99, 4), (i, i = order, 0, 1) /))
+ call test (1, 0, 3, (/ (i, i = 1, 0, 3), (i, i = order, 0, 1) /)) ! { dg-warning "will be executed zero times" }
+ call test (1, 2000, -5, (/ (i, i = 1, 2000, -5), (i, i = order, 0, 1) /)) ! { dg-warning "will be executed zero times" }
+ call test (3000, 99, 4, (/ (i, i = 3000, 99, 4), (i, i = order, 0, 1) /)) ! { dg-warning "will be executed zero times" }
call test (400, 77, -39, (/ (i, i = 400, 77, -39), (i, i = order, 0, 1) /))
do j = -10, 10
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_18.f90 b/gcc/testsuite/gfortran.dg/array_constructor_18.f90
index 246f448063c..c78976839d0 100644
--- a/gcc/testsuite/gfortran.dg/array_constructor_18.f90
+++ b/gcc/testsuite/gfortran.dg/array_constructor_18.f90
@@ -5,7 +5,7 @@
!
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
!
- call foo ((/(S1(i),i=1,3,-1)/))
+ call foo ((/(S1(i),i=1,3,-1)/)) ! { dg-warning "will be executed zero times" }
CONTAINS
FUNCTION S1(i)
CHARACTER(LEN=1) :: S1
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_22.f90 b/gcc/testsuite/gfortran.dg/array_constructor_22.f90
index d29039a80e6..0dcdaea68c1 100644
--- a/gcc/testsuite/gfortran.dg/array_constructor_22.f90
+++ b/gcc/testsuite/gfortran.dg/array_constructor_22.f90
@@ -7,7 +7,7 @@ module test
function my_string(x)
integer i
real, intent(in) :: x(:)
- character(0) h4(1:minval([(1,i=1,0)],1))
+ character(0) h4(1:minval([(1,i=1,0)],1)) ! { dg-warning "will be executed zero times" }
character(0) sv1(size(x,1):size(h4))
character(0) sv2(2*lbound(sv1,1):size(h4))
character(lbound(sv2,1)-3) my_string
diff --git a/gcc/testsuite/gfortran.dg/char_result_13.f90 b/gcc/testsuite/gfortran.dg/char_result_13.f90
new file mode 100644
index 00000000000..741d55f166a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/char_result_13.f90
@@ -0,0 +1,49 @@
+! { dg-do run }
+! Tests the fix for PR38538, where the character length for the
+! argument of 'func' was not calculated.
+!
+! Contributed by Vivek Rao <vivekrao4@yahoo.com>
+!
+module abc
+ implicit none
+contains
+ subroutine xmain (i, j)
+ integer i, j
+ call foo (func ("_"//bar (i)//"x"//bar (j)//"x"), "_abcxabx") ! original was elemental
+ call foo (nfunc("_"//bar (j)//"x"//bar (i)//"x"), "_abxabcx")
+ end subroutine xmain
+!
+ function bar (i) result(yy)
+ integer i, j, k
+ character (len = i) :: yy(2)
+ do j = 1, size (yy, 1)
+ do k = 1, i
+ yy(j)(k:k) = char (96+k)
+ end do
+ end do
+ end function bar
+!
+ elemental function func (yy) result(xy)
+ character (len = *), intent(in) :: yy
+ character (len = len (yy)) :: xy
+ xy = yy
+ end function func
+!
+ function nfunc (yy) result(xy)
+ character (len = *), intent(in) :: yy(:)
+ character (len = len (yy)) :: xy(size (yy))
+ xy = yy
+ end function nfunc
+!
+ subroutine foo(cc, teststr)
+ character (len=*), intent(in) :: cc(:)
+ character (len=*), intent(in) :: teststr
+ if (any (cc .ne. teststr)) call abort
+ end subroutine foo
+end module abc
+
+ use abc
+ call xmain(3, 2)
+end
+! { dg-final { cleanup-modules "abc" } }
+
diff --git a/gcc/testsuite/gfortran.dg/do_1.f90 b/gcc/testsuite/gfortran.dg/do_1.f90
index 20e1f31ca67..171275af3f2 100644
--- a/gcc/testsuite/gfortran.dg/do_1.f90
+++ b/gcc/testsuite/gfortran.dg/do_1.f90
@@ -29,17 +29,17 @@ program do_1
! Zero iterations
j = 0
- do i = 1, 0, 1
+ do i = 1, 0, 1 ! { dg-warning "executed zero times" }
j = j + 1
end do
if (j .ne. 0) call abort
j = 0
- do i = 1, 0, 2
+ do i = 1, 0, 2 ! { dg-warning "executed zero times" }
j = j + 1
end do
if (j .ne. 0) call abort
j = 0
- do i = 1, 2, -1
+ do i = 1, 2, -1 ! { dg-warning "executed zero times" }
j = j + 1
end do
if (j .ne. 0) call abort
diff --git a/gcc/testsuite/gfortran.dg/do_3.F90 b/gcc/testsuite/gfortran.dg/do_3.F90
index 3cada5a0051..67723a508f4 100644
--- a/gcc/testsuite/gfortran.dg/do_3.F90
+++ b/gcc/testsuite/gfortran.dg/do_3.F90
@@ -21,16 +21,16 @@ program test
TEST_LOOP(i, 0, 1, 2, 1, test_i, 2)
TEST_LOOP(i, 0, 1, 3, 1, test_i, 3)
TEST_LOOP(i, 0, 1, huge(0), 1, test_i, huge(0))
- TEST_LOOP(i, 0, 1, -1, 0, test_i, 0)
- TEST_LOOP(i, 0, 1, -2, 0, test_i, 0)
- TEST_LOOP(i, 0, 1, -3, 0, test_i, 0)
- TEST_LOOP(i, 0, 1, -huge(0), 0, test_i, 0)
- TEST_LOOP(i, 0, 1, -huge(0)-1, 0, test_i, 0)
-
- TEST_LOOP(i, 1, 0, 1, 0, test_i, 1)
- TEST_LOOP(i, 1, 0, 2, 0, test_i, 1)
- TEST_LOOP(i, 1, 0, 3, 0, test_i, 1)
- TEST_LOOP(i, 1, 0, huge(0), 0, test_i, 1)
+ TEST_LOOP(i, 0, 1, -1, 0, test_i, 0) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 0, 1, -2, 0, test_i, 0) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 0, 1, -3, 0, test_i, 0) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 0, 1, -huge(0), 0, test_i, 0) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 0, 1, -huge(0)-1, 0, test_i, 0) ! { dg-warning "executed zero times" }
+
+ TEST_LOOP(i, 1, 0, 1, 0, test_i, 1) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 1, 0, 2, 0, test_i, 1) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 1, 0, 3, 0, test_i, 1) ! { dg-warning "executed zero times" }
+ TEST_LOOP(i, 1, 0, huge(0), 0, test_i, 1) ! { dg-warning "executed zero times" }
TEST_LOOP(i, 1, 0, -1, 2, test_i, -1)
TEST_LOOP(i, 1, 0, -2, 1, test_i, -1)
TEST_LOOP(i, 1, 0, -3, 1, test_i, -2)
@@ -58,14 +58,14 @@ program test
TEST_LOOP(i1, huge(i1), -huge(i1)-1_1, -huge(i1)-1_1, 2, test_i1, -huge(i1)-2_1)
TEST_LOOP(i1, -2_1, 3_1, huge(i1), 1, test_i1, huge(i1)-2_1)
- TEST_LOOP(i1, -2_1, 3_1, -huge(i1), 0, test_i1, -2_1)
+ TEST_LOOP(i1, -2_1, 3_1, -huge(i1), 0, test_i1, -2_1) ! { dg-warning "executed zero times" }
TEST_LOOP(i1, 2_1, -3_1, -huge(i1), 1, test_i1, 2_1-huge(i1))
- TEST_LOOP(i1, 2_1, -3_1, huge(i1), 0, test_i1, 2_1)
+ TEST_LOOP(i1, 2_1, -3_1, huge(i1), 0, test_i1, 2_1) ! { dg-warning "executed zero times" }
! Real loops
TEST_LOOP(r, 0.0, 1.0, 0.11, 1 + int(1.0/0.11), test_r, 0.0)
- TEST_LOOP(r, 0.0, 1.0, -0.11, 0, test_r, 0.0)
- TEST_LOOP(r, 0.0, -1.0, 0.11, 0, test_r, 0.0)
+ TEST_LOOP(r, 0.0, 1.0, -0.11, 0, test_r, 0.0) ! { dg-warning "executed zero times" }
+ TEST_LOOP(r, 0.0, -1.0, 0.11, 0, test_r, 0.0) ! { dg-warning "executed zero times" }
TEST_LOOP(r, 0.0, -1.0, -0.11, 1 + int(1.0/0.11), test_r, 0.0)
TEST_LOOP(r, 0.0, 0.0, 0.11, 1, test_r, 0.0)
TEST_LOOP(r, 0.0, 0.0, -0.11, 1, test_r, 0.0)
diff --git a/gcc/testsuite/gfortran.dg/do_4.f b/gcc/testsuite/gfortran.dg/do_4.f
new file mode 100644
index 00000000000..6d688a0a323
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_4.f
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! Verify that the loop not terminated on an action-stmt is correctly rejected
+ do10i=1,20
+ if(i.eq.5)then
+ goto 10
+ 10 endif ! { dg-error "is within another block" }
+ end
+! { dg-excess-errors "" }
+
diff --git a/gcc/testsuite/gfortran.dg/do_check_1.f90 b/gcc/testsuite/gfortran.dg/do_check_1.f90
new file mode 100644
index 00000000000..94d8a848810
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_check_1.f90
@@ -0,0 +1,16 @@
+! { dg-do run }
+! { dg-options "-fcheck=do" }
+! { dg-shouldfail "DO check" }
+!
+! PR fortran/34656
+! Run-time check for zero STEP
+!
+program test
+ implicit none
+ integer :: i,j
+ j = 0
+ do i = 1, 40, j
+ print *, i
+ end do
+end program test
+! { dg-output "Fortran runtime error: DO step value is zero" }
diff --git a/gcc/testsuite/gfortran.dg/do_check_2.f90 b/gcc/testsuite/gfortran.dg/do_check_2.f90
new file mode 100644
index 00000000000..c40760d2598
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_check_2.f90
@@ -0,0 +1,20 @@
+! { dg-do run }
+! { dg-options "-fcheck=do" }
+! { dg-shouldfail "DO check" }
+!
+! PR fortran/34656
+! Run-time check for modifing loop variables
+!
+program test
+ implicit none
+ integer :: i,j
+ do i = 1, 10
+ call modLoopVar(i)
+ end do
+contains
+ subroutine modLoopVar(i)
+ integer :: i
+ i = i + 1
+ end subroutine modLoopVar
+end program test
+! { dg-output "Fortran runtime error: Loop variable has been modified" }
diff --git a/gcc/testsuite/gfortran.dg/do_check_3.f90 b/gcc/testsuite/gfortran.dg/do_check_3.f90
new file mode 100644
index 00000000000..15086c20a13
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_check_3.f90
@@ -0,0 +1,22 @@
+! { dg-do run }
+! { dg-options "-fcheck=do" }
+! { dg-shouldfail "DO check" }
+!
+! PR fortran/34656
+! Run-time check for modifing loop variables
+!
+program test
+ implicit none
+ real :: i, j, k
+ j = 10.0
+ k = 1.0
+ do i = 1.0, j, k ! { dg-warning "must be integer" }
+ call modLoopVar(i)
+ end do
+contains
+ subroutine modLoopVar(x)
+ real :: x
+ x = x + 1
+ end subroutine modLoopVar
+end program test
+! { dg-output "Fortran runtime error: Loop variable has been modified" }
diff --git a/gcc/testsuite/gfortran.dg/do_check_4.f90 b/gcc/testsuite/gfortran.dg/do_check_4.f90
new file mode 100644
index 00000000000..65bc92c7e1a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_check_4.f90
@@ -0,0 +1,21 @@
+! { dg-do run }
+! { dg-options "-fcheck=do" }
+! { dg-shouldfail "DO check" }
+!
+! PR fortran/34656
+! Run-time check for modifing loop variables
+!
+PROGRAM test
+ IMPLICIT NONE
+ INTEGER :: i
+ DO i=1,100
+ CALL do_something()
+ ENDDO
+CONTAINS
+ SUBROUTINE do_something()
+ IMPLICIT NONE
+ DO i=1,10
+ ENDDO
+ END SUBROUTINE do_something
+END PROGRAM test
+! { dg-output "Fortran runtime error: Loop variable has been modified" }
diff --git a/gcc/testsuite/gfortran.dg/do_check_5.f90 b/gcc/testsuite/gfortran.dg/do_check_5.f90
new file mode 100644
index 00000000000..081a228cfc7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_check_5.f90
@@ -0,0 +1,32 @@
+! { dg-do compile }
+!
+! PR/fortran 38432
+! DO-loop compile-time checks
+!
+implicit none
+integer :: i
+real :: r
+do i = 1, 0 ! { dg-warning "executed zero times" }
+end do
+
+do i = 1, -1, 1 ! { dg-warning "executed zero times" }
+end do
+
+do i = 1, 2, -1 ! { dg-warning "executed zero times" }
+end do
+
+do i = 1, 2, 0 ! { dg-error "cannot be zero" }
+end do
+
+do r = 1, 0 ! { dg-warning "must be integer|executed zero times" }
+end do
+
+do r = 1, -1, 1 ! { dg-warning "must be integer|executed zero times" }
+end do
+
+do r = 1, 2, -1 ! { dg-warning "must be integer|executed zero times" }
+end do
+
+do r = 1, 2, 0 ! { dg-error "must be integer|cannot be zero" }
+end do
+end
diff --git a/gcc/testsuite/gfortran.dg/fmt_f0_1.f90 b/gcc/testsuite/gfortran.dg/fmt_f0_1.f90
new file mode 100644
index 00000000000..166846b87fe
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/fmt_f0_1.f90
@@ -0,0 +1,17 @@
+! { dg-do run )
+! PR39304 write of 0.0 with F0.3 gives **
+! Test case developed from case provided by reporter.
+ REAL :: x
+ CHARACTER(80) :: str
+ x = 0.0
+ write (str,'(f0.0)') x
+ if (str.ne."0.") call abort
+ write (str,'(f0.1)') x
+ if (str.ne."0.0") call abort
+ write (str,'(f0.2)') x
+ if (str.ne."0.00") call abort
+ write (str,'(f0.3)') x
+ if (str.ne."0.000") call abort
+ write (str,'(f0.4)') x
+ if (str.ne."0.0000") call abort
+ END
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr39354.f90 b/gcc/testsuite/gfortran.dg/gomp/pr39354.f90
new file mode 100644
index 00000000000..3b9c327849a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr39354.f90
@@ -0,0 +1,37 @@
+! PR fortran/39354
+! { dg-do compile }
+! { dg-options "-fopenmp" }
+ SUBROUTINE ltest(l1, l2, l3, l4, r1, r2, r3, r4)
+ LOGICAL l1, l2, l3, l4, r1, r2, r3, r4
+!$OMP ATOMIC
+ l1 = l1 .and. r1
+!$OMP ATOMIC
+ l2 = l2 .or. r2
+!$OMP ATOMIC
+ l3 = l3 .eqv. r3
+!$OMP ATOMIC
+ l4 = l4 .neqv. r4
+ END
+ SUBROUTINE itest(l1, l2, l3, l4, l5, l6, l7, l8, l9, &
+& r1, r2, r3, r4, r5, r6, r7, r8, r9)
+ INTEGER l1, l2, l3, l4, l5, l6, l7, l8, l9, &
+& r1, r2, r3, r4, r5, r6, r7, r8, r9
+!$OMP ATOMIC
+ l1 = l1 + r1
+!$OMP ATOMIC
+ l2 = l2 - r2
+!$OMP ATOMIC
+ l3 = l3 * r3
+!$OMP ATOMIC
+ l4 = l4 / r4
+!$OMP ATOMIC
+ l5 = max (l5, r1, r5)
+!$OMP ATOMIC
+ l6 = min (r1, r6, l6)
+!$OMP ATOMIC
+ l7 = iand (l7, r7)
+!$OMP ATOMIC
+ l8 = ior (r8, l8)
+!$OMP ATOMIC
+ l9 = ieor (l9, r9)
+ END
diff --git a/gcc/testsuite/gfortran.dg/goto_2.f90 b/gcc/testsuite/gfortran.dg/goto_2.f90
index acff590a9cd..fc5e8d83008 100644
--- a/gcc/testsuite/gfortran.dg/goto_2.f90
+++ b/gcc/testsuite/gfortran.dg/goto_2.f90
@@ -2,51 +2,51 @@
! Checks for corrects warnings if branching to then end of a
! construct at various nesting levels
subroutine check_if(i)
- goto 10
+ goto 10 ! { dg-warning "Label at ... is not in the same block" }
if (i > 0) goto 40
if (i < 0) then
goto 40
-10 end if
+10 end if ! { dg-warning "Label at ... is not in the same block" }
if (i == 0) then
i = i+1
- goto 20 ! { dg-warning "jumps to END of construct" }
+ goto 20
goto 40
-20 end if ! { dg-warning "jumps to END of construct" }
+20 end if
if (i == 1) then
i = i+1
if (i == 2) then
- goto 30 ! { dg-warning "jumps to END of construct" }
+ goto 30
end if
goto 40
-30 end if ! { dg-warning "jumps to END of construct" }
+30 end if
return
40 i = -1
end subroutine check_if
subroutine check_select(i)
- goto 10
+ goto 10 ! { dg-warning "Label at ... is not in the same block" }
select case (i)
case default
goto 999
-10 end select
+10 end select ! { dg-warning "Label at ... is not in the same block" }
select case (i)
case (2)
i = 1
- goto 20 ! { dg-warning "jumps to END of construct" }
+ goto 20
goto 999
case default
goto 999
-20 end select ! { dg-warning "jumps to END of construct" }
+20 end select
j = i
select case (j)
case default
select case (i)
case (1)
i = 2
- goto 30 ! { dg-warning "jumps to END of construct" }
+ goto 30
end select
goto 999
-30 end select ! { dg-warning "jumps to END of construct" }
+30 end select
return
999 i = -1
end subroutine check_select
diff --git a/gcc/testsuite/gfortran.dg/goto_4.f90 b/gcc/testsuite/gfortran.dg/goto_4.f90
index d48af7240fe..7340814cc01 100644
--- a/gcc/testsuite/gfortran.dg/goto_4.f90
+++ b/gcc/testsuite/gfortran.dg/goto_4.f90
@@ -1,10 +1,11 @@
! { dg-do run }
! PR 17708: Jumping to END DO statements didn't do the right thing
+! PR 38507: The warning we used to give was wrong
program test
j = 0
do 10 i=1,3
- if(i == 2) goto 10 ! { dg-warning "jumps to END" }
+ if(i == 2) goto 10
j = j+1
-10 enddo ! { dg-warning "jumps to END" }
+10 enddo
if (j/=2) call abort
end
diff --git a/gcc/testsuite/gfortran.dg/goto_5.f90 b/gcc/testsuite/gfortran.dg/goto_5.f90
new file mode 100644
index 00000000000..44ba6972492
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goto_5.f90
@@ -0,0 +1,44 @@
+! { dg-do compile }
+! PR 38507
+! Verify that we correctly flag invalid gotos, while not flagging valid gotos.
+integer i,j
+
+do i=1,10
+ goto 20
+20 end do ! { dg-warning "is not in the same block" }
+
+goto 20 ! { dg-warning "is not in the same block" }
+goto 25 ! { dg-warning "is not in the same block" }
+goto 40 ! { dg-warning "is not in the same block" }
+goto 50 ! { dg-warning "is not in the same block" }
+
+goto 222
+goto 333
+goto 444
+
+222 if (i < 0) then
+25 end if ! { dg-warning "is not in the same block" }
+
+333 if (i > 0) then
+ do j = 1,20
+ goto 30
+ end do
+else if (i == 0) then
+ goto 30
+else
+ goto 30
+30 end if
+
+444 select case(i)
+case(0)
+ goto 50
+ goto 60 ! { dg-warning "is not in the same block" }
+case(1)
+ goto 40
+ goto 50
+ 40 continue ! { dg-warning "is not in the same block" }
+ 60 continue ! { dg-warning "is not in the same block" }
+50 end select ! { dg-warning "is not in the same block" }
+continue
+
+end
diff --git a/gcc/testsuite/gfortran.dg/power1.f90 b/gcc/testsuite/gfortran.dg/power1.f90
new file mode 100644
index 00000000000..50dbac2756d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/power1.f90
@@ -0,0 +1,58 @@
+! { dg-do run }
+! Test fix for PR fortran/38823.
+program power
+
+ implicit none
+
+ integer, parameter :: &
+ & s = kind(1.e0), &
+ & d = kind(1.d0), &
+ & e = max(selected_real_kind(precision(1.d0)+1), d)
+
+ real(s), parameter :: ris = 2.e0_s**2
+ real(d), parameter :: rid = 2.e0_d**2
+ real(e), parameter :: rie = 2.e0_e**2
+ complex(s), parameter :: cis = (2.e0_s,1.e0_s)**2
+ complex(d), parameter :: cid = (2.e0_d,1.e0_d)**2
+ complex(e), parameter :: cie = (2.e0_e,1.e0_e)**2
+
+ real(s), parameter :: rrs = 2.e0_s**2.e0
+ real(d), parameter :: rrd = 2.e0_d**2.e0
+ real(e), parameter :: rre = 2.e0_e**2.e0
+ complex(s), parameter :: crs = (2.e0_s,1.e0_s)**2.e0
+ complex(d), parameter :: crd = (2.e0_d,1.e0_d)**2.e0
+ complex(e), parameter :: cre = (2.e0_e,1.e0_e)**2.e0
+
+ real(s), parameter :: rds = 2.e0_s**2.e0_d
+ real(d), parameter :: rdd = 2.e0_d**2.e0_d
+ real(e), parameter :: rde = 2.e0_e**2.e0_d
+ complex(s), parameter :: cds = (2.e0_s,1.e0_s)**2.e0_d
+ complex(d), parameter :: cdd = (2.e0_d,1.e0_d)**2.e0_d
+ complex(e), parameter :: cde = (2.e0_e,1.e0_e)**2.e0_d
+
+ real(s), parameter :: eps_s = 1.e-5_s
+ real(d), parameter :: eps_d = 1.e-10_d
+ real(e), parameter :: eps_e = 1.e-10_e
+
+ if (abs(ris - 4) > eps_s) call abort
+ if (abs(rid - 4) > eps_d) call abort
+ if (abs(rie - 4) > eps_e) call abort
+ if (abs(real(cis, s) - 3) > eps_s .or. abs(aimag(cis) - 4) > eps_s) call abort
+ if (abs(real(cid, d) - 3) > eps_d .or. abs(aimag(cid) - 4) > eps_d) call abort
+ if (abs(real(cie, e) - 3) > eps_e .or. abs(aimag(cie) - 4) > eps_e) call abort
+
+ if (abs(rrs - 4) > eps_s) call abort
+ if (abs(rrd - 4) > eps_d) call abort
+ if (abs(rre - 4) > eps_e) call abort
+ if (abs(real(crs, s) - 3) > eps_s .or. abs(aimag(crs) - 4) > eps_s) call abort
+ if (abs(real(crd, d) - 3) > eps_d .or. abs(aimag(crd) - 4) > eps_d) call abort
+ if (abs(real(cre, e) - 3) > eps_e .or. abs(aimag(cre) - 4) > eps_e) call abort
+
+ if (abs(rds - 4) > eps_s) call abort
+ if (abs(rdd - 4) > eps_d) call abort
+ if (abs(rde - 4) > eps_e) call abort
+ if (abs(real(cds, s) - 3) > eps_s .or. abs(aimag(cds) - 4) > eps_s) call abort
+ if (abs(real(cdd, d) - 3) > eps_d .or. abs(aimag(cdd) - 4) > eps_d) call abort
+ if (abs(real(cde, e) - 3) > eps_e .or. abs(aimag(cde) - 4) > eps_e) call abort
+
+end program power
diff --git a/gcc/testsuite/gfortran.dg/pr39516.f b/gcc/testsuite/gfortran.dg/pr39516.f
new file mode 100644
index 00000000000..3d6104a8ebf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr39516.f
@@ -0,0 +1,20 @@
+C PR tree-optimization/39516
+C { dg-do compile }
+C { dg-options "-O2 -ftree-loop-linear" }
+ SUBROUTINE SUB(A, B, M)
+ IMPLICIT NONE
+ DOUBLE PRECISION A(20,20), B(20)
+ INTEGER*8 I, J, K, M
+ DO I=1,M
+ DO J=1,M
+ A(I,J)=A(I,J)+1
+ END DO
+ END DO
+ DO K=1,20
+ DO I=1,M
+ DO J=1,M
+ B(I)=B(I)+A(I,J)
+ END DO
+ END DO
+ END DO
+ END SUBROUTINE
diff --git a/gcc/testsuite/gfortran.dg/read_repeat.f90 b/gcc/testsuite/gfortran.dg/read_repeat.f90
new file mode 100644
index 00000000000..192ebe81ffb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/read_repeat.f90
@@ -0,0 +1,24 @@
+! { dg-do run }
+! PR39528 repeated entries not read when using list-directed input.
+! Test case derived from reporters example.
+program rread
+ implicit none
+ integer :: iarr(1:7), ia, ib, i
+
+ iarr = 0
+
+ write(10,*) " 2*1 3*2 /"
+ write(10,*) " 12"
+ write(10,*) " 13"
+ rewind(10)
+
+ read(10,*) (iarr(i), i=1,7)
+ read(10,*) ia, ib
+
+ if (any(iarr(1:2).ne.1)) call abort
+ if (any(iarr(3:5).ne.2)) call abort
+ if (any(iarr(6:7).ne.0)) call abort
+ if (ia .ne. 12 .or. ib .ne. 13) call abort
+
+ close(10, status="delete")
+end program rread
diff --git a/gcc/testsuite/gfortran.dg/recursive_check_7.f90 b/gcc/testsuite/gfortran.dg/recursive_check_7.f90
new file mode 100644
index 00000000000..c1af8adc810
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/recursive_check_7.f90
@@ -0,0 +1,40 @@
+! { dg-do run }
+! { dg-options "-fcheck=recursion" }
+! { dg-shouldfail "Recursion check" }
+!
+! PR fortran/32626
+! Recursion run-time check
+!
+
+subroutine NormalFunc()
+end subroutine NormalFunc
+
+recursive subroutine valid(x)
+ logical :: x
+ if(x) call sndValid()
+ print *, 'OK'
+end subroutine valid
+
+subroutine sndValid()
+ call valid(.false.)
+end subroutine sndValid
+
+subroutine invalid(x)
+ logical :: x
+ if(x) call sndInvalid()
+ print *, 'BUG'
+ call abort()
+end subroutine invalid
+
+subroutine sndInvalid()
+ call invalid(.false.)
+end subroutine sndInvalid
+
+call valid(.true.)
+call valid(.true.)
+call NormalFunc()
+call NormalFunc()
+call invalid(.true.)
+end
+
+! { dg-output "Fortran runtime error: Recursive call to nonrecursive procedure 'invalid'" }
diff --git a/gcc/testsuite/gfortran.dg/trim_1.f90 b/gcc/testsuite/gfortran.dg/trim_1.f90
new file mode 100644
index 00000000000..ac1e1f2032d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/trim_1.f90
@@ -0,0 +1,41 @@
+! { dg-do run }
+
+! Torture-test TRIM and LEN_TRIM for correctness.
+
+
+! Given a total string length and a trimmed length, construct an
+! appropriate string and check gfortran gets it right.
+
+SUBROUTINE check_trim (full_len, trimmed_len)
+ IMPLICIT NONE
+ INTEGER, INTENT(IN) :: full_len, trimmed_len
+ CHARACTER(LEN=full_len) :: string
+
+ string = ""
+ IF (trimmed_len > 0) THEN
+ string(trimmed_len:trimmed_len) = "x"
+ END IF
+
+ IF (LEN (string) /= full_len &
+ .OR. LEN_TRIM (string) /= trimmed_len &
+ .OR. LEN (TRIM (string)) /= trimmed_len &
+ .OR. TRIM (string) /= string (1:trimmed_len)) THEN
+ PRINT *, full_len, trimmed_len
+ PRINT *, LEN (string), LEN_TRIM (string)
+ CALL abort ()
+ END IF
+END SUBROUTINE check_trim
+
+
+! The main program, check with various combinations.
+
+PROGRAM main
+ IMPLICIT NONE
+ INTEGER :: i, j
+
+ DO i = 0, 20
+ DO j = 0, i
+ CALL check_trim (i, j)
+ END DO
+ END DO
+END PROGRAM main
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_10.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_10.f03
new file mode 100644
index 00000000000..3f372c815f2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_10.f03
@@ -0,0 +1,43 @@
+! { dg-do compile }
+
+! Type-bound procedures
+! Test for resolution errors with DEFERRED, namely checks about invalid
+! overriding and taking into account inherited DEFERRED bindings.
+! Also check that DEFERRED attribute is saved to module correctly.
+
+MODULE m1
+ IMPLICIT NONE
+
+ ABSTRACT INTERFACE
+ SUBROUTINE intf ()
+ END SUBROUTINE intf
+ END INTERFACE
+
+ TYPE, ABSTRACT :: abstract_type
+ CONTAINS
+ PROCEDURE(intf), DEFERRED, NOPASS :: def
+ PROCEDURE, NOPASS :: nodef => realproc
+ END TYPE abstract_type
+
+CONTAINS
+
+ SUBROUTINE realproc ()
+ END SUBROUTINE realproc
+
+END MODULE m1
+
+MODULE m2
+ USE m1
+ IMPLICIT NONE
+
+ TYPE, ABSTRACT, EXTENDS(abstract_type) :: sub_type1
+ CONTAINS
+ PROCEDURE(intf), DEFERRED, NOPASS :: nodef ! { dg-error "must not be DEFERRED" }
+ END TYPE sub_type1
+
+ TYPE, EXTENDS(abstract_type) :: sub_type2 ! { dg-error "must be ABSTRACT" }
+ END TYPE sub_type2
+
+END MODULE m2
+
+! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_11.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_11.f03
new file mode 100644
index 00000000000..fafc149f574
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_11.f03
@@ -0,0 +1,33 @@
+! { dg-do compile }
+
+! Type-bound procedures
+! Test that legal usage of DEFERRED is accepted.
+
+MODULE testmod
+ IMPLICIT NONE
+
+ ABSTRACT INTERFACE
+ SUBROUTINE intf ()
+ END SUBROUTINE intf
+ END INTERFACE
+
+ TYPE, ABSTRACT :: abstract_type
+ CONTAINS
+ PROCEDURE(intf), DEFERRED, NOPASS :: p1
+ PROCEDURE(realproc), DEFERRED, NOPASS :: p2
+ END TYPE abstract_type
+
+ TYPE, EXTENDS(abstract_type) :: sub_type
+ CONTAINS
+ PROCEDURE, NOPASS :: p1 => realproc
+ PROCEDURE, NOPASS :: p2 => realproc
+ END TYPE sub_type
+
+CONTAINS
+
+ SUBROUTINE realproc ()
+ END SUBROUTINE realproc
+
+END MODULE testmod
+
+! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_4.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_4.f03
index 3eb9687ad02..92adc1a852a 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_4.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_4.f03
@@ -30,10 +30,6 @@ MODULE testmod
PROCEDURE, PUBLIC, PRIVATE ! { dg-error "Duplicate" }
PROCEDURE, NON_OVERRIDABLE, NON_OVERRIDABLE ! { dg-error "Duplicate" }
PROCEDURE, NOPASS, NOPASS ! { dg-error "illegal NOPASS" }
-
- ! TODO: Correct these when things get implemented.
- PROCEDURE, DEFERRED :: x ! { dg-error "not yet implemented" }
- PROCEDURE(abc) ! { dg-error "not yet implemented" }
END TYPE t
CONTAINS
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_9.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_9.f03
new file mode 100644
index 00000000000..9106de69579
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_9.f03
@@ -0,0 +1,33 @@
+! { dg-do compile }
+
+! Type-bound procedures
+! Test for basic parsing errors for invalid DEFERRED.
+
+MODULE testmod
+ IMPLICIT NONE
+
+ ABSTRACT INTERFACE
+ SUBROUTINE intf ()
+ END SUBROUTINE intf
+ END INTERFACE
+
+ TYPE not_abstract
+ CONTAINS
+ PROCEDURE(intf), DEFERRED, NOPASS :: proc ! { dg-error "is not ABSTRACT" }
+ END TYPE not_abstract
+
+ TYPE, ABSTRACT :: abstract_type
+ CONTAINS
+ PROCEDURE, DEFERRED :: p2 ! { dg-error "Interface must be specified" }
+ PROCEDURE(intf), NOPASS :: p3 ! { dg-error "should be declared DEFERRED" }
+ PROCEDURE(intf), DEFERRED, NON_OVERRIDABLE :: p4 ! { dg-error "can't both" }
+ PROCEDURE(unknown), DEFERRED :: p5 ! { dg-error "has no IMPLICIT|module procedure" }
+ PROCEDURE(intf), DEFERRED, DEFERRED :: p6 ! { dg-error "Duplicate DEFERRED" }
+ PROCEDURE(intf), DEFERRED :: p6 => proc ! { dg-error "is invalid for DEFERRED" }
+ PROCEDURE(), DEFERRED :: p7 ! { dg-error "Interface-name expected" }
+ PROCEDURE(intf, DEFERRED) :: p8 ! { dg-error "'\\)' expected" }
+ END TYPE abstract_type
+
+END MODULE testmod
+
+! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90 b/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90
new file mode 100644
index 00000000000..e16131502db
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90
@@ -0,0 +1,21 @@
+program mymatmul
+ implicit none
+ integer, parameter :: kp = 4
+ integer, parameter :: n = 2000
+ real(kp), dimension(n,n) :: rr, ri
+ complex(kp), dimension(n,n) :: a,b,c
+ real :: t1, t2
+ integer :: i, j, k
+
+ do j = 1, n
+ do k = 1, n
+ do i = 1, n
+ c(i,j) = c(i,j) + a(i,k) * b(k,j)
+ end do
+ end do
+ end do
+
+end program mymatmul
+
+! { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } }
+! { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/pr39318.f90 b/gcc/testsuite/gfortran.dg/vect/pr39318.f90
new file mode 100644
index 00000000000..9e58a17b526
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/vect/pr39318.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+! { dg-options "-c -fopenmp -fexceptions -O2 -ftree-vectorize" }
+
+ subroutine adw_trajsp (F_u,i0,in,j0,jn)
+ implicit none
+ real F_u(*)
+ integer i0,in,j0,jn
+ integer n,i,j
+ real*8 xsin(i0:in,j0:jn)
+!$omp parallel do private(xsin)
+ do j=j0,jn
+ do i=i0,in
+ xsin(i,j) = sqrt(F_u(n))
+ end do
+ end do
+!$omp end parallel do
+ return
+ end
+
+! { dg-final { cleanup-tree-dump "vect" } }
+
diff --git a/gcc/testsuite/gnat.dg/pack12.adb b/gcc/testsuite/gnat.dg/pack12.adb
new file mode 100644
index 00000000000..640ace325de
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/pack12.adb
@@ -0,0 +1,31 @@
+-- { dg-do run }
+
+procedure Pack12 is
+
+ type U16 is mod 2 ** 16;
+
+ type Key is record
+ Value : U16;
+ Valid : Boolean;
+ end record;
+
+ type Key_Buffer is record
+ Current, Latch : Key;
+ end record;
+
+ type Block is record
+ Keys : Key_Buffer;
+ Stamp : U16;
+ end record;
+ pragma Pack (Block);
+
+ My_Block : Block;
+ My_Stamp : constant := 16#1234#;
+
+begin
+ My_Block.Stamp := My_Stamp;
+ My_Block.Keys.Latch := My_Block.Keys.Current;
+ if My_Block.Stamp /= My_Stamp then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/slice_enum.adb b/gcc/testsuite/gnat.dg/slice_enum.adb
new file mode 100644
index 00000000000..cdaea47d65c
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/slice_enum.adb
@@ -0,0 +1,8 @@
+-- { dg-do compile }
+
+procedure Slice_Enum is
+ Pos : array (Boolean) of Integer;
+begin
+ Pos (Boolean) := (others => 0);
+end;
+
diff --git a/gcc/testsuite/lib/compat.exp b/gcc/testsuite/lib/compat.exp
index 049e5a23270..a4ec3601e56 100644
--- a/gcc/testsuite/lib/compat.exp
+++ b/gcc/testsuite/lib/compat.exp
@@ -170,6 +170,7 @@ proc compat-get-options-main { src } {
foreach op $tmp {
set cmd [lindex $op 0]
if { ![string compare "dg-options" $cmd] \
+ || [string match "dg-prune-output" $cmd] \
|| [string match "dg-skip-if" $cmd] \
|| [string match "dg-require-*" $cmd] } {
set status [catch "$op" errmsg]
@@ -215,6 +216,7 @@ proc compat-get-options { src } {
foreach op $tmp {
set cmd [lindex $op 0]
if { ![string compare "dg-options" $cmd] \
+ || ![string compare "dg-prune-output" $cmd] \
|| ![string compare "dg-xfail-if" $cmd] } {
set status [catch "$op" errmsg]
if { $status != 0 } {
diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
index 0570f41e6d7..7bcbcabc087 100644
--- a/gcc/testsuite/lib/gcc-defs.exp
+++ b/gcc/testsuite/lib/gcc-defs.exp
@@ -49,6 +49,11 @@ proc ${tool}_check_compile {testcase option objname gcc_output} {
set gcc_output [prune_warnings $gcc_output]
+ if { [info proc ${tool}-dg-prune] != "" } {
+ global target_triplet
+ set gcc_output [${tool}-dg-prune $target_triplet $gcc_output]
+ }
+
set unsupported_message [${tool}_check_unsupported_p $gcc_output]
if { $unsupported_message != "" } {
unsupported "$testcase: $unsupported_message"
diff --git a/gcc/testsuite/lib/target-libpath.exp b/gcc/testsuite/lib/target-libpath.exp
index 8999aa47980..c95cba6d784 100644
--- a/gcc/testsuite/lib/target-libpath.exp
+++ b/gcc/testsuite/lib/target-libpath.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,6 +25,8 @@ set orig_ld_library64_path_saved 0
set orig_ld_library_path_32_saved 0
set orig_ld_library_path_64_saved 0
set orig_dyld_library_path_saved 0
+set orig_gcc_exec_prefix_saved 0
+set orig_gcc_exec_prefix_checked 0
#######################################
@@ -42,6 +44,8 @@ proc set_ld_library_path_env_vars { } {
global orig_ld_library_path_32_saved
global orig_ld_library_path_64_saved
global orig_dyld_library_path_saved
+ global orig_gcc_exec_prefix_saved
+ global orig_gcc_exec_prefix_checked
global orig_ld_library_path
global orig_ld_run_path
global orig_shlib_path
@@ -50,11 +54,23 @@ proc set_ld_library_path_env_vars { } {
global orig_ld_library_path_32
global orig_ld_library_path_64
global orig_dyld_library_path
- global GCC_EXEC_PREFIX
+ global orig_gcc_exec_prefix
+ global TEST_GCC_EXEC_PREFIX
+ global env
- # Set the relocated compiler prefix, but only if the user hasn't specified one.
- if { [info exists GCC_EXEC_PREFIX] && ![info exists env(GCC_EXEC_PREFIX)] } {
- setenv GCC_EXEC_PREFIX "$GCC_EXEC_PREFIX"
+ # Save the original GCC_EXEC_PREFIX.
+ if { $orig_gcc_exec_prefix_checked == 0 } {
+ if [info exists env(GCC_EXEC_PREFIX)] {
+ set orig_gcc_exec_prefix "$env(GCC_EXEC_PREFIX)"
+ set orig_gcc_exec_prefix_saved 1
+ }
+ set orig_gcc_exec_prefix_checked 1
+ }
+
+ # Set GCC_EXEC_PREFIX for the compiler under test to pick up files not in
+ # the build tree from a specified location (normally the install tree).
+ if [info exists TEST_GCC_EXEC_PREFIX] {
+ setenv GCC_EXEC_PREFIX "$TEST_GCC_EXEC_PREFIX"
}
# Setting the ld library path causes trouble when testing cross-compilers.
@@ -63,8 +79,6 @@ proc set_ld_library_path_env_vars { } {
}
if { $orig_environment_saved == 0 } {
- global env
-
set orig_environment_saved 1
# Save the original environment.
@@ -187,6 +201,7 @@ proc restore_ld_library_path_env_vars { } {
global orig_ld_library_path_32_saved
global orig_ld_library_path_64_saved
global orig_dyld_library_path_saved
+ global orig_gcc_exec_prefix_saved
global orig_ld_library_path
global orig_ld_run_path
global orig_shlib_path
@@ -195,11 +210,19 @@ proc restore_ld_library_path_env_vars { } {
global orig_ld_library_path_32
global orig_ld_library_path_64
global orig_dyld_library_path
+ global orig_gcc_exec_prefix
+ global env
if { $orig_environment_saved == 0 } {
return
}
+ if { $orig_gcc_exec_prefix_saved } {
+ setenv GCC_EXEC_PREFIX "$orig_gcc_exec_prefix"
+ } elseif [info exists env(GCC_EXEC_PREFIX)] {
+ unsetenv GCC_EXEC_PREFIX
+ }
+
if { $orig_ld_library_path_saved } {
setenv LD_LIBRARY_PATH "$orig_ld_library_path"
} elseif [info exists env(LD_LIBRARY_PATH)] {
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 27ca50deceb..884e743d405 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2288,7 +2288,8 @@ proc check_effective_target_vect_short_mult { } {
|| [istarget spu-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
- || [istarget powerpc*-*-*] } {
+ || [istarget powerpc*-*-*]
+ || [check_effective_target_arm32] } {
set et_vect_short_mult_saved 1
}
}
diff --git a/gcc/testsuite/objc.dg/conditional-1.m b/gcc/testsuite/objc.dg/conditional-1.m
new file mode 100644
index 00000000000..0aad62c55f1
--- /dev/null
+++ b/gcc/testsuite/objc.dg/conditional-1.m
@@ -0,0 +1,45 @@
+/* Testing conditional warnings (without headers). */
+/* Author: David Ayers */
+
+/* { dg-do compile } */
+
+#define nil ((id)0)
+@interface MyObject
+@end
+
+@protocol MyProtocol
+@end
+
+@interface MyProtoObject <MyProtocol>
+@end
+
+
+int
+main (int argc, char *argv[])
+{
+ id var_id = nil;
+ id <MyProtocol> var_id_p = nil;
+ MyObject *var_obj = nil;
+ MyProtoObject *var_obj_p = nil;
+
+ var_id = (var_id == var_obj) ? var_id : var_obj;
+ var_id = (var_id == var_obj) ? var_id : var_obj_p;
+
+ /* Ayers: Currently, the following test case passes for
+ technically the wrong reason (see below).
+ */
+ var_obj_p = (var_id == var_obj) ? var_obj_p : var_obj; /* { dg-warning "distinct Objective-C types" } */
+ var_obj_p = (var_id == var_obj) ? var_obj_p : var_id_p;
+
+ /* Ayers: The first of the following test cases
+ should probably warn for var_obj_p = var_obj,
+ yet that would require extensive changes to
+ build_conditional_expr to create a tree with
+ multiple types that the assignment would have
+ to evaluate both versions for correct diagnostics.
+ */
+ var_obj_p = (var_id == var_obj) ? var_id : var_obj;
+ var_obj_p = (var_id == var_obj) ? var_id : var_obj_p;
+
+ return 0;
+}
diff --git a/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp b/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp
index 257c28e4805..b137b751ae0 100644
--- a/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp
+++ b/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp
@@ -17,6 +17,7 @@
# Load support procs.
load_lib objc-dg.exp
+load_lib target-libpath.exp
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
@@ -37,20 +38,11 @@ set generator_src "$srcdir/$subdir/struct-layout-encoding-1_generate.c"
set generator_src "$generator_src $srcdir/$subdir/generate-random.c"
set generator_src "$generator_src $srcdir/$subdir/generate-random_r.c"
set generator_cmd "-o $generator $generator_src"
-# Temporarily unset GCC_EXEC_PREFIX from environment, as that might
-# confuse the $HOSTCC.
-set orig_gcc_exec_prefix_saved 0
-if [info exists env(GCC_EXEC_PREFIX)] {
- set orig_gcc_exec_prefix "$env(GCC_EXEC_PREFIX)"
- set orig_gcc_exec_prefix_saved 1
- unsetenv GCC_EXEC_PREFIX
-}
+# Temporarily switch to the environment of the host compiler.
+restore_ld_library_path_env_vars
set status [remote_exec build "$HOSTCC $HOSTCFLAGS $generator_cmd"]
set status [lindex $status 0]
-if { $orig_gcc_exec_prefix_saved } {
- set orig_gcc_exec_prefix_saved 0
- setenv GCC_EXEC_PREFIX "$orig_gcc_exec_prefix"
-}
+set_ld_library_path_env_vars
if { $status == 0 } then {
file delete -force $tstobjdir
file mkdir $tstobjdir
diff --git a/gcc/testsuite/objc/execute/exceptions/handler-1.m b/gcc/testsuite/objc/execute/exceptions/handler-1.m
new file mode 100644
index 00000000000..9cd8df19c44
--- /dev/null
+++ b/gcc/testsuite/objc/execute/exceptions/handler-1.m
@@ -0,0 +1,38 @@
+/* Test custom exception handlers */
+/* Author: David Ayers */
+
+#include <objc/objc-api.h>
+#include <objc/Object.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+static unsigned int handlerExpected = 0;
+
+void
+my_exception_handler(id excp)
+{
+ /* Returning from the handler would abort. */
+ if (handlerExpected)
+ exit(0);
+
+ abort();
+}
+
+int
+main(int argc, char *argv[])
+{
+ _objc_unexpected_exception = my_exception_handler;
+
+ @try
+ {
+ @throw [Object new];
+ }
+ @catch (id exc)
+ {
+ handlerExpected = 1;
+ }
+
+ @throw [Object new];
+ abort();
+ return 0;
+}
diff --git a/gcc/testsuite/objc/execute/trivial.m b/gcc/testsuite/objc/execute/trivial.m
new file mode 100644
index 00000000000..f1dce2c1e2b
--- /dev/null
+++ b/gcc/testsuite/objc/execute/trivial.m
@@ -0,0 +1,7 @@
+#import <objc/Object.h>
+
+int main(void)
+{
+ [Object class];
+ return 0;
+}
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 5632a8930bc..9c5b2e6c58c 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -1796,9 +1796,21 @@ remove_useless_stmts_bind (gimple_stmt_iterator *gsi, struct rus_data *data ATTR
|| (TREE_CODE (BLOCK_ABSTRACT_ORIGIN (block))
!= FUNCTION_DECL)))
{
- gsi_insert_seq_before (gsi, body_seq, GSI_SAME_STMT);
- gsi_remove (gsi, false);
- data->repeat = true;
+ tree var = NULL_TREE;
+ /* Even if there are no gimple_bind_vars, there might be other
+ decls in BLOCK_VARS rendering the GIMPLE_BIND not useless. */
+ if (block && !BLOCK_NUM_NONLOCALIZED_VARS (block))
+ for (var = BLOCK_VARS (block); var; var = TREE_CHAIN (var))
+ if (TREE_CODE (var) == IMPORTED_DECL)
+ break;
+ if (var || (block && BLOCK_NUM_NONLOCALIZED_VARS (block)))
+ gsi_next (gsi);
+ else
+ {
+ gsi_insert_seq_before (gsi, body_seq, GSI_SAME_STMT);
+ gsi_remove (gsi, false);
+ data->repeat = true;
+ }
}
else
gsi_next (gsi);
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index bc9737dd951..ea67f1d00b4 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -698,7 +698,7 @@ dr_analyze_innermost (struct data_reference *dr)
}
base = build_fold_addr_expr (base);
- if (!simple_iv (loop, stmt, base, &base_iv, false))
+ if (!simple_iv (loop, loop_containing_stmt (stmt), base, &base_iv, false))
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "failed: evolution of base is not affine.\n");
@@ -709,7 +709,8 @@ dr_analyze_innermost (struct data_reference *dr)
offset_iv.base = ssize_int (0);
offset_iv.step = ssize_int (0);
}
- else if (!simple_iv (loop, stmt, poffset, &offset_iv, false))
+ else if (!simple_iv (loop, loop_containing_stmt (stmt),
+ poffset, &offset_iv, false))
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "failed: evolution of offset is not affine.\n");
@@ -2301,7 +2302,7 @@ analyze_subscript_affine_affine (tree chrec_a,
/* If the overlap occurs outside of the bounds of the
loop, there is no dependence. */
- if (x1 > niter || y1 > niter)
+ if (x1 >= niter || y1 >= niter)
{
*overlaps_a = conflict_fn_no_dependence ();
*overlaps_b = conflict_fn_no_dependence ();
diff --git a/gcc/tree-data-ref.h b/gcc/tree-data-ref.h
index 6477542879d..4a12f3946d8 100644
--- a/gcc/tree-data-ref.h
+++ b/gcc/tree-data-ref.h
@@ -291,14 +291,6 @@ struct data_dependence_relation
struct data_reference *a;
struct data_reference *b;
- /* When the dependence relation is affine, it can be represented by
- a distance vector. */
- bool affine_p;
-
- /* Set to true when the dependence relation is on the same data
- access. */
- bool self_reference_p;
-
/* A "yes/no/maybe" field for the dependence relation:
- when "ARE_DEPENDENT == NULL_TREE", there exist a dependence
@@ -320,18 +312,26 @@ struct data_dependence_relation
/* The analyzed loop nest. */
VEC (loop_p, heap) *loop_nest;
- /* An index in loop_nest for the innermost loop that varies for
- this data dependence relation. */
- unsigned inner_loop;
-
/* The classic direction vector. */
VEC (lambda_vector, heap) *dir_vects;
/* The classic distance vector. */
VEC (lambda_vector, heap) *dist_vects;
+ /* An index in loop_nest for the innermost loop that varies for
+ this data dependence relation. */
+ unsigned inner_loop;
+
/* Is the dependence reversed with respect to the lexicographic order? */
bool reversed_p;
+
+ /* When the dependence relation is affine, it can be represented by
+ a distance vector. */
+ bool affine_p;
+
+ /* Set to true when the dependence relation is on the same data
+ access. */
+ bool self_reference_p;
};
typedef struct data_dependence_relation *ddr_p;
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c
index df0be2df134..5241e64c929 100644
--- a/gcc/tree-dfa.c
+++ b/gcc/tree-dfa.c
@@ -1,6 +1,6 @@
/* Data flow functions for trees.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free Software
- Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+ Free Software Foundation, Inc.
Contributed by Diego Novillo <dnovillo@redhat.com>
This file is part of GCC.
@@ -639,7 +639,7 @@ set_default_def (tree var, tree def)
/* Add VAR to the list of referenced variables if it isn't already there. */
-void
+bool
add_referenced_var (tree var)
{
var_ann_t v_ann;
@@ -655,7 +655,7 @@ add_referenced_var (tree var)
/* Tag's don't have DECL_INITIAL. */
if (MTAG_P (var))
- return;
+ return true;
/* Scan DECL_INITIAL for pointer variables as they may contain
address arithmetic referencing the address of other
@@ -667,7 +667,11 @@ add_referenced_var (tree var)
optimizers. */
&& !DECL_EXTERNAL (var))
walk_tree (&DECL_INITIAL (var), find_vars_r, NULL, 0);
+
+ return true;
}
+
+ return false;
}
/* Remove VAR from the list. */
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index e4fbaf7327c..20e62edbf05 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -1946,11 +1946,34 @@ make_eh_edge (struct eh_region *region, void *data)
make_edge (src, dst, EDGE_ABNORMAL | EDGE_EH);
}
+/* See if STMT is call that might be inlined. */
+
+static bool
+inlinable_call_p (gimple stmt)
+{
+ tree decl;
+ if (gimple_code (stmt) != GIMPLE_CALL)
+ return false;
+ if (cfun->after_inlining)
+ return false;
+ /* Indirect calls can be propagated to direct call
+ and inlined. */
+ decl = gimple_call_fndecl (stmt);
+ if (!decl)
+ return true;
+ if (cgraph_function_flags_ready
+ && cgraph_function_body_availability (cgraph_node (decl))
+ < AVAIL_OVERWRITABLE)
+ return false;
+ return !DECL_UNINLINABLE (decl);
+}
+
void
make_eh_edges (gimple stmt)
{
int region_nr;
bool is_resx;
+ bool inlinable = false;
if (gimple_code (stmt) == GIMPLE_RESX)
{
@@ -1963,9 +1986,10 @@ make_eh_edges (gimple stmt)
if (region_nr < 0)
return;
is_resx = false;
+ inlinable = inlinable_call_p (stmt);
}
- foreach_reachable_handler (region_nr, is_resx, make_eh_edge, stmt);
+ foreach_reachable_handler (region_nr, is_resx, inlinable, make_eh_edge, stmt);
}
static bool mark_eh_edge_found_error;
@@ -2019,6 +2043,7 @@ verify_eh_edges (gimple stmt)
basic_block bb = gimple_bb (stmt);
edge_iterator ei;
edge e;
+ bool inlinable = false;
FOR_EACH_EDGE (e, ei, bb->succs)
gcc_assert (!e->aux);
@@ -2046,10 +2071,11 @@ verify_eh_edges (gimple stmt)
error ("BB %i last statement has incorrectly set region", bb->index);
return true;
}
+ inlinable = inlinable_call_p (stmt);
is_resx = false;
}
- foreach_reachable_handler (region_nr, is_resx, mark_eh_edge, stmt);
+ foreach_reachable_handler (region_nr, is_resx, inlinable, mark_eh_edge, stmt);
FOR_EACH_EDGE (e, ei, bb->succs)
{
if ((e->flags & EDGE_EH) && !e->aux)
@@ -2342,15 +2368,7 @@ stmt_could_throw_p (gimple stmt)
if (code == GIMPLE_ASSIGN || code == GIMPLE_COND)
return stmt_could_throw_1_p (stmt);
else if (is_gimple_call (stmt))
- {
- tree t = gimple_call_fndecl (stmt);
-
- /* Assume that calls to weak functions may trap. */
- if (!t || !DECL_P (t) || DECL_WEAK (t))
- return true;
-
- return (gimple_call_flags (stmt) & ECF_NOTHROW) == 0;
- }
+ return (gimple_call_flags (stmt) & ECF_NOTHROW) == 0;
else if (gimple_code (stmt) == GIMPLE_ASM)
return (gimple_asm_volatile_p (stmt));
else
@@ -2384,6 +2402,32 @@ tree_could_throw_p (tree t)
return false;
}
+/* Return true if STMT can throw an exception that is not caught within
+ the current function (CFUN). */
+
+bool
+stmt_can_throw_external (gimple stmt)
+{
+ int region_nr;
+ bool is_resx = false;
+ bool inlinable_call = false;
+
+ if (!stmt_could_throw_p (stmt))
+ return false;
+
+ if (gimple_code (stmt) == GIMPLE_RESX)
+ {
+ region_nr = gimple_resx_region (stmt);
+ is_resx = true;
+ }
+ else
+ region_nr = lookup_stmt_eh_region (stmt);
+
+ if (region_nr < 0)
+ return true;
+
+ return can_throw_external_1 (region_nr, is_resx, inlinable_call);
+}
/* Return true if STMT can throw an exception that is caught within
the current function (CFUN). */
@@ -2393,6 +2437,7 @@ stmt_can_throw_internal (gimple stmt)
{
int region_nr;
bool is_resx = false;
+ bool inlinable_call = false;
if (gimple_code (stmt) == GIMPLE_RESX)
{
@@ -2400,12 +2445,15 @@ stmt_can_throw_internal (gimple stmt)
is_resx = true;
}
else
- region_nr = lookup_stmt_eh_region (stmt);
+ {
+ region_nr = lookup_stmt_eh_region (stmt);
+ inlinable_call = inlinable_call_p (stmt);
+ }
if (region_nr < 0)
return false;
- return can_throw_internal_1 (region_nr, is_resx);
+ return can_throw_internal_1 (region_nr, is_resx, inlinable_call);
}
@@ -2591,3 +2639,274 @@ struct gimple_opt_pass pass_refactor_eh =
TODO_dump_func /* todo_flags_finish */
}
};
+
+/* Walk statements, see what regions are really references and remove unreachable ones. */
+
+static void
+tree_remove_unreachable_handlers (void)
+{
+ sbitmap reachable, contains_stmt;
+ VEC(int,heap) * label_to_region;
+ basic_block bb;
+
+ label_to_region = label_to_region_map ();
+ reachable = sbitmap_alloc (num_eh_regions ());
+ sbitmap_zero (reachable);
+ contains_stmt = sbitmap_alloc (num_eh_regions ());
+ sbitmap_zero (contains_stmt);
+
+ FOR_EACH_BB (bb)
+ {
+ gimple_stmt_iterator gsi;
+ int region;
+ bool has_eh_preds = false;
+ edge e;
+ edge_iterator ei;
+
+ FOR_EACH_EDGE (e, ei, bb->preds) if (e->flags & EDGE_EH)
+ has_eh_preds = true;
+
+ for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+ {
+ gimple stmt = gsi_stmt (gsi);
+
+ if (gimple_code (stmt) == GIMPLE_LABEL && has_eh_preds)
+ {
+ int uid = LABEL_DECL_UID (gimple_label_label (stmt));
+ if (uid <= cfun->cfg->last_label_uid)
+ {
+ int region = VEC_index (int, label_to_region, uid);
+ SET_BIT (reachable, region);
+ }
+ }
+ if (gimple_code (stmt) == RESX)
+ SET_BIT (reachable, gimple_resx_region (stmt));
+ if ((region = lookup_stmt_eh_region (stmt)) >= 0)
+ SET_BIT (contains_stmt, region);
+ }
+ }
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "Before removal of unreachable regions:\n");
+ dump_eh_tree (dump_file, cfun);
+ fprintf (dump_file, "Reachable regions: ");
+ dump_sbitmap_file (dump_file, reachable);
+ fprintf (dump_file, "Regions containing insns: ");
+ dump_sbitmap_file (dump_file, contains_stmt);
+ }
+
+ remove_unreachable_regions (reachable, contains_stmt);
+ sbitmap_free (reachable);
+ sbitmap_free (contains_stmt);
+ VEC_free (int, heap, label_to_region);
+ if (dump_file)
+ {
+ fprintf (dump_file, "\n\nAfter removal of unreachable regions:\n");
+ dump_eh_tree (dump_file, cfun);
+ fprintf (dump_file, "\n\n");
+ }
+}
+
+/* Pattern match emtpy EH receiver looking like:
+
+ save_filt.6352_662 = [filter_expr] <<<filter object>>>;
+ save_eptr.6351_663 = [exc_ptr_expr] <<<exception object>>>;
+ <<<exception object>>> = save_eptr.6351_663;
+ <<<filter object>>> = save_filt.6352_662;
+ resx 1
+ */
+
+static int
+tree_empty_eh_handler_p (basic_block bb)
+{
+ gimple_stmt_iterator gsi;
+ int region;
+
+ gsi = gsi_last_bb (bb);
+
+ /* RESX */
+ if (gsi_end_p (gsi))
+ return 0;
+ if (gimple_code (gsi_stmt (gsi)) != GIMPLE_RESX)
+ return 0;
+ region = gimple_resx_region (gsi_stmt (gsi));
+
+ /* filter_object set. */
+ gsi_prev (&gsi);
+ if (gsi_end_p (gsi))
+ return 0;
+ if (gimple_code (gsi_stmt (gsi)) != GIMPLE_ASSIGN)
+ return 0;
+ if (TREE_CODE (gimple_assign_lhs (gsi_stmt (gsi))) != FILTER_EXPR)
+ return 0;
+
+ /* filter_object set. */
+ gsi_prev (&gsi);
+ if (gsi_end_p (gsi))
+ return 0;
+ if (gimple_code (gsi_stmt (gsi)) != GIMPLE_ASSIGN)
+ return 0;
+ if (TREE_CODE (gimple_assign_lhs (gsi_stmt (gsi))) != EXC_PTR_EXPR)
+ return 0;
+
+ /* filter_object get. */
+ gsi_prev (&gsi);
+ if (gsi_end_p (gsi))
+ return 0;
+ if (gimple_code (gsi_stmt (gsi)) != GIMPLE_ASSIGN)
+ return 0;
+ if (TREE_CODE (gimple_assign_rhs1 (gsi_stmt (gsi))) != EXC_PTR_EXPR)
+ return 0;
+
+ /* filter_object get. */
+ gsi_prev (&gsi);
+ if (gsi_end_p (gsi))
+ return 0;
+ if (gimple_code (gsi_stmt (gsi)) != GIMPLE_ASSIGN)
+ return 0;
+ if (TREE_CODE (gimple_assign_rhs1 (gsi_stmt (gsi))) != FILTER_EXPR)
+ return 0;
+
+ /* label. */
+ gsi_prev (&gsi);
+ if (gsi_end_p (gsi))
+ return 0;
+ if (gimple_code (gsi_stmt (gsi)) == GIMPLE_LABEL)
+ return region;
+ else
+ return 0;
+}
+
+static bool dominance_info_invalidated;
+
+/* Look for basic blocks containing empty exception handler and remove them.
+ This is similar to jump forwarding, just across EH edges. */
+
+static bool
+cleanup_empty_eh (basic_block bb)
+{
+ int region;
+
+ /* When handler of EH region winds up to be empty, we can safely
+ remove it. This leads to inner EH regions to be redirected
+ to outer one, if present in function. So we need to rebuild
+ EH edges in all sources. */
+ if ((region = tree_empty_eh_handler_p (bb)))
+ {
+ edge_iterator ei;
+ edge e;
+ gimple_stmt_iterator si;
+
+ remove_eh_region (region);
+
+ /* It is safe to mark symbol for renaming because we have abnormal PHI
+ here. Once EH edges are made redirectable we might need to add here
+ similar updating as jump threading does. */
+
+ for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
+ mark_sym_for_renaming (SSA_NAME_VAR (PHI_RESULT (gsi_stmt (si))));
+
+ while ((e = ei_safe_edge (ei_start (bb->preds))))
+ {
+ basic_block src = e->src;
+ gcc_assert (e->flags & EDGE_EH);
+ for (ei = ei_start (src->succs); (e = ei_safe_edge (ei));)
+ {
+ if (e->flags & EDGE_EH)
+ {
+ remove_edge (e);
+ dominance_info_invalidated = true;
+ }
+ else
+ ei_next (&ei);
+ }
+ if (!stmt_can_throw_internal (last_stmt (src)))
+ continue;
+ make_eh_edges (last_stmt (src));
+ FOR_EACH_EDGE (e, ei, src->succs) if (e->flags & EDGE_EH)
+ {
+ dominance_info_invalidated = true;
+ for (si = gsi_start_phis (e->dest); !gsi_end_p (si);
+ gsi_next (&si))
+ mark_sym_for_renaming (SSA_NAME_VAR
+ (PHI_RESULT (gsi_stmt (si))));
+ }
+ }
+ if (dump_file)
+ fprintf (dump_file, "Empty EH handler %i removed\n", region);
+ delete_basic_block (bb);
+ return true;
+ }
+ return false;
+}
+
+
+/* Perform cleanups and lowering of exception handling
+ 1) cleanups regions with handlers doing nothing are optimized out
+ 2) MUST_NOT_THROW regions that became dead because of 1) are optimized out
+ 3) Info about regions that are containing instructions, and regions
+ reachable via local EH edges is collected
+ 4) Eh tree is pruned for regions no longer neccesary.
+ */
+
+static unsigned int
+cleanup_eh (void)
+{
+ bool changed = false;
+ basic_block bb;
+ int i;
+
+ if (!cfun->eh)
+ return 0;
+ if (dump_file)
+ {
+ fprintf (dump_file, "Before cleanups:\n");
+ dump_eh_tree (dump_file, cfun);
+ }
+
+ dominance_info_invalidated = false;
+ /* We cannot use FOR_EACH_BB, since the basic blocks may get removed. */
+ for (i = NUM_FIXED_BLOCKS; i < last_basic_block; i++)
+ {
+ bb = BASIC_BLOCK (i);
+ if (bb)
+ changed |= cleanup_empty_eh (bb);
+ }
+ if (dominance_info_invalidated)
+ {
+ free_dominance_info (CDI_DOMINATORS);
+ free_dominance_info (CDI_POST_DOMINATORS);
+ }
+
+ /* Removing contained cleanup can render MUST_NOT_THROW regions empty. */
+ if (changed)
+ delete_unreachable_blocks ();
+
+ tree_remove_unreachable_handlers ();
+ if (dump_file)
+ {
+ fprintf (dump_file, "After cleanups:\n");
+ dump_eh_tree (dump_file, cfun);
+ }
+
+ return (changed ? TODO_cleanup_cfg | TODO_update_ssa : 0);
+}
+
+struct gimple_opt_pass pass_cleanup_eh = {
+ {
+ GIMPLE_PASS,
+ "ehcleanup", /* name */
+ NULL, /* gate */
+ cleanup_eh, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_TREE_EH, /* tv_id */
+ PROP_gimple_lcf, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_dump_func /* todo_flags_finish */
+ }
+};
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 3bedd358428..07fb9be31e8 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -768,7 +768,7 @@ extern void dump_referenced_vars (FILE *);
extern void dump_variable (FILE *, tree);
extern void debug_variable (tree);
extern tree get_virtual_var (tree);
-extern void add_referenced_var (tree);
+extern bool add_referenced_var (tree);
extern void remove_referenced_var (tree);
extern void mark_symbols_for_renaming (gimple);
extern void find_new_referenced_vars (gimple);
@@ -991,7 +991,7 @@ unsigned int tree_ssa_prefetch_arrays (void);
unsigned int remove_empty_loops (void);
void tree_ssa_iv_optimize (void);
unsigned tree_predictive_commoning (void);
-tree canonicalize_loop_ivs (struct loop *, htab_t, tree);
+tree canonicalize_loop_ivs (struct loop *, htab_t, tree *);
bool parallelize_loops (void);
bool loop_only_exit_p (const struct loop *, const_edge);
@@ -1077,6 +1077,7 @@ extern bool operation_could_trap_p (enum tree_code, bool, bool, tree);
extern bool stmt_could_throw_p (gimple);
extern bool tree_could_throw_p (tree);
extern bool stmt_can_throw_internal (gimple);
+extern bool stmt_can_throw_external (gimple);
extern void add_stmt_to_eh_region (gimple, int);
extern bool remove_stmt_from_eh_region (gimple);
extern bool maybe_clean_or_replace_eh_stmt (gimple, gimple);
@@ -1145,6 +1146,7 @@ tree force_gimple_operand (tree, gimple_seq *, bool, tree);
tree force_gimple_operand_gsi (gimple_stmt_iterator *, tree, bool, tree,
bool, enum gsi_iterator_update);
tree gimple_fold_indirect_ref (tree);
+void mark_addressable (tree);
/* In tree-ssa-structalias.c */
bool find_what_p_points_to (tree);
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index fd4443c74f9..37d9098034f 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -1,5 +1,5 @@
/* Tree inlining.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Alexandre Oliva <aoliva@redhat.com>
@@ -122,7 +122,6 @@ eni_weights eni_time_weights;
static tree declare_return_variable (copy_body_data *, tree, tree, tree *);
static bool inlinable_function_p (tree);
static void remap_block (tree *, copy_body_data *);
-static tree remap_decls (tree, copy_body_data *);
static void copy_bind_expr (tree *, int *, copy_body_data *);
static tree mark_local_for_remap_r (tree *, int *, void *);
static void unsave_expr_1 (tree);
@@ -427,8 +426,65 @@ remap_type (tree type, copy_body_data *id)
return tmp;
}
+/* Return previously remapped type of TYPE in ID. Return NULL if TYPE
+ is NULL or TYPE has not been remapped before. */
+
static tree
-remap_decls (tree decls, copy_body_data *id)
+remapped_type (tree type, copy_body_data *id)
+{
+ tree *node;
+
+ if (type == NULL)
+ return type;
+
+ /* See if we have remapped this type. */
+ node = (tree *) pointer_map_contains (id->decl_map, type);
+ if (node)
+ return *node;
+ else
+ return NULL;
+}
+
+ /* The type only needs remapping if it's variably modified. */
+/* Decide if DECL can be put into BLOCK_NONLOCAL_VARs. */
+
+static bool
+can_be_nonlocal (tree decl, copy_body_data *id)
+{
+ /* We can not duplicate function decls. */
+ if (TREE_CODE (decl) == FUNCTION_DECL)
+ return true;
+
+ /* Local static vars must be non-local or we get multiple declaration
+ problems. */
+ if (TREE_CODE (decl) == VAR_DECL
+ && !auto_var_in_fn_p (decl, id->src_fn))
+ return true;
+
+ /* At the moment dwarf2out can handle only these types of nodes. We
+ can support more later. */
+ if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != PARM_DECL)
+ return false;
+
+ /* We must use global type. We call remapped_type instead of
+ remap_type since we don't want to remap this type here if it
+ hasn't been remapped before. */
+ if (TREE_TYPE (decl) != remapped_type (TREE_TYPE (decl), id))
+ return false;
+
+ /* Wihtout SSA we can't tell if variable is used. */
+ if (!gimple_in_ssa_p (cfun))
+ return false;
+
+ /* Live variables must be copied so we can attach DECL_RTL. */
+ if (var_ann (decl))
+ return false;
+
+ return true;
+}
+
+static tree
+remap_decls (tree decls, VEC(tree,gc) **nonlocalized_list, copy_body_data *id)
{
tree old_var;
tree new_decls = NULL_TREE;
@@ -437,16 +493,18 @@ remap_decls (tree decls, copy_body_data *id)
for (old_var = decls; old_var; old_var = TREE_CHAIN (old_var))
{
tree new_var;
+ tree origin_var = DECL_ORIGIN (old_var);
- /* We cannot chain the local static declarations into the local_decls
- as we can't duplicate them or break one decl rule. Go ahead
- and link them into local_decls. */
-
- if (!auto_var_in_fn_p (old_var, id->src_fn)
- && !DECL_EXTERNAL (old_var))
+ if (can_be_nonlocal (old_var, id))
{
- cfun->local_decls = tree_cons (NULL_TREE, old_var,
- cfun->local_decls);
+ if (TREE_CODE (old_var) == VAR_DECL
+ && (var_ann (old_var) || !gimple_in_ssa_p (cfun)))
+ cfun->local_decls = tree_cons (NULL_TREE, old_var,
+ cfun->local_decls);
+ if (debug_info_level > DINFO_LEVEL_TERSE
+ && !DECL_IGNORED_P (old_var)
+ && nonlocalized_list)
+ VEC_safe_push (tree, gc, *nonlocalized_list, origin_var);
continue;
}
@@ -456,8 +514,16 @@ remap_decls (tree decls, copy_body_data *id)
/* If we didn't remap this variable, we can't mess with its
TREE_CHAIN. If we remapped this variable to the return slot, it's
already declared somewhere else, so don't declare it here. */
- if (!new_var || new_var == id->retvar)
+
+ if (new_var == id->retvar)
;
+ else if (!new_var)
+ {
+ if (debug_info_level > DINFO_LEVEL_TERSE
+ && !DECL_IGNORED_P (old_var)
+ && nonlocalized_list)
+ VEC_safe_push (tree, gc, *nonlocalized_list, origin_var);
+ }
else
{
gcc_assert (DECL_P (new_var));
@@ -485,10 +551,14 @@ remap_block (tree *block, copy_body_data *id)
TREE_USED (new_block) = TREE_USED (old_block);
BLOCK_ABSTRACT_ORIGIN (new_block) = old_block;
BLOCK_SOURCE_LOCATION (new_block) = BLOCK_SOURCE_LOCATION (old_block);
+ BLOCK_NONLOCALIZED_VARS (new_block)
+ = VEC_copy (tree, gc, BLOCK_NONLOCALIZED_VARS (old_block));
*block = new_block;
/* Remap its variables. */
- BLOCK_VARS (new_block) = remap_decls (BLOCK_VARS (old_block), id);
+ BLOCK_VARS (new_block) = remap_decls (BLOCK_VARS (old_block),
+ &BLOCK_NONLOCALIZED_VARS (new_block),
+ id);
fn = id->dst_fn;
@@ -549,7 +619,7 @@ copy_bind_expr (tree *tp, int *walk_subtrees, copy_body_data *id)
if (BIND_EXPR_VARS (*tp))
/* This will remap a lot of the same decls again, but this should be
harmless. */
- BIND_EXPR_VARS (*tp) = remap_decls (BIND_EXPR_VARS (*tp), id);
+ BIND_EXPR_VARS (*tp) = remap_decls (BIND_EXPR_VARS (*tp), NULL, id);
}
@@ -595,7 +665,7 @@ copy_gimple_bind (gimple stmt, copy_body_data *id)
harmless. */
new_vars = gimple_bind_vars (stmt);
if (new_vars)
- new_vars = remap_decls (new_vars, id);
+ new_vars = remap_decls (new_vars, NULL, id);
new_bind = gimple_build_bind (new_vars, new_body, new_block);
@@ -2040,6 +2110,10 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
We need to construct map for the variable anyway as it might be used
in different SSA names when parameter is set in function.
+ Do replacement at -O0 for const arguments replaced by constant.
+ This is important for builtin_constant_p and other construct requiring
+ constant argument to be visible in inlined function body.
+
FIXME: This usually kills the last connection in between inlined
function parameter and the actual value in debug info. Can we do
better here? If we just inserted the statement, copy propagation
@@ -2048,6 +2122,9 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
We might want to introduce a notion that single SSA_NAME might
represent multiple variables for purposes of debugging. */
if (gimple_in_ssa_p (cfun) && rhs && def && is_gimple_reg (p)
+ && (optimize
+ || (TREE_READONLY (p)
+ && is_gimple_min_invariant (rhs)))
&& (TREE_CODE (rhs) == SSA_NAME
|| is_gimple_min_invariant (rhs))
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (def))
@@ -2058,7 +2135,7 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
/* If the value of argument is never used, don't care about initializing
it. */
- if (gimple_in_ssa_p (cfun) && !def && is_gimple_reg (p))
+ if (optimize && gimple_in_ssa_p (cfun) && !def && is_gimple_reg (p))
{
gcc_assert (!value || !TREE_SIDE_EFFECTS (value));
return NULL;
@@ -3076,7 +3153,7 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
tree modify_dest;
location_t saved_location;
struct cgraph_edge *cg_edge;
- const char *reason;
+ cgraph_inline_failed_t reason;
basic_block return_block;
edge e;
gimple_stmt_iterator gsi, stmt_gsi;
@@ -3141,7 +3218,7 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
cgraph_create_edge (id->dst_node, dest, stmt,
bb->count, CGRAPH_FREQ_BASE,
bb->loop_depth)->inline_failed
- = N_("originally indirect function call not considered for inlining");
+ = CIF_ORIGINALLY_INDIRECT_CALL;
if (dump_file)
{
fprintf (dump_file, "Created new direct edge to %s",
@@ -3164,18 +3241,19 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
/* Avoid warnings during early inline pass. */
&& cgraph_global_info_ready)
{
- sorry ("inlining failed in call to %q+F: %s", fn, reason);
+ sorry ("inlining failed in call to %q+F: %s", fn,
+ cgraph_inline_failed_string (reason));
sorry ("called from here");
}
else if (warn_inline && DECL_DECLARED_INLINE_P (fn)
&& !DECL_IN_SYSTEM_HEADER (fn)
- && strlen (reason)
+ && reason != CIF_UNSPECIFIED
&& !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn))
/* Avoid warnings during early inline pass. */
&& cgraph_global_info_ready)
{
warning (OPT_Winline, "inlining failed in call to %q+F: %s",
- fn, reason);
+ fn, cgraph_inline_failed_string (reason));
warning (OPT_Winline, "called from here");
}
goto egress;
@@ -3305,26 +3383,29 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
DECL_NO_TBAA_P (retvar) = 1;
}
- /* This is it. Duplicate the callee body. Assume callee is
- pre-gimplified. Note that we must not alter the caller
- function in any way before this point, as this CALL_EXPR may be
- a self-referential call; if we're calling ourselves, we need to
- duplicate our body before altering anything. */
- copy_body (id, bb->count, bb->frequency, bb, return_block);
-
/* Add local vars in this inlined callee to caller. */
t_step = id->src_cfun->local_decls;
for (; t_step; t_step = TREE_CHAIN (t_step))
{
var = TREE_VALUE (t_step);
if (TREE_STATIC (var) && !TREE_ASM_WRITTEN (var))
- cfun->local_decls = tree_cons (NULL_TREE, var,
- cfun->local_decls);
- else
+ {
+ if (var_ann (var) && add_referenced_var (var))
+ cfun->local_decls = tree_cons (NULL_TREE, var,
+ cfun->local_decls);
+ }
+ else if (!can_be_nonlocal (var, id))
cfun->local_decls = tree_cons (NULL_TREE, remap_decl (var, id),
- cfun->local_decls);
+ cfun->local_decls);
}
+ /* This is it. Duplicate the callee body. Assume callee is
+ pre-gimplified. Note that we must not alter the caller
+ function in any way before this point, as this CALL_EXPR may be
+ a self-referential call; if we're calling ourselves, we need to
+ duplicate our body before altering anything. */
+ copy_body (id, bb->count, bb->frequency, bb, return_block);
+
/* Clean up. */
pointer_map_destroy (id->decl_map);
id->decl_map = st;
@@ -3905,7 +3986,7 @@ replace_locals_stmt (gimple_stmt_iterator *gsip,
/* This will remap a lot of the same decls again, but this should be
harmless. */
if (gimple_bind_vars (stmt))
- gimple_bind_set_vars (stmt, remap_decls (gimple_bind_vars (stmt), id));
+ gimple_bind_set_vars (stmt, remap_decls (gimple_bind_vars (stmt), NULL, id));
}
/* Keep iterating. */
@@ -4140,7 +4221,7 @@ copy_arguments_for_versioning (tree orig_parm, copy_body_data * id,
*parg = new_tree;
parg = &TREE_CHAIN (new_tree);
}
- else
+ else if (!pointer_map_contains (id->decl_map, arg))
{
/* Make an equivalent VAR_DECL. If the argument was used
as temporary variable later in function, the uses will be
@@ -4188,6 +4269,29 @@ tree_versionable_function_p (tree fndecl)
return true;
}
+/* Create a new name for omp child function. Returns an identifier. */
+
+static GTY(()) unsigned int clone_fn_id_num;
+
+static tree
+clone_function_name (tree decl)
+{
+ tree name = DECL_ASSEMBLER_NAME (decl);
+ size_t len = IDENTIFIER_LENGTH (name);
+ char *tmp_name, *prefix;
+
+ prefix = XALLOCAVEC (char, len + strlen ("_clone") + 1);
+ memcpy (prefix, IDENTIFIER_POINTER (name), len);
+ strcpy (prefix + len, "_clone");
+#ifndef NO_DOT_IN_LABEL
+ prefix[len] = '.';
+#elif !defined NO_DOLLAR_IN_LABEL
+ prefix[len] = '$';
+#endif
+ ASM_FORMAT_PRIVATE_NAME (tmp_name, prefix, clone_fn_id_num++);
+ return get_identifier (tmp_name);
+}
+
/* Create a copy of a function's tree.
OLD_DECL and NEW_DECL are FUNCTION_DECL tree nodes
of the original function and the new copied function
@@ -4220,6 +4324,12 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map,
old_version_node = cgraph_node (old_decl);
new_version_node = cgraph_node (new_decl);
+ /* Output the inlining info for this abstract function, since it has been
+ inlined. If we don't do this now, we can lose the information about the
+ variables in the function when the blocks get blown away as soon as we
+ remove the cgraph node. */
+ (*debug_hooks->outlining_inline_function) (old_decl);
+
DECL_ARTIFICIAL (new_decl) = 1;
DECL_ABSTRACT_ORIGIN (new_decl) = DECL_ORIGIN (old_decl);
@@ -4229,7 +4339,7 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map,
/* Generate a new name for the new version. */
if (!update_clones)
{
- DECL_NAME (new_decl) = create_tmp_var_name (NULL);
+ DECL_NAME (new_decl) = clone_function_name (old_decl);
SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl));
SET_DECL_RTL (new_decl, NULL_RTX);
id.statements_to_fold = pointer_set_create ();
@@ -4263,16 +4373,6 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map,
DECL_STRUCT_FUNCTION (new_decl)->static_chain_decl =
copy_static_chain (DECL_STRUCT_FUNCTION (old_decl)->static_chain_decl,
&id);
- /* Copy the function's arguments. */
- if (DECL_ARGUMENTS (old_decl) != NULL_TREE)
- DECL_ARGUMENTS (new_decl) =
- copy_arguments_for_versioning (DECL_ARGUMENTS (old_decl), &id,
- args_to_skip, &vars);
-
- DECL_INITIAL (new_decl) = remap_blocks (DECL_INITIAL (id.src_fn), &id);
-
- /* Renumber the lexical scoping (non-code) blocks consecutively. */
- number_blocks (id.dst_fn);
/* If there's a tree_map, prepare for substitution. */
if (tree_map)
@@ -4307,6 +4407,16 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map,
VEC_safe_push (gimple, heap, init_stmts, init);
}
}
+ /* Copy the function's arguments. */
+ if (DECL_ARGUMENTS (old_decl) != NULL_TREE)
+ DECL_ARGUMENTS (new_decl) =
+ copy_arguments_for_versioning (DECL_ARGUMENTS (old_decl), &id,
+ args_to_skip, &vars);
+
+ DECL_INITIAL (new_decl) = remap_blocks (DECL_INITIAL (id.src_fn), &id);
+
+ /* Renumber the lexical scoping (non-code) blocks consecutively. */
+ number_blocks (id.dst_fn);
declare_inline_vars (DECL_INITIAL (new_decl), vars);
if (DECL_STRUCT_FUNCTION (old_decl)->local_decls != NULL_TREE)
@@ -4317,7 +4427,7 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map,
tree var = TREE_VALUE (t_step);
if (TREE_STATIC (var) && !TREE_ASM_WRITTEN (var))
cfun->local_decls = tree_cons (NULL_TREE, var, cfun->local_decls);
- else
+ else if (!can_be_nonlocal (var, &id))
cfun->local_decls =
tree_cons (NULL_TREE, remap_decl (var, &id),
cfun->local_decls);
@@ -4434,3 +4544,5 @@ tree_can_inline_p (tree caller, tree callee)
/* Allow the backend to decide if inlining is ok. */
return targetm.target_option.can_inline_p (caller, callee);
}
+
+#include "gt-tree-inline.h"
diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c
index 40e7508f613..7e811cf8c9d 100644
--- a/gcc/tree-nrv.c
+++ b/gcc/tree-nrv.c
@@ -121,6 +121,10 @@ tree_nrv (void)
if (is_gimple_reg_type (result_type))
return 0;
+ /* If the front end already did something like this, don't do it here. */
+ if (DECL_NAME (result))
+ return 0;
+
/* Look through each block for assignments to the RESULT_DECL. */
FOR_EACH_BB (bb)
{
@@ -138,8 +142,8 @@ tree_nrv (void)
if (ret_val)
gcc_assert (ret_val == result);
}
- else if (is_gimple_assign (stmt)
- && gimple_assign_lhs (stmt) == result)
+ else if (gimple_has_lhs (stmt)
+ && gimple_get_lhs (stmt) == result)
{
tree rhs;
@@ -173,9 +177,9 @@ tree_nrv (void)
TREE_TYPE (found)))
return 0;
}
- else if (is_gimple_assign (stmt))
+ else if (gimple_has_lhs (stmt))
{
- tree addr = get_base_address (gimple_assign_lhs (stmt));
+ tree addr = get_base_address (gimple_get_lhs (stmt));
/* If there's any MODIFY of component of RESULT,
then bail out. */
if (addr && addr == result)
@@ -199,10 +203,17 @@ tree_nrv (void)
/* At this point we know that all the return statements return the
same local which has suitable attributes for NRV. Copy debugging
- information from FOUND to RESULT. */
- DECL_NAME (result) = DECL_NAME (found);
- DECL_SOURCE_LOCATION (result) = DECL_SOURCE_LOCATION (found);
- DECL_ABSTRACT_ORIGIN (result) = DECL_ABSTRACT_ORIGIN (found);
+ information from FOUND to RESULT if it will be useful. But don't set
+ DECL_ABSTRACT_ORIGIN to point at another function. */
+ if (!DECL_IGNORED_P (found)
+ && !(DECL_ABSTRACT_ORIGIN (found)
+ && DECL_CONTEXT (DECL_ABSTRACT_ORIGIN (found)) != current_function_decl))
+ {
+ DECL_NAME (result) = DECL_NAME (found);
+ DECL_SOURCE_LOCATION (result) = DECL_SOURCE_LOCATION (found);
+ DECL_ABSTRACT_ORIGIN (result) = DECL_ABSTRACT_ORIGIN (found);
+ }
+
TREE_ADDRESSABLE (result) = TREE_ADDRESSABLE (found);
/* Now walk through the function changing all references to VAR to be
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index 2640167face..d69fd2949df 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -293,9 +293,6 @@ execute_fixup_cfg (void)
gimple_stmt_iterator gsi;
int todo = gimple_in_ssa_p (cfun) ? TODO_verify_ssa : 0;
- cfun->after_inlining = true;
- cfun->always_inline_functions_inlined = true;
-
if (cfun->eh)
FOR_EACH_BB (bb)
{
@@ -314,6 +311,7 @@ execute_fixup_cfg (void)
if (gimple_in_ssa_p (cfun))
{
todo |= TODO_update_ssa | TODO_cleanup_cfg;
+ mark_symbols_for_renaming (stmt);
update_stmt (stmt);
}
}
@@ -333,6 +331,25 @@ execute_fixup_cfg (void)
return todo;
}
+struct gimple_opt_pass pass_fixup_cfg =
+{
+ {
+ GIMPLE_PASS,
+ NULL, /* name */
+ NULL, /* gate */
+ execute_fixup_cfg, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ 0, /* tv_id */
+ PROP_cfg, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0 /* todo_flags_finish */
+ }
+};
+
/* Do the actions required to initialize internal data structures used
in tree-ssa optimization passes. */
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index f1d7227e4c1..4e9b102973a 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -385,7 +385,7 @@ loop_parallel_p (struct loop *loop, htab_t reduction_list,
tree def = PHI_RESULT (phi);
affine_iv iv;
- if (is_gimple_reg (def) && !simple_iv (loop, phi, def, &iv, true))
+ if (is_gimple_reg (def) && !simple_iv (loop, loop, def, &iv, true))
{
struct reduction_info *red;
@@ -1321,16 +1321,20 @@ create_loop_fn (void)
return decl;
}
-/* Bases all the induction variables in LOOP on a single induction variable
- (unsigned with base 0 and step 1), whose final value is compared with
- NIT. The induction variable is incremented in the loop latch.
- REDUCTION_LIST describes the reductions in LOOP. Return the induction
- variable that was created. */
+/* Bases all the induction variables in LOOP on a single induction
+ variable (unsigned with base 0 and step 1), whose final value is
+ compared with *NIT. When the IV type precision has to be larger
+ than *NIT type precision, *NIT is converted to the larger type, the
+ conversion code is inserted before the loop, and *NIT is updated to
+ the new definition. The induction variable is incremented in the
+ loop latch. REDUCTION_LIST describes the reductions in LOOP.
+ Return the induction variable that was created. */
tree
-canonicalize_loop_ivs (struct loop *loop, htab_t reduction_list, tree nit)
+canonicalize_loop_ivs (struct loop *loop, htab_t reduction_list, tree *nit)
{
- unsigned precision = TYPE_PRECISION (TREE_TYPE (nit));
+ unsigned precision = TYPE_PRECISION (TREE_TYPE (*nit));
+ unsigned original_precision = precision;
tree res, type, var_before, val, atype, mtype;
gimple_stmt_iterator gsi, psi;
gimple phi, stmt;
@@ -1338,6 +1342,7 @@ canonicalize_loop_ivs (struct loop *loop, htab_t reduction_list, tree nit)
affine_iv iv;
edge exit = single_dom_exit (loop);
struct reduction_info *red;
+ gimple_seq stmts;
for (psi = gsi_start_phis (loop->header);
!gsi_end_p (psi); gsi_next (&psi))
@@ -1351,6 +1356,14 @@ canonicalize_loop_ivs (struct loop *loop, htab_t reduction_list, tree nit)
type = lang_hooks.types.type_for_size (precision, 1);
+ if (original_precision != precision)
+ {
+ *nit = fold_convert (type, *nit);
+ *nit = force_gimple_operand (*nit, &stmts, true, NULL_TREE);
+ if (stmts)
+ gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts);
+ }
+
gsi = gsi_last_bb (loop->latch);
create_iv (build_int_cst_type (type, 0), build_int_cst (type, 1), NULL_TREE,
loop, &gsi, true, &var_before, NULL);
@@ -1367,7 +1380,7 @@ canonicalize_loop_ivs (struct loop *loop, htab_t reduction_list, tree nit)
continue;
}
- ok = simple_iv (loop, phi, res, &iv, true);
+ ok = simple_iv (loop, loop, res, &iv, true);
if (reduction_list)
red = reduction_phi (reduction_list, phi);
@@ -1410,7 +1423,7 @@ canonicalize_loop_ivs (struct loop *loop, htab_t reduction_list, tree nit)
}
gimple_cond_set_code (stmt, LT_EXPR);
gimple_cond_set_lhs (stmt, var_before);
- gimple_cond_set_rhs (stmt, nit);
+ gimple_cond_set_rhs (stmt, *nit);
update_stmt (stmt);
return var_before;
@@ -1760,7 +1773,7 @@ gen_parallel_loop (struct loop *loop, htab_t reduction_list,
free_original_copy_tables ();
/* Base all the induction variables in LOOP on a single control one. */
- canonicalize_loop_ivs (loop, reduction_list, nit);
+ canonicalize_loop_ivs (loop, reduction_list, &nit);
/* Ensure that the exit condition is the first statement in the loop. */
transform_to_exit_first_loop (loop, reduction_list, nit);
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index db437a62538..96239c494d8 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -210,6 +210,7 @@ struct dump_file_info
#define PROP_rtl (1 << 7)
#define PROP_alias (1 << 8)
#define PROP_gimple_lomp (1 << 9) /* lowered OpenMP directives */
+#define PROP_cfglayout (1 << 10) /* cfglayout mode on RTL */
#define PROP_trees \
(PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_lomp)
@@ -309,6 +310,8 @@ extern struct gimple_opt_pass pass_tree_profile;
extern struct gimple_opt_pass pass_early_tree_profile;
extern struct gimple_opt_pass pass_cleanup_cfg;
extern struct gimple_opt_pass pass_referenced_vars;
+extern struct gimple_opt_pass pass_cleanup_eh;
+extern struct gimple_opt_pass pass_fixup_cfg;
extern struct gimple_opt_pass pass_sra;
extern struct gimple_opt_pass pass_sra_early;
extern struct gimple_opt_pass pass_tail_recursion;
@@ -388,6 +391,7 @@ extern struct gimple_opt_pass pass_reassoc;
extern struct gimple_opt_pass pass_rebuild_cgraph_edges;
extern struct gimple_opt_pass pass_build_cgraph_edges;
extern struct gimple_opt_pass pass_reset_cc_flags;
+extern struct gimple_opt_pass pass_local_pure_const;
/* IPA Passes */
extern struct ipa_opt_pass pass_ipa_inline;
@@ -523,6 +527,7 @@ extern void execute_pass_list (struct opt_pass *);
extern void execute_ipa_pass_list (struct opt_pass *);
extern void print_current_pass (FILE *);
extern void debug_pass (void);
+extern bool function_called_by_processed_nodes_p (void);
/* Set to true if the pass is called the first time during compilation of the
current function. Note that using this information in the optimization
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index 5ce8c3ea066..bd82a8016fb 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -1374,7 +1374,7 @@ ref_at_iteration (struct loop *loop, tree ref, int iter)
else
return NULL_TREE;
- ok = simple_iv (loop, first_stmt (loop->header), idx, &iv, true);
+ ok = simple_iv (loop, loop, idx, &iv, true);
if (!ok)
return NULL_TREE;
iv.base = expand_simple_operations (iv.base);
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index d7f97d705a1..8e12c2b32ab 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -1915,12 +1915,54 @@ analyze_scalar_evolution (struct loop *loop, tree var)
}
/* Analyze scalar evolution of use of VERSION in USE_LOOP with respect to
- WRTO_LOOP (which should be a superloop of both USE_LOOP and definition
- of VERSION).
+ WRTO_LOOP (which should be a superloop of USE_LOOP)
FOLDED_CASTS is set to true if resolve_mixers used
chrec_convert_aggressive (TODO -- not really, we are way too conservative
- at the moment in order to keep things simple). */
+ at the moment in order to keep things simple).
+
+ To illustrate the meaning of USE_LOOP and WRTO_LOOP, consider the following
+ example:
+
+ for (i = 0; i < 100; i++) -- loop 1
+ {
+ for (j = 0; j < 100; j++) -- loop 2
+ {
+ k1 = i;
+ k2 = j;
+
+ use2 (k1, k2);
+
+ for (t = 0; t < 100; t++) -- loop 3
+ use3 (k1, k2);
+
+ }
+ use1 (k1, k2);
+ }
+
+ Both k1 and k2 are invariants in loop3, thus
+ analyze_scalar_evolution_in_loop (loop3, loop3, k1) = k1
+ analyze_scalar_evolution_in_loop (loop3, loop3, k2) = k2
+
+ As they are invariant, it does not matter whether we consider their
+ usage in loop 3 or loop 2, hence
+ analyze_scalar_evolution_in_loop (loop2, loop3, k1) =
+ analyze_scalar_evolution_in_loop (loop2, loop2, k1) = i
+ analyze_scalar_evolution_in_loop (loop2, loop3, k2) =
+ analyze_scalar_evolution_in_loop (loop2, loop2, k2) = [0,+,1]_2
+
+ Similarly for their evolutions with respect to loop 1. The values of K2
+ in the use in loop 2 vary independently on loop 1, thus we cannot express
+ the evolution with respect to loop 1:
+ analyze_scalar_evolution_in_loop (loop1, loop3, k1) =
+ analyze_scalar_evolution_in_loop (loop1, loop2, k1) = [0,+,1]_1
+ analyze_scalar_evolution_in_loop (loop1, loop3, k2) =
+ analyze_scalar_evolution_in_loop (loop1, loop2, k2) = dont_know
+
+ The value of k2 in the use in loop 1 is known, though:
+ analyze_scalar_evolution_in_loop (loop1, loop1, k1) = [0,+,1]_1
+ analyze_scalar_evolution_in_loop (loop1, loop1, k2) = 100
+ */
static tree
analyze_scalar_evolution_in_loop (struct loop *wrto_loop, struct loop *use_loop,
@@ -1929,6 +1971,25 @@ analyze_scalar_evolution_in_loop (struct loop *wrto_loop, struct loop *use_loop,
bool val = false;
tree ev = version, tmp;
+ /* We cannot just do
+
+ tmp = analyze_scalar_evolution (use_loop, version);
+ ev = resolve_mixers (wrto_loop, tmp);
+
+ as resolve_mixers would query the scalar evolution with respect to
+ wrto_loop. For example, in the situation described in the function
+ comment, suppose that wrto_loop = loop1, use_loop = loop3 and
+ version = k2. Then
+
+ analyze_scalar_evolution (use_loop, version) = k2
+
+ and resolve_mixers (loop1, k2) finds that the value of k2 in loop 1
+ is 100, which is a wrong result, since we are interested in the
+ value in loop 3.
+
+ Instead, we need to proceed from use_loop to wrto_loop loop by loop,
+ each time checking that there is no evolution in the inner loop. */
+
if (folded_casts)
*folded_casts = false;
while (1)
@@ -2743,17 +2804,31 @@ scev_reset (void)
}
}
-/* Checks whether OP behaves as a simple affine iv of LOOP in STMT and returns
- its base and step in IV if possible. If ALLOW_NONCONSTANT_STEP is true, we
- want step to be invariant in LOOP. Otherwise we require it to be an
- integer constant. IV->no_overflow is set to true if we are sure the iv cannot
- overflow (e.g. because it is computed in signed arithmetics). */
+/* Checks whether use of OP in USE_LOOP behaves as a simple affine iv with
+ respect to WRTO_LOOP and returns its base and step in IV if possible
+ (see analyze_scalar_evolution_in_loop for more details on USE_LOOP
+ and WRTO_LOOP). If ALLOW_NONCONSTANT_STEP is true, we want step to be
+ invariant in LOOP. Otherwise we require it to be an integer constant.
+
+ IV->no_overflow is set to true if we are sure the iv cannot overflow (e.g.
+ because it is computed in signed arithmetics). Consequently, adding an
+ induction variable
+
+ for (i = IV->base; ; i += IV->step)
+
+ is only safe if IV->no_overflow is false, or TYPE_OVERFLOW_UNDEFINED is
+ false for the type of the induction variable, or you can prove that i does
+ not wrap by some other argument. Otherwise, this might introduce undefined
+ behavior, and
+
+ for (i = iv->base; ; i = (type) ((unsigned type) i + (unsigned type) iv->step))
+
+ must be used instead. */
bool
-simple_iv (struct loop *loop, gimple stmt, tree op, affine_iv *iv,
- bool allow_nonconstant_step)
+simple_iv (struct loop *wrto_loop, struct loop *use_loop, tree op,
+ affine_iv *iv, bool allow_nonconstant_step)
{
- basic_block bb = gimple_bb (stmt);
tree type, ev;
bool folded_casts;
@@ -2766,13 +2841,13 @@ simple_iv (struct loop *loop, gimple stmt, tree op, affine_iv *iv,
&& TREE_CODE (type) != POINTER_TYPE)
return false;
- ev = analyze_scalar_evolution_in_loop (loop, bb->loop_father, op,
+ ev = analyze_scalar_evolution_in_loop (wrto_loop, use_loop, op,
&folded_casts);
- if (chrec_contains_undetermined (ev))
+ if (chrec_contains_undetermined (ev)
+ || chrec_contains_symbols_defined_in_loop (ev, wrto_loop->num))
return false;
- if (tree_does_not_contain_chrecs (ev)
- && !chrec_contains_symbols_defined_in_loop (ev, loop->num))
+ if (tree_does_not_contain_chrecs (ev))
{
iv->base = ev;
iv->step = build_int_cst (TREE_TYPE (ev), 0);
@@ -2781,22 +2856,16 @@ simple_iv (struct loop *loop, gimple stmt, tree op, affine_iv *iv,
}
if (TREE_CODE (ev) != POLYNOMIAL_CHREC
- || CHREC_VARIABLE (ev) != (unsigned) loop->num)
+ || CHREC_VARIABLE (ev) != (unsigned) wrto_loop->num)
return false;
iv->step = CHREC_RIGHT (ev);
- if (allow_nonconstant_step)
- {
- if (tree_contains_chrecs (iv->step, NULL)
- || chrec_contains_symbols_defined_in_loop (iv->step, loop->num))
- return false;
- }
- else if (TREE_CODE (iv->step) != INTEGER_CST)
+ if ((!allow_nonconstant_step && TREE_CODE (iv->step) != INTEGER_CST)
+ || tree_contains_chrecs (iv->step, NULL))
return false;
iv->base = CHREC_LEFT (ev);
- if (tree_contains_chrecs (iv->base, NULL)
- || chrec_contains_symbols_defined_in_loop (iv->base, loop->num))
+ if (tree_contains_chrecs (iv->base, NULL))
return false;
iv->no_overflow = !folded_casts && TYPE_OVERFLOW_UNDEFINED (type);
diff --git a/gcc/tree-scalar-evolution.h b/gcc/tree-scalar-evolution.h
index 072f25d2963..06324972ca5 100644
--- a/gcc/tree-scalar-evolution.h
+++ b/gcc/tree-scalar-evolution.h
@@ -36,7 +36,7 @@ extern void scev_analysis (void);
unsigned int scev_const_prop (void);
bool expression_expensive_p (tree);
-extern bool simple_iv (struct loop *, gimple, tree, affine_iv *, bool);
+extern bool simple_iv (struct loop *, struct loop *, tree, affine_iv *, bool);
/* Returns the basic block preceding LOOP or ENTRY_BLOCK_PTR when the
loop is function's body. */
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 636e30b8f88..6149ff551f9 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1713,16 +1713,6 @@ try_instantiate_multiple_fields (struct sra_elt *elt, tree f)
gcc_assert (block && block->is_scalar);
var = block->replacement;
-
- if ((bit & ~alchk)
- || (HOST_WIDE_INT)size != tree_low_cst (DECL_SIZE (var), 1))
- {
- block->replacement = fold_build3 (BIT_FIELD_REF,
- TREE_TYPE (block->element), var,
- bitsize_int (size),
- bitsize_int (bit & ~alchk));
- }
-
block->in_bitfld_block = 2;
/* Add the member fields to the group, such that they access
@@ -1736,12 +1726,14 @@ try_instantiate_multiple_fields (struct sra_elt *elt, tree f)
gcc_assert (fld && fld->is_scalar && !fld->replacement);
fld->replacement = fold_build3 (BIT_FIELD_REF, field_type, var,
- DECL_SIZE (f),
+ bitsize_int (TYPE_PRECISION (field_type)),
bitsize_int
((TREE_INT_CST_LOW (DECL_FIELD_OFFSET (f))
* BITS_PER_UNIT
+ (TREE_INT_CST_LOW
- (DECL_FIELD_BIT_OFFSET (f))))
+ (DECL_FIELD_BIT_OFFSET (f)))
+ - (TREE_INT_CST_LOW
+ (TREE_OPERAND (block->element, 2))))
& ~alchk));
fld->in_bitfld_block = 1;
}
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index d6027268a7d..c7df5884783 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -208,6 +208,7 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "target.h"
#include "toplev.h"
+#include "dbgcnt.h"
/* Possible lattice values. */
@@ -320,52 +321,45 @@ get_default_value (tree var)
{
tree sym = SSA_NAME_VAR (var);
prop_value_t val = { UNINITIALIZED, NULL_TREE };
- tree cst_val;
-
- if (!is_gimple_reg (var))
- {
- /* Short circuit for regular CCP. We are not interested in any
- non-register when DO_STORE_CCP is false. */
- val.lattice_val = VARYING;
- }
- else if ((cst_val = get_symbol_constant_value (sym)) != NULL_TREE)
+ gimple stmt;
+
+ stmt = SSA_NAME_DEF_STMT (var);
+
+ if (gimple_nop_p (stmt))
{
- /* Globals and static variables declared 'const' take their
- initial value. */
- val.lattice_val = CONSTANT;
- val.value = cst_val;
+ /* Variables defined by an empty statement are those used
+ before being initialized. If VAR is a local variable, we
+ can assume initially that it is UNDEFINED, otherwise we must
+ consider it VARYING. */
+ if (is_gimple_reg (sym) && TREE_CODE (sym) != PARM_DECL)
+ val.lattice_val = UNDEFINED;
+ else
+ val.lattice_val = VARYING;
}
- else
- {
- gimple stmt = SSA_NAME_DEF_STMT (var);
-
- if (gimple_nop_p (stmt))
+ else if (is_gimple_assign (stmt)
+ /* Value-returning GIMPLE_CALL statements assign to
+ a variable, and are treated similarly to GIMPLE_ASSIGN. */
+ || (is_gimple_call (stmt)
+ && gimple_call_lhs (stmt) != NULL_TREE)
+ || gimple_code (stmt) == GIMPLE_PHI)
+ {
+ tree cst;
+ if (gimple_assign_single_p (stmt)
+ && DECL_P (gimple_assign_rhs1 (stmt))
+ && (cst = get_symbol_constant_value (gimple_assign_rhs1 (stmt))))
{
- /* Variables defined by an empty statement are those used
- before being initialized. If VAR is a local variable, we
- can assume initially that it is UNDEFINED, otherwise we must
- consider it VARYING. */
- if (is_gimple_reg (sym) && TREE_CODE (sym) != PARM_DECL)
- val.lattice_val = UNDEFINED;
- else
- val.lattice_val = VARYING;
- }
- else if (is_gimple_assign (stmt)
- /* Value-returning GIMPLE_CALL statements assign to
- a variable, and are treated similarly to GIMPLE_ASSIGN. */
- || (is_gimple_call (stmt)
- && gimple_call_lhs (stmt) != NULL_TREE)
- || gimple_code (stmt) == GIMPLE_PHI)
- {
- /* Any other variable defined by an assignment or a PHI node
- is considered UNDEFINED. */
- val.lattice_val = UNDEFINED;
+ val.lattice_val = CONSTANT;
+ val.value = cst;
}
else
- {
- /* Otherwise, VAR will never take on a constant value. */
- val.lattice_val = VARYING;
- }
+ /* Any other variable defined by an assignment or a PHI node
+ is considered UNDEFINED. */
+ val.lattice_val = UNDEFINED;
+ }
+ else
+ {
+ /* Otherwise, VAR will never take on a constant value. */
+ val.lattice_val = VARYING;
}
return val;
@@ -501,6 +495,7 @@ likely_value (gimple stmt)
bool has_constant_operand, has_undefined_operand, all_undefined_operands;
tree use;
ssa_op_iter iter;
+ unsigned i;
enum gimple_code code = gimple_code (stmt);
@@ -516,33 +511,11 @@ likely_value (gimple stmt)
if (gimple_has_volatile_ops (stmt))
return VARYING;
- /* If we are not doing store-ccp, statements with loads
- and/or stores will never fold into a constant. */
- if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS))
- return VARYING;
-
- /* Note that only a GIMPLE_SINGLE_RHS assignment can satisfy
- is_gimple_min_invariant, so we do not consider calls or
- other forms of assignment. */
- if (gimple_assign_single_p (stmt)
- && is_gimple_min_invariant (gimple_assign_rhs1 (stmt)))
- return CONSTANT;
-
- if (code == GIMPLE_COND
- && is_gimple_min_invariant (gimple_cond_lhs (stmt))
- && is_gimple_min_invariant (gimple_cond_rhs (stmt)))
- return CONSTANT;
-
- if (code == GIMPLE_SWITCH
- && is_gimple_min_invariant (gimple_switch_index (stmt)))
- return CONSTANT;
-
/* Arrive here for more complex cases. */
-
has_constant_operand = false;
has_undefined_operand = false;
all_undefined_operands = true;
- FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_USE | SSA_OP_VUSE)
+ FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_USE)
{
prop_value_t *val = get_value (use);
@@ -555,6 +528,17 @@ likely_value (gimple stmt)
has_constant_operand = true;
}
+ /* There may be constants in regular rhs operands. */
+ for (i = is_gimple_call (stmt) + gimple_has_lhs (stmt);
+ i < gimple_num_ops (stmt); ++i)
+ {
+ tree op = gimple_op (stmt, i);
+ if (!op || TREE_CODE (op) == SSA_NAME)
+ continue;
+ if (is_gimple_min_invariant (op))
+ has_constant_operand = true;
+ }
+
/* If the operation combines operands like COMPLEX_EXPR make sure to
not mark the result UNDEFINED if only one part of the result is
undefined. */
@@ -585,11 +569,11 @@ likely_value (gimple stmt)
if (has_undefined_operand)
return VARYING;
+ /* We do not consider virtual operands here -- load from read-only
+ memory may have only VARYING virtual operands, but still be
+ constant. */
if (has_constant_operand
- /* We do not consider virtual operands here -- load from read-only
- memory may have only VARYING virtual operands, but still be
- constant. */
- || ZERO_SSA_OPERANDS (stmt, SSA_OP_USE))
+ || gimple_references_memory_p (stmt))
return CONSTANT;
return VARYING;
@@ -605,9 +589,6 @@ surely_varying_stmt_p (gimple stmt)
if (gimple_has_volatile_ops (stmt))
return true;
- if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS))
- return true;
-
/* If it is a call and does not return a value or is not a
builtin and not an indirect call, it is varying. */
if (is_gimple_call (stmt))
@@ -619,6 +600,10 @@ surely_varying_stmt_p (gimple stmt)
return true;
}
+ /* Any other store operation is not interesting. */
+ else if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_DEFS))
+ return true;
+
/* Anything other than assignments and conditional jumps are not
interesting for CCP. */
if (gimple_code (stmt) != GIMPLE_ASSIGN
@@ -657,10 +642,7 @@ ccp_initialize (void)
/* If the statement will not produce a constant, mark
all its outputs VARYING. */
FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_ALL_DEFS)
- {
- if (is_varying)
- set_value_varying (def);
- }
+ set_value_varying (def);
}
prop_set_simulate_again (stmt, !is_varying);
}
@@ -685,6 +667,24 @@ ccp_initialize (void)
}
}
+/* Debug count support. Reset the values of ssa names
+ VARYING when the total number ssa names analyzed is
+ beyond the debug count specified. */
+
+static void
+do_dbg_cnt (void)
+{
+ unsigned i;
+ for (i = 0; i < num_ssa_names; i++)
+ {
+ if (!dbg_cnt (ccp))
+ {
+ const_val[i].lattice_val = VARYING;
+ const_val[i].value = NULL_TREE;
+ }
+ }
+}
+
/* Do final substitution of propagated values, cleanup the flowgraph and
free allocated storage.
@@ -694,8 +694,11 @@ ccp_initialize (void)
static bool
ccp_finalize (void)
{
+ bool something_changed;
+
+ do_dbg_cnt ();
/* Perform substitutions based on the known constant values. */
- bool something_changed = substitute_and_fold (const_val, false);
+ something_changed = substitute_and_fold (const_val, false);
free (const_val);
const_val = NULL;
@@ -953,6 +956,16 @@ ccp_fold (gimple stmt)
return fold_unary (VIEW_CONVERT_EXPR,
TREE_TYPE (rhs), val->value);
}
+ else if (TREE_CODE (rhs) == INDIRECT_REF
+ && TREE_CODE (TREE_OPERAND (rhs, 0)) == SSA_NAME)
+ {
+ prop_value_t *val = get_value (TREE_OPERAND (rhs, 0));
+ if (val->lattice_val == CONSTANT
+ && TREE_CODE (val->value) == ADDR_EXPR
+ && useless_type_conversion_p (TREE_TYPE (rhs),
+ TREE_TYPE (TREE_TYPE (val->value))))
+ rhs = TREE_OPERAND (val->value, 0);
+ }
return fold_const_aggregate_ref (rhs);
}
else if (kind == tcc_declaration)
@@ -1144,6 +1157,9 @@ fold_const_aggregate_ref (tree t)
unsigned HOST_WIDE_INT cnt;
tree cfield, cval;
+ if (TREE_CODE_CLASS (TREE_CODE (t)) == tcc_declaration)
+ return get_symbol_constant_value (t);
+
switch (TREE_CODE (t))
{
case ARRAY_REF:
@@ -1942,8 +1958,7 @@ maybe_fold_offset_to_address (tree addr, tree offset, tree orig_type)
|| (TREE_CODE (orig) == COMPONENT_REF
&& TREE_CODE (TREE_TYPE (TREE_OPERAND (orig, 1))) == ARRAY_TYPE))
&& (TREE_CODE (t) == ARRAY_REF
- || (TREE_CODE (t) == COMPONENT_REF
- && TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 1))) == ARRAY_TYPE))
+ || TREE_CODE (t) == COMPONENT_REF)
&& !operand_equal_p (TREE_CODE (orig) == ARRAY_REF
? TREE_OPERAND (orig, 0) : orig,
TREE_CODE (t) == ARRAY_REF
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index 654ba950228..5b3616394bb 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -892,7 +892,7 @@ copy_prop_visit_phi_node (gimple phi)
memory reference of all the other arguments. */
if (phi_val.value == NULL_TREE)
{
- phi_val.value = arg;
+ phi_val.value = arg_val->value ? arg_val->value : arg;
continue;
}
@@ -908,7 +908,8 @@ copy_prop_visit_phi_node (gimple phi)
}
}
- if (phi_val.value && set_copy_of_val (lhs, phi_val.value))
+ if (phi_val.value && may_propagate_copy (lhs, phi_val.value)
+ && set_copy_of_val (lhs, phi_val.value))
retval = (phi_val.value != lhs) ? SSA_PROP_INTERESTING : SSA_PROP_VARYING;
else
retval = SSA_PROP_NOT_INTERESTING;
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index dd45bb7bc45..859d6fe6172 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -147,6 +147,14 @@ along with GCC; see the file COPYING3. If not see
ptr2 = &x[index];
+ Or
+ ssa = (int) decl
+ res = ssa & 1
+
+ Provided that decl has known alignment >= 2, will get turned into
+
+ res = 0
+
We also propagate casts into SWITCH_EXPR and COND_EXPR conditions to
allow us to remove the cast and {NOT_EXPR,NEG_EXPR} into a subsequent
{NOT_EXPR,NEG_EXPR}.
@@ -820,19 +828,20 @@ forward_propagate_addr_expr_1 (tree name, tree def_rhs,
array_ref = TREE_OPERAND (def_rhs, 0);
if (TREE_CODE (array_ref) != ARRAY_REF
|| TREE_CODE (TREE_TYPE (TREE_OPERAND (array_ref, 0))) != ARRAY_TYPE
- || !integer_zerop (TREE_OPERAND (array_ref, 1)))
+ || TREE_CODE (TREE_OPERAND (array_ref, 1)) != INTEGER_CST)
return false;
rhs2 = gimple_assign_rhs2 (use_stmt);
- /* Try to optimize &x[0] p+ C where C is a multiple of the size
- of the elements in X into &x[C/element size]. */
+ /* Try to optimize &x[C1] p+ C2 where C2 is a multiple of the size
+ of the elements in X into &x[C1 + C2/element size]. */
if (TREE_CODE (rhs2) == INTEGER_CST)
{
tree new_rhs = maybe_fold_stmt_addition (gimple_expr_type (use_stmt),
- array_ref, rhs2);
+ def_rhs, rhs2);
if (new_rhs)
{
- gimple_assign_set_rhs_from_tree (use_stmt_gsi, new_rhs);
+ gimple_assign_set_rhs_from_tree (use_stmt_gsi,
+ unshare_expr (new_rhs));
use_stmt = gsi_stmt (*use_stmt_gsi);
update_stmt (use_stmt);
tidy_after_forward_propagate_addr (use_stmt);
@@ -845,6 +854,7 @@ forward_propagate_addr_expr_1 (tree name, tree def_rhs,
array elements, then the result is converted into the proper
type for the arithmetic. */
if (TREE_CODE (rhs2) == SSA_NAME
+ && integer_zerop (TREE_OPERAND (array_ref, 1))
&& useless_type_conversion_p (TREE_TYPE (name), TREE_TYPE (def_rhs))
/* Avoid problems with IVopts creating PLUS_EXPRs with a
different type than their operands. */
@@ -1124,6 +1134,45 @@ simplify_gimple_switch (gimple stmt)
}
}
+/* Run bitwise and assignments throug the folder. If the first argument is an
+ ssa name that is itself a result of a typecast of an ADDR_EXPR to an
+ integer, feed the ADDR_EXPR to the folder rather than the ssa name.
+*/
+
+static void
+simplify_bitwise_and (gimple_stmt_iterator *gsi, gimple stmt)
+{
+ tree res;
+ tree arg1 = gimple_assign_rhs1 (stmt);
+ tree arg2 = gimple_assign_rhs2 (stmt);
+
+ if (TREE_CODE (arg2) != INTEGER_CST)
+ return;
+
+ if (TREE_CODE (arg1) == SSA_NAME && !SSA_NAME_IS_DEFAULT_DEF (arg1))
+ {
+ gimple def = SSA_NAME_DEF_STMT (arg1);
+
+ if (gimple_assign_cast_p (def)
+ && INTEGRAL_TYPE_P (gimple_expr_type (def)))
+ {
+ tree op = gimple_assign_rhs1 (def);
+
+ if (TREE_CODE (op) == ADDR_EXPR)
+ arg1 = op;
+ }
+ }
+
+ res = fold_binary (BIT_AND_EXPR, TREE_TYPE (gimple_assign_lhs (stmt)),
+ arg1, arg2);
+ if (res && is_gimple_min_invariant (res))
+ {
+ gimple_assign_set_rhs_from_tree (gsi, res);
+ update_stmt (stmt);
+ }
+ return;
+}
+
/* Main entry point for the forward propagation optimizer. */
static unsigned int
@@ -1206,6 +1255,11 @@ tree_ssa_forward_propagate_single_use_vars (void)
else
gsi_next (&gsi);
}
+ else if (gimple_assign_rhs_code (stmt) == BIT_AND_EXPR)
+ {
+ simplify_bitwise_and (&gsi, stmt);
+ gsi_next (&gsi);
+ }
else
gsi_next (&gsi);
}
diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c
index 335fd068540..08048560cfb 100644
--- a/gcc/tree-ssa-ifcombine.c
+++ b/gcc/tree-ssa-ifcombine.c
@@ -380,6 +380,43 @@ ifcombine_ifandif (basic_block inner_cond_bb, basic_block outer_cond_bb)
return true;
}
+ /* See if we have two comparisons that we can merge into one. */
+ else if (TREE_CODE_CLASS (gimple_cond_code (inner_cond)) == tcc_comparison
+ && TREE_CODE_CLASS (gimple_cond_code (outer_cond)) == tcc_comparison
+ && operand_equal_p (gimple_cond_lhs (inner_cond),
+ gimple_cond_lhs (outer_cond), 0)
+ && operand_equal_p (gimple_cond_rhs (inner_cond),
+ gimple_cond_rhs (outer_cond), 0))
+ {
+ enum tree_code code1 = gimple_cond_code (inner_cond);
+ enum tree_code code2 = gimple_cond_code (outer_cond);
+ tree t;
+
+ if (!(t = combine_comparisons (TRUTH_ANDIF_EXPR, code1, code2,
+ boolean_type_node,
+ gimple_cond_lhs (outer_cond),
+ gimple_cond_rhs (outer_cond))))
+ return false;
+ t = canonicalize_cond_expr_cond (t);
+ if (!t)
+ return false;
+ gimple_cond_set_condition_from_tree (inner_cond, t);
+ update_stmt (inner_cond);
+
+ /* Leave CFG optimization to cfg_cleanup. */
+ gimple_cond_set_condition_from_tree (outer_cond, boolean_true_node);
+ update_stmt (outer_cond);
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "optimizing two comparisons to ");
+ print_generic_expr (dump_file, t, 0);
+ fprintf (dump_file, "\n");
+ }
+
+ return true;
+ }
+
return false;
}
@@ -502,42 +539,13 @@ ifcombine_iforif (basic_block inner_cond_bb, basic_block outer_cond_bb)
{
enum tree_code code1 = gimple_cond_code (inner_cond);
enum tree_code code2 = gimple_cond_code (outer_cond);
- enum tree_code code;
tree t;
-#define CHK(a,b) ((code1 == a ## _EXPR && code2 == b ## _EXPR) \
- || (code2 == a ## _EXPR && code1 == b ## _EXPR))
- /* Merge the two condition codes if possible. */
- if (code1 == code2)
- code = code1;
- else if (CHK (EQ, LT))
- code = LE_EXPR;
- else if (CHK (EQ, GT))
- code = GE_EXPR;
- else if (CHK (LT, LE))
- code = LE_EXPR;
- else if (CHK (GT, GE))
- code = GE_EXPR;
- else if (INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_lhs (inner_cond)))
- || flag_unsafe_math_optimizations)
- {
- if (CHK (LT, GT))
- code = NE_EXPR;
- else if (CHK (LT, NE))
- code = NE_EXPR;
- else if (CHK (GT, NE))
- code = NE_EXPR;
- else
- return false;
- }
- /* We could check for combinations leading to trivial true/false. */
- else
+ if (!(t = combine_comparisons (TRUTH_ORIF_EXPR, code1, code2,
+ boolean_type_node,
+ gimple_cond_lhs (outer_cond),
+ gimple_cond_rhs (outer_cond))))
return false;
-#undef CHK
-
- /* Do it. */
- t = fold_build2 (code, boolean_type_node, gimple_cond_lhs (outer_cond),
- gimple_cond_rhs (outer_cond));
t = canonicalize_cond_expr_cond (t);
if (!t)
return false;
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index 15166cc8f5e..5731964e457 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -583,7 +583,7 @@ remove_unused_scope_block_p (tree scope)
else if (debug_info_level == DINFO_LEVEL_NONE
|| debug_info_level == DINFO_LEVEL_TERSE)
;
- else if (BLOCK_VARS (scope))
+ else if (BLOCK_VARS (scope) || BLOCK_NUM_NONLOCALIZED_VARS (scope))
unused = false;
/* See if this block is important for representation of inlined function.
Inlined functions are always represented by block with
@@ -613,6 +613,7 @@ static void
dump_scope_block (FILE *file, int indent, tree scope, int flags)
{
tree var, t;
+ unsigned int i;
fprintf (file, "\n%*s{ Scope block #%i%s%s",indent, "" , BLOCK_NUMBER (scope),
TREE_USED (scope) ? "" : " (unused)",
@@ -648,6 +649,13 @@ dump_scope_block (FILE *file, int indent, tree scope, int flags)
print_generic_decl (file, var, flags);
fprintf (file, "%s\n", used ? "" : " (unused)");
}
+ for (i = 0; i < BLOCK_NUM_NONLOCALIZED_VARS (scope); i++)
+ {
+ fprintf (file, "%*s",indent, "");
+ print_generic_decl (file, BLOCK_NONLOCALIZED_VAR (scope, i),
+ flags);
+ fprintf (file, " (nonlocalized)\n");
+ }
for (t = BLOCK_SUBBLOCKS (scope); t ; t = BLOCK_CHAIN (t))
dump_scope_block (file, indent + 2, t, flags);
fprintf (file, "\n%*s}\n",indent, "");
@@ -732,7 +740,8 @@ remove_unused_locals (void)
if (TREE_CODE (var) != FUNCTION_DECL
&& (!(ann = var_ann (var))
- || !ann->used))
+ || !ann->used)
+ && (optimize || DECL_ARTIFICIAL (var)))
{
if (is_global_var (var))
{
@@ -773,8 +782,7 @@ remove_unused_locals (void)
if (TREE_CODE (var) == VAR_DECL
&& is_global_var (var)
- && bitmap_bit_p (global_unused_vars, DECL_UID (var))
- && (optimize || DECL_ARTIFICIAL (var)))
+ && bitmap_bit_p (global_unused_vars, DECL_UID (var)))
*cell = TREE_CHAIN (*cell);
else
cell = &TREE_CHAIN (*cell);
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index b1813d373dc..fcaf7846458 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -1,6 +1,6 @@
/* Induction variable optimizations.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software
- Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of GCC.
@@ -219,15 +219,12 @@ struct ivopts_data
/* The currently optimized loop. */
struct loop *current_loop;
- /* Are we optimizing for speed? */
- bool speed;
+ /* Numbers of iterations for all exits of the current loop. */
+ struct pointer_map_t *niters;
/* Number of registers used in it. */
unsigned regs_used;
- /* Numbers of iterations for all exits of the current loop. */
- struct pointer_map_t *niters;
-
/* The size of version_info array allocated. */
unsigned version_info_size;
@@ -237,9 +234,6 @@ struct ivopts_data
/* The bitmap of indices in version_info whose value was changed. */
bitmap relevant;
- /* The maximum invariant id. */
- unsigned max_inv_id;
-
/* The uses of induction variables. */
VEC(iv_use_p,heap) *iv_uses;
@@ -249,9 +243,15 @@ struct ivopts_data
/* A bitmap of important candidates. */
bitmap important_candidates;
+ /* The maximum invariant id. */
+ unsigned max_inv_id;
+
/* Whether to consider just related and important candidates when replacing a
use. */
bool consider_all_candidates;
+
+ /* Are we optimizing for speed? */
+ bool speed;
};
/* An assignment of iv candidates to uses. */
@@ -884,7 +884,7 @@ determine_biv_step (gimple phi)
if (!is_gimple_reg (name))
return NULL_TREE;
- if (!simple_iv (loop, phi, name, &iv, true))
+ if (!simple_iv (loop, loop, name, &iv, true))
return NULL_TREE;
return integer_zerop (iv.step) ? NULL_TREE : iv.step;
@@ -990,7 +990,7 @@ find_givs_in_stmt_scev (struct ivopts_data *data, gimple stmt, affine_iv *iv)
if (TREE_CODE (lhs) != SSA_NAME)
return false;
- if (!simple_iv (loop, stmt, lhs, iv, true))
+ if (!simple_iv (loop, loop_containing_stmt (stmt), lhs, iv, true))
return false;
iv->base = expand_simple_operations (iv->base);
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 7ebe680871d..c1514bf25f8 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -99,6 +99,8 @@ create_iv (tree base, tree step, tree var, struct loop *loop,
}
if (POINTER_TYPE_P (TREE_TYPE (base)))
{
+ if (TREE_CODE (base) == ADDR_EXPR)
+ mark_addressable (TREE_OPERAND (base, 0));
step = fold_convert (sizetype, step);
if (incr_op == MINUS_EXPR)
step = fold_build1 (NEGATE_EXPR, sizetype, step);
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index 13b10c9f1c4..d657e1ae78f 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -699,8 +699,10 @@ number_of_iterations_lt_to_ne (tree type, affine_iv *iv0, affine_iv *iv1,
iv0->base <= iv1->base + MOD. */
if (!iv0->no_overflow && !integer_zerop (mod))
{
- bound = fold_build2 (MINUS_EXPR, type,
+ bound = fold_build2 (MINUS_EXPR, type1,
TYPE_MAX_VALUE (type1), tmod);
+ if (POINTER_TYPE_P (type))
+ bound = fold_convert (type, bound);
assumption = fold_build2 (LE_EXPR, boolean_type_node,
iv1->base, bound);
if (integer_zerop (assumption))
@@ -708,6 +710,11 @@ number_of_iterations_lt_to_ne (tree type, affine_iv *iv0, affine_iv *iv1,
}
if (mpz_cmp (mmod, bnds->below) < 0)
noloop = boolean_false_node;
+ else if (POINTER_TYPE_P (type))
+ noloop = fold_build2 (GT_EXPR, boolean_type_node,
+ iv0->base,
+ fold_build2 (POINTER_PLUS_EXPR, type,
+ iv1->base, tmod));
else
noloop = fold_build2 (GT_EXPR, boolean_type_node,
iv0->base,
@@ -723,6 +730,8 @@ number_of_iterations_lt_to_ne (tree type, affine_iv *iv0, affine_iv *iv1,
{
bound = fold_build2 (PLUS_EXPR, type1,
TYPE_MIN_VALUE (type1), tmod);
+ if (POINTER_TYPE_P (type))
+ bound = fold_convert (type, bound);
assumption = fold_build2 (GE_EXPR, boolean_type_node,
iv0->base, bound);
if (integer_zerop (assumption))
@@ -730,6 +739,13 @@ number_of_iterations_lt_to_ne (tree type, affine_iv *iv0, affine_iv *iv1,
}
if (mpz_cmp (mmod, bnds->below) < 0)
noloop = boolean_false_node;
+ else if (POINTER_TYPE_P (type))
+ noloop = fold_build2 (GT_EXPR, boolean_type_node,
+ fold_build2 (POINTER_PLUS_EXPR, type,
+ iv0->base,
+ fold_build1 (NEGATE_EXPR,
+ type1, tmod)),
+ iv1->base);
else
noloop = fold_build2 (GT_EXPR, boolean_type_node,
fold_build2 (MINUS_EXPR, type1,
@@ -1084,10 +1100,10 @@ number_of_iterations_le (tree type, affine_iv *iv0, affine_iv *iv1,
{
if (integer_nonzerop (iv0->step))
assumption = fold_build2 (NE_EXPR, boolean_type_node,
- iv1->base, TYPE_MAX_VALUE (type1));
+ iv1->base, TYPE_MAX_VALUE (type));
else
assumption = fold_build2 (NE_EXPR, boolean_type_node,
- iv0->base, TYPE_MIN_VALUE (type1));
+ iv0->base, TYPE_MIN_VALUE (type));
if (integer_zerop (assumption))
return false;
@@ -1097,8 +1113,18 @@ number_of_iterations_le (tree type, affine_iv *iv0, affine_iv *iv1,
}
if (integer_nonzerop (iv0->step))
- iv1->base = fold_build2 (PLUS_EXPR, type1,
- iv1->base, build_int_cst (type1, 1));
+ {
+ if (POINTER_TYPE_P (type))
+ iv1->base = fold_build2 (POINTER_PLUS_EXPR, type, iv1->base,
+ build_int_cst (type1, 1));
+ else
+ iv1->base = fold_build2 (PLUS_EXPR, type1, iv1->base,
+ build_int_cst (type1, 1));
+ }
+ else if (POINTER_TYPE_P (type))
+ iv0->base = fold_build2 (POINTER_PLUS_EXPR, type, iv0->base,
+ fold_build1 (NEGATE_EXPR, type1,
+ build_int_cst (type1, 1)));
else
iv0->base = fold_build2 (MINUS_EXPR, type1,
iv0->base, build_int_cst (type1, 1));
@@ -1781,9 +1807,9 @@ number_of_iterations_exit (struct loop *loop, edge exit,
&& !POINTER_TYPE_P (type))
return false;
- if (!simple_iv (loop, stmt, op0, &iv0, false))
+ if (!simple_iv (loop, loop_containing_stmt (stmt), op0, &iv0, false))
return false;
- if (!simple_iv (loop, stmt, op1, &iv1, false))
+ if (!simple_iv (loop, loop_containing_stmt (stmt), op1, &iv1, false))
return false;
/* We don't want to see undefined signed overflow warnings while
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index 6da4bf232aa..d0e460cf92e 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -364,7 +364,8 @@ idx_analyze_ref (tree base, tree *index, void *data)
|| TREE_CODE (base) == ALIGN_INDIRECT_REF)
return false;
- if (!simple_iv (ar_data->loop, ar_data->stmt, *index, &iv, false))
+ if (!simple_iv (ar_data->loop, loop_containing_stmt (ar_data->stmt),
+ *index, &iv, false))
return false;
ibase = iv.base;
step = iv.step;
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 9d931c496e8..9d06a8a3f29 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -3564,46 +3564,28 @@ compute_avail (void)
basic_block block, son;
basic_block *worklist;
size_t sp = 0;
- tree param;
+ unsigned i;
- /* For arguments with default definitions, we pretend they are
- defined in the entry block. */
- for (param = DECL_ARGUMENTS (current_function_decl);
- param;
- param = TREE_CHAIN (param))
+ /* We pretend that default definitions are defined in the entry block.
+ This includes function arguments and the static chain decl. */
+ for (i = 1; i < num_ssa_names; ++i)
{
- if (gimple_default_def (cfun, param) != NULL)
- {
- tree def = gimple_default_def (cfun, param);
- pre_expr e = get_or_alloc_expr_for_name (def);
-
- add_to_value (get_expr_value_id (e), e);
- if (!in_fre)
- {
- bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), e);
- bitmap_value_insert_into_set (maximal_set, e);
- }
- bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), e);
- }
- }
+ tree name = ssa_name (i);
+ pre_expr e;
+ if (!name
+ || !SSA_NAME_IS_DEFAULT_DEF (name)
+ || has_zero_uses (name)
+ || !is_gimple_reg (name))
+ continue;
- /* Likewise for the static chain decl. */
- if (cfun->static_chain_decl)
- {
- param = cfun->static_chain_decl;
- if (gimple_default_def (cfun, param) != NULL)
+ e = get_or_alloc_expr_for_name (name);
+ add_to_value (get_expr_value_id (e), e);
+ if (!in_fre)
{
- tree def = gimple_default_def (cfun, param);
- pre_expr e = get_or_alloc_expr_for_name (def);
-
- add_to_value (get_expr_value_id (e), e);
- if (!in_fre)
- {
- bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), e);
- bitmap_value_insert_into_set (maximal_set, e);
- }
- bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), e);
+ bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), e);
+ bitmap_value_insert_into_set (maximal_set, e);
}
+ bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), e);
}
/* Allocate the worklist. */
@@ -3857,7 +3839,7 @@ eliminate (void)
{
gimple_stmt_iterator i;
- for (i = gsi_start_bb (b); !gsi_end_p (i); gsi_next (&i))
+ for (i = gsi_start_bb (b); !gsi_end_p (i);)
{
gimple stmt = gsi_stmt (i);
@@ -3915,6 +3897,7 @@ eliminate (void)
propagate_tree_value_into_stmt (&i, sprime);
stmt = gsi_stmt (i);
update_stmt (stmt);
+ gsi_next (&i);
continue;
}
@@ -3975,6 +3958,58 @@ eliminate (void)
}
}
}
+ /* If the statement is a scalar store, see if the expression
+ has the same value number as its rhs. If so, the store is
+ dead. */
+ else if (gimple_assign_single_p (stmt)
+ && !is_gimple_reg (gimple_assign_lhs (stmt))
+ && (TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME
+ || is_gimple_min_invariant (gimple_assign_rhs1 (stmt))))
+ {
+ tree rhs = gimple_assign_rhs1 (stmt);
+ tree val;
+ val = vn_reference_lookup (gimple_assign_lhs (stmt),
+ shared_vuses_from_stmt (stmt),
+ true, NULL);
+ if (TREE_CODE (rhs) == SSA_NAME)
+ rhs = VN_INFO (rhs)->valnum;
+ if (val
+ && operand_equal_p (val, rhs, 0))
+ {
+ def_operand_p def;
+ use_operand_p use;
+ vuse_vec_p usevec;
+ ssa_op_iter oi;
+ imm_use_iterator ui;
+ gimple use_stmt;
+
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "Deleted dead store ");
+ print_gimple_stmt (dump_file, stmt, 0, 0);
+ }
+
+ /* Propagate all may-uses to the uses of their defs. */
+ FOR_EACH_SSA_VDEF_OPERAND (def, usevec, stmt, oi)
+ {
+ tree vuse = VUSE_ELEMENT_VAR (*usevec, 0);
+ tree vdef = DEF_FROM_PTR (def);
+
+ /* If the vdef is used in an abnormal PHI node we
+ have to propagate that flag to the vuse as well. */
+ if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vdef))
+ SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vuse) = 1;
+
+ FOR_EACH_IMM_USE_STMT (use_stmt, ui, vdef)
+ FOR_EACH_IMM_USE_ON_STMT (use, ui)
+ SET_USE (use, vuse);
+ }
+
+ gsi_remove (&i, true);
+ release_defs (stmt);
+ continue;
+ }
+ }
/* Visit COND_EXPRs and fold the comparison with the
available value-numbers. */
else if (gimple_code (stmt) == GIMPLE_COND)
@@ -3999,6 +4034,8 @@ eliminate (void)
todo = TODO_cleanup_cfg;
}
}
+
+ gsi_next (&i);
}
}
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index bc4fd7cc868..fb903921656 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -658,6 +658,8 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result)
case CONST_DECL:
case RESULT_DECL:
case SSA_NAME:
+ case EXC_PTR_EXPR:
+ case FILTER_EXPR:
temp.op0 = ref;
break;
case ADDR_EXPR:
@@ -750,6 +752,8 @@ get_ref_from_reference_ops (VEC(vn_reference_op_s, heap) *ops)
case CONST_DECL:
case RESULT_DECL:
case SSA_NAME:
+ case FILTER_EXPR:
+ case EXC_PTR_EXPR:
*op0_p = op->op0;
break;
@@ -2367,14 +2371,19 @@ visit_use (tree use)
VN_INFO (lhs)->expr = NULL_TREE;
}
- if (TREE_CODE (lhs) == SSA_NAME
- /* We can substitute SSA_NAMEs that are live over
- abnormal edges with their constant value. */
- && !(gimple_assign_copy_p (stmt)
- && is_gimple_min_invariant (gimple_assign_rhs1 (stmt)))
- && !(simplified
- && is_gimple_min_invariant (simplified))
- && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs))
+ if ((TREE_CODE (lhs) == SSA_NAME
+ /* We can substitute SSA_NAMEs that are live over
+ abnormal edges with their constant value. */
+ && !(gimple_assign_copy_p (stmt)
+ && is_gimple_min_invariant (gimple_assign_rhs1 (stmt)))
+ && !(simplified
+ && is_gimple_min_invariant (simplified))
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs))
+ /* Stores or copies from SSA_NAMEs that are live over
+ abnormal edges are a problem. */
+ || (gimple_assign_single_p (stmt)
+ && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_assign_rhs1 (stmt))))
changed = defs_to_varying (stmt);
else if (REFERENCE_CLASS_P (lhs) || DECL_P (lhs))
{
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 07fd9ed2a85..1cb07f5581c 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -1524,8 +1524,8 @@ do_sd_constraint (constraint_graph_t graph, constraint_t c,
of a variable can also reach all other fields of the variable
we simply have to expand the solution to contain all sub-fields
if one sub-field is contained. */
- if (c->rhs.var == escaped_id
- || c->rhs.var == callused_id)
+ if (c->rhs.var == find (escaped_id)
+ || c->rhs.var == find (callused_id))
{
bitmap vars = NULL;
/* In a first pass record all variables we need to add all
@@ -1592,11 +1592,9 @@ do_sd_constraint (constraint_graph_t graph, constraint_t c,
if (get_varinfo (t)->is_special_var)
flag |= bitmap_ior_into (sol, get_varinfo (t)->solution);
/* Merging the solution from ESCAPED needlessly increases
- the set. Use ESCAPED as representative instead.
- Same for CALLUSED. */
- else if (get_varinfo (t)->id == escaped_id
- || get_varinfo (t)->id == callused_id)
- flag |= bitmap_set_bit (sol, get_varinfo (t)->id);
+ the set. Use ESCAPED as representative instead. */
+ else if (get_varinfo (t)->id == find (escaped_id))
+ flag |= bitmap_set_bit (sol, escaped_id);
else if (add_graph_edge (graph, lhs, t))
flag |= bitmap_ior_into (sol, get_varinfo (t)->solution);
}
@@ -1816,9 +1814,9 @@ compute_topo_order (constraint_graph_t graph,
typedef struct equiv_class_label
{
+ hashval_t hashcode;
unsigned int equivalence_class;
bitmap labels;
- hashval_t hashcode;
} *equiv_class_label_t;
typedef const struct equiv_class_label *const_equiv_class_label_t;
@@ -2515,9 +2513,8 @@ solve_graph (constraint_graph_t graph)
solution_empty = bitmap_empty_p (solution);
if (!solution_empty
- /* Do not propagate the ESCAPED/CALLUSED solutions. */
- && i != escaped_id
- && i != callused_id)
+ /* Do not propagate the ESCAPED solutions. */
+ && i != find (escaped_id))
{
bitmap_iterator bi;
@@ -3487,8 +3484,9 @@ make_escape_constraint (tree op)
RHS. */
static void
-handle_rhs_call (gimple stmt)
+handle_rhs_call (gimple stmt, VEC(ce_s, heap) **results)
{
+ struct constraint_expr rhsc;
unsigned i;
for (i = 0; i < gimple_call_num_args (stmt); ++i)
@@ -3504,6 +3502,12 @@ handle_rhs_call (gimple stmt)
/* The static chain escapes as well. */
if (gimple_call_chain (stmt))
make_escape_constraint (gimple_call_chain (stmt));
+
+ /* Regular functions return escaped addresses. */
+ rhsc.var = escaped_id;
+ rhsc.offset = 0;
+ rhsc.type = ADDRESSOF;
+ VEC_safe_push (ce_s, heap, *results, &rhsc);
}
/* For non-IPA mode, generate constraints necessary for a call
@@ -3511,10 +3515,9 @@ handle_rhs_call (gimple stmt)
the LHS point to global and escaped variables. */
static void
-handle_lhs_call (tree lhs, int flags)
+handle_lhs_call (tree lhs, int flags, VEC(ce_s, heap) *rhsc)
{
VEC(ce_s, heap) *lhsc = NULL;
- struct constraint_expr rhsc;
unsigned int j;
struct constraint_expr *lhsp;
@@ -3522,6 +3525,7 @@ handle_lhs_call (tree lhs, int flags)
if (flags & ECF_MALLOC)
{
+ struct constraint_expr rhsc;
tree heapvar = heapvar_lookup (lhs);
varinfo_t vi;
@@ -3545,15 +3549,30 @@ handle_lhs_call (tree lhs, int flags)
vi->size = ~0;
rhsc.type = ADDRESSOF;
rhsc.offset = 0;
+ for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
+ process_constraint (new_constraint (*lhsp, rhsc));
}
- else
+ else if (VEC_length (ce_s, rhsc) > 0)
{
- rhsc.var = escaped_id;
- rhsc.offset = 0;
- rhsc.type = ADDRESSOF;
+ struct constraint_expr *lhsp, *rhsp;
+ unsigned int i, j;
+ /* If the store is to a global decl make sure to
+ add proper escape constraints. */
+ lhs = get_base_address (lhs);
+ if (lhs
+ && DECL_P (lhs)
+ && is_global_var (lhs))
+ {
+ struct constraint_expr tmpc;
+ tmpc.var = escaped_id;
+ tmpc.offset = 0;
+ tmpc.type = SCALAR;
+ VEC_safe_push (ce_s, heap, lhsc, &tmpc);
+ }
+ for (i = 0; VEC_iterate (ce_s, lhsc, i, lhsp); ++i)
+ for (j = 0; VEC_iterate (ce_s, rhsc, j, rhsp); ++j)
+ process_constraint (new_constraint (*lhsp, *rhsp));
}
- for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
- process_constraint (new_constraint (*lhsp, rhsc));
VEC_free (ce_s, heap, lhsc);
}
@@ -3561,43 +3580,23 @@ handle_lhs_call (tree lhs, int flags)
const function that returns a pointer in the statement STMT. */
static void
-handle_const_call (gimple stmt)
+handle_const_call (gimple stmt, VEC(ce_s, heap) **results)
{
- tree lhs = gimple_call_lhs (stmt);
- VEC(ce_s, heap) *lhsc = NULL;
- struct constraint_expr rhsc;
- unsigned int j, k;
- struct constraint_expr *lhsp;
- tree tmpvar;
- struct constraint_expr tmpc;
+ struct constraint_expr rhsc, tmpc;
+ tree tmpvar = NULL_TREE;
+ unsigned int k;
- get_constraint_for (lhs, &lhsc);
-
- /* If this is a nested function then it can return anything. */
+ /* Treat nested const functions the same as pure functions as far
+ as the static chain is concerned. */
if (gimple_call_chain (stmt))
{
- rhsc.var = anything_id;
+ make_constraint_to (callused_id, gimple_call_chain (stmt));
+ rhsc.var = callused_id;
rhsc.offset = 0;
- rhsc.type = ADDRESSOF;
- for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
- process_constraint (new_constraint (*lhsp, rhsc));
- VEC_free (ce_s, heap, lhsc);
- return;
+ rhsc.type = SCALAR;
+ VEC_safe_push (ce_s, heap, *results, &rhsc);
}
- /* We always use a temporary here, otherwise we end up with a quadratic
- amount of constraints for
- large_struct = const_call (large_struct);
- in field-sensitive PTA. */
- tmpvar = create_tmp_var_raw (ptr_type_node, "consttmp");
- tmpc = get_constraint_exp_for_temp (tmpvar);
-
- /* May return addresses of globals. */
- rhsc.var = nonlocal_id;
- rhsc.offset = 0;
- rhsc.type = ADDRESSOF;
- process_constraint (new_constraint (tmpc, rhsc));
-
/* May return arguments. */
for (k = 0; k < gimple_call_num_args (stmt); ++k)
{
@@ -3609,26 +3608,41 @@ handle_const_call (gimple stmt)
struct constraint_expr *argp;
int i;
+ /* We always use a temporary here, otherwise we end up with
+ a quadratic amount of constraints for
+ large_struct = const_call (large_struct);
+ with field-sensitive PTA. */
+ if (tmpvar == NULL_TREE)
+ {
+ tmpvar = create_tmp_var_raw (ptr_type_node, "consttmp");
+ tmpc = get_constraint_exp_for_temp (tmpvar);
+ }
+
get_constraint_for (arg, &argc);
for (i = 0; VEC_iterate (ce_s, argc, i, argp); i++)
process_constraint (new_constraint (tmpc, *argp));
VEC_free (ce_s, heap, argc);
}
}
+ if (tmpvar != NULL_TREE)
+ VEC_safe_push (ce_s, heap, *results, &tmpc);
- for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
- process_constraint (new_constraint (*lhsp, tmpc));
-
- VEC_free (ce_s, heap, lhsc);
+ /* May return addresses of globals. */
+ rhsc.var = nonlocal_id;
+ rhsc.offset = 0;
+ rhsc.type = ADDRESSOF;
+ VEC_safe_push (ce_s, heap, *results, &rhsc);
}
/* For non-IPA mode, generate constraints necessary for a call to a
pure function in statement STMT. */
static void
-handle_pure_call (gimple stmt)
+handle_pure_call (gimple stmt, VEC(ce_s, heap) **results)
{
+ struct constraint_expr rhsc;
unsigned i;
+ bool need_callused = false;
/* Memory reached from pointer arguments is call-used. */
for (i = 0; i < gimple_call_num_args (stmt); ++i)
@@ -3636,48 +3650,31 @@ handle_pure_call (gimple stmt)
tree arg = gimple_call_arg (stmt, i);
if (could_have_pointers (arg))
- make_constraint_to (callused_id, arg);
+ {
+ make_constraint_to (callused_id, arg);
+ need_callused = true;
+ }
}
/* The static chain is used as well. */
if (gimple_call_chain (stmt))
- make_constraint_to (callused_id, gimple_call_chain (stmt));
-
- /* If the call returns a pointer it may point to reachable memory
- from the arguments. Not so for malloc functions though. */
- if (gimple_call_lhs (stmt)
- && could_have_pointers (gimple_call_lhs (stmt))
- && !(gimple_call_flags (stmt) & ECF_MALLOC))
{
- tree lhs = gimple_call_lhs (stmt);
- VEC(ce_s, heap) *lhsc = NULL;
- struct constraint_expr rhsc;
- struct constraint_expr *lhsp;
- unsigned j;
-
- get_constraint_for (lhs, &lhsc);
-
- /* If this is a nested function then it can return anything. */
- if (gimple_call_chain (stmt))
- {
- rhsc.var = anything_id;
- rhsc.offset = 0;
- rhsc.type = ADDRESSOF;
- for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
- process_constraint (new_constraint (*lhsp, rhsc));
- VEC_free (ce_s, heap, lhsc);
- return;
- }
+ make_constraint_to (callused_id, gimple_call_chain (stmt));
+ need_callused = true;
+ }
- /* Else just add the call-used memory here. Escaped variables
- and globals will be dealt with in handle_lhs_call. */
+ /* Pure functions may return callused and escaped memory. */
+ if (need_callused)
+ {
rhsc.var = callused_id;
rhsc.offset = 0;
- rhsc.type = ADDRESSOF;
- for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
- process_constraint (new_constraint (*lhsp, rhsc));
- VEC_free (ce_s, heap, lhsc);
+ rhsc.type = SCALAR;
+ VEC_safe_push (ce_s, heap, *results, &rhsc);
}
+ rhsc.var = escaped_id;
+ rhsc.offset = 0;
+ rhsc.type = ADDRESSOF;
+ VEC_safe_push (ce_s, heap, *results, &rhsc);
}
/* Walk statement T setting up aliasing constraints according to the
@@ -3742,33 +3739,28 @@ find_func_aliases (gimple origt)
{
if (!in_ipa_mode)
{
+ VEC(ce_s, heap) *rhsc = NULL;
int flags = gimple_call_flags (t);
/* Const functions can return their arguments and addresses
of global memory but not of escaped memory. */
- if (flags & ECF_CONST)
+ if (flags & (ECF_CONST|ECF_NOVOPS))
{
if (gimple_call_lhs (t)
&& could_have_pointers (gimple_call_lhs (t)))
- handle_const_call (t);
+ handle_const_call (t, &rhsc);
}
/* Pure functions can return addresses in and of memory
reachable from their arguments, but they are not an escape
point for reachable memory of their arguments. */
- else if (flags & ECF_PURE)
- {
- handle_pure_call (t);
- if (gimple_call_lhs (t)
- && could_have_pointers (gimple_call_lhs (t)))
- handle_lhs_call (gimple_call_lhs (t), flags);
- }
+ else if (flags & (ECF_PURE|ECF_LOOPING_CONST_OR_PURE))
+ handle_pure_call (t, &rhsc);
else
- {
- handle_rhs_call (t);
- if (gimple_call_lhs (t)
- && could_have_pointers (gimple_call_lhs (t)))
- handle_lhs_call (gimple_call_lhs (t), flags);
- }
+ handle_rhs_call (t, &rhsc);
+ if (gimple_call_lhs (t)
+ && could_have_pointers (gimple_call_lhs (t)))
+ handle_lhs_call (gimple_call_lhs (t), flags, rhsc);
+ VEC_free (ce_s, heap, rhsc);
}
else
{
@@ -4924,9 +4916,10 @@ find_what_p_points_to (tree p)
pi->pt_null = 1;
else if (vi->id == anything_id
|| vi->id == nonlocal_id
- || vi->id == escaped_id
- || vi->id == callused_id)
+ || vi->id == escaped_id)
was_pt_anything = 1;
+ else if (vi->id == callused_id)
+ gcc_unreachable ();
else if (vi->id == readonly_id)
was_pt_anything = 1;
else if (vi->id == integer_id)
@@ -5676,23 +5669,20 @@ ipa_pta_execute (void)
for (node = cgraph_nodes; node; node = node->next)
{
- if (!node->analyzed || cgraph_is_master_clone (node))
- {
- unsigned int varid;
+ unsigned int varid;
- varid = create_function_info_for (node->decl,
- cgraph_node_name (node));
- if (node->local.externally_visible)
- {
- varinfo_t fi = get_varinfo (varid);
- for (; fi; fi = fi->next)
- make_constraint_from (fi, anything_id);
- }
+ varid = create_function_info_for (node->decl,
+ cgraph_node_name (node));
+ if (node->local.externally_visible)
+ {
+ varinfo_t fi = get_varinfo (varid);
+ for (; fi; fi = fi->next)
+ make_constraint_from (fi, anything_id);
}
}
for (node = cgraph_nodes; node; node = node->next)
{
- if (node->analyzed && cgraph_is_master_clone (node))
+ if (node->analyzed)
{
struct function *func = DECL_STRUCT_FUNCTION (node->decl);
basic_block bb;
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index b26884b1b27..ee3df246dea 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -478,6 +478,21 @@ verify_phi_args (gimple phi, basic_block bb, basic_block *definition_block)
op_p, phi, e->flags & EDGE_ABNORMAL, NULL);
}
+ if (TREE_CODE (op) == ADDR_EXPR)
+ {
+ tree base = TREE_OPERAND (op, 0);
+ while (handled_component_p (base))
+ base = TREE_OPERAND (base, 0);
+ if ((TREE_CODE (base) == VAR_DECL
+ || TREE_CODE (base) == PARM_DECL
+ || TREE_CODE (base) == RESULT_DECL)
+ && !TREE_ADDRESSABLE (base))
+ {
+ error ("address taken, but ADDRESSABLE bit not set");
+ err = true;
+ }
+ }
+
if (e->dest != bb)
{
error ("wrong edge %d->%d for PHI argument",
@@ -1589,6 +1604,11 @@ warn_uninitialized_vars (bool warn_possibly_uninitialized)
walk_gimple_op (gsi_stmt (gsi), warn_uninitialized_var, &wi);
}
}
+
+ /* Post-dominator information can not be reliably updated. Free it
+ after the use. */
+
+ free_dominance_info (CDI_POST_DOMINATORS);
return 0;
}
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
deleted file mode 100644
index a4460b49168..00000000000
--- a/gcc/tree-vect-analyze.c
+++ /dev/null
@@ -1,4711 +0,0 @@
-/* Analysis Utilities for Loop Vectorization.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software
- Foundation, Inc.
- Contributed by Dorit Naishlos <dorit@il.ibm.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 "ggc.h"
-#include "tree.h"
-#include "target.h"
-#include "basic-block.h"
-#include "diagnostic.h"
-#include "tree-flow.h"
-#include "tree-dump.h"
-#include "timevar.h"
-#include "cfgloop.h"
-#include "expr.h"
-#include "optabs.h"
-#include "params.h"
-#include "tree-chrec.h"
-#include "tree-data-ref.h"
-#include "tree-scalar-evolution.h"
-#include "tree-vectorizer.h"
-#include "toplev.h"
-#include "recog.h"
-
-static bool vect_can_advance_ivs_p (loop_vec_info);
-
-/* Return the smallest scalar part of STMT.
- This is used to determine the vectype of the stmt. We generally set the
- vectype according to the type of the result (lhs). For stmts whose
- result-type is different than the type of the arguments (e.g., demotion,
- promotion), vectype will be reset appropriately (later). Note that we have
- to visit the smallest datatype in this function, because that determines the
- VF. If the smallest datatype in the loop is present only as the rhs of a
- promotion operation - we'd miss it.
- Such a case, where a variable of this datatype does not appear in the lhs
- anywhere in the loop, can only occur if it's an invariant: e.g.:
- 'int_x = (int) short_inv', which we'd expect to have been optimized away by
- invariant motion. However, we cannot rely on invariant motion to always take
- invariants out of the loop, and so in the case of promotion we also have to
- check the rhs.
- LHS_SIZE_UNIT and RHS_SIZE_UNIT contain the sizes of the corresponding
- types. */
-
-tree
-vect_get_smallest_scalar_type (gimple stmt, HOST_WIDE_INT *lhs_size_unit,
- HOST_WIDE_INT *rhs_size_unit)
-{
- tree scalar_type = gimple_expr_type (stmt);
- HOST_WIDE_INT lhs, rhs;
-
- lhs = rhs = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (scalar_type));
-
- if (is_gimple_assign (stmt)
- && (gimple_assign_cast_p (stmt)
- || gimple_assign_rhs_code (stmt) == WIDEN_MULT_EXPR
- || gimple_assign_rhs_code (stmt) == FLOAT_EXPR))
- {
- tree rhs_type = TREE_TYPE (gimple_assign_rhs1 (stmt));
-
- rhs = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (rhs_type));
- if (rhs < lhs)
- scalar_type = rhs_type;
- }
-
- *lhs_size_unit = lhs;
- *rhs_size_unit = rhs;
- return scalar_type;
-}
-
-
-/* Function vect_determine_vectorization_factor
-
- Determine the vectorization factor (VF). VF is the number of data elements
- that are operated upon in parallel in a single iteration of the vectorized
- loop. For example, when vectorizing a loop that operates on 4byte elements,
- on a target with vector size (VS) 16byte, the VF is set to 4, since 4
- elements can fit in a single vector register.
-
- We currently support vectorization of loops in which all types operated upon
- are of the same size. Therefore this function currently sets VF according to
- the size of the types operated upon, and fails if there are multiple sizes
- in the loop.
-
- VF is also the factor by which the loop iterations are strip-mined, e.g.:
- original loop:
- for (i=0; i<N; i++){
- a[i] = b[i] + c[i];
- }
-
- vectorized loop:
- for (i=0; i<N; i+=VF){
- a[i:VF] = b[i:VF] + c[i:VF];
- }
-*/
-
-static bool
-vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
- int nbbs = loop->num_nodes;
- gimple_stmt_iterator si;
- unsigned int vectorization_factor = 0;
- tree scalar_type;
- gimple phi;
- tree vectype;
- unsigned int nunits;
- stmt_vec_info stmt_info;
- int i;
- HOST_WIDE_INT dummy;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_determine_vectorization_factor ===");
-
- for (i = 0; i < nbbs; i++)
- {
- basic_block bb = bbs[i];
-
- for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
- {
- phi = gsi_stmt (si);
- stmt_info = vinfo_for_stmt (phi);
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "==> examining phi: ");
- print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
- }
-
- gcc_assert (stmt_info);
-
- if (STMT_VINFO_RELEVANT_P (stmt_info))
- {
- gcc_assert (!STMT_VINFO_VECTYPE (stmt_info));
- scalar_type = TREE_TYPE (PHI_RESULT (phi));
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "get vectype for scalar type: ");
- print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
- }
-
- vectype = get_vectype_for_scalar_type (scalar_type);
- if (!vectype)
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- fprintf (vect_dump,
- "not vectorized: unsupported data-type ");
- print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
- }
- return false;
- }
- STMT_VINFO_VECTYPE (stmt_info) = vectype;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "vectype: ");
- print_generic_expr (vect_dump, vectype, TDF_SLIM);
- }
-
- nunits = TYPE_VECTOR_SUBPARTS (vectype);
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "nunits = %d", nunits);
-
- if (!vectorization_factor
- || (nunits > vectorization_factor))
- vectorization_factor = nunits;
- }
- }
-
- for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
- {
- gimple stmt = gsi_stmt (si);
- stmt_info = vinfo_for_stmt (stmt);
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "==> examining statement: ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- gcc_assert (stmt_info);
-
- /* skip stmts which do not need to be vectorized. */
- if (!STMT_VINFO_RELEVANT_P (stmt_info)
- && !STMT_VINFO_LIVE_P (stmt_info))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "skip.");
- continue;
- }
-
- if (gimple_get_lhs (stmt) == NULL_TREE)
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- fprintf (vect_dump, "not vectorized: irregular stmt.");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
- return false;
- }
-
- if (VECTOR_MODE_P (TYPE_MODE (gimple_expr_type (stmt))))
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- fprintf (vect_dump, "not vectorized: vector stmt in loop:");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
- return false;
- }
-
- if (STMT_VINFO_VECTYPE (stmt_info))
- {
- /* The only case when a vectype had been already set is for stmts
- that contain a dataref, or for "pattern-stmts" (stmts generated
- by the vectorizer to represent/replace a certain idiom). */
- gcc_assert (STMT_VINFO_DATA_REF (stmt_info)
- || is_pattern_stmt_p (stmt_info));
- vectype = STMT_VINFO_VECTYPE (stmt_info);
- }
- else
- {
-
- gcc_assert (! STMT_VINFO_DATA_REF (stmt_info)
- && !is_pattern_stmt_p (stmt_info));
-
- scalar_type = vect_get_smallest_scalar_type (stmt, &dummy,
- &dummy);
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "get vectype for scalar type: ");
- print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
- }
-
- vectype = get_vectype_for_scalar_type (scalar_type);
- if (!vectype)
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- fprintf (vect_dump,
- "not vectorized: unsupported data-type ");
- print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
- }
- return false;
- }
- STMT_VINFO_VECTYPE (stmt_info) = vectype;
- }
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "vectype: ");
- print_generic_expr (vect_dump, vectype, TDF_SLIM);
- }
-
- nunits = TYPE_VECTOR_SUBPARTS (vectype);
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "nunits = %d", nunits);
-
- if (!vectorization_factor
- || (nunits > vectorization_factor))
- vectorization_factor = nunits;
-
- }
- }
-
- /* TODO: Analyze cost. Decide if worth while to vectorize. */
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "vectorization factor = %d", vectorization_factor);
- if (vectorization_factor <= 1)
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "not vectorized: unsupported data-type");
- return false;
- }
- LOOP_VINFO_VECT_FACTOR (loop_vinfo) = vectorization_factor;
-
- return true;
-}
-
-
-/* SLP costs are calculated according to SLP instance unrolling factor (i.e.,
- the number of created vector stmts depends on the unrolling factor). However,
- the actual number of vector stmts for every SLP node depends on VF which is
- set later in vect_analyze_operations(). Hence, SLP costs should be updated.
- In this function we assume that the inside costs calculated in
- vect_model_xxx_cost are linear in ncopies. */
-
-static void
-vect_update_slp_costs_according_to_vf (loop_vec_info loop_vinfo)
-{
- unsigned int i, vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
- VEC (slp_instance, heap) *slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
- slp_instance instance;
-
- if (vect_print_dump_info (REPORT_SLP))
- fprintf (vect_dump, "=== vect_update_slp_costs_according_to_vf ===");
-
- for (i = 0; VEC_iterate (slp_instance, slp_instances, i, instance); i++)
- /* We assume that costs are linear in ncopies. */
- SLP_INSTANCE_INSIDE_OF_LOOP_COST (instance) *= vf
- / SLP_INSTANCE_UNROLLING_FACTOR (instance);
-}
-
-
-/* Function vect_analyze_operations.
-
- Scan the loop stmts and make sure they are all vectorizable. */
-
-static bool
-vect_analyze_operations (loop_vec_info loop_vinfo)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
- int nbbs = loop->num_nodes;
- gimple_stmt_iterator si;
- unsigned int vectorization_factor = 0;
- int i;
- bool ok;
- gimple phi;
- stmt_vec_info stmt_info;
- bool need_to_vectorize = false;
- int min_profitable_iters;
- int min_scalar_loop_bound;
- unsigned int th;
- bool only_slp_in_loop = true;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_analyze_operations ===");
-
- gcc_assert (LOOP_VINFO_VECT_FACTOR (loop_vinfo));
- vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
-
- for (i = 0; i < nbbs; i++)
- {
- basic_block bb = bbs[i];
-
- for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
- {
- phi = gsi_stmt (si);
- ok = true;
-
- stmt_info = vinfo_for_stmt (phi);
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "examining phi: ");
- print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
- }
-
- if (! is_loop_header_bb_p (bb))
- {
- /* inner-loop loop-closed exit phi in outer-loop vectorization
- (i.e. a phi in the tail of the outer-loop).
- FORNOW: we currently don't support the case that these phis
- are not used in the outerloop, cause this case requires
- to actually do something here. */
- if (!STMT_VINFO_RELEVANT_P (stmt_info)
- || STMT_VINFO_LIVE_P (stmt_info))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump,
- "Unsupported loop-closed phi in outer-loop.");
- return false;
- }
- continue;
- }
-
- gcc_assert (stmt_info);
-
- if (STMT_VINFO_LIVE_P (stmt_info))
- {
- /* FORNOW: not yet supported. */
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "not vectorized: value used after loop.");
- return false;
- }
-
- if (STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_loop
- && STMT_VINFO_DEF_TYPE (stmt_info) != vect_induction_def)
- {
- /* A scalar-dependence cycle that we don't support. */
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "not vectorized: scalar dependence cycle.");
- return false;
- }
-
- if (STMT_VINFO_RELEVANT_P (stmt_info))
- {
- need_to_vectorize = true;
- if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def)
- ok = vectorizable_induction (phi, NULL, NULL);
- }
-
- if (!ok)
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- fprintf (vect_dump,
- "not vectorized: relevant phi not supported: ");
- print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
- }
- return false;
- }
- }
-
- for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
- {
- gimple stmt = gsi_stmt (si);
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- enum vect_relevant relevance = STMT_VINFO_RELEVANT (stmt_info);
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "==> examining statement: ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- gcc_assert (stmt_info);
-
- /* skip stmts which do not need to be vectorized.
- this is expected to include:
- - the COND_EXPR which is the loop exit condition
- - any LABEL_EXPRs in the loop
- - computations that are used only for array indexing or loop
- control */
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info)
- && !STMT_VINFO_LIVE_P (stmt_info))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "irrelevant.");
- continue;
- }
-
- switch (STMT_VINFO_DEF_TYPE (stmt_info))
- {
- case vect_loop_def:
- break;
-
- case vect_reduction_def:
- gcc_assert (relevance == vect_used_in_outer
- || relevance == vect_used_in_outer_by_reduction
- || relevance == vect_unused_in_loop);
- break;
-
- case vect_induction_def:
- case vect_constant_def:
- case vect_invariant_def:
- case vect_unknown_def_type:
- default:
- gcc_unreachable ();
- }
-
- if (STMT_VINFO_RELEVANT_P (stmt_info))
- {
- gcc_assert (!VECTOR_MODE_P (TYPE_MODE (gimple_expr_type (stmt))));
- gcc_assert (STMT_VINFO_VECTYPE (stmt_info));
- need_to_vectorize = true;
- }
-
- ok = true;
- if (STMT_VINFO_RELEVANT_P (stmt_info)
- || STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def)
- ok = (vectorizable_type_promotion (stmt, NULL, NULL, NULL)
- || vectorizable_type_demotion (stmt, NULL, NULL, NULL)
- || vectorizable_conversion (stmt, NULL, NULL, NULL)
- || vectorizable_operation (stmt, NULL, NULL, NULL)
- || vectorizable_assignment (stmt, NULL, NULL, NULL)
- || vectorizable_load (stmt, NULL, NULL, NULL, NULL)
- || vectorizable_call (stmt, NULL, NULL)
- || vectorizable_store (stmt, NULL, NULL, NULL)
- || vectorizable_condition (stmt, NULL, NULL)
- || vectorizable_reduction (stmt, NULL, NULL));
-
- if (!ok)
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- fprintf (vect_dump, "not vectorized: relevant stmt not ");
- fprintf (vect_dump, "supported: ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
- return false;
- }
-
- /* Stmts that are (also) "live" (i.e. - that are used out of the loop)
- need extra handling, except for vectorizable reductions. */
- if (STMT_VINFO_LIVE_P (stmt_info)
- && STMT_VINFO_TYPE (stmt_info) != reduc_vec_info_type)
- ok = vectorizable_live_operation (stmt, NULL, NULL);
-
- if (!ok)
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- fprintf (vect_dump, "not vectorized: live stmt not ");
- fprintf (vect_dump, "supported: ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
- return false;
- }
-
- if (!PURE_SLP_STMT (stmt_info))
- {
- /* STMT needs loop-based vectorization. */
- only_slp_in_loop = false;
-
- /* Groups of strided accesses whose size is not a power of 2 are
- not vectorizable yet using loop-vectorization. Therefore, if
- this stmt feeds non-SLP-able stmts (i.e., this stmt has to be
- both SLPed and loop-based vectorized), the loop cannot be
- vectorized. */
- if (STMT_VINFO_STRIDED_ACCESS (stmt_info)
- && exact_log2 (DR_GROUP_SIZE (vinfo_for_stmt (
- DR_GROUP_FIRST_DR (stmt_info)))) == -1)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "not vectorized: the size of group "
- "of strided accesses is not a power of 2");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
- return false;
- }
- }
- } /* stmts in bb */
- } /* bbs */
-
- /* All operations in the loop are either irrelevant (deal with loop
- control, or dead), or only used outside the loop and can be moved
- out of the loop (e.g. invariants, inductions). The loop can be
- optimized away by scalar optimizations. We're better off not
- touching this loop. */
- if (!need_to_vectorize)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump,
- "All the computation can be taken out of the loop.");
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump,
- "not vectorized: redundant loop. no profit to vectorize.");
- return false;
- }
-
- /* If all the stmts in the loop can be SLPed, we perform only SLP, and
- vectorization factor of the loop is the unrolling factor required by the
- SLP instances. If that unrolling factor is 1, we say, that we perform
- pure SLP on loop - cross iteration parallelism is not exploited. */
- if (only_slp_in_loop)
- vectorization_factor = LOOP_VINFO_SLP_UNROLLING_FACTOR (loop_vinfo);
- else
- vectorization_factor = least_common_multiple (vectorization_factor,
- LOOP_VINFO_SLP_UNROLLING_FACTOR (loop_vinfo));
-
- LOOP_VINFO_VECT_FACTOR (loop_vinfo) = vectorization_factor;
-
- if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
- && vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump,
- "vectorization_factor = %d, niters = " HOST_WIDE_INT_PRINT_DEC,
- vectorization_factor, LOOP_VINFO_INT_NITERS (loop_vinfo));
-
- if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
- && (LOOP_VINFO_INT_NITERS (loop_vinfo) < vectorization_factor))
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "not vectorized: iteration count too small.");
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump,"not vectorized: iteration count smaller than "
- "vectorization factor.");
- return false;
- }
-
- /* Analyze cost. Decide if worth while to vectorize. */
-
- /* Once VF is set, SLP costs should be updated since the number of created
- vector stmts depends on VF. */
- vect_update_slp_costs_according_to_vf (loop_vinfo);
-
- min_profitable_iters = vect_estimate_min_profitable_iters (loop_vinfo);
- LOOP_VINFO_COST_MODEL_MIN_ITERS (loop_vinfo) = min_profitable_iters;
-
- if (min_profitable_iters < 0)
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "not vectorized: vectorization not profitable.");
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "not vectorized: vector version will never be "
- "profitable.");
- return false;
- }
-
- min_scalar_loop_bound = ((PARAM_VALUE (PARAM_MIN_VECT_LOOP_BOUND)
- * vectorization_factor) - 1);
-
- /* Use the cost model only if it is more conservative than user specified
- threshold. */
-
- th = (unsigned) min_scalar_loop_bound;
- if (min_profitable_iters
- && (!min_scalar_loop_bound
- || min_profitable_iters > min_scalar_loop_bound))
- th = (unsigned) min_profitable_iters;
-
- if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
- && LOOP_VINFO_INT_NITERS (loop_vinfo) <= th)
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "not vectorized: vectorization not "
- "profitable.");
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "not vectorized: iteration count smaller than "
- "user specified loop bound parameter or minimum "
- "profitable iterations (whichever is more conservative).");
- return false;
- }
-
- if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
- || LOOP_VINFO_INT_NITERS (loop_vinfo) % vectorization_factor != 0
- || LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "epilog loop required.");
- if (!vect_can_advance_ivs_p (loop_vinfo))
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump,
- "not vectorized: can't create epilog loop 1.");
- return false;
- }
- if (!slpeel_can_duplicate_loop_p (loop, single_exit (loop)))
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump,
- "not vectorized: can't create epilog loop 2.");
- return false;
- }
- }
-
- return true;
-}
-
-
-/* Function exist_non_indexing_operands_for_use_p
-
- USE is one of the uses attached to STMT. Check if USE is
- used in STMT for anything other than indexing an array. */
-
-static bool
-exist_non_indexing_operands_for_use_p (tree use, gimple stmt)
-{
- tree operand;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
-
- /* USE corresponds to some operand in STMT. If there is no data
- reference in STMT, then any operand that corresponds to USE
- is not indexing an array. */
- if (!STMT_VINFO_DATA_REF (stmt_info))
- return true;
-
- /* STMT has a data_ref. FORNOW this means that its of one of
- the following forms:
- -1- ARRAY_REF = var
- -2- var = ARRAY_REF
- (This should have been verified in analyze_data_refs).
-
- 'var' in the second case corresponds to a def, not a use,
- so USE cannot correspond to any operands that are not used
- for array indexing.
-
- Therefore, all we need to check is if STMT falls into the
- first case, and whether var corresponds to USE. */
-
- if (TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME)
- return false;
-
- if (!gimple_assign_copy_p (stmt))
- return false;
- operand = gimple_assign_rhs1 (stmt);
-
- if (TREE_CODE (operand) != SSA_NAME)
- return false;
-
- if (operand == use)
- return true;
-
- return false;
-}
-
-
-/* Function vect_analyze_scalar_cycles_1.
-
- Examine the cross iteration def-use cycles of scalar variables
- in LOOP. LOOP_VINFO represents the loop that is now being
- considered for vectorization (can be LOOP, or an outer-loop
- enclosing LOOP). */
-
-static void
-vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
-{
- basic_block bb = loop->header;
- tree dumy;
- VEC(gimple,heap) *worklist = VEC_alloc (gimple, heap, 64);
- gimple_stmt_iterator gsi;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_analyze_scalar_cycles ===");
-
- /* First - identify all inductions. */
- for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
- {
- gimple phi = gsi_stmt (gsi);
- tree access_fn = NULL;
- tree def = PHI_RESULT (phi);
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (phi);
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "Analyze phi: ");
- print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
- }
-
- /* Skip virtual phi's. The data dependences that are associated with
- virtual defs/uses (i.e., memory accesses) are analyzed elsewhere. */
- if (!is_gimple_reg (SSA_NAME_VAR (def)))
- continue;
-
- STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_unknown_def_type;
-
- /* Analyze the evolution function. */
- access_fn = analyze_scalar_evolution (loop, def);
- if (access_fn && vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "Access function of PHI: ");
- print_generic_expr (vect_dump, access_fn, TDF_SLIM);
- }
-
- if (!access_fn
- || !vect_is_simple_iv_evolution (loop->num, access_fn, &dumy, &dumy))
- {
- VEC_safe_push (gimple, heap, worklist, phi);
- continue;
- }
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Detected induction.");
- STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_induction_def;
- }
-
-
- /* Second - identify all reductions. */
- while (VEC_length (gimple, worklist) > 0)
- {
- gimple phi = VEC_pop (gimple, worklist);
- tree def = PHI_RESULT (phi);
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (phi);
- gimple reduc_stmt;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "Analyze phi: ");
- print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
- }
-
- gcc_assert (is_gimple_reg (SSA_NAME_VAR (def)));
- gcc_assert (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_unknown_def_type);
-
- reduc_stmt = vect_is_simple_reduction (loop_vinfo, phi);
- if (reduc_stmt)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Detected reduction.");
- STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_reduction_def;
- STMT_VINFO_DEF_TYPE (vinfo_for_stmt (reduc_stmt)) =
- vect_reduction_def;
- }
- else
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Unknown def-use cycle pattern.");
- }
-
- VEC_free (gimple, heap, worklist);
- return;
-}
-
-
-/* Function vect_analyze_scalar_cycles.
-
- Examine the cross iteration def-use cycles of scalar variables, by
- analyzing the loop-header PHIs of scalar variables; Classify each
- cycle as one of the following: invariant, induction, reduction, unknown.
- We do that for the loop represented by LOOP_VINFO, and also to its
- inner-loop, if exists.
- Examples for scalar cycles:
-
- Example1: reduction:
-
- loop1:
- for (i=0; i<N; i++)
- sum += a[i];
-
- Example2: induction:
-
- loop2:
- for (i=0; i<N; i++)
- a[i] = i; */
-
-static void
-vect_analyze_scalar_cycles (loop_vec_info loop_vinfo)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-
- vect_analyze_scalar_cycles_1 (loop_vinfo, loop);
-
- /* When vectorizing an outer-loop, the inner-loop is executed sequentially.
- Reductions in such inner-loop therefore have different properties than
- the reductions in the nest that gets vectorized:
- 1. When vectorized, they are executed in the same order as in the original
- scalar loop, so we can't change the order of computation when
- vectorizing them.
- 2. FIXME: Inner-loop reductions can be used in the inner-loop, so the
- current checks are too strict. */
-
- if (loop->inner)
- vect_analyze_scalar_cycles_1 (loop_vinfo, loop->inner);
-}
-
-
-/* Find the place of the data-ref in STMT in the interleaving chain that starts
- from FIRST_STMT. Return -1 if the data-ref is not a part of the chain. */
-
-static int
-vect_get_place_in_interleaving_chain (gimple stmt, gimple first_stmt)
-{
- gimple next_stmt = first_stmt;
- int result = 0;
-
- if (first_stmt != DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)))
- return -1;
-
- while (next_stmt && next_stmt != stmt)
- {
- result++;
- next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
- }
-
- if (next_stmt)
- return result;
- else
- return -1;
-}
-
-
-/* Function vect_insert_into_interleaving_chain.
-
- Insert DRA into the interleaving chain of DRB according to DRA's INIT. */
-
-static void
-vect_insert_into_interleaving_chain (struct data_reference *dra,
- struct data_reference *drb)
-{
- gimple prev, next;
- tree next_init;
- stmt_vec_info stmtinfo_a = vinfo_for_stmt (DR_STMT (dra));
- stmt_vec_info stmtinfo_b = vinfo_for_stmt (DR_STMT (drb));
-
- prev = DR_GROUP_FIRST_DR (stmtinfo_b);
- next = DR_GROUP_NEXT_DR (vinfo_for_stmt (prev));
- while (next)
- {
- next_init = DR_INIT (STMT_VINFO_DATA_REF (vinfo_for_stmt (next)));
- if (tree_int_cst_compare (next_init, DR_INIT (dra)) > 0)
- {
- /* Insert here. */
- DR_GROUP_NEXT_DR (vinfo_for_stmt (prev)) = DR_STMT (dra);
- DR_GROUP_NEXT_DR (stmtinfo_a) = next;
- return;
- }
- prev = next;
- next = DR_GROUP_NEXT_DR (vinfo_for_stmt (prev));
- }
-
- /* We got to the end of the list. Insert here. */
- DR_GROUP_NEXT_DR (vinfo_for_stmt (prev)) = DR_STMT (dra);
- DR_GROUP_NEXT_DR (stmtinfo_a) = NULL;
-}
-
-
-/* Function vect_update_interleaving_chain.
-
- For two data-refs DRA and DRB that are a part of a chain interleaved data
- accesses, update the interleaving chain. DRB's INIT is smaller than DRA's.
-
- There are four possible cases:
- 1. New stmts - both DRA and DRB are not a part of any chain:
- FIRST_DR = DRB
- NEXT_DR (DRB) = DRA
- 2. DRB is a part of a chain and DRA is not:
- no need to update FIRST_DR
- no need to insert DRB
- insert DRA according to init
- 3. DRA is a part of a chain and DRB is not:
- if (init of FIRST_DR > init of DRB)
- FIRST_DR = DRB
- NEXT(FIRST_DR) = previous FIRST_DR
- else
- insert DRB according to its init
- 4. both DRA and DRB are in some interleaving chains:
- choose the chain with the smallest init of FIRST_DR
- insert the nodes of the second chain into the first one. */
-
-static void
-vect_update_interleaving_chain (struct data_reference *drb,
- struct data_reference *dra)
-{
- stmt_vec_info stmtinfo_a = vinfo_for_stmt (DR_STMT (dra));
- stmt_vec_info stmtinfo_b = vinfo_for_stmt (DR_STMT (drb));
- tree next_init, init_dra_chain, init_drb_chain;
- gimple first_a, first_b;
- tree node_init;
- gimple node, prev, next, first_stmt;
-
- /* 1. New stmts - both DRA and DRB are not a part of any chain. */
- if (!DR_GROUP_FIRST_DR (stmtinfo_a) && !DR_GROUP_FIRST_DR (stmtinfo_b))
- {
- DR_GROUP_FIRST_DR (stmtinfo_a) = DR_STMT (drb);
- DR_GROUP_FIRST_DR (stmtinfo_b) = DR_STMT (drb);
- DR_GROUP_NEXT_DR (stmtinfo_b) = DR_STMT (dra);
- return;
- }
-
- /* 2. DRB is a part of a chain and DRA is not. */
- if (!DR_GROUP_FIRST_DR (stmtinfo_a) && DR_GROUP_FIRST_DR (stmtinfo_b))
- {
- DR_GROUP_FIRST_DR (stmtinfo_a) = DR_GROUP_FIRST_DR (stmtinfo_b);
- /* Insert DRA into the chain of DRB. */
- vect_insert_into_interleaving_chain (dra, drb);
- return;
- }
-
- /* 3. DRA is a part of a chain and DRB is not. */
- if (DR_GROUP_FIRST_DR (stmtinfo_a) && !DR_GROUP_FIRST_DR (stmtinfo_b))
- {
- gimple old_first_stmt = DR_GROUP_FIRST_DR (stmtinfo_a);
- tree init_old = DR_INIT (STMT_VINFO_DATA_REF (vinfo_for_stmt (
- old_first_stmt)));
- gimple tmp;
-
- if (tree_int_cst_compare (init_old, DR_INIT (drb)) > 0)
- {
- /* DRB's init is smaller than the init of the stmt previously marked
- as the first stmt of the interleaving chain of DRA. Therefore, we
- update FIRST_STMT and put DRB in the head of the list. */
- DR_GROUP_FIRST_DR (stmtinfo_b) = DR_STMT (drb);
- DR_GROUP_NEXT_DR (stmtinfo_b) = old_first_stmt;
-
- /* Update all the stmts in the list to point to the new FIRST_STMT. */
- tmp = old_first_stmt;
- while (tmp)
- {
- DR_GROUP_FIRST_DR (vinfo_for_stmt (tmp)) = DR_STMT (drb);
- tmp = DR_GROUP_NEXT_DR (vinfo_for_stmt (tmp));
- }
- }
- else
- {
- /* Insert DRB in the list of DRA. */
- vect_insert_into_interleaving_chain (drb, dra);
- DR_GROUP_FIRST_DR (stmtinfo_b) = DR_GROUP_FIRST_DR (stmtinfo_a);
- }
- return;
- }
-
- /* 4. both DRA and DRB are in some interleaving chains. */
- first_a = DR_GROUP_FIRST_DR (stmtinfo_a);
- first_b = DR_GROUP_FIRST_DR (stmtinfo_b);
- if (first_a == first_b)
- return;
- init_dra_chain = DR_INIT (STMT_VINFO_DATA_REF (vinfo_for_stmt (first_a)));
- init_drb_chain = DR_INIT (STMT_VINFO_DATA_REF (vinfo_for_stmt (first_b)));
-
- if (tree_int_cst_compare (init_dra_chain, init_drb_chain) > 0)
- {
- /* Insert the nodes of DRA chain into the DRB chain.
- After inserting a node, continue from this node of the DRB chain (don't
- start from the beginning. */
- node = DR_GROUP_FIRST_DR (stmtinfo_a);
- prev = DR_GROUP_FIRST_DR (stmtinfo_b);
- first_stmt = first_b;
- }
- else
- {
- /* Insert the nodes of DRB chain into the DRA chain.
- After inserting a node, continue from this node of the DRA chain (don't
- start from the beginning. */
- node = DR_GROUP_FIRST_DR (stmtinfo_b);
- prev = DR_GROUP_FIRST_DR (stmtinfo_a);
- first_stmt = first_a;
- }
-
- while (node)
- {
- node_init = DR_INIT (STMT_VINFO_DATA_REF (vinfo_for_stmt (node)));
- next = DR_GROUP_NEXT_DR (vinfo_for_stmt (prev));
- while (next)
- {
- next_init = DR_INIT (STMT_VINFO_DATA_REF (vinfo_for_stmt (next)));
- if (tree_int_cst_compare (next_init, node_init) > 0)
- {
- /* Insert here. */
- DR_GROUP_NEXT_DR (vinfo_for_stmt (prev)) = node;
- DR_GROUP_NEXT_DR (vinfo_for_stmt (node)) = next;
- prev = node;
- break;
- }
- prev = next;
- next = DR_GROUP_NEXT_DR (vinfo_for_stmt (prev));
- }
- if (!next)
- {
- /* We got to the end of the list. Insert here. */
- DR_GROUP_NEXT_DR (vinfo_for_stmt (prev)) = node;
- DR_GROUP_NEXT_DR (vinfo_for_stmt (node)) = NULL;
- prev = node;
- }
- DR_GROUP_FIRST_DR (vinfo_for_stmt (node)) = first_stmt;
- node = DR_GROUP_NEXT_DR (vinfo_for_stmt (node));
- }
-}
-
-
-/* Function vect_equal_offsets.
-
- Check if OFFSET1 and OFFSET2 are identical expressions. */
-
-static bool
-vect_equal_offsets (tree offset1, tree offset2)
-{
- bool res0, res1;
-
- STRIP_NOPS (offset1);
- STRIP_NOPS (offset2);
-
- if (offset1 == offset2)
- return true;
-
- if (TREE_CODE (offset1) != TREE_CODE (offset2)
- || !BINARY_CLASS_P (offset1)
- || !BINARY_CLASS_P (offset2))
- return false;
-
- res0 = vect_equal_offsets (TREE_OPERAND (offset1, 0),
- TREE_OPERAND (offset2, 0));
- res1 = vect_equal_offsets (TREE_OPERAND (offset1, 1),
- TREE_OPERAND (offset2, 1));
-
- return (res0 && res1);
-}
-
-
-/* Function vect_check_interleaving.
-
- Check if DRA and DRB are a part of interleaving. In case they are, insert
- DRA and DRB in an interleaving chain. */
-
-static void
-vect_check_interleaving (struct data_reference *dra,
- struct data_reference *drb)
-{
- HOST_WIDE_INT type_size_a, type_size_b, diff_mod_size, step, init_a, init_b;
-
- /* Check that the data-refs have same first location (except init) and they
- are both either store or load (not load and store). */
- if ((DR_BASE_ADDRESS (dra) != DR_BASE_ADDRESS (drb)
- && (TREE_CODE (DR_BASE_ADDRESS (dra)) != ADDR_EXPR
- || TREE_CODE (DR_BASE_ADDRESS (drb)) != ADDR_EXPR
- || TREE_OPERAND (DR_BASE_ADDRESS (dra), 0)
- != TREE_OPERAND (DR_BASE_ADDRESS (drb),0)))
- || !vect_equal_offsets (DR_OFFSET (dra), DR_OFFSET (drb))
- || !tree_int_cst_compare (DR_INIT (dra), DR_INIT (drb))
- || DR_IS_READ (dra) != DR_IS_READ (drb))
- return;
-
- /* Check:
- 1. data-refs are of the same type
- 2. their steps are equal
- 3. the step is greater than the difference between data-refs' inits */
- type_size_a = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (dra))));
- type_size_b = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (drb))));
-
- if (type_size_a != type_size_b
- || tree_int_cst_compare (DR_STEP (dra), DR_STEP (drb))
- || !types_compatible_p (TREE_TYPE (DR_REF (dra)),
- TREE_TYPE (DR_REF (drb))))
- return;
-
- init_a = TREE_INT_CST_LOW (DR_INIT (dra));
- init_b = TREE_INT_CST_LOW (DR_INIT (drb));
- step = TREE_INT_CST_LOW (DR_STEP (dra));
-
- if (init_a > init_b)
- {
- /* If init_a == init_b + the size of the type * k, we have an interleaving,
- and DRB is accessed before DRA. */
- diff_mod_size = (init_a - init_b) % type_size_a;
-
- if ((init_a - init_b) > step)
- return;
-
- if (diff_mod_size == 0)
- {
- vect_update_interleaving_chain (drb, dra);
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- {
- fprintf (vect_dump, "Detected interleaving ");
- print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM);
- fprintf (vect_dump, " and ");
- print_generic_expr (vect_dump, DR_REF (drb), TDF_SLIM);
- }
- return;
- }
- }
- else
- {
- /* If init_b == init_a + the size of the type * k, we have an
- interleaving, and DRA is accessed before DRB. */
- diff_mod_size = (init_b - init_a) % type_size_a;
-
- if ((init_b - init_a) > step)
- return;
-
- if (diff_mod_size == 0)
- {
- vect_update_interleaving_chain (dra, drb);
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- {
- fprintf (vect_dump, "Detected interleaving ");
- print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM);
- fprintf (vect_dump, " and ");
- print_generic_expr (vect_dump, DR_REF (drb), TDF_SLIM);
- }
- return;
- }
- }
-}
-
-/* Check if data references pointed by DR_I and DR_J are same or
- belong to same interleaving group. Return FALSE if drs are
- different, otherwise return TRUE. */
-
-static bool
-vect_same_range_drs (data_reference_p dr_i, data_reference_p dr_j)
-{
- gimple stmt_i = DR_STMT (dr_i);
- gimple stmt_j = DR_STMT (dr_j);
-
- if (operand_equal_p (DR_REF (dr_i), DR_REF (dr_j), 0)
- || (DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt_i))
- && DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt_j))
- && (DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt_i))
- == DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt_j)))))
- return true;
- else
- return false;
-}
-
-/* If address ranges represented by DDR_I and DDR_J are equal,
- return TRUE, otherwise return FALSE. */
-
-static bool
-vect_vfa_range_equal (ddr_p ddr_i, ddr_p ddr_j)
-{
- if ((vect_same_range_drs (DDR_A (ddr_i), DDR_A (ddr_j))
- && vect_same_range_drs (DDR_B (ddr_i), DDR_B (ddr_j)))
- || (vect_same_range_drs (DDR_A (ddr_i), DDR_B (ddr_j))
- && vect_same_range_drs (DDR_B (ddr_i), DDR_A (ddr_j))))
- return true;
- else
- return false;
-}
-
-/* Insert DDR into LOOP_VINFO list of ddrs that may alias and need to be
- tested at run-time. Return TRUE if DDR was successfully inserted.
- Return false if versioning is not supported. */
-
-static bool
-vect_mark_for_runtime_alias_test (ddr_p ddr, loop_vec_info loop_vinfo)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-
- if ((unsigned) PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS) == 0)
- return false;
-
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- {
- fprintf (vect_dump, "mark for run-time aliasing test between ");
- print_generic_expr (vect_dump, DR_REF (DDR_A (ddr)), TDF_SLIM);
- fprintf (vect_dump, " and ");
- print_generic_expr (vect_dump, DR_REF (DDR_B (ddr)), TDF_SLIM);
- }
-
- if (optimize_loop_nest_for_size_p (loop))
- {
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- fprintf (vect_dump, "versioning not supported when optimizing for size.");
- return false;
- }
-
- /* FORNOW: We don't support versioning with outer-loop vectorization. */
- if (loop->inner)
- {
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- fprintf (vect_dump, "versioning not yet supported for outer-loops.");
- return false;
- }
-
- VEC_safe_push (ddr_p, heap, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo), ddr);
- return true;
-}
-
-/* Function vect_analyze_data_ref_dependence.
-
- Return TRUE if there (might) exist a dependence between a memory-reference
- DRA and a memory-reference DRB. When versioning for alias may check a
- dependence at run-time, return FALSE. */
-
-static bool
-vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
- loop_vec_info loop_vinfo)
-{
- unsigned int i;
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- int vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
- struct data_reference *dra = DDR_A (ddr);
- struct data_reference *drb = DDR_B (ddr);
- stmt_vec_info stmtinfo_a = vinfo_for_stmt (DR_STMT (dra));
- stmt_vec_info stmtinfo_b = vinfo_for_stmt (DR_STMT (drb));
- int dra_size = GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (dra))));
- int drb_size = GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (drb))));
- lambda_vector dist_v;
- unsigned int loop_depth;
-
- if (DDR_ARE_DEPENDENT (ddr) == chrec_known)
- {
- /* Independent data accesses. */
- vect_check_interleaving (dra, drb);
- return false;
- }
-
- if ((DR_IS_READ (dra) && DR_IS_READ (drb)) || dra == drb)
- return false;
-
- if (DDR_ARE_DEPENDENT (ddr) == chrec_dont_know)
- {
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- {
- fprintf (vect_dump,
- "versioning for alias required: can't determine dependence between ");
- print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM);
- fprintf (vect_dump, " and ");
- print_generic_expr (vect_dump, DR_REF (drb), TDF_SLIM);
- }
- /* Add to list of ddrs that need to be tested at run-time. */
- return !vect_mark_for_runtime_alias_test (ddr, loop_vinfo);
- }
-
- if (DDR_NUM_DIST_VECTS (ddr) == 0)
- {
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- {
- fprintf (vect_dump, "versioning for alias required: bad dist vector for ");
- print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM);
- fprintf (vect_dump, " and ");
- print_generic_expr (vect_dump, DR_REF (drb), TDF_SLIM);
- }
- /* Add to list of ddrs that need to be tested at run-time. */
- return !vect_mark_for_runtime_alias_test (ddr, loop_vinfo);
- }
-
- loop_depth = index_in_loop_nest (loop->num, DDR_LOOP_NEST (ddr));
- for (i = 0; VEC_iterate (lambda_vector, DDR_DIST_VECTS (ddr), i, dist_v); i++)
- {
- int dist = dist_v[loop_depth];
-
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- fprintf (vect_dump, "dependence distance = %d.", dist);
-
- /* Same loop iteration. */
- if (dist % vectorization_factor == 0 && dra_size == drb_size)
- {
- /* Two references with distance zero have the same alignment. */
- VEC_safe_push (dr_p, heap, STMT_VINFO_SAME_ALIGN_REFS (stmtinfo_a), drb);
- VEC_safe_push (dr_p, heap, STMT_VINFO_SAME_ALIGN_REFS (stmtinfo_b), dra);
- if (vect_print_dump_info (REPORT_ALIGNMENT))
- fprintf (vect_dump, "accesses have the same alignment.");
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- {
- fprintf (vect_dump, "dependence distance modulo vf == 0 between ");
- print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM);
- fprintf (vect_dump, " and ");
- print_generic_expr (vect_dump, DR_REF (drb), TDF_SLIM);
- }
-
- /* For interleaving, mark that there is a read-write dependency if
- necessary. We check before that one of the data-refs is store. */
- if (DR_IS_READ (dra))
- DR_GROUP_READ_WRITE_DEPENDENCE (stmtinfo_a) = true;
- else
- {
- if (DR_IS_READ (drb))
- DR_GROUP_READ_WRITE_DEPENDENCE (stmtinfo_b) = true;
- }
-
- continue;
- }
-
- if (abs (dist) >= vectorization_factor
- || (dist > 0 && DDR_REVERSED_P (ddr)))
- {
- /* Dependence distance does not create dependence, as far as
- vectorization is concerned, in this case. If DDR_REVERSED_P the
- order of the data-refs in DDR was reversed (to make distance
- vector positive), and the actual distance is negative. */
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- fprintf (vect_dump, "dependence distance >= VF or negative.");
- continue;
- }
-
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- fprintf (vect_dump,
- "not vectorized, possible dependence "
- "between data-refs ");
- print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM);
- fprintf (vect_dump, " and ");
- print_generic_expr (vect_dump, DR_REF (drb), TDF_SLIM);
- }
-
- return true;
- }
-
- return false;
-}
-
-/* Function vect_analyze_data_ref_dependences.
-
- Examine all the data references in the loop, and make sure there do not
- exist any data dependences between them. */
-
-static bool
-vect_analyze_data_ref_dependences (loop_vec_info loop_vinfo)
-{
- unsigned int i;
- VEC (ddr_p, heap) * ddrs = LOOP_VINFO_DDRS (loop_vinfo);
- struct data_dependence_relation *ddr;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_analyze_dependences ===");
-
- for (i = 0; VEC_iterate (ddr_p, ddrs, i, ddr); i++)
- if (vect_analyze_data_ref_dependence (ddr, loop_vinfo))
- return false;
-
- return true;
-}
-
-
-/* Function vect_compute_data_ref_alignment
-
- Compute the misalignment of the data reference DR.
-
- Output:
- 1. If during the misalignment computation it is found that the data reference
- cannot be vectorized then false is returned.
- 2. DR_MISALIGNMENT (DR) is defined.
-
- FOR NOW: No analysis is actually performed. Misalignment is calculated
- only for trivial cases. TODO. */
-
-static bool
-vect_compute_data_ref_alignment (struct data_reference *dr)
-{
- gimple stmt = DR_STMT (dr);
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- tree ref = DR_REF (dr);
- tree vectype;
- tree base, base_addr;
- bool base_aligned;
- tree misalign;
- tree aligned_to, alignment;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "vect_compute_data_ref_alignment:");
-
- /* Initialize misalignment to unknown. */
- SET_DR_MISALIGNMENT (dr, -1);
-
- misalign = DR_INIT (dr);
- aligned_to = DR_ALIGNED_TO (dr);
- base_addr = DR_BASE_ADDRESS (dr);
- vectype = STMT_VINFO_VECTYPE (stmt_info);
-
- /* In case the dataref is in an inner-loop of the loop that is being
- vectorized (LOOP), we use the base and misalignment information
- relative to the outer-loop (LOOP). This is ok only if the misalignment
- stays the same throughout the execution of the inner-loop, which is why
- we have to check that the stride of the dataref in the inner-loop evenly
- divides by the vector size. */
- if (nested_in_vect_loop_p (loop, stmt))
- {
- tree step = DR_STEP (dr);
- HOST_WIDE_INT dr_step = TREE_INT_CST_LOW (step);
-
- if (dr_step % GET_MODE_SIZE (TYPE_MODE (vectype)) == 0)
- {
- if (vect_print_dump_info (REPORT_ALIGNMENT))
- fprintf (vect_dump, "inner step divides the vector-size.");
- misalign = STMT_VINFO_DR_INIT (stmt_info);
- aligned_to = STMT_VINFO_DR_ALIGNED_TO (stmt_info);
- base_addr = STMT_VINFO_DR_BASE_ADDRESS (stmt_info);
- }
- else
- {
- if (vect_print_dump_info (REPORT_ALIGNMENT))
- fprintf (vect_dump, "inner step doesn't divide the vector-size.");
- misalign = NULL_TREE;
- }
- }
-
- base = build_fold_indirect_ref (base_addr);
- alignment = ssize_int (TYPE_ALIGN (vectype)/BITS_PER_UNIT);
-
- if ((aligned_to && tree_int_cst_compare (aligned_to, alignment) < 0)
- || !misalign)
- {
- if (vect_print_dump_info (REPORT_ALIGNMENT))
- {
- fprintf (vect_dump, "Unknown alignment for access: ");
- print_generic_expr (vect_dump, base, TDF_SLIM);
- }
- return true;
- }
-
- if ((DECL_P (base)
- && tree_int_cst_compare (ssize_int (DECL_ALIGN_UNIT (base)),
- alignment) >= 0)
- || (TREE_CODE (base_addr) == SSA_NAME
- && tree_int_cst_compare (ssize_int (TYPE_ALIGN_UNIT (TREE_TYPE (
- TREE_TYPE (base_addr)))),
- alignment) >= 0))
- base_aligned = true;
- else
- base_aligned = false;
-
- if (!base_aligned)
- {
- /* Do not change the alignment of global variables if
- flag_section_anchors is enabled. */
- if (!vect_can_force_dr_alignment_p (base, TYPE_ALIGN (vectype))
- || (TREE_STATIC (base) && flag_section_anchors))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "can't force alignment of ref: ");
- print_generic_expr (vect_dump, ref, TDF_SLIM);
- }
- return true;
- }
-
- /* Force the alignment of the decl.
- NOTE: This is the only change to the code we make during
- the analysis phase, before deciding to vectorize the loop. */
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "force alignment");
- DECL_ALIGN (base) = TYPE_ALIGN (vectype);
- DECL_USER_ALIGN (base) = 1;
- }
-
- /* At this point we assume that the base is aligned. */
- gcc_assert (base_aligned
- || (TREE_CODE (base) == VAR_DECL
- && DECL_ALIGN (base) >= TYPE_ALIGN (vectype)));
-
- /* Modulo alignment. */
- misalign = size_binop (TRUNC_MOD_EXPR, misalign, alignment);
-
- if (!host_integerp (misalign, 1))
- {
- /* Negative or overflowed misalignment value. */
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "unexpected misalign value");
- return false;
- }
-
- SET_DR_MISALIGNMENT (dr, TREE_INT_CST_LOW (misalign));
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "misalign = %d bytes of ref ", DR_MISALIGNMENT (dr));
- print_generic_expr (vect_dump, ref, TDF_SLIM);
- }
-
- return true;
-}
-
-
-/* Function vect_compute_data_refs_alignment
-
- Compute the misalignment of data references in the loop.
- Return FALSE if a data reference is found that cannot be vectorized. */
-
-static bool
-vect_compute_data_refs_alignment (loop_vec_info loop_vinfo)
-{
- VEC (data_reference_p, heap) *datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
- struct data_reference *dr;
- unsigned int i;
-
- for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
- if (!vect_compute_data_ref_alignment (dr))
- return false;
-
- return true;
-}
-
-
-/* Function vect_update_misalignment_for_peel
-
- DR - the data reference whose misalignment is to be adjusted.
- DR_PEEL - the data reference whose misalignment is being made
- zero in the vector loop by the peel.
- NPEEL - the number of iterations in the peel loop if the misalignment
- of DR_PEEL is known at compile time. */
-
-static void
-vect_update_misalignment_for_peel (struct data_reference *dr,
- struct data_reference *dr_peel, int npeel)
-{
- unsigned int i;
- VEC(dr_p,heap) *same_align_drs;
- struct data_reference *current_dr;
- int dr_size = GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (dr))));
- int dr_peel_size = GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (dr_peel))));
- stmt_vec_info stmt_info = vinfo_for_stmt (DR_STMT (dr));
- stmt_vec_info peel_stmt_info = vinfo_for_stmt (DR_STMT (dr_peel));
-
- /* For interleaved data accesses the step in the loop must be multiplied by
- the size of the interleaving group. */
- if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
- dr_size *= DR_GROUP_SIZE (vinfo_for_stmt (DR_GROUP_FIRST_DR (stmt_info)));
- if (STMT_VINFO_STRIDED_ACCESS (peel_stmt_info))
- dr_peel_size *= DR_GROUP_SIZE (peel_stmt_info);
-
- /* It can be assumed that the data refs with the same alignment as dr_peel
- are aligned in the vector loop. */
- same_align_drs
- = STMT_VINFO_SAME_ALIGN_REFS (vinfo_for_stmt (DR_STMT (dr_peel)));
- for (i = 0; VEC_iterate (dr_p, same_align_drs, i, current_dr); i++)
- {
- if (current_dr != dr)
- continue;
- gcc_assert (DR_MISALIGNMENT (dr) / dr_size ==
- DR_MISALIGNMENT (dr_peel) / dr_peel_size);
- SET_DR_MISALIGNMENT (dr, 0);
- return;
- }
-
- if (known_alignment_for_access_p (dr)
- && known_alignment_for_access_p (dr_peel))
- {
- int misal = DR_MISALIGNMENT (dr);
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- misal += npeel * dr_size;
- misal %= GET_MODE_SIZE (TYPE_MODE (vectype));
- SET_DR_MISALIGNMENT (dr, misal);
- return;
- }
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Setting misalignment to -1.");
- SET_DR_MISALIGNMENT (dr, -1);
-}
-
-
-/* Function vect_verify_datarefs_alignment
-
- Return TRUE if all data references in the loop can be
- handled with respect to alignment. */
-
-static bool
-vect_verify_datarefs_alignment (loop_vec_info loop_vinfo)
-{
- VEC (data_reference_p, heap) *datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
- struct data_reference *dr;
- enum dr_alignment_support supportable_dr_alignment;
- unsigned int i;
-
- for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
- {
- gimple stmt = DR_STMT (dr);
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
-
- /* For interleaving, only the alignment of the first access matters. */
- if (STMT_VINFO_STRIDED_ACCESS (stmt_info)
- && DR_GROUP_FIRST_DR (stmt_info) != stmt)
- continue;
-
- supportable_dr_alignment = vect_supportable_dr_alignment (dr);
- if (!supportable_dr_alignment)
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- if (DR_IS_READ (dr))
- fprintf (vect_dump,
- "not vectorized: unsupported unaligned load.");
- else
- fprintf (vect_dump,
- "not vectorized: unsupported unaligned store.");
- }
- return false;
- }
- if (supportable_dr_alignment != dr_aligned
- && vect_print_dump_info (REPORT_ALIGNMENT))
- fprintf (vect_dump, "Vectorizing an unaligned access.");
- }
- return true;
-}
-
-
-/* Function vector_alignment_reachable_p
-
- Return true if vector alignment for DR is reachable by peeling
- a few loop iterations. Return false otherwise. */
-
-static bool
-vector_alignment_reachable_p (struct data_reference *dr)
-{
- gimple stmt = DR_STMT (dr);
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
-
- if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
- {
- /* For interleaved access we peel only if number of iterations in
- the prolog loop ({VF - misalignment}), is a multiple of the
- number of the interleaved accesses. */
- int elem_size, mis_in_elements;
- int nelements = TYPE_VECTOR_SUBPARTS (vectype);
-
- /* FORNOW: handle only known alignment. */
- if (!known_alignment_for_access_p (dr))
- return false;
-
- elem_size = GET_MODE_SIZE (TYPE_MODE (vectype)) / nelements;
- mis_in_elements = DR_MISALIGNMENT (dr) / elem_size;
-
- if ((nelements - mis_in_elements) % DR_GROUP_SIZE (stmt_info))
- return false;
- }
-
- /* If misalignment is known at the compile time then allow peeling
- only if natural alignment is reachable through peeling. */
- if (known_alignment_for_access_p (dr) && !aligned_access_p (dr))
- {
- HOST_WIDE_INT elmsize =
- int_cst_value (TYPE_SIZE_UNIT (TREE_TYPE (vectype)));
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "data size =" HOST_WIDE_INT_PRINT_DEC, elmsize);
- fprintf (vect_dump, ". misalignment = %d. ", DR_MISALIGNMENT (dr));
- }
- if (DR_MISALIGNMENT (dr) % elmsize)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "data size does not divide the misalignment.\n");
- return false;
- }
- }
-
- if (!known_alignment_for_access_p (dr))
- {
- tree type = (TREE_TYPE (DR_REF (dr)));
- tree ba = DR_BASE_OBJECT (dr);
- bool is_packed = false;
-
- if (ba)
- is_packed = contains_packed_reference (ba);
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Unknown misalignment, is_packed = %d",is_packed);
- if (targetm.vectorize.vector_alignment_reachable (type, is_packed))
- return true;
- else
- return false;
- }
-
- return true;
-}
-
-/* Function vect_enhance_data_refs_alignment
-
- This pass will use loop versioning and loop peeling in order to enhance
- the alignment of data references in the loop.
-
- FOR NOW: we assume that whatever versioning/peeling takes place, only the
- original loop is to be vectorized; Any other loops that are created by
- the transformations performed in this pass - are not supposed to be
- vectorized. This restriction will be relaxed.
-
- This pass will require a cost model to guide it whether to apply peeling
- or versioning or a combination of the two. For example, the scheme that
- intel uses when given a loop with several memory accesses, is as follows:
- choose one memory access ('p') which alignment you want to force by doing
- peeling. Then, either (1) generate a loop in which 'p' is aligned and all
- other accesses are not necessarily aligned, or (2) use loop versioning to
- generate one loop in which all accesses are aligned, and another loop in
- which only 'p' is necessarily aligned.
-
- ("Automatic Intra-Register Vectorization for the Intel Architecture",
- Aart J.C. Bik, Milind Girkar, Paul M. Grey and Ximmin Tian, International
- Journal of Parallel Programming, Vol. 30, No. 2, April 2002.)
-
- Devising a cost model is the most critical aspect of this work. It will
- guide us on which access to peel for, whether to use loop versioning, how
- many versions to create, etc. The cost model will probably consist of
- generic considerations as well as target specific considerations (on
- powerpc for example, misaligned stores are more painful than misaligned
- loads).
-
- Here are the general steps involved in alignment enhancements:
-
- -- original loop, before alignment analysis:
- for (i=0; i<N; i++){
- x = q[i]; # DR_MISALIGNMENT(q) = unknown
- p[i] = y; # DR_MISALIGNMENT(p) = unknown
- }
-
- -- After vect_compute_data_refs_alignment:
- for (i=0; i<N; i++){
- x = q[i]; # DR_MISALIGNMENT(q) = 3
- p[i] = y; # DR_MISALIGNMENT(p) = unknown
- }
-
- -- Possibility 1: we do loop versioning:
- if (p is aligned) {
- for (i=0; i<N; i++){ # loop 1A
- x = q[i]; # DR_MISALIGNMENT(q) = 3
- p[i] = y; # DR_MISALIGNMENT(p) = 0
- }
- }
- else {
- for (i=0; i<N; i++){ # loop 1B
- x = q[i]; # DR_MISALIGNMENT(q) = 3
- p[i] = y; # DR_MISALIGNMENT(p) = unaligned
- }
- }
-
- -- Possibility 2: we do loop peeling:
- for (i = 0; i < 3; i++){ # (scalar loop, not to be vectorized).
- x = q[i];
- p[i] = y;
- }
- for (i = 3; i < N; i++){ # loop 2A
- x = q[i]; # DR_MISALIGNMENT(q) = 0
- p[i] = y; # DR_MISALIGNMENT(p) = unknown
- }
-
- -- Possibility 3: combination of loop peeling and versioning:
- for (i = 0; i < 3; i++){ # (scalar loop, not to be vectorized).
- x = q[i];
- p[i] = y;
- }
- if (p is aligned) {
- for (i = 3; i<N; i++){ # loop 3A
- x = q[i]; # DR_MISALIGNMENT(q) = 0
- p[i] = y; # DR_MISALIGNMENT(p) = 0
- }
- }
- else {
- for (i = 3; i<N; i++){ # loop 3B
- x = q[i]; # DR_MISALIGNMENT(q) = 0
- p[i] = y; # DR_MISALIGNMENT(p) = unaligned
- }
- }
-
- These loops are later passed to loop_transform to be vectorized. The
- vectorizer will use the alignment information to guide the transformation
- (whether to generate regular loads/stores, or with special handling for
- misalignment). */
-
-static bool
-vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
-{
- VEC (data_reference_p, heap) *datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- enum dr_alignment_support supportable_dr_alignment;
- struct data_reference *dr0 = NULL;
- struct data_reference *dr;
- unsigned int i;
- bool do_peeling = false;
- bool do_versioning = false;
- bool stat;
- gimple stmt;
- stmt_vec_info stmt_info;
- int vect_versioning_for_alias_required;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_enhance_data_refs_alignment ===");
-
- /* While cost model enhancements are expected in the future, the high level
- view of the code at this time is as follows:
-
- A) If there is a misaligned write then see if peeling to align this write
- can make all data references satisfy vect_supportable_dr_alignment.
- If so, update data structures as needed and return true. Note that
- at this time vect_supportable_dr_alignment is known to return false
- for a misaligned write.
-
- B) If peeling wasn't possible and there is a data reference with an
- unknown misalignment that does not satisfy vect_supportable_dr_alignment
- then see if loop versioning checks can be used to make all data
- references satisfy vect_supportable_dr_alignment. If so, update
- data structures as needed and return true.
-
- C) If neither peeling nor versioning were successful then return false if
- any data reference does not satisfy vect_supportable_dr_alignment.
-
- D) Return true (all data references satisfy vect_supportable_dr_alignment).
-
- Note, Possibility 3 above (which is peeling and versioning together) is not
- being done at this time. */
-
- /* (1) Peeling to force alignment. */
-
- /* (1.1) Decide whether to perform peeling, and how many iterations to peel:
- Considerations:
- + How many accesses will become aligned due to the peeling
- - How many accesses will become unaligned due to the peeling,
- and the cost of misaligned accesses.
- - The cost of peeling (the extra runtime checks, the increase
- in code size).
-
- The scheme we use FORNOW: peel to force the alignment of the first
- misaligned store in the loop.
- Rationale: misaligned stores are not yet supported.
-
- TODO: Use a cost model. */
-
- for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
- {
- stmt = DR_STMT (dr);
- stmt_info = vinfo_for_stmt (stmt);
-
- /* For interleaving, only the alignment of the first access
- matters. */
- if (STMT_VINFO_STRIDED_ACCESS (stmt_info)
- && DR_GROUP_FIRST_DR (stmt_info) != stmt)
- continue;
-
- if (!DR_IS_READ (dr) && !aligned_access_p (dr))
- {
- do_peeling = vector_alignment_reachable_p (dr);
- if (do_peeling)
- dr0 = dr;
- if (!do_peeling && vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "vector alignment may not be reachable");
- break;
- }
- }
-
- vect_versioning_for_alias_required =
- (VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)) > 0);
-
- /* Temporarily, if versioning for alias is required, we disable peeling
- until we support peeling and versioning. Often peeling for alignment
- will require peeling for loop-bound, which in turn requires that we
- know how to adjust the loop ivs after the loop. */
- if (vect_versioning_for_alias_required
- || !vect_can_advance_ivs_p (loop_vinfo)
- || !slpeel_can_duplicate_loop_p (loop, single_exit (loop)))
- do_peeling = false;
-
- if (do_peeling)
- {
- int mis;
- int npeel = 0;
- gimple stmt = DR_STMT (dr0);
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- int nelements = TYPE_VECTOR_SUBPARTS (vectype);
-
- if (known_alignment_for_access_p (dr0))
- {
- /* Since it's known at compile time, compute the number of iterations
- in the peeled loop (the peeling factor) for use in updating
- DR_MISALIGNMENT values. The peeling factor is the vectorization
- factor minus the misalignment as an element count. */
- mis = DR_MISALIGNMENT (dr0);
- mis /= GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (dr0))));
- npeel = nelements - mis;
-
- /* For interleaved data access every iteration accesses all the
- members of the group, therefore we divide the number of iterations
- by the group size. */
- stmt_info = vinfo_for_stmt (DR_STMT (dr0));
- if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
- npeel /= DR_GROUP_SIZE (stmt_info);
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Try peeling by %d", npeel);
- }
-
- /* Ensure that all data refs can be vectorized after the peel. */
- for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
- {
- int save_misalignment;
-
- if (dr == dr0)
- continue;
-
- stmt = DR_STMT (dr);
- stmt_info = vinfo_for_stmt (stmt);
- /* For interleaving, only the alignment of the first access
- matters. */
- if (STMT_VINFO_STRIDED_ACCESS (stmt_info)
- && DR_GROUP_FIRST_DR (stmt_info) != stmt)
- continue;
-
- save_misalignment = DR_MISALIGNMENT (dr);
- vect_update_misalignment_for_peel (dr, dr0, npeel);
- supportable_dr_alignment = vect_supportable_dr_alignment (dr);
- SET_DR_MISALIGNMENT (dr, save_misalignment);
-
- if (!supportable_dr_alignment)
- {
- do_peeling = false;
- break;
- }
- }
-
- if (do_peeling)
- {
- /* (1.2) Update the DR_MISALIGNMENT of each data reference DR_i.
- If the misalignment of DR_i is identical to that of dr0 then set
- DR_MISALIGNMENT (DR_i) to zero. If the misalignment of DR_i and
- dr0 are known at compile time then increment DR_MISALIGNMENT (DR_i)
- by the peeling factor times the element size of DR_i (MOD the
- vectorization factor times the size). Otherwise, the
- misalignment of DR_i must be set to unknown. */
- for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
- if (dr != dr0)
- vect_update_misalignment_for_peel (dr, dr0, npeel);
-
- LOOP_VINFO_UNALIGNED_DR (loop_vinfo) = dr0;
- LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo) = DR_MISALIGNMENT (dr0);
- SET_DR_MISALIGNMENT (dr0, 0);
- if (vect_print_dump_info (REPORT_ALIGNMENT))
- fprintf (vect_dump, "Alignment of access forced using peeling.");
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Peeling for alignment will be applied.");
-
- stat = vect_verify_datarefs_alignment (loop_vinfo);
- gcc_assert (stat);
- return stat;
- }
- }
-
-
- /* (2) Versioning to force alignment. */
-
- /* Try versioning if:
- 1) flag_tree_vect_loop_version is TRUE
- 2) optimize loop for speed
- 3) there is at least one unsupported misaligned data ref with an unknown
- misalignment, and
- 4) all misaligned data refs with a known misalignment are supported, and
- 5) the number of runtime alignment checks is within reason. */
-
- do_versioning =
- flag_tree_vect_loop_version
- && optimize_loop_nest_for_speed_p (loop)
- && (!loop->inner); /* FORNOW */
-
- if (do_versioning)
- {
- for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
- {
- stmt = DR_STMT (dr);
- stmt_info = vinfo_for_stmt (stmt);
-
- /* For interleaving, only the alignment of the first access
- matters. */
- if (aligned_access_p (dr)
- || (STMT_VINFO_STRIDED_ACCESS (stmt_info)
- && DR_GROUP_FIRST_DR (stmt_info) != stmt))
- continue;
-
- supportable_dr_alignment = vect_supportable_dr_alignment (dr);
-
- if (!supportable_dr_alignment)
- {
- gimple stmt;
- int mask;
- tree vectype;
-
- if (known_alignment_for_access_p (dr)
- || VEC_length (gimple,
- LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
- >= (unsigned) PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIGNMENT_CHECKS))
- {
- do_versioning = false;
- break;
- }
-
- stmt = DR_STMT (dr);
- vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (stmt));
- gcc_assert (vectype);
-
- /* The rightmost bits of an aligned address must be zeros.
- Construct the mask needed for this test. For example,
- GET_MODE_SIZE for the vector mode V4SI is 16 bytes so the
- mask must be 15 = 0xf. */
- mask = GET_MODE_SIZE (TYPE_MODE (vectype)) - 1;
-
- /* FORNOW: use the same mask to test all potentially unaligned
- references in the loop. The vectorizer currently supports
- a single vector size, see the reference to
- GET_MODE_NUNITS (TYPE_MODE (vectype)) where the
- vectorization factor is computed. */
- gcc_assert (!LOOP_VINFO_PTR_MASK (loop_vinfo)
- || LOOP_VINFO_PTR_MASK (loop_vinfo) == mask);
- LOOP_VINFO_PTR_MASK (loop_vinfo) = mask;
- VEC_safe_push (gimple, heap,
- LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo),
- DR_STMT (dr));
- }
- }
-
- /* Versioning requires at least one misaligned data reference. */
- if (VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo)) == 0)
- do_versioning = false;
- else if (!do_versioning)
- VEC_truncate (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo), 0);
- }
-
- if (do_versioning)
- {
- VEC(gimple,heap) *may_misalign_stmts
- = LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo);
- gimple stmt;
-
- /* It can now be assumed that the data references in the statements
- in LOOP_VINFO_MAY_MISALIGN_STMTS will be aligned in the version
- of the loop being vectorized. */
- for (i = 0; VEC_iterate (gimple, may_misalign_stmts, i, stmt); i++)
- {
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- dr = STMT_VINFO_DATA_REF (stmt_info);
- SET_DR_MISALIGNMENT (dr, 0);
- if (vect_print_dump_info (REPORT_ALIGNMENT))
- fprintf (vect_dump, "Alignment of access forced using versioning.");
- }
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Versioning for alignment will be applied.");
-
- /* Peeling and versioning can't be done together at this time. */
- gcc_assert (! (do_peeling && do_versioning));
-
- stat = vect_verify_datarefs_alignment (loop_vinfo);
- gcc_assert (stat);
- return stat;
- }
-
- /* This point is reached if neither peeling nor versioning is being done. */
- gcc_assert (! (do_peeling || do_versioning));
-
- stat = vect_verify_datarefs_alignment (loop_vinfo);
- return stat;
-}
-
-
-/* Function vect_analyze_data_refs_alignment
-
- Analyze the alignment of the data-references in the loop.
- Return FALSE if a data reference is found that cannot be vectorized. */
-
-static bool
-vect_analyze_data_refs_alignment (loop_vec_info loop_vinfo)
-{
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_analyze_data_refs_alignment ===");
-
- if (!vect_compute_data_refs_alignment (loop_vinfo))
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump,
- "not vectorized: can't calculate alignment for data ref.");
- return false;
- }
-
- return true;
-}
-
-
-/* Analyze groups of strided accesses: check that DR belongs to a group of
- strided accesses of legal size, step, etc. Detect gaps, single element
- interleaving, and other special cases. Set strided access info.
- Collect groups of strided stores for further use in SLP analysis. */
-
-static bool
-vect_analyze_group_access (struct data_reference *dr)
-{
- tree step = DR_STEP (dr);
- tree scalar_type = TREE_TYPE (DR_REF (dr));
- HOST_WIDE_INT type_size = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (scalar_type));
- gimple stmt = DR_STMT (dr);
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- HOST_WIDE_INT dr_step = TREE_INT_CST_LOW (step);
- HOST_WIDE_INT stride;
- bool slp_impossible = false;
-
- /* For interleaving, STRIDE is STEP counted in elements, i.e., the size of the
- interleaving group (including gaps). */
- stride = dr_step / type_size;
-
- /* Not consecutive access is possible only if it is a part of interleaving. */
- if (!DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)))
- {
- /* Check if it this DR is a part of interleaving, and is a single
- element of the group that is accessed in the loop. */
-
- /* Gaps are supported only for loads. STEP must be a multiple of the type
- size. The size of the group must be a power of 2. */
- if (DR_IS_READ (dr)
- && (dr_step % type_size) == 0
- && stride > 0
- && exact_log2 (stride) != -1)
- {
- DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)) = stmt;
- DR_GROUP_SIZE (vinfo_for_stmt (stmt)) = stride;
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- {
- fprintf (vect_dump, "Detected single element interleaving %d ",
- DR_GROUP_SIZE (vinfo_for_stmt (stmt)));
- print_generic_expr (vect_dump, DR_REF (dr), TDF_SLIM);
- fprintf (vect_dump, " step ");
- print_generic_expr (vect_dump, step, TDF_SLIM);
- }
- return true;
- }
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "not consecutive access");
- return false;
- }
-
- if (DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)) == stmt)
- {
- /* First stmt in the interleaving chain. Check the chain. */
- gimple next = DR_GROUP_NEXT_DR (vinfo_for_stmt (stmt));
- struct data_reference *data_ref = dr;
- unsigned int count = 1;
- tree next_step;
- tree prev_init = DR_INIT (data_ref);
- gimple prev = stmt;
- HOST_WIDE_INT diff, count_in_bytes;
-
- while (next)
- {
- /* Skip same data-refs. In case that two or more stmts share data-ref
- (supported only for loads), we vectorize only the first stmt, and
- the rest get their vectorized loads from the first one. */
- if (!tree_int_cst_compare (DR_INIT (data_ref),
- DR_INIT (STMT_VINFO_DATA_REF (
- vinfo_for_stmt (next)))))
- {
- if (!DR_IS_READ (data_ref))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Two store stmts share the same dr.");
- return false;
- }
-
- /* Check that there is no load-store dependencies for this loads
- to prevent a case of load-store-load to the same location. */
- if (DR_GROUP_READ_WRITE_DEPENDENCE (vinfo_for_stmt (next))
- || DR_GROUP_READ_WRITE_DEPENDENCE (vinfo_for_stmt (prev)))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump,
- "READ_WRITE dependence in interleaving.");
- return false;
- }
-
- /* For load use the same data-ref load. */
- DR_GROUP_SAME_DR_STMT (vinfo_for_stmt (next)) = prev;
-
- prev = next;
- next = DR_GROUP_NEXT_DR (vinfo_for_stmt (next));
- continue;
- }
- prev = next;
-
- /* Check that all the accesses have the same STEP. */
- next_step = DR_STEP (STMT_VINFO_DATA_REF (vinfo_for_stmt (next)));
- if (tree_int_cst_compare (step, next_step))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "not consecutive access in interleaving");
- return false;
- }
-
- data_ref = STMT_VINFO_DATA_REF (vinfo_for_stmt (next));
- /* Check that the distance between two accesses is equal to the type
- size. Otherwise, we have gaps. */
- diff = (TREE_INT_CST_LOW (DR_INIT (data_ref))
- - TREE_INT_CST_LOW (prev_init)) / type_size;
- if (diff != 1)
- {
- /* FORNOW: SLP of accesses with gaps is not supported. */
- slp_impossible = true;
- if (!DR_IS_READ (data_ref))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "interleaved store with gaps");
- return false;
- }
- }
-
- /* Store the gap from the previous member of the group. If there is no
- gap in the access, DR_GROUP_GAP is always 1. */
- DR_GROUP_GAP (vinfo_for_stmt (next)) = diff;
-
- prev_init = DR_INIT (data_ref);
- next = DR_GROUP_NEXT_DR (vinfo_for_stmt (next));
- /* Count the number of data-refs in the chain. */
- count++;
- }
-
- /* COUNT is the number of accesses found, we multiply it by the size of
- the type to get COUNT_IN_BYTES. */
- count_in_bytes = type_size * count;
-
- /* Check that the size of the interleaving is not greater than STEP. */
- if (dr_step < count_in_bytes)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "interleaving size is greater than step for ");
- print_generic_expr (vect_dump, DR_REF (dr), TDF_SLIM);
- }
- return false;
- }
-
- /* Check that the size of the interleaving is equal to STEP for stores,
- i.e., that there are no gaps. */
- if (dr_step != count_in_bytes)
- {
- if (DR_IS_READ (dr))
- {
- slp_impossible = true;
- /* There is a gap after the last load in the group. This gap is a
- difference between the stride and the number of elements. When
- there is no gap, this difference should be 0. */
- DR_GROUP_GAP (vinfo_for_stmt (stmt)) = stride - count;
- }
- else
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "interleaved store with gaps");
- return false;
- }
- }
-
- /* Check that STEP is a multiple of type size. */
- if ((dr_step % type_size) != 0)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "step is not a multiple of type size: step ");
- print_generic_expr (vect_dump, step, TDF_SLIM);
- fprintf (vect_dump, " size ");
- print_generic_expr (vect_dump, TYPE_SIZE_UNIT (scalar_type),
- TDF_SLIM);
- }
- return false;
- }
-
- /* FORNOW: we handle only interleaving that is a power of 2.
- We don't fail here if it may be still possible to vectorize the
- group using SLP. If not, the size of the group will be checked in
- vect_analyze_operations, and the vectorization will fail. */
- if (exact_log2 (stride) == -1)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "interleaving is not a power of 2");
-
- if (slp_impossible)
- return false;
- }
- DR_GROUP_SIZE (vinfo_for_stmt (stmt)) = stride;
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Detected interleaving of size %d", (int)stride);
-
- /* SLP: create an SLP data structure for every interleaving group of
- stores for further analysis in vect_analyse_slp. */
- if (!DR_IS_READ (dr) && !slp_impossible)
- VEC_safe_push (gimple, heap, LOOP_VINFO_STRIDED_STORES (loop_vinfo), stmt);
- }
-
- return true;
-}
-
-
-/* Analyze the access pattern of the data-reference DR.
- In case of non-consecutive accesses call vect_analyze_group_access() to
- analyze groups of strided accesses. */
-
-static bool
-vect_analyze_data_ref_access (struct data_reference *dr)
-{
- tree step = DR_STEP (dr);
- tree scalar_type = TREE_TYPE (DR_REF (dr));
- gimple stmt = DR_STMT (dr);
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- HOST_WIDE_INT dr_step = TREE_INT_CST_LOW (step);
-
- if (!step)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "bad data-ref access");
- return false;
- }
-
- /* Don't allow invariant accesses. */
- if (dr_step == 0)
- return false;
-
- if (nested_in_vect_loop_p (loop, stmt))
- {
- /* Interleaved accesses are not yet supported within outer-loop
- vectorization for references in the inner-loop. */
- DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)) = NULL;
-
- /* For the rest of the analysis we use the outer-loop step. */
- step = STMT_VINFO_DR_STEP (stmt_info);
- dr_step = TREE_INT_CST_LOW (step);
-
- if (dr_step == 0)
- {
- if (vect_print_dump_info (REPORT_ALIGNMENT))
- fprintf (vect_dump, "zero step in outer loop.");
- if (DR_IS_READ (dr))
- return true;
- else
- return false;
- }
- }
-
- /* Consecutive? */
- if (!tree_int_cst_compare (step, TYPE_SIZE_UNIT (scalar_type)))
- {
- /* Mark that it is not interleaving. */
- DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)) = NULL;
- return true;
- }
-
- if (nested_in_vect_loop_p (loop, stmt))
- {
- if (vect_print_dump_info (REPORT_ALIGNMENT))
- fprintf (vect_dump, "strided access in outer loop.");
- return false;
- }
-
- /* Not consecutive access - check if it's a part of interleaving group. */
- return vect_analyze_group_access (dr);
-}
-
-
-/* Function vect_analyze_data_ref_accesses.
-
- Analyze the access pattern of all the data references in the loop.
-
- FORNOW: the only access pattern that is considered vectorizable is a
- simple step 1 (consecutive) access.
-
- FORNOW: handle only arrays and pointer accesses. */
-
-static bool
-vect_analyze_data_ref_accesses (loop_vec_info loop_vinfo)
-{
- unsigned int i;
- VEC (data_reference_p, heap) *datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
- struct data_reference *dr;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_analyze_data_ref_accesses ===");
-
- for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
- if (!vect_analyze_data_ref_access (dr))
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "not vectorized: complicated access pattern.");
- return false;
- }
-
- return true;
-}
-
-/* Function vect_prune_runtime_alias_test_list.
-
- Prune a list of ddrs to be tested at run-time by versioning for alias.
- Return FALSE if resulting list of ddrs is longer then allowed by
- PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS, otherwise return TRUE. */
-
-static bool
-vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
-{
- VEC (ddr_p, heap) * ddrs =
- LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo);
- unsigned i, j;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_prune_runtime_alias_test_list ===");
-
- for (i = 0; i < VEC_length (ddr_p, ddrs); )
- {
- bool found;
- ddr_p ddr_i;
-
- ddr_i = VEC_index (ddr_p, ddrs, i);
- found = false;
-
- for (j = 0; j < i; j++)
- {
- ddr_p ddr_j = VEC_index (ddr_p, ddrs, j);
-
- if (vect_vfa_range_equal (ddr_i, ddr_j))
- {
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- {
- fprintf (vect_dump, "found equal ranges ");
- print_generic_expr (vect_dump, DR_REF (DDR_A (ddr_i)), TDF_SLIM);
- fprintf (vect_dump, ", ");
- print_generic_expr (vect_dump, DR_REF (DDR_B (ddr_i)), TDF_SLIM);
- fprintf (vect_dump, " and ");
- print_generic_expr (vect_dump, DR_REF (DDR_A (ddr_j)), TDF_SLIM);
- fprintf (vect_dump, ", ");
- print_generic_expr (vect_dump, DR_REF (DDR_B (ddr_j)), TDF_SLIM);
- }
- found = true;
- break;
- }
- }
-
- if (found)
- {
- VEC_ordered_remove (ddr_p, ddrs, i);
- continue;
- }
- i++;
- }
-
- if (VEC_length (ddr_p, ddrs) >
- (unsigned) PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS))
- {
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- {
- fprintf (vect_dump,
- "disable versioning for alias - max number of generated "
- "checks exceeded.");
- }
-
- VEC_truncate (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo), 0);
-
- return false;
- }
-
- return true;
-}
-
-/* Recursively free the memory allocated for the SLP tree rooted at NODE. */
-
-static void
-vect_free_slp_tree (slp_tree node)
-{
- if (!node)
- return;
-
- if (SLP_TREE_LEFT (node))
- vect_free_slp_tree (SLP_TREE_LEFT (node));
-
- if (SLP_TREE_RIGHT (node))
- vect_free_slp_tree (SLP_TREE_RIGHT (node));
-
- VEC_free (gimple, heap, SLP_TREE_SCALAR_STMTS (node));
-
- if (SLP_TREE_VEC_STMTS (node))
- VEC_free (gimple, heap, SLP_TREE_VEC_STMTS (node));
-
- free (node);
-}
-
-
-/* Free the memory allocated for the SLP instance. */
-
-void
-vect_free_slp_instance (slp_instance instance)
-{
- vect_free_slp_tree (SLP_INSTANCE_TREE (instance));
- VEC_free (int, heap, SLP_INSTANCE_LOAD_PERMUTATION (instance));
- VEC_free (slp_tree, heap, SLP_INSTANCE_LOADS (instance));
-}
-
-
-/* Get the defs for the rhs of STMT (collect them in DEF_STMTS0/1), check that
- they are of a legal type and that they match the defs of the first stmt of
- the SLP group (stored in FIRST_STMT_...). */
-
-static bool
-vect_get_and_check_slp_defs (loop_vec_info loop_vinfo, slp_tree slp_node,
- gimple stmt, VEC (gimple, heap) **def_stmts0,
- VEC (gimple, heap) **def_stmts1,
- enum vect_def_type *first_stmt_dt0,
- enum vect_def_type *first_stmt_dt1,
- tree *first_stmt_def0_type,
- tree *first_stmt_def1_type,
- tree *first_stmt_const_oprnd,
- int ncopies_for_cost,
- bool *pattern0, bool *pattern1)
-{
- tree oprnd;
- unsigned int i, number_of_oprnds;
- tree def;
- gimple def_stmt;
- enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
- stmt_vec_info stmt_info =
- vinfo_for_stmt (VEC_index (gimple, SLP_TREE_SCALAR_STMTS (slp_node), 0));
- enum gimple_rhs_class rhs_class;
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-
- rhs_class = get_gimple_rhs_class (gimple_assign_rhs_code (stmt));
- number_of_oprnds = gimple_num_ops (stmt) - 1; /* RHS only */
-
- for (i = 0; i < number_of_oprnds; i++)
- {
- oprnd = gimple_op (stmt, i + 1);
-
- if (!vect_is_simple_use (oprnd, loop_vinfo, &def_stmt, &def, &dt[i])
- || (!def_stmt && dt[i] != vect_constant_def))
- {
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump, "Build SLP failed: can't find def for ");
- print_generic_expr (vect_dump, oprnd, TDF_SLIM);
- }
-
- return false;
- }
-
- /* Check if DEF_STMT is a part of a pattern and get the def stmt from
- the pattern. Check that all the stmts of the node are in the
- pattern. */
- if (def_stmt && gimple_bb (def_stmt)
- && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
- && vinfo_for_stmt (def_stmt)
- && STMT_VINFO_IN_PATTERN_P (vinfo_for_stmt (def_stmt)))
- {
- if (!*first_stmt_dt0)
- *pattern0 = true;
- else
- {
- if (i == 1 && !*first_stmt_dt1)
- *pattern1 = true;
- else if ((i == 0 && !*pattern0) || (i == 1 && !*pattern1))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "Build SLP failed: some of the stmts"
- " are in a pattern, and others are not ");
- print_generic_expr (vect_dump, oprnd, TDF_SLIM);
- }
-
- return false;
- }
- }
-
- def_stmt = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (def_stmt));
- dt[i] = STMT_VINFO_DEF_TYPE (vinfo_for_stmt (def_stmt));
-
- if (*dt == vect_unknown_def_type)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Unsupported pattern.");
- return false;
- }
-
- switch (gimple_code (def_stmt))
- {
- case GIMPLE_PHI:
- def = gimple_phi_result (def_stmt);
- break;
-
- case GIMPLE_ASSIGN:
- def = gimple_assign_lhs (def_stmt);
- break;
-
- default:
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "unsupported defining stmt: ");
- return false;
- }
- }
-
- if (!*first_stmt_dt0)
- {
- /* op0 of the first stmt of the group - store its info. */
- *first_stmt_dt0 = dt[i];
- if (def)
- *first_stmt_def0_type = TREE_TYPE (def);
- else
- *first_stmt_const_oprnd = oprnd;
-
- /* Analyze costs (for the first stmt of the group only). */
- if (rhs_class != GIMPLE_SINGLE_RHS)
- /* Not memory operation (we don't call this functions for loads). */
- vect_model_simple_cost (stmt_info, ncopies_for_cost, dt, slp_node);
- else
- /* Store. */
- vect_model_store_cost (stmt_info, ncopies_for_cost, dt[0], slp_node);
- }
-
- else
- {
- if (!*first_stmt_dt1 && i == 1)
- {
- /* op1 of the first stmt of the group - store its info. */
- *first_stmt_dt1 = dt[i];
- if (def)
- *first_stmt_def1_type = TREE_TYPE (def);
- else
- {
- /* We assume that the stmt contains only one constant
- operand. We fail otherwise, to be on the safe side. */
- if (*first_stmt_const_oprnd)
- {
- if (vect_print_dump_info (REPORT_SLP))
- fprintf (vect_dump, "Build SLP failed: two constant "
- "oprnds in stmt");
- return false;
- }
- *first_stmt_const_oprnd = oprnd;
- }
- }
- else
- {
- /* Not first stmt of the group, check that the def-stmt/s match
- the def-stmt/s of the first stmt. */
- if ((i == 0
- && (*first_stmt_dt0 != dt[i]
- || (*first_stmt_def0_type && def
- && *first_stmt_def0_type != TREE_TYPE (def))))
- || (i == 1
- && (*first_stmt_dt1 != dt[i]
- || (*first_stmt_def1_type && def
- && *first_stmt_def1_type != TREE_TYPE (def))))
- || (!def
- && TREE_TYPE (*first_stmt_const_oprnd)
- != TREE_TYPE (oprnd)))
- {
- if (vect_print_dump_info (REPORT_SLP))
- fprintf (vect_dump, "Build SLP failed: different types ");
-
- return false;
- }
- }
- }
-
- /* Check the types of the definitions. */
- switch (dt[i])
- {
- case vect_constant_def:
- case vect_invariant_def:
- break;
-
- case vect_loop_def:
- if (i == 0)
- VEC_safe_push (gimple, heap, *def_stmts0, def_stmt);
- else
- VEC_safe_push (gimple, heap, *def_stmts1, def_stmt);
- break;
-
- default:
- /* FORNOW: Not supported. */
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump, "Build SLP failed: illegal type of def ");
- print_generic_expr (vect_dump, def, TDF_SLIM);
- }
-
- return false;
- }
- }
-
- return true;
-}
-
-
-/* Recursively build an SLP tree starting from NODE.
- Fail (and return FALSE) if def-stmts are not isomorphic, require data
- permutation or are of unsupported types of operation. Otherwise, return
- TRUE. */
-
-static bool
-vect_build_slp_tree (loop_vec_info loop_vinfo, slp_tree *node,
- unsigned int group_size,
- int *inside_cost, int *outside_cost,
- int ncopies_for_cost, unsigned int *max_nunits,
- VEC (int, heap) **load_permutation,
- VEC (slp_tree, heap) **loads)
-{
- VEC (gimple, heap) *def_stmts0 = VEC_alloc (gimple, heap, group_size);
- VEC (gimple, heap) *def_stmts1 = VEC_alloc (gimple, heap, group_size);
- unsigned int i;
- VEC (gimple, heap) *stmts = SLP_TREE_SCALAR_STMTS (*node);
- gimple stmt = VEC_index (gimple, stmts, 0);
- enum vect_def_type first_stmt_dt0 = 0, first_stmt_dt1 = 0;
- enum tree_code first_stmt_code = 0, rhs_code;
- tree first_stmt_def1_type = NULL_TREE, first_stmt_def0_type = NULL_TREE;
- tree lhs;
- bool stop_recursion = false, need_same_oprnds = false;
- tree vectype, scalar_type, first_op1 = NULL_TREE;
- unsigned int vectorization_factor = 0, ncopies;
- optab optab;
- int icode;
- enum machine_mode optab_op2_mode;
- enum machine_mode vec_mode;
- tree first_stmt_const_oprnd = NULL_TREE;
- struct data_reference *first_dr;
- bool pattern0 = false, pattern1 = false;
- HOST_WIDE_INT dummy;
- bool permutation = false;
- unsigned int load_place;
- gimple first_load;
-
- /* For every stmt in NODE find its def stmt/s. */
- for (i = 0; VEC_iterate (gimple, stmts, i, stmt); i++)
- {
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump, "Build SLP for ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- lhs = gimple_get_lhs (stmt);
- if (lhs == NULL_TREE)
- {
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump,
- "Build SLP failed: not GIMPLE_ASSIGN nor GIMPLE_CALL");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- return false;
- }
-
- scalar_type = vect_get_smallest_scalar_type (stmt, &dummy, &dummy);
- vectype = get_vectype_for_scalar_type (scalar_type);
- if (!vectype)
- {
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump, "Build SLP failed: unsupported data-type ");
- print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
- }
- return false;
- }
-
- gcc_assert (LOOP_VINFO_VECT_FACTOR (loop_vinfo));
- vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
- ncopies = vectorization_factor / TYPE_VECTOR_SUBPARTS (vectype);
- if (ncopies > 1 && vect_print_dump_info (REPORT_SLP))
- fprintf (vect_dump, "SLP with multiple types ");
-
- /* In case of multiple types we need to detect the smallest type. */
- if (*max_nunits < TYPE_VECTOR_SUBPARTS (vectype))
- *max_nunits = TYPE_VECTOR_SUBPARTS (vectype);
-
- if (is_gimple_call (stmt))
- rhs_code = CALL_EXPR;
- else
- rhs_code = gimple_assign_rhs_code (stmt);
-
- /* Check the operation. */
- if (i == 0)
- {
- first_stmt_code = rhs_code;
-
- /* Shift arguments should be equal in all the packed stmts for a
- vector shift with scalar shift operand. */
- if (rhs_code == LSHIFT_EXPR || rhs_code == RSHIFT_EXPR
- || rhs_code == LROTATE_EXPR
- || rhs_code == RROTATE_EXPR)
- {
- vec_mode = TYPE_MODE (vectype);
-
- /* First see if we have a vector/vector shift. */
- optab = optab_for_tree_code (rhs_code, vectype,
- optab_vector);
-
- if (!optab
- || (optab->handlers[(int) vec_mode].insn_code
- == CODE_FOR_nothing))
- {
- /* No vector/vector shift, try for a vector/scalar shift. */
- optab = optab_for_tree_code (rhs_code, vectype,
- optab_scalar);
-
- if (!optab)
- {
- if (vect_print_dump_info (REPORT_SLP))
- fprintf (vect_dump, "Build SLP failed: no optab.");
- return false;
- }
- icode = (int) optab->handlers[(int) vec_mode].insn_code;
- if (icode == CODE_FOR_nothing)
- {
- if (vect_print_dump_info (REPORT_SLP))
- fprintf (vect_dump, "Build SLP failed: "
- "op not supported by target.");
- return false;
- }
- optab_op2_mode = insn_data[icode].operand[2].mode;
- if (!VECTOR_MODE_P (optab_op2_mode))
- {
- need_same_oprnds = true;
- first_op1 = gimple_assign_rhs2 (stmt);
- }
- }
- }
- }
- else
- {
- if (first_stmt_code != rhs_code
- && (first_stmt_code != IMAGPART_EXPR
- || rhs_code != REALPART_EXPR)
- && (first_stmt_code != REALPART_EXPR
- || rhs_code != IMAGPART_EXPR))
- {
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump,
- "Build SLP failed: different operation in stmt ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- return false;
- }
-
- if (need_same_oprnds
- && !operand_equal_p (first_op1, gimple_assign_rhs2 (stmt), 0))
- {
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump,
- "Build SLP failed: different shift arguments in ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- return false;
- }
- }
-
- /* Strided store or load. */
- if (STMT_VINFO_STRIDED_ACCESS (vinfo_for_stmt (stmt)))
- {
- if (REFERENCE_CLASS_P (lhs))
- {
- /* Store. */
- if (!vect_get_and_check_slp_defs (loop_vinfo, *node, stmt,
- &def_stmts0, &def_stmts1,
- &first_stmt_dt0,
- &first_stmt_dt1,
- &first_stmt_def0_type,
- &first_stmt_def1_type,
- &first_stmt_const_oprnd,
- ncopies_for_cost,
- &pattern0, &pattern1))
- return false;
- }
- else
- {
- /* Load. */
- /* FORNOW: Check that there is no gap between the loads. */
- if ((DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)) == stmt
- && DR_GROUP_GAP (vinfo_for_stmt (stmt)) != 0)
- || (DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)) != stmt
- && DR_GROUP_GAP (vinfo_for_stmt (stmt)) != 1))
- {
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump, "Build SLP failed: strided "
- "loads have gaps ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- return false;
- }
-
- first_load = DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt));
-
- if (first_load == stmt)
- {
- first_dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt));
- if (vect_supportable_dr_alignment (first_dr)
- == dr_unaligned_unsupported)
- {
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump, "Build SLP failed: unsupported "
- "unaligned load ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- return false;
- }
-
- /* Analyze costs (for the first stmt in the group). */
- vect_model_load_cost (vinfo_for_stmt (stmt),
- ncopies_for_cost, *node);
- }
-
- /* Store the place of this load in the interleaving chain. In
- case that permutation is needed we later decide if a specific
- permutation is supported. */
- load_place = vect_get_place_in_interleaving_chain (stmt,
- first_load);
- if (load_place != i)
- permutation = true;
-
- VEC_safe_push (int, heap, *load_permutation, load_place);
-
- /* We stop the tree when we reach a group of loads. */
- stop_recursion = true;
- continue;
- }
- } /* Strided access. */
- else
- {
- if (TREE_CODE_CLASS (rhs_code) == tcc_reference)
- {
- /* Not strided load. */
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump, "Build SLP failed: not strided load ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- /* FORNOW: Not strided loads are not supported. */
- return false;
- }
-
- /* Not memory operation. */
- if (TREE_CODE_CLASS (rhs_code) != tcc_binary
- && TREE_CODE_CLASS (rhs_code) != tcc_unary)
- {
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump, "Build SLP failed: operation");
- fprintf (vect_dump, " unsupported ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- return false;
- }
-
- /* Find the def-stmts. */
- if (!vect_get_and_check_slp_defs (loop_vinfo, *node, stmt,
- &def_stmts0, &def_stmts1,
- &first_stmt_dt0, &first_stmt_dt1,
- &first_stmt_def0_type,
- &first_stmt_def1_type,
- &first_stmt_const_oprnd,
- ncopies_for_cost,
- &pattern0, &pattern1))
- return false;
- }
- }
-
- /* Add the costs of the node to the overall instance costs. */
- *inside_cost += SLP_TREE_INSIDE_OF_LOOP_COST (*node);
- *outside_cost += SLP_TREE_OUTSIDE_OF_LOOP_COST (*node);
-
- /* Strided loads were reached - stop the recursion. */
- if (stop_recursion)
- {
- if (permutation)
- {
- VEC_safe_push (slp_tree, heap, *loads, *node);
- *inside_cost += TARG_VEC_PERMUTE_COST * group_size;
- }
-
- return true;
- }
-
- /* Create SLP_TREE nodes for the definition node/s. */
- if (first_stmt_dt0 == vect_loop_def)
- {
- slp_tree left_node = XNEW (struct _slp_tree);
- SLP_TREE_SCALAR_STMTS (left_node) = def_stmts0;
- SLP_TREE_VEC_STMTS (left_node) = NULL;
- SLP_TREE_LEFT (left_node) = NULL;
- SLP_TREE_RIGHT (left_node) = NULL;
- SLP_TREE_OUTSIDE_OF_LOOP_COST (left_node) = 0;
- SLP_TREE_INSIDE_OF_LOOP_COST (left_node) = 0;
- if (!vect_build_slp_tree (loop_vinfo, &left_node, group_size,
- inside_cost, outside_cost, ncopies_for_cost,
- max_nunits, load_permutation, loads))
- return false;
-
- SLP_TREE_LEFT (*node) = left_node;
- }
-
- if (first_stmt_dt1 == vect_loop_def)
- {
- slp_tree right_node = XNEW (struct _slp_tree);
- SLP_TREE_SCALAR_STMTS (right_node) = def_stmts1;
- SLP_TREE_VEC_STMTS (right_node) = NULL;
- SLP_TREE_LEFT (right_node) = NULL;
- SLP_TREE_RIGHT (right_node) = NULL;
- SLP_TREE_OUTSIDE_OF_LOOP_COST (right_node) = 0;
- SLP_TREE_INSIDE_OF_LOOP_COST (right_node) = 0;
- if (!vect_build_slp_tree (loop_vinfo, &right_node, group_size,
- inside_cost, outside_cost, ncopies_for_cost,
- max_nunits, load_permutation, loads))
- return false;
-
- SLP_TREE_RIGHT (*node) = right_node;
- }
-
- return true;
-}
-
-
-static void
-vect_print_slp_tree (slp_tree node)
-{
- int i;
- gimple stmt;
-
- if (!node)
- return;
-
- fprintf (vect_dump, "node ");
- for (i = 0; VEC_iterate (gimple, SLP_TREE_SCALAR_STMTS (node), i, stmt); i++)
- {
- fprintf (vect_dump, "\n\tstmt %d ", i);
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
- fprintf (vect_dump, "\n");
-
- vect_print_slp_tree (SLP_TREE_LEFT (node));
- vect_print_slp_tree (SLP_TREE_RIGHT (node));
-}
-
-
-/* Mark the tree rooted at NODE with MARK (PURE_SLP or HYBRID).
- If MARK is HYBRID, it refers to a specific stmt in NODE (the stmt at index
- J). Otherwise, MARK is PURE_SLP and J is -1, which indicates that all the
- stmts in NODE are to be marked. */
-
-static void
-vect_mark_slp_stmts (slp_tree node, enum slp_vect_type mark, int j)
-{
- int i;
- gimple stmt;
-
- if (!node)
- return;
-
- for (i = 0; VEC_iterate (gimple, SLP_TREE_SCALAR_STMTS (node), i, stmt); i++)
- if (j < 0 || i == j)
- STMT_SLP_TYPE (vinfo_for_stmt (stmt)) = mark;
-
- vect_mark_slp_stmts (SLP_TREE_LEFT (node), mark, j);
- vect_mark_slp_stmts (SLP_TREE_RIGHT (node), mark, j);
-}
-
-
-/* Check if the permutation required by the SLP INSTANCE is supported.
- Reorganize the SLP nodes stored in SLP_INSTANCE_LOADS if needed. */
-
-static bool
-vect_supported_slp_permutation_p (slp_instance instance)
-{
- slp_tree node = VEC_index (slp_tree, SLP_INSTANCE_LOADS (instance), 0);
- gimple stmt = VEC_index (gimple, SLP_TREE_SCALAR_STMTS (node), 0);
- gimple first_load = DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt));
- VEC (slp_tree, heap) *sorted_loads = NULL;
- int index;
- slp_tree *tmp_loads = NULL;
- int group_size = SLP_INSTANCE_GROUP_SIZE (instance), i, j;
- slp_tree load;
-
- /* FORNOW: The only supported loads permutation is loads from the same
- location in all the loads in the node, when the data-refs in
- nodes of LOADS constitute an interleaving chain.
- Sort the nodes according to the order of accesses in the chain. */
- tmp_loads = (slp_tree *) xmalloc (sizeof (slp_tree) * group_size);
- for (i = 0, j = 0;
- VEC_iterate (int, SLP_INSTANCE_LOAD_PERMUTATION (instance), i, index)
- && VEC_iterate (slp_tree, SLP_INSTANCE_LOADS (instance), j, load);
- i += group_size, j++)
- {
- gimple scalar_stmt = VEC_index (gimple, SLP_TREE_SCALAR_STMTS (load), 0);
- /* Check that the loads are all in the same interleaving chain. */
- if (DR_GROUP_FIRST_DR (vinfo_for_stmt (scalar_stmt)) != first_load)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "Build SLP failed: unsupported data "
- "permutation ");
- print_gimple_stmt (vect_dump, scalar_stmt, 0, TDF_SLIM);
- }
-
- free (tmp_loads);
- return false;
- }
-
- tmp_loads[index] = load;
- }
-
- sorted_loads = VEC_alloc (slp_tree, heap, group_size);
- for (i = 0; i < group_size; i++)
- VEC_safe_push (slp_tree, heap, sorted_loads, tmp_loads[i]);
-
- VEC_free (slp_tree, heap, SLP_INSTANCE_LOADS (instance));
- SLP_INSTANCE_LOADS (instance) = sorted_loads;
- free (tmp_loads);
-
- if (!vect_transform_slp_perm_load (stmt, NULL, NULL,
- SLP_INSTANCE_UNROLLING_FACTOR (instance),
- instance, true))
- return false;
-
- return true;
-}
-
-
-/* Check if the required load permutation is supported.
- LOAD_PERMUTATION contains a list of indices of the loads.
- In SLP this permutation is relative to the order of strided stores that are
- the base of the SLP instance. */
-
-static bool
-vect_supported_load_permutation_p (slp_instance slp_instn, int group_size,
- VEC (int, heap) *load_permutation)
-{
- int i = 0, j, prev = -1, next, k;
- bool supported;
-
- /* FORNOW: permutations are only supported for loop-aware SLP. */
- if (!slp_instn)
- return false;
-
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump, "Load permutation ");
- for (i = 0; VEC_iterate (int, load_permutation, i, next); i++)
- fprintf (vect_dump, "%d ", next);
- }
-
- /* FORNOW: the only supported permutation is 0..01..1.. of length equal to
- GROUP_SIZE and where each sequence of same drs is of GROUP_SIZE length as
- well. */
- if (VEC_length (int, load_permutation)
- != (unsigned int) (group_size * group_size))
- return false;
-
- supported = true;
- for (j = 0; j < group_size; j++)
- {
- for (i = j * group_size, k = 0;
- VEC_iterate (int, load_permutation, i, next) && k < group_size;
- i++, k++)
- {
- if (i != j * group_size && next != prev)
- {
- supported = false;
- break;
- }
-
- prev = next;
- }
- }
-
- if (supported && i == group_size * group_size
- && vect_supported_slp_permutation_p (slp_instn))
- return true;
-
- return false;
-}
-
-
-/* Find the first load in the loop that belongs to INSTANCE.
- When loads are in several SLP nodes, there can be a case in which the first
- load does not appear in the first SLP node to be transformed, causing
- incorrect order of statements. Since we generate all the loads together,
- they must be inserted before the first load of the SLP instance and not
- before the first load of the first node of the instance. */
-static gimple
-vect_find_first_load_in_slp_instance (slp_instance instance)
-{
- int i, j;
- slp_tree load_node;
- gimple first_load = NULL, load;
-
- for (i = 0;
- VEC_iterate (slp_tree, SLP_INSTANCE_LOADS (instance), i, load_node);
- i++)
- for (j = 0;
- VEC_iterate (gimple, SLP_TREE_SCALAR_STMTS (load_node), j, load);
- j++)
- first_load = get_earlier_stmt (load, first_load);
-
- return first_load;
-}
-
-
-/* Analyze an SLP instance starting from a group of strided stores. Call
- vect_build_slp_tree to build a tree of packed stmts if possible.
- Return FALSE if it's impossible to SLP any stmt in the loop. */
-
-static bool
-vect_analyze_slp_instance (loop_vec_info loop_vinfo, gimple stmt)
-{
- slp_instance new_instance;
- slp_tree node = XNEW (struct _slp_tree);
- unsigned int group_size = DR_GROUP_SIZE (vinfo_for_stmt (stmt));
- unsigned int unrolling_factor = 1, nunits;
- tree vectype, scalar_type;
- gimple next;
- unsigned int vectorization_factor = 0, ncopies;
- bool slp_impossible = false;
- int inside_cost = 0, outside_cost = 0, ncopies_for_cost;
- unsigned int max_nunits = 0;
- VEC (int, heap) *load_permutation;
- VEC (slp_tree, heap) *loads;
-
- scalar_type = TREE_TYPE (DR_REF (STMT_VINFO_DATA_REF (
- vinfo_for_stmt (stmt))));
- vectype = get_vectype_for_scalar_type (scalar_type);
- if (!vectype)
- {
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump, "Build SLP failed: unsupported data-type ");
- print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
- }
- return false;
- }
-
- nunits = TYPE_VECTOR_SUBPARTS (vectype);
- vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
- ncopies = vectorization_factor / nunits;
-
- /* Create a node (a root of the SLP tree) for the packed strided stores. */
- SLP_TREE_SCALAR_STMTS (node) = VEC_alloc (gimple, heap, group_size);
- next = stmt;
- /* Collect the stores and store them in SLP_TREE_SCALAR_STMTS. */
- while (next)
- {
- VEC_safe_push (gimple, heap, SLP_TREE_SCALAR_STMTS (node), next);
- next = DR_GROUP_NEXT_DR (vinfo_for_stmt (next));
- }
-
- SLP_TREE_VEC_STMTS (node) = NULL;
- SLP_TREE_NUMBER_OF_VEC_STMTS (node) = 0;
- SLP_TREE_LEFT (node) = NULL;
- SLP_TREE_RIGHT (node) = NULL;
- SLP_TREE_OUTSIDE_OF_LOOP_COST (node) = 0;
- SLP_TREE_INSIDE_OF_LOOP_COST (node) = 0;
-
- /* Calculate the unrolling factor. */
- unrolling_factor = least_common_multiple (nunits, group_size) / group_size;
-
- /* Calculate the number of vector stmts to create based on the unrolling
- factor (number of vectors is 1 if NUNITS >= GROUP_SIZE, and is
- GROUP_SIZE / NUNITS otherwise. */
- ncopies_for_cost = unrolling_factor * group_size / nunits;
-
- load_permutation = VEC_alloc (int, heap, group_size * group_size);
- loads = VEC_alloc (slp_tree, heap, group_size);
-
- /* Build the tree for the SLP instance. */
- if (vect_build_slp_tree (loop_vinfo, &node, group_size, &inside_cost,
- &outside_cost, ncopies_for_cost, &max_nunits,
- &load_permutation, &loads))
- {
- /* Create a new SLP instance. */
- new_instance = XNEW (struct _slp_instance);
- SLP_INSTANCE_TREE (new_instance) = node;
- SLP_INSTANCE_GROUP_SIZE (new_instance) = group_size;
- /* Calculate the unrolling factor based on the smallest type in the
- loop. */
- if (max_nunits > nunits)
- unrolling_factor = least_common_multiple (max_nunits, group_size)
- / group_size;
-
- SLP_INSTANCE_UNROLLING_FACTOR (new_instance) = unrolling_factor;
- SLP_INSTANCE_OUTSIDE_OF_LOOP_COST (new_instance) = outside_cost;
- SLP_INSTANCE_INSIDE_OF_LOOP_COST (new_instance) = inside_cost;
- SLP_INSTANCE_LOADS (new_instance) = loads;
- SLP_INSTANCE_FIRST_LOAD_STMT (new_instance) = NULL;
- SLP_INSTANCE_LOAD_PERMUTATION (new_instance) = load_permutation;
- if (VEC_length (slp_tree, loads))
- {
- if (!vect_supported_load_permutation_p (new_instance, group_size,
- load_permutation))
- {
- if (vect_print_dump_info (REPORT_SLP))
- {
- fprintf (vect_dump, "Build SLP failed: unsupported load "
- "permutation ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- vect_free_slp_instance (new_instance);
- return false;
- }
-
- SLP_INSTANCE_FIRST_LOAD_STMT (new_instance)
- = vect_find_first_load_in_slp_instance (new_instance);
- }
- else
- VEC_free (int, heap, SLP_INSTANCE_LOAD_PERMUTATION (new_instance));
-
- VEC_safe_push (slp_instance, heap, LOOP_VINFO_SLP_INSTANCES (loop_vinfo),
- new_instance);
- if (vect_print_dump_info (REPORT_SLP))
- vect_print_slp_tree (node);
-
- return true;
- }
-
- /* Failed to SLP. */
- /* Free the allocated memory. */
- vect_free_slp_tree (node);
- VEC_free (int, heap, load_permutation);
- VEC_free (slp_tree, heap, loads);
-
- if (slp_impossible)
- return false;
-
- /* SLP failed for this instance, but it is still possible to SLP other stmts
- in the loop. */
- return true;
-}
-
-
-/* Check if there are stmts in the loop can be vectorized using SLP. Build SLP
- trees of packed scalar stmts if SLP is possible. */
-
-static bool
-vect_analyze_slp (loop_vec_info loop_vinfo)
-{
- unsigned int i;
- VEC (gimple, heap) *strided_stores = LOOP_VINFO_STRIDED_STORES (loop_vinfo);
- gimple store;
-
- if (vect_print_dump_info (REPORT_SLP))
- fprintf (vect_dump, "=== vect_analyze_slp ===");
-
- for (i = 0; VEC_iterate (gimple, strided_stores, i, store); i++)
- if (!vect_analyze_slp_instance (loop_vinfo, store))
- {
- /* SLP failed. No instance can be SLPed in the loop. */
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "SLP failed.");
-
- return false;
- }
-
- return true;
-}
-
-
-/* For each possible SLP instance decide whether to SLP it and calculate overall
- unrolling factor needed to SLP the loop. */
-
-static void
-vect_make_slp_decision (loop_vec_info loop_vinfo)
-{
- unsigned int i, unrolling_factor = 1;
- VEC (slp_instance, heap) *slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
- slp_instance instance;
- int decided_to_slp = 0;
-
- if (vect_print_dump_info (REPORT_SLP))
- fprintf (vect_dump, "=== vect_make_slp_decision ===");
-
- for (i = 0; VEC_iterate (slp_instance, slp_instances, i, instance); i++)
- {
- /* FORNOW: SLP if you can. */
- if (unrolling_factor < SLP_INSTANCE_UNROLLING_FACTOR (instance))
- unrolling_factor = SLP_INSTANCE_UNROLLING_FACTOR (instance);
-
- /* Mark all the stmts that belong to INSTANCE as PURE_SLP stmts. Later we
- call vect_detect_hybrid_slp () to find stmts that need hybrid SLP and
- loop-based vectorization. Such stmts will be marked as HYBRID. */
- vect_mark_slp_stmts (SLP_INSTANCE_TREE (instance), pure_slp, -1);
- decided_to_slp++;
- }
-
- LOOP_VINFO_SLP_UNROLLING_FACTOR (loop_vinfo) = unrolling_factor;
-
- if (decided_to_slp && vect_print_dump_info (REPORT_SLP))
- fprintf (vect_dump, "Decided to SLP %d instances. Unrolling factor %d",
- decided_to_slp, unrolling_factor);
-}
-
-
-/* Find stmts that must be both vectorized and SLPed (since they feed stmts that
- can't be SLPed) in the tree rooted at NODE. Mark such stmts as HYBRID. */
-
-static void
-vect_detect_hybrid_slp_stmts (slp_tree node)
-{
- int i;
- gimple stmt;
- imm_use_iterator imm_iter;
- gimple use_stmt;
-
- if (!node)
- return;
-
- for (i = 0; VEC_iterate (gimple, SLP_TREE_SCALAR_STMTS (node), i, stmt); i++)
- if (PURE_SLP_STMT (vinfo_for_stmt (stmt))
- && TREE_CODE (gimple_op (stmt, 0)) == SSA_NAME)
- FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, gimple_op (stmt, 0))
- if (vinfo_for_stmt (use_stmt)
- && !STMT_SLP_TYPE (vinfo_for_stmt (use_stmt))
- && STMT_VINFO_RELEVANT (vinfo_for_stmt (use_stmt)))
- vect_mark_slp_stmts (node, hybrid, i);
-
- vect_detect_hybrid_slp_stmts (SLP_TREE_LEFT (node));
- vect_detect_hybrid_slp_stmts (SLP_TREE_RIGHT (node));
-}
-
-
-/* Find stmts that must be both vectorized and SLPed. */
-
-static void
-vect_detect_hybrid_slp (loop_vec_info loop_vinfo)
-{
- unsigned int i;
- VEC (slp_instance, heap) *slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
- slp_instance instance;
-
- if (vect_print_dump_info (REPORT_SLP))
- fprintf (vect_dump, "=== vect_detect_hybrid_slp ===");
-
- for (i = 0; VEC_iterate (slp_instance, slp_instances, i, instance); i++)
- vect_detect_hybrid_slp_stmts (SLP_INSTANCE_TREE (instance));
-}
-
-
-/* Function vect_analyze_data_refs.
-
- Find all the data references in the loop.
-
- The general structure of the analysis of data refs in the vectorizer is as
- follows:
- 1- vect_analyze_data_refs(loop): call compute_data_dependences_for_loop to
- find and analyze all data-refs in the loop and their dependences.
- 2- vect_analyze_dependences(): apply dependence testing using ddrs.
- 3- vect_analyze_drs_alignment(): check that ref_stmt.alignment is ok.
- 4- vect_analyze_drs_access(): check that ref_stmt.step is ok.
-
-*/
-
-static bool
-vect_analyze_data_refs (loop_vec_info loop_vinfo)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- unsigned int i;
- VEC (data_reference_p, heap) *datarefs;
- struct data_reference *dr;
- tree scalar_type;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_analyze_data_refs ===\n");
-
- compute_data_dependences_for_loop (loop, true,
- &LOOP_VINFO_DATAREFS (loop_vinfo),
- &LOOP_VINFO_DDRS (loop_vinfo));
-
- /* Go through the data-refs, check that the analysis succeeded. Update pointer
- from stmt_vec_info struct to DR and vectype. */
- datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
-
- for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
- {
- gimple stmt;
- stmt_vec_info stmt_info;
- basic_block bb;
- tree base, offset, init;
-
- if (!dr || !DR_REF (dr))
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "not vectorized: unhandled data-ref ");
- return false;
- }
-
- stmt = DR_STMT (dr);
- stmt_info = vinfo_for_stmt (stmt);
-
- /* Check that analysis of the data-ref succeeded. */
- if (!DR_BASE_ADDRESS (dr) || !DR_OFFSET (dr) || !DR_INIT (dr)
- || !DR_STEP (dr))
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- fprintf (vect_dump, "not vectorized: data ref analysis failed ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
- return false;
- }
-
- if (TREE_CODE (DR_BASE_ADDRESS (dr)) == INTEGER_CST)
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "not vectorized: base addr of dr is a "
- "constant");
- return false;
- }
-
- if (!DR_SYMBOL_TAG (dr))
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- fprintf (vect_dump, "not vectorized: no memory tag for ");
- print_generic_expr (vect_dump, DR_REF (dr), TDF_SLIM);
- }
- return false;
- }
-
- base = unshare_expr (DR_BASE_ADDRESS (dr));
- offset = unshare_expr (DR_OFFSET (dr));
- init = unshare_expr (DR_INIT (dr));
-
- /* Update DR field in stmt_vec_info struct. */
- bb = gimple_bb (stmt);
-
- /* If the dataref is in an inner-loop of the loop that is considered for
- for vectorization, we also want to analyze the access relative to
- the outer-loop (DR contains information only relative to the
- inner-most enclosing loop). We do that by building a reference to the
- first location accessed by the inner-loop, and analyze it relative to
- the outer-loop. */
- if (nested_in_vect_loop_p (loop, stmt))
- {
- tree outer_step, outer_base, outer_init;
- HOST_WIDE_INT pbitsize, pbitpos;
- tree poffset;
- enum machine_mode pmode;
- int punsignedp, pvolatilep;
- affine_iv base_iv, offset_iv;
- tree dinit;
-
- /* Build a reference to the first location accessed by the
- inner-loop: *(BASE+INIT). (The first location is actually
- BASE+INIT+OFFSET, but we add OFFSET separately later). */
- tree inner_base = build_fold_indirect_ref
- (fold_build2 (POINTER_PLUS_EXPR,
- TREE_TYPE (base), base,
- fold_convert (sizetype, init)));
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "analyze in outer-loop: ");
- print_generic_expr (vect_dump, inner_base, TDF_SLIM);
- }
-
- outer_base = get_inner_reference (inner_base, &pbitsize, &pbitpos,
- &poffset, &pmode, &punsignedp, &pvolatilep, false);
- gcc_assert (outer_base != NULL_TREE);
-
- if (pbitpos % BITS_PER_UNIT != 0)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "failed: bit offset alignment.\n");
- return false;
- }
-
- outer_base = build_fold_addr_expr (outer_base);
- if (!simple_iv (loop, stmt, outer_base, &base_iv, false))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "failed: evolution of base is not affine.\n");
- return false;
- }
-
- if (offset)
- {
- if (poffset)
- poffset = fold_build2 (PLUS_EXPR, TREE_TYPE (offset), offset, poffset);
- else
- poffset = offset;
- }
-
- if (!poffset)
- {
- offset_iv.base = ssize_int (0);
- offset_iv.step = ssize_int (0);
- }
- else if (!simple_iv (loop, stmt, poffset, &offset_iv, false))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "evolution of offset is not affine.\n");
- return false;
- }
-
- outer_init = ssize_int (pbitpos / BITS_PER_UNIT);
- split_constant_offset (base_iv.base, &base_iv.base, &dinit);
- outer_init = size_binop (PLUS_EXPR, outer_init, dinit);
- split_constant_offset (offset_iv.base, &offset_iv.base, &dinit);
- outer_init = size_binop (PLUS_EXPR, outer_init, dinit);
-
- outer_step = size_binop (PLUS_EXPR,
- fold_convert (ssizetype, base_iv.step),
- fold_convert (ssizetype, offset_iv.step));
-
- STMT_VINFO_DR_STEP (stmt_info) = outer_step;
- /* FIXME: Use canonicalize_base_object_address (base_iv.base); */
- STMT_VINFO_DR_BASE_ADDRESS (stmt_info) = base_iv.base;
- STMT_VINFO_DR_INIT (stmt_info) = outer_init;
- STMT_VINFO_DR_OFFSET (stmt_info) =
- fold_convert (ssizetype, offset_iv.base);
- STMT_VINFO_DR_ALIGNED_TO (stmt_info) =
- size_int (highest_pow2_factor (offset_iv.base));
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "\touter base_address: ");
- print_generic_expr (vect_dump, STMT_VINFO_DR_BASE_ADDRESS (stmt_info), TDF_SLIM);
- fprintf (vect_dump, "\n\touter offset from base address: ");
- print_generic_expr (vect_dump, STMT_VINFO_DR_OFFSET (stmt_info), TDF_SLIM);
- fprintf (vect_dump, "\n\touter constant offset from base address: ");
- print_generic_expr (vect_dump, STMT_VINFO_DR_INIT (stmt_info), TDF_SLIM);
- fprintf (vect_dump, "\n\touter step: ");
- print_generic_expr (vect_dump, STMT_VINFO_DR_STEP (stmt_info), TDF_SLIM);
- fprintf (vect_dump, "\n\touter aligned to: ");
- print_generic_expr (vect_dump, STMT_VINFO_DR_ALIGNED_TO (stmt_info), TDF_SLIM);
- }
- }
-
- if (STMT_VINFO_DATA_REF (stmt_info))
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- fprintf (vect_dump,
- "not vectorized: more than one data ref in stmt: ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
- return false;
- }
- STMT_VINFO_DATA_REF (stmt_info) = dr;
-
- /* Set vectype for STMT. */
- scalar_type = TREE_TYPE (DR_REF (dr));
- STMT_VINFO_VECTYPE (stmt_info) =
- get_vectype_for_scalar_type (scalar_type);
- if (!STMT_VINFO_VECTYPE (stmt_info))
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- {
- fprintf (vect_dump,
- "not vectorized: no vectype for stmt: ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- fprintf (vect_dump, " scalar_type: ");
- print_generic_expr (vect_dump, scalar_type, TDF_DETAILS);
- }
- return false;
- }
- }
-
- return true;
-}
-
-
-/* Utility functions used by vect_mark_stmts_to_be_vectorized. */
-
-/* Function vect_mark_relevant.
-
- Mark STMT as "relevant for vectorization" and add it to WORKLIST. */
-
-static void
-vect_mark_relevant (VEC(gimple,heap) **worklist, gimple stmt,
- enum vect_relevant relevant, bool live_p)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- enum vect_relevant save_relevant = STMT_VINFO_RELEVANT (stmt_info);
- bool save_live_p = STMT_VINFO_LIVE_P (stmt_info);
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "mark relevant %d, live %d.", relevant, live_p);
-
- if (STMT_VINFO_IN_PATTERN_P (stmt_info))
- {
- gimple pattern_stmt;
-
- /* This is the last stmt in a sequence that was detected as a
- pattern that can potentially be vectorized. Don't mark the stmt
- as relevant/live because it's not going to be vectorized.
- Instead mark the pattern-stmt that replaces it. */
-
- pattern_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "last stmt in pattern. don't mark relevant/live.");
- stmt_info = vinfo_for_stmt (pattern_stmt);
- gcc_assert (STMT_VINFO_RELATED_STMT (stmt_info) == stmt);
- save_relevant = STMT_VINFO_RELEVANT (stmt_info);
- save_live_p = STMT_VINFO_LIVE_P (stmt_info);
- stmt = pattern_stmt;
- }
-
- STMT_VINFO_LIVE_P (stmt_info) |= live_p;
- if (relevant > STMT_VINFO_RELEVANT (stmt_info))
- STMT_VINFO_RELEVANT (stmt_info) = relevant;
-
- if (STMT_VINFO_RELEVANT (stmt_info) == save_relevant
- && STMT_VINFO_LIVE_P (stmt_info) == save_live_p)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "already marked relevant/live.");
- return;
- }
-
- VEC_safe_push (gimple, heap, *worklist, stmt);
-}
-
-
-/* Function vect_stmt_relevant_p.
-
- Return true if STMT in loop that is represented by LOOP_VINFO is
- "relevant for vectorization".
-
- A stmt is considered "relevant for vectorization" if:
- - it has uses outside the loop.
- - it has vdefs (it alters memory).
- - control stmts in the loop (except for the exit condition).
-
- CHECKME: what other side effects would the vectorizer allow? */
-
-static bool
-vect_stmt_relevant_p (gimple stmt, loop_vec_info loop_vinfo,
- enum vect_relevant *relevant, bool *live_p)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- ssa_op_iter op_iter;
- imm_use_iterator imm_iter;
- use_operand_p use_p;
- def_operand_p def_p;
-
- *relevant = vect_unused_in_loop;
- *live_p = false;
-
- /* cond stmt other than loop exit cond. */
- if (is_ctrl_stmt (stmt)
- && STMT_VINFO_TYPE (vinfo_for_stmt (stmt)) != loop_exit_ctrl_vec_info_type)
- *relevant = vect_used_in_loop;
-
- /* changing memory. */
- if (gimple_code (stmt) != GIMPLE_PHI)
- if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_DEFS))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "vec_stmt_relevant_p: stmt has vdefs.");
- *relevant = vect_used_in_loop;
- }
-
- /* uses outside the loop. */
- FOR_EACH_PHI_OR_STMT_DEF (def_p, stmt, op_iter, SSA_OP_DEF)
- {
- FOR_EACH_IMM_USE_FAST (use_p, imm_iter, DEF_FROM_PTR (def_p))
- {
- basic_block bb = gimple_bb (USE_STMT (use_p));
- if (!flow_bb_inside_loop_p (loop, bb))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "vec_stmt_relevant_p: used out of loop.");
-
- /* We expect all such uses to be in the loop exit phis
- (because of loop closed form) */
- gcc_assert (gimple_code (USE_STMT (use_p)) == GIMPLE_PHI);
- gcc_assert (bb == single_exit (loop)->dest);
-
- *live_p = true;
- }
- }
- }
-
- return (*live_p || *relevant);
-}
-
-
-/*
- Function process_use.
-
- Inputs:
- - a USE in STMT in a loop represented by LOOP_VINFO
- - LIVE_P, RELEVANT - enum values to be set in the STMT_VINFO of the stmt
- that defined USE. This is done by calling mark_relevant and passing it
- the WORKLIST (to add DEF_STMT to the WORKLIST in case it is relevant).
-
- Outputs:
- Generally, LIVE_P and RELEVANT are used to define the liveness and
- relevance info of the DEF_STMT of this USE:
- STMT_VINFO_LIVE_P (DEF_STMT_info) <-- live_p
- STMT_VINFO_RELEVANT (DEF_STMT_info) <-- relevant
- Exceptions:
- - case 1: If USE is used only for address computations (e.g. array indexing),
- which does not need to be directly vectorized, then the liveness/relevance
- of the respective DEF_STMT is left unchanged.
- - case 2: If STMT is a reduction phi and DEF_STMT is a reduction stmt, we
- skip DEF_STMT cause it had already been processed.
- - case 3: If DEF_STMT and STMT are in different nests, then "relevant" will
- be modified accordingly.
-
- Return true if everything is as expected. Return false otherwise. */
-
-static bool
-process_use (gimple stmt, tree use, loop_vec_info loop_vinfo, bool live_p,
- enum vect_relevant relevant, VEC(gimple,heap) **worklist)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
- stmt_vec_info dstmt_vinfo;
- basic_block bb, def_bb;
- tree def;
- gimple def_stmt;
- enum vect_def_type dt;
-
- /* case 1: we are only interested in uses that need to be vectorized. Uses
- that are used for address computation are not considered relevant. */
- if (!exist_non_indexing_operands_for_use_p (use, stmt))
- return true;
-
- if (!vect_is_simple_use (use, loop_vinfo, &def_stmt, &def, &dt))
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "not vectorized: unsupported use in stmt.");
- return false;
- }
-
- if (!def_stmt || gimple_nop_p (def_stmt))
- return true;
-
- def_bb = gimple_bb (def_stmt);
- if (!flow_bb_inside_loop_p (loop, def_bb))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "def_stmt is out of loop.");
- return true;
- }
-
- /* case 2: A reduction phi (STMT) defined by a reduction stmt (DEF_STMT).
- DEF_STMT must have already been processed, because this should be the
- only way that STMT, which is a reduction-phi, was put in the worklist,
- as there should be no other uses for DEF_STMT in the loop. So we just
- check that everything is as expected, and we are done. */
- dstmt_vinfo = vinfo_for_stmt (def_stmt);
- bb = gimple_bb (stmt);
- if (gimple_code (stmt) == GIMPLE_PHI
- && STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def
- && gimple_code (def_stmt) != GIMPLE_PHI
- && STMT_VINFO_DEF_TYPE (dstmt_vinfo) == vect_reduction_def
- && bb->loop_father == def_bb->loop_father)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "reduc-stmt defining reduc-phi in the same nest.");
- if (STMT_VINFO_IN_PATTERN_P (dstmt_vinfo))
- dstmt_vinfo = vinfo_for_stmt (STMT_VINFO_RELATED_STMT (dstmt_vinfo));
- gcc_assert (STMT_VINFO_RELEVANT (dstmt_vinfo) < vect_used_by_reduction);
- gcc_assert (STMT_VINFO_LIVE_P (dstmt_vinfo)
- || STMT_VINFO_RELEVANT (dstmt_vinfo) > vect_unused_in_loop);
- return true;
- }
-
- /* case 3a: outer-loop stmt defining an inner-loop stmt:
- outer-loop-header-bb:
- d = def_stmt
- inner-loop:
- stmt # use (d)
- outer-loop-tail-bb:
- ... */
- if (flow_loop_nested_p (def_bb->loop_father, bb->loop_father))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "outer-loop def-stmt defining inner-loop stmt.");
- switch (relevant)
- {
- case vect_unused_in_loop:
- relevant = (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def) ?
- vect_used_by_reduction : vect_unused_in_loop;
- break;
- case vect_used_in_outer_by_reduction:
- relevant = vect_used_by_reduction;
- break;
- case vect_used_in_outer:
- relevant = vect_used_in_loop;
- break;
- case vect_used_by_reduction:
- case vect_used_in_loop:
- break;
-
- default:
- gcc_unreachable ();
- }
- }
-
- /* case 3b: inner-loop stmt defining an outer-loop stmt:
- outer-loop-header-bb:
- ...
- inner-loop:
- d = def_stmt
- outer-loop-tail-bb:
- stmt # use (d) */
- else if (flow_loop_nested_p (bb->loop_father, def_bb->loop_father))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "inner-loop def-stmt defining outer-loop stmt.");
- switch (relevant)
- {
- case vect_unused_in_loop:
- relevant = (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def) ?
- vect_used_in_outer_by_reduction : vect_unused_in_loop;
- break;
-
- case vect_used_in_outer_by_reduction:
- case vect_used_in_outer:
- break;
-
- case vect_used_by_reduction:
- relevant = vect_used_in_outer_by_reduction;
- break;
-
- case vect_used_in_loop:
- relevant = vect_used_in_outer;
- break;
-
- default:
- gcc_unreachable ();
- }
- }
-
- vect_mark_relevant (worklist, def_stmt, relevant, live_p);
- return true;
-}
-
-
-/* Function vect_mark_stmts_to_be_vectorized.
-
- Not all stmts in the loop need to be vectorized. For example:
-
- for i...
- for j...
- 1. T0 = i + j
- 2. T1 = a[T0]
-
- 3. j = j + 1
-
- Stmt 1 and 3 do not need to be vectorized, because loop control and
- addressing of vectorized data-refs are handled differently.
-
- This pass detects such stmts. */
-
-static bool
-vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo)
-{
- VEC(gimple,heap) *worklist;
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
- unsigned int nbbs = loop->num_nodes;
- gimple_stmt_iterator si;
- gimple stmt;
- unsigned int i;
- stmt_vec_info stmt_vinfo;
- basic_block bb;
- gimple phi;
- bool live_p;
- enum vect_relevant relevant;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_mark_stmts_to_be_vectorized ===");
-
- worklist = VEC_alloc (gimple, heap, 64);
-
- /* 1. Init worklist. */
- for (i = 0; i < nbbs; i++)
- {
- bb = bbs[i];
- for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
- {
- phi = gsi_stmt (si);
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "init: phi relevant? ");
- print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
- }
-
- if (vect_stmt_relevant_p (phi, loop_vinfo, &relevant, &live_p))
- vect_mark_relevant (&worklist, phi, relevant, live_p);
- }
- for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
- {
- stmt = gsi_stmt (si);
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "init: stmt relevant? ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- if (vect_stmt_relevant_p (stmt, loop_vinfo, &relevant, &live_p))
- vect_mark_relevant (&worklist, stmt, relevant, live_p);
- }
- }
-
- /* 2. Process_worklist */
- while (VEC_length (gimple, worklist) > 0)
- {
- use_operand_p use_p;
- ssa_op_iter iter;
-
- stmt = VEC_pop (gimple, worklist);
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "worklist: examine stmt: ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- /* Examine the USEs of STMT. For each USE, mark the stmt that defines it
- (DEF_STMT) as relevant/irrelevant and live/dead according to the
- liveness and relevance properties of STMT. */
- stmt_vinfo = vinfo_for_stmt (stmt);
- relevant = STMT_VINFO_RELEVANT (stmt_vinfo);
- live_p = STMT_VINFO_LIVE_P (stmt_vinfo);
-
- /* Generally, the liveness and relevance properties of STMT are
- propagated as is to the DEF_STMTs of its USEs:
- live_p <-- STMT_VINFO_LIVE_P (STMT_VINFO)
- relevant <-- STMT_VINFO_RELEVANT (STMT_VINFO)
-
- One exception is when STMT has been identified as defining a reduction
- variable; in this case we set the liveness/relevance as follows:
- live_p = false
- relevant = vect_used_by_reduction
- This is because we distinguish between two kinds of relevant stmts -
- those that are used by a reduction computation, and those that are
- (also) used by a regular computation. This allows us later on to
- identify stmts that are used solely by a reduction, and therefore the
- order of the results that they produce does not have to be kept.
-
- Reduction phis are expected to be used by a reduction stmt, or by
- in an outer loop; Other reduction stmts are expected to be
- in the loop, and possibly used by a stmt in an outer loop.
- Here are the expected values of "relevant" for reduction phis/stmts:
-
- relevance: phi stmt
- vect_unused_in_loop ok
- vect_used_in_outer_by_reduction ok ok
- vect_used_in_outer ok ok
- vect_used_by_reduction ok
- vect_used_in_loop */
-
- if (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def)
- {
- enum vect_relevant tmp_relevant = relevant;
- switch (tmp_relevant)
- {
- case vect_unused_in_loop:
- gcc_assert (gimple_code (stmt) != GIMPLE_PHI);
- relevant = vect_used_by_reduction;
- break;
-
- case vect_used_in_outer_by_reduction:
- case vect_used_in_outer:
- gcc_assert (gimple_code (stmt) != GIMPLE_ASSIGN
- || (gimple_assign_rhs_code (stmt) != WIDEN_SUM_EXPR
- && (gimple_assign_rhs_code (stmt)
- != DOT_PROD_EXPR)));
- break;
-
- case vect_used_by_reduction:
- if (gimple_code (stmt) == GIMPLE_PHI)
- break;
- /* fall through */
- case vect_used_in_loop:
- default:
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "unsupported use of reduction.");
- VEC_free (gimple, heap, worklist);
- return false;
- }
- live_p = false;
- }
-
- FOR_EACH_PHI_OR_STMT_USE (use_p, stmt, iter, SSA_OP_USE)
- {
- tree op = USE_FROM_PTR (use_p);
- if (!process_use (stmt, op, loop_vinfo, live_p, relevant, &worklist))
- {
- VEC_free (gimple, heap, worklist);
- return false;
- }
- }
- } /* while worklist */
-
- VEC_free (gimple, heap, worklist);
- return true;
-}
-
-
-/* Function vect_can_advance_ivs_p
-
- In case the number of iterations that LOOP iterates is unknown at compile
- time, an epilog loop will be generated, and the loop induction variables
- (IVs) will be "advanced" to the value they are supposed to take just before
- the epilog loop. Here we check that the access function of the loop IVs
- and the expression that represents the loop bound are simple enough.
- These restrictions will be relaxed in the future. */
-
-static bool
-vect_can_advance_ivs_p (loop_vec_info loop_vinfo)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- basic_block bb = loop->header;
- gimple phi;
- gimple_stmt_iterator gsi;
-
- /* Analyze phi functions of the loop header. */
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "vect_can_advance_ivs_p:");
-
- for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
- {
- tree access_fn = NULL;
- tree evolution_part;
-
- phi = gsi_stmt (gsi);
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "Analyze phi: ");
- print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
- }
-
- /* Skip virtual phi's. The data dependences that are associated with
- virtual defs/uses (i.e., memory accesses) are analyzed elsewhere. */
-
- if (!is_gimple_reg (SSA_NAME_VAR (PHI_RESULT (phi))))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "virtual phi. skip.");
- continue;
- }
-
- /* Skip reduction phis. */
-
- if (STMT_VINFO_DEF_TYPE (vinfo_for_stmt (phi)) == vect_reduction_def)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "reduc phi. skip.");
- continue;
- }
-
- /* Analyze the evolution function. */
-
- access_fn = instantiate_parameters
- (loop, analyze_scalar_evolution (loop, PHI_RESULT (phi)));
-
- if (!access_fn)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "No Access function.");
- return false;
- }
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "Access function of PHI: ");
- print_generic_expr (vect_dump, access_fn, TDF_SLIM);
- }
-
- evolution_part = evolution_part_in_loop_num (access_fn, loop->num);
-
- if (evolution_part == NULL_TREE)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "No evolution.");
- return false;
- }
-
- /* FORNOW: We do not transform initial conditions of IVs
- which evolution functions are a polynomial of degree >= 2. */
-
- if (tree_is_chrec (evolution_part))
- return false;
- }
-
- return true;
-}
-
-
-/* Function vect_get_loop_niters.
-
- Determine how many iterations the loop is executed.
- If an expression that represents the number of iterations
- can be constructed, place it in NUMBER_OF_ITERATIONS.
- Return the loop exit condition. */
-
-static gimple
-vect_get_loop_niters (struct loop *loop, tree *number_of_iterations)
-{
- tree niters;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== get_loop_niters ===");
-
- niters = number_of_exit_cond_executions (loop);
-
- if (niters != NULL_TREE
- && niters != chrec_dont_know)
- {
- *number_of_iterations = niters;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "==> get_loop_niters:" );
- print_generic_expr (vect_dump, *number_of_iterations, TDF_SLIM);
- }
- }
-
- return get_loop_exit_condition (loop);
-}
-
-
-/* Function vect_analyze_loop_1.
-
- Apply a set of analyses on LOOP, and create a loop_vec_info struct
- for it. The different analyses will record information in the
- loop_vec_info struct. This is a subset of the analyses applied in
- vect_analyze_loop, to be applied on an inner-loop nested in the loop
- that is now considered for (outer-loop) vectorization. */
-
-static loop_vec_info
-vect_analyze_loop_1 (struct loop *loop)
-{
- loop_vec_info loop_vinfo;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "===== analyze_loop_nest_1 =====");
-
- /* Check the CFG characteristics of the loop (nesting, entry/exit, etc. */
-
- loop_vinfo = vect_analyze_loop_form (loop);
- if (!loop_vinfo)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "bad inner-loop form.");
- return NULL;
- }
-
- return loop_vinfo;
-}
-
-
-/* Function vect_analyze_loop_form.
-
- Verify that certain CFG restrictions hold, including:
- - the loop has a pre-header
- - the loop has a single entry and exit
- - the loop exit condition is simple enough, and the number of iterations
- can be analyzed (a countable loop). */
-
-loop_vec_info
-vect_analyze_loop_form (struct loop *loop)
-{
- loop_vec_info loop_vinfo;
- gimple loop_cond;
- tree number_of_iterations = NULL;
- loop_vec_info inner_loop_vinfo = NULL;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_analyze_loop_form ===");
-
- /* Different restrictions apply when we are considering an inner-most loop,
- vs. an outer (nested) loop.
- (FORNOW. May want to relax some of these restrictions in the future). */
-
- if (!loop->inner)
- {
- /* Inner-most loop. We currently require that the number of BBs is
- exactly 2 (the header and latch). Vectorizable inner-most loops
- look like this:
-
- (pre-header)
- |
- header <--------+
- | | |
- | +--> latch --+
- |
- (exit-bb) */
-
- if (loop->num_nodes != 2)
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- fprintf (vect_dump, "not vectorized: too many BBs in loop.");
- return NULL;
- }
-
- if (empty_block_p (loop->header))
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- fprintf (vect_dump, "not vectorized: empty loop.");
- return NULL;
- }
- }
- else
- {
- struct loop *innerloop = loop->inner;
- edge backedge, entryedge;
-
- /* Nested loop. We currently require that the loop is doubly-nested,
- contains a single inner loop, and the number of BBs is exactly 5.
- Vectorizable outer-loops look like this:
-
- (pre-header)
- |
- header <---+
- | |
- inner-loop |
- | |
- tail ------+
- |
- (exit-bb)
-
- The inner-loop has the properties expected of inner-most loops
- as described above. */
-
- if ((loop->inner)->inner || (loop->inner)->next)
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- fprintf (vect_dump, "not vectorized: multiple nested loops.");
- return NULL;
- }
-
- /* Analyze the inner-loop. */
- inner_loop_vinfo = vect_analyze_loop_1 (loop->inner);
- if (!inner_loop_vinfo)
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- fprintf (vect_dump, "not vectorized: Bad inner loop.");
- return NULL;
- }
-
- if (!expr_invariant_in_loop_p (loop,
- LOOP_VINFO_NITERS (inner_loop_vinfo)))
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- fprintf (vect_dump,
- "not vectorized: inner-loop count not invariant.");
- destroy_loop_vec_info (inner_loop_vinfo, true);
- return NULL;
- }
-
- if (loop->num_nodes != 5)
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- fprintf (vect_dump, "not vectorized: too many BBs in loop.");
- destroy_loop_vec_info (inner_loop_vinfo, true);
- return NULL;
- }
-
- gcc_assert (EDGE_COUNT (innerloop->header->preds) == 2);
- backedge = EDGE_PRED (innerloop->header, 1);
- entryedge = EDGE_PRED (innerloop->header, 0);
- if (EDGE_PRED (innerloop->header, 0)->src == innerloop->latch)
- {
- backedge = EDGE_PRED (innerloop->header, 0);
- entryedge = EDGE_PRED (innerloop->header, 1);
- }
-
- if (entryedge->src != loop->header
- || !single_exit (innerloop)
- || single_exit (innerloop)->dest != EDGE_PRED (loop->latch, 0)->src)
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- fprintf (vect_dump, "not vectorized: unsupported outerloop form.");
- destroy_loop_vec_info (inner_loop_vinfo, true);
- return NULL;
- }
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Considering outer-loop vectorization.");
- }
-
- if (!single_exit (loop)
- || EDGE_COUNT (loop->header->preds) != 2)
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- {
- if (!single_exit (loop))
- fprintf (vect_dump, "not vectorized: multiple exits.");
- else if (EDGE_COUNT (loop->header->preds) != 2)
- fprintf (vect_dump, "not vectorized: too many incoming edges.");
- }
- if (inner_loop_vinfo)
- destroy_loop_vec_info (inner_loop_vinfo, true);
- return NULL;
- }
-
- /* We assume that the loop exit condition is at the end of the loop. i.e,
- that the loop is represented as a do-while (with a proper if-guard
- before the loop if needed), where the loop header contains all the
- executable statements, and the latch is empty. */
- if (!empty_block_p (loop->latch)
- || phi_nodes (loop->latch))
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- fprintf (vect_dump, "not vectorized: unexpected loop form.");
- if (inner_loop_vinfo)
- destroy_loop_vec_info (inner_loop_vinfo, true);
- return NULL;
- }
-
- /* Make sure there exists a single-predecessor exit bb: */
- if (!single_pred_p (single_exit (loop)->dest))
- {
- edge e = single_exit (loop);
- if (!(e->flags & EDGE_ABNORMAL))
- {
- split_loop_exit_edge (e);
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "split exit edge.");
- }
- else
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- fprintf (vect_dump, "not vectorized: abnormal loop exit edge.");
- if (inner_loop_vinfo)
- destroy_loop_vec_info (inner_loop_vinfo, true);
- return NULL;
- }
- }
-
- loop_cond = vect_get_loop_niters (loop, &number_of_iterations);
- if (!loop_cond)
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- fprintf (vect_dump, "not vectorized: complicated exit condition.");
- if (inner_loop_vinfo)
- destroy_loop_vec_info (inner_loop_vinfo, true);
- return NULL;
- }
-
- if (!number_of_iterations)
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- fprintf (vect_dump,
- "not vectorized: number of iterations cannot be computed.");
- if (inner_loop_vinfo)
- destroy_loop_vec_info (inner_loop_vinfo, true);
- return NULL;
- }
-
- if (chrec_contains_undetermined (number_of_iterations))
- {
- if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
- fprintf (vect_dump, "Infinite number of iterations.");
- if (inner_loop_vinfo)
- destroy_loop_vec_info (inner_loop_vinfo, true);
- return NULL;
- }
-
- if (!NITERS_KNOWN_P (number_of_iterations))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "Symbolic number of iterations is ");
- print_generic_expr (vect_dump, number_of_iterations, TDF_DETAILS);
- }
- }
- else if (TREE_INT_CST_LOW (number_of_iterations) == 0)
- {
- if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "not vectorized: number of iterations = 0.");
- if (inner_loop_vinfo)
- destroy_loop_vec_info (inner_loop_vinfo, false);
- return NULL;
- }
-
- loop_vinfo = new_loop_vec_info (loop);
- LOOP_VINFO_NITERS (loop_vinfo) = number_of_iterations;
- LOOP_VINFO_NITERS_UNCHANGED (loop_vinfo) = number_of_iterations;
-
- STMT_VINFO_TYPE (vinfo_for_stmt (loop_cond)) = loop_exit_ctrl_vec_info_type;
-
- /* CHECKME: May want to keep it around it in the future. */
- if (inner_loop_vinfo)
- destroy_loop_vec_info (inner_loop_vinfo, false);
-
- gcc_assert (!loop->aux);
- loop->aux = loop_vinfo;
- return loop_vinfo;
-}
-
-
-/* Function vect_analyze_loop.
-
- Apply a set of analyses on LOOP, and create a loop_vec_info struct
- for it. The different analyses will record information in the
- loop_vec_info struct. */
-loop_vec_info
-vect_analyze_loop (struct loop *loop)
-{
- bool ok;
- loop_vec_info loop_vinfo;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "===== analyze_loop_nest =====");
-
- if (loop_outer (loop)
- && loop_vec_info_for_loop (loop_outer (loop))
- && LOOP_VINFO_VECTORIZABLE_P (loop_vec_info_for_loop (loop_outer (loop))))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "outer-loop already vectorized.");
- return NULL;
- }
-
- /* Check the CFG characteristics of the loop (nesting, entry/exit, etc. */
-
- loop_vinfo = vect_analyze_loop_form (loop);
- if (!loop_vinfo)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "bad loop form.");
- return NULL;
- }
-
- /* Find all data references in the loop (which correspond to vdefs/vuses)
- and analyze their evolution in the loop.
-
- FORNOW: Handle only simple, array references, which
- alignment can be forced, and aligned pointer-references. */
-
- ok = vect_analyze_data_refs (loop_vinfo);
- if (!ok)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "bad data references.");
- destroy_loop_vec_info (loop_vinfo, true);
- return NULL;
- }
-
- /* Classify all cross-iteration scalar data-flow cycles.
- Cross-iteration cycles caused by virtual phis are analyzed separately. */
-
- vect_analyze_scalar_cycles (loop_vinfo);
-
- vect_pattern_recog (loop_vinfo);
-
- /* Data-flow analysis to detect stmts that do not need to be vectorized. */
-
- ok = vect_mark_stmts_to_be_vectorized (loop_vinfo);
- if (!ok)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "unexpected pattern.");
- destroy_loop_vec_info (loop_vinfo, true);
- return NULL;
- }
-
- /* Analyze the alignment of the data-refs in the loop.
- Fail if a data reference is found that cannot be vectorized. */
-
- ok = vect_analyze_data_refs_alignment (loop_vinfo);
- if (!ok)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "bad data alignment.");
- destroy_loop_vec_info (loop_vinfo, true);
- return NULL;
- }
-
- ok = vect_determine_vectorization_factor (loop_vinfo);
- if (!ok)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "can't determine vectorization factor.");
- destroy_loop_vec_info (loop_vinfo, true);
- return NULL;
- }
-
- /* Analyze data dependences between the data-refs in the loop.
- FORNOW: fail at the first data dependence that we encounter. */
-
- ok = vect_analyze_data_ref_dependences (loop_vinfo);
- if (!ok)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "bad data dependence.");
- destroy_loop_vec_info (loop_vinfo, true);
- return NULL;
- }
-
- /* Analyze the access patterns of the data-refs in the loop (consecutive,
- complex, etc.). FORNOW: Only handle consecutive access pattern. */
-
- ok = vect_analyze_data_ref_accesses (loop_vinfo);
- if (!ok)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "bad data access.");
- destroy_loop_vec_info (loop_vinfo, true);
- return NULL;
- }
-
- /* Prune the list of ddrs to be tested at run-time by versioning for alias.
- It is important to call pruning after vect_analyze_data_ref_accesses,
- since we use grouping information gathered by interleaving analysis. */
- ok = vect_prune_runtime_alias_test_list (loop_vinfo);
- if (!ok)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "too long list of versioning for alias "
- "run-time tests.");
- destroy_loop_vec_info (loop_vinfo, true);
- return NULL;
- }
-
- /* Check the SLP opportunities in the loop, analyze and build SLP trees. */
- ok = vect_analyze_slp (loop_vinfo);
- if (ok)
- {
- /* Decide which possible SLP instances to SLP. */
- vect_make_slp_decision (loop_vinfo);
-
- /* Find stmts that need to be both vectorized and SLPed. */
- vect_detect_hybrid_slp (loop_vinfo);
- }
-
- /* This pass will decide on using loop versioning and/or loop peeling in
- order to enhance the alignment of data references in the loop. */
-
- ok = vect_enhance_data_refs_alignment (loop_vinfo);
- if (!ok)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "bad data alignment.");
- destroy_loop_vec_info (loop_vinfo, true);
- return NULL;
- }
-
- /* Scan all the operations in the loop and make sure they are
- vectorizable. */
-
- ok = vect_analyze_operations (loop_vinfo);
- if (!ok)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "bad operation or unsupported loop bound.");
- destroy_loop_vec_info (loop_vinfo, true);
- return NULL;
- }
-
- LOOP_VINFO_VECTORIZABLE_P (loop_vinfo) = 1;
-
- return loop_vinfo;
-}
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
new file mode 100644
index 00000000000..b4cabb6f0c1
--- /dev/null
+++ b/gcc/tree-vect-data-refs.c
@@ -0,0 +1,3355 @@
+/* Data References Analysis and Manipulation Utilities for Vectorization.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+ Foundation, Inc.
+ Contributed by Dorit Naishlos <dorit@il.ibm.com>
+ and Ira Rosen <irar@il.ibm.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 "ggc.h"
+#include "tree.h"
+#include "target.h"
+#include "basic-block.h"
+#include "diagnostic.h"
+#include "tree-flow.h"
+#include "tree-dump.h"
+#include "cfgloop.h"
+#include "expr.h"
+#include "optabs.h"
+#include "tree-chrec.h"
+#include "tree-scalar-evolution.h"
+#include "tree-vectorizer.h"
+#include "toplev.h"
+
+
+/* Return the smallest scalar part of STMT.
+ This is used to determine the vectype of the stmt. We generally set the
+ vectype according to the type of the result (lhs). For stmts whose
+ result-type is different than the type of the arguments (e.g., demotion,
+ promotion), vectype will be reset appropriately (later). Note that we have
+ to visit the smallest datatype in this function, because that determines the
+ VF. If the smallest datatype in the loop is present only as the rhs of a
+ promotion operation - we'd miss it.
+ Such a case, where a variable of this datatype does not appear in the lhs
+ anywhere in the loop, can only occur if it's an invariant: e.g.:
+ 'int_x = (int) short_inv', which we'd expect to have been optimized away by
+ invariant motion. However, we cannot rely on invariant motion to always take
+ invariants out of the loop, and so in the case of promotion we also have to
+ check the rhs.
+ LHS_SIZE_UNIT and RHS_SIZE_UNIT contain the sizes of the corresponding
+ types. */
+
+tree
+vect_get_smallest_scalar_type (gimple stmt, HOST_WIDE_INT *lhs_size_unit,
+ HOST_WIDE_INT *rhs_size_unit)
+{
+ tree scalar_type = gimple_expr_type (stmt);
+ HOST_WIDE_INT lhs, rhs;
+
+ lhs = rhs = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (scalar_type));
+
+ if (is_gimple_assign (stmt)
+ && (gimple_assign_cast_p (stmt)
+ || gimple_assign_rhs_code (stmt) == WIDEN_MULT_EXPR
+ || gimple_assign_rhs_code (stmt) == FLOAT_EXPR))
+ {
+ tree rhs_type = TREE_TYPE (gimple_assign_rhs1 (stmt));
+
+ rhs = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (rhs_type));
+ if (rhs < lhs)
+ scalar_type = rhs_type;
+ }
+
+ *lhs_size_unit = lhs;
+ *rhs_size_unit = rhs;
+ return scalar_type;
+}
+
+
+/* Find the place of the data-ref in STMT in the interleaving chain that starts
+ from FIRST_STMT. Return -1 if the data-ref is not a part of the chain. */
+
+int
+vect_get_place_in_interleaving_chain (gimple stmt, gimple first_stmt)
+{
+ gimple next_stmt = first_stmt;
+ int result = 0;
+
+ if (first_stmt != DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)))
+ return -1;
+
+ while (next_stmt && next_stmt != stmt)
+ {
+ result++;
+ next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
+ }
+
+ if (next_stmt)
+ return result;
+ else
+ return -1;
+}
+
+
+/* Function vect_insert_into_interleaving_chain.
+
+ Insert DRA into the interleaving chain of DRB according to DRA's INIT. */
+
+static void
+vect_insert_into_interleaving_chain (struct data_reference *dra,
+ struct data_reference *drb)
+{
+ gimple prev, next;
+ tree next_init;
+ stmt_vec_info stmtinfo_a = vinfo_for_stmt (DR_STMT (dra));
+ stmt_vec_info stmtinfo_b = vinfo_for_stmt (DR_STMT (drb));
+
+ prev = DR_GROUP_FIRST_DR (stmtinfo_b);
+ next = DR_GROUP_NEXT_DR (vinfo_for_stmt (prev));
+ while (next)
+ {
+ next_init = DR_INIT (STMT_VINFO_DATA_REF (vinfo_for_stmt (next)));
+ if (tree_int_cst_compare (next_init, DR_INIT (dra)) > 0)
+ {
+ /* Insert here. */
+ DR_GROUP_NEXT_DR (vinfo_for_stmt (prev)) = DR_STMT (dra);
+ DR_GROUP_NEXT_DR (stmtinfo_a) = next;
+ return;
+ }
+ prev = next;
+ next = DR_GROUP_NEXT_DR (vinfo_for_stmt (prev));
+ }
+
+ /* We got to the end of the list. Insert here. */
+ DR_GROUP_NEXT_DR (vinfo_for_stmt (prev)) = DR_STMT (dra);
+ DR_GROUP_NEXT_DR (stmtinfo_a) = NULL;
+}
+
+
+/* Function vect_update_interleaving_chain.
+
+ For two data-refs DRA and DRB that are a part of a chain interleaved data
+ accesses, update the interleaving chain. DRB's INIT is smaller than DRA's.
+
+ There are four possible cases:
+ 1. New stmts - both DRA and DRB are not a part of any chain:
+ FIRST_DR = DRB
+ NEXT_DR (DRB) = DRA
+ 2. DRB is a part of a chain and DRA is not:
+ no need to update FIRST_DR
+ no need to insert DRB
+ insert DRA according to init
+ 3. DRA is a part of a chain and DRB is not:
+ if (init of FIRST_DR > init of DRB)
+ FIRST_DR = DRB
+ NEXT(FIRST_DR) = previous FIRST_DR
+ else
+ insert DRB according to its init
+ 4. both DRA and DRB are in some interleaving chains:
+ choose the chain with the smallest init of FIRST_DR
+ insert the nodes of the second chain into the first one. */
+
+static void
+vect_update_interleaving_chain (struct data_reference *drb,
+ struct data_reference *dra)
+{
+ stmt_vec_info stmtinfo_a = vinfo_for_stmt (DR_STMT (dra));
+ stmt_vec_info stmtinfo_b = vinfo_for_stmt (DR_STMT (drb));
+ tree next_init, init_dra_chain, init_drb_chain;
+ gimple first_a, first_b;
+ tree node_init;
+ gimple node, prev, next, first_stmt;
+
+ /* 1. New stmts - both DRA and DRB are not a part of any chain. */
+ if (!DR_GROUP_FIRST_DR (stmtinfo_a) && !DR_GROUP_FIRST_DR (stmtinfo_b))
+ {
+ DR_GROUP_FIRST_DR (stmtinfo_a) = DR_STMT (drb);
+ DR_GROUP_FIRST_DR (stmtinfo_b) = DR_STMT (drb);
+ DR_GROUP_NEXT_DR (stmtinfo_b) = DR_STMT (dra);
+ return;
+ }
+
+ /* 2. DRB is a part of a chain and DRA is not. */
+ if (!DR_GROUP_FIRST_DR (stmtinfo_a) && DR_GROUP_FIRST_DR (stmtinfo_b))
+ {
+ DR_GROUP_FIRST_DR (stmtinfo_a) = DR_GROUP_FIRST_DR (stmtinfo_b);
+ /* Insert DRA into the chain of DRB. */
+ vect_insert_into_interleaving_chain (dra, drb);
+ return;
+ }
+
+ /* 3. DRA is a part of a chain and DRB is not. */
+ if (DR_GROUP_FIRST_DR (stmtinfo_a) && !DR_GROUP_FIRST_DR (stmtinfo_b))
+ {
+ gimple old_first_stmt = DR_GROUP_FIRST_DR (stmtinfo_a);
+ tree init_old = DR_INIT (STMT_VINFO_DATA_REF (vinfo_for_stmt (
+ old_first_stmt)));
+ gimple tmp;
+
+ if (tree_int_cst_compare (init_old, DR_INIT (drb)) > 0)
+ {
+ /* DRB's init is smaller than the init of the stmt previously marked
+ as the first stmt of the interleaving chain of DRA. Therefore, we
+ update FIRST_STMT and put DRB in the head of the list. */
+ DR_GROUP_FIRST_DR (stmtinfo_b) = DR_STMT (drb);
+ DR_GROUP_NEXT_DR (stmtinfo_b) = old_first_stmt;
+
+ /* Update all the stmts in the list to point to the new FIRST_STMT. */
+ tmp = old_first_stmt;
+ while (tmp)
+ {
+ DR_GROUP_FIRST_DR (vinfo_for_stmt (tmp)) = DR_STMT (drb);
+ tmp = DR_GROUP_NEXT_DR (vinfo_for_stmt (tmp));
+ }
+ }
+ else
+ {
+ /* Insert DRB in the list of DRA. */
+ vect_insert_into_interleaving_chain (drb, dra);
+ DR_GROUP_FIRST_DR (stmtinfo_b) = DR_GROUP_FIRST_DR (stmtinfo_a);
+ }
+ return;
+ }
+
+ /* 4. both DRA and DRB are in some interleaving chains. */
+ first_a = DR_GROUP_FIRST_DR (stmtinfo_a);
+ first_b = DR_GROUP_FIRST_DR (stmtinfo_b);
+ if (first_a == first_b)
+ return;
+ init_dra_chain = DR_INIT (STMT_VINFO_DATA_REF (vinfo_for_stmt (first_a)));
+ init_drb_chain = DR_INIT (STMT_VINFO_DATA_REF (vinfo_for_stmt (first_b)));
+
+ if (tree_int_cst_compare (init_dra_chain, init_drb_chain) > 0)
+ {
+ /* Insert the nodes of DRA chain into the DRB chain.
+ After inserting a node, continue from this node of the DRB chain (don't
+ start from the beginning. */
+ node = DR_GROUP_FIRST_DR (stmtinfo_a);
+ prev = DR_GROUP_FIRST_DR (stmtinfo_b);
+ first_stmt = first_b;
+ }
+ else
+ {
+ /* Insert the nodes of DRB chain into the DRA chain.
+ After inserting a node, continue from this node of the DRA chain (don't
+ start from the beginning. */
+ node = DR_GROUP_FIRST_DR (stmtinfo_b);
+ prev = DR_GROUP_FIRST_DR (stmtinfo_a);
+ first_stmt = first_a;
+ }
+
+ while (node)
+ {
+ node_init = DR_INIT (STMT_VINFO_DATA_REF (vinfo_for_stmt (node)));
+ next = DR_GROUP_NEXT_DR (vinfo_for_stmt (prev));
+ while (next)
+ {
+ next_init = DR_INIT (STMT_VINFO_DATA_REF (vinfo_for_stmt (next)));
+ if (tree_int_cst_compare (next_init, node_init) > 0)
+ {
+ /* Insert here. */
+ DR_GROUP_NEXT_DR (vinfo_for_stmt (prev)) = node;
+ DR_GROUP_NEXT_DR (vinfo_for_stmt (node)) = next;
+ prev = node;
+ break;
+ }
+ prev = next;
+ next = DR_GROUP_NEXT_DR (vinfo_for_stmt (prev));
+ }
+ if (!next)
+ {
+ /* We got to the end of the list. Insert here. */
+ DR_GROUP_NEXT_DR (vinfo_for_stmt (prev)) = node;
+ DR_GROUP_NEXT_DR (vinfo_for_stmt (node)) = NULL;
+ prev = node;
+ }
+ DR_GROUP_FIRST_DR (vinfo_for_stmt (node)) = first_stmt;
+ node = DR_GROUP_NEXT_DR (vinfo_for_stmt (node));
+ }
+}
+
+
+/* Function vect_equal_offsets.
+
+ Check if OFFSET1 and OFFSET2 are identical expressions. */
+
+static bool
+vect_equal_offsets (tree offset1, tree offset2)
+{
+ bool res0, res1;
+
+ STRIP_NOPS (offset1);
+ STRIP_NOPS (offset2);
+
+ if (offset1 == offset2)
+ return true;
+
+ if (TREE_CODE (offset1) != TREE_CODE (offset2)
+ || !BINARY_CLASS_P (offset1)
+ || !BINARY_CLASS_P (offset2))
+ return false;
+
+ res0 = vect_equal_offsets (TREE_OPERAND (offset1, 0),
+ TREE_OPERAND (offset2, 0));
+ res1 = vect_equal_offsets (TREE_OPERAND (offset1, 1),
+ TREE_OPERAND (offset2, 1));
+
+ return (res0 && res1);
+}
+
+
+/* Function vect_check_interleaving.
+
+ Check if DRA and DRB are a part of interleaving. In case they are, insert
+ DRA and DRB in an interleaving chain. */
+
+static void
+vect_check_interleaving (struct data_reference *dra,
+ struct data_reference *drb)
+{
+ HOST_WIDE_INT type_size_a, type_size_b, diff_mod_size, step, init_a, init_b;
+
+ /* Check that the data-refs have same first location (except init) and they
+ are both either store or load (not load and store). */
+ if ((DR_BASE_ADDRESS (dra) != DR_BASE_ADDRESS (drb)
+ && (TREE_CODE (DR_BASE_ADDRESS (dra)) != ADDR_EXPR
+ || TREE_CODE (DR_BASE_ADDRESS (drb)) != ADDR_EXPR
+ || TREE_OPERAND (DR_BASE_ADDRESS (dra), 0)
+ != TREE_OPERAND (DR_BASE_ADDRESS (drb),0)))
+ || !vect_equal_offsets (DR_OFFSET (dra), DR_OFFSET (drb))
+ || !tree_int_cst_compare (DR_INIT (dra), DR_INIT (drb))
+ || DR_IS_READ (dra) != DR_IS_READ (drb))
+ return;
+
+ /* Check:
+ 1. data-refs are of the same type
+ 2. their steps are equal
+ 3. the step is greater than the difference between data-refs' inits */
+ type_size_a = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (dra))));
+ type_size_b = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (drb))));
+
+ if (type_size_a != type_size_b
+ || tree_int_cst_compare (DR_STEP (dra), DR_STEP (drb))
+ || !types_compatible_p (TREE_TYPE (DR_REF (dra)),
+ TREE_TYPE (DR_REF (drb))))
+ return;
+
+ init_a = TREE_INT_CST_LOW (DR_INIT (dra));
+ init_b = TREE_INT_CST_LOW (DR_INIT (drb));
+ step = TREE_INT_CST_LOW (DR_STEP (dra));
+
+ if (init_a > init_b)
+ {
+ /* If init_a == init_b + the size of the type * k, we have an interleaving,
+ and DRB is accessed before DRA. */
+ diff_mod_size = (init_a - init_b) % type_size_a;
+
+ if ((init_a - init_b) > step)
+ return;
+
+ if (diff_mod_size == 0)
+ {
+ vect_update_interleaving_chain (drb, dra);
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ {
+ fprintf (vect_dump, "Detected interleaving ");
+ print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM);
+ fprintf (vect_dump, " and ");
+ print_generic_expr (vect_dump, DR_REF (drb), TDF_SLIM);
+ }
+ return;
+ }
+ }
+ else
+ {
+ /* If init_b == init_a + the size of the type * k, we have an
+ interleaving, and DRA is accessed before DRB. */
+ diff_mod_size = (init_b - init_a) % type_size_a;
+
+ if ((init_b - init_a) > step)
+ return;
+
+ if (diff_mod_size == 0)
+ {
+ vect_update_interleaving_chain (dra, drb);
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ {
+ fprintf (vect_dump, "Detected interleaving ");
+ print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM);
+ fprintf (vect_dump, " and ");
+ print_generic_expr (vect_dump, DR_REF (drb), TDF_SLIM);
+ }
+ return;
+ }
+ }
+}
+
+/* Check if data references pointed by DR_I and DR_J are same or
+ belong to same interleaving group. Return FALSE if drs are
+ different, otherwise return TRUE. */
+
+static bool
+vect_same_range_drs (data_reference_p dr_i, data_reference_p dr_j)
+{
+ gimple stmt_i = DR_STMT (dr_i);
+ gimple stmt_j = DR_STMT (dr_j);
+
+ if (operand_equal_p (DR_REF (dr_i), DR_REF (dr_j), 0)
+ || (DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt_i))
+ && DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt_j))
+ && (DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt_i))
+ == DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt_j)))))
+ return true;
+ else
+ return false;
+}
+
+/* If address ranges represented by DDR_I and DDR_J are equal,
+ return TRUE, otherwise return FALSE. */
+
+static bool
+vect_vfa_range_equal (ddr_p ddr_i, ddr_p ddr_j)
+{
+ if ((vect_same_range_drs (DDR_A (ddr_i), DDR_A (ddr_j))
+ && vect_same_range_drs (DDR_B (ddr_i), DDR_B (ddr_j)))
+ || (vect_same_range_drs (DDR_A (ddr_i), DDR_B (ddr_j))
+ && vect_same_range_drs (DDR_B (ddr_i), DDR_A (ddr_j))))
+ return true;
+ else
+ return false;
+}
+
+/* Insert DDR into LOOP_VINFO list of ddrs that may alias and need to be
+ tested at run-time. Return TRUE if DDR was successfully inserted.
+ Return false if versioning is not supported. */
+
+static bool
+vect_mark_for_runtime_alias_test (ddr_p ddr, loop_vec_info loop_vinfo)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+
+ if ((unsigned) PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS) == 0)
+ return false;
+
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ {
+ fprintf (vect_dump, "mark for run-time aliasing test between ");
+ print_generic_expr (vect_dump, DR_REF (DDR_A (ddr)), TDF_SLIM);
+ fprintf (vect_dump, " and ");
+ print_generic_expr (vect_dump, DR_REF (DDR_B (ddr)), TDF_SLIM);
+ }
+
+ if (optimize_loop_nest_for_size_p (loop))
+ {
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ fprintf (vect_dump, "versioning not supported when optimizing for size.");
+ return false;
+ }
+
+ /* FORNOW: We don't support versioning with outer-loop vectorization. */
+ if (loop->inner)
+ {
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ fprintf (vect_dump, "versioning not yet supported for outer-loops.");
+ return false;
+ }
+
+ VEC_safe_push (ddr_p, heap, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo), ddr);
+ return true;
+}
+
+/* Function vect_analyze_data_ref_dependence.
+
+ Return TRUE if there (might) exist a dependence between a memory-reference
+ DRA and a memory-reference DRB. When versioning for alias may check a
+ dependence at run-time, return FALSE. */
+
+static bool
+vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
+ loop_vec_info loop_vinfo)
+{
+ unsigned int i;
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ int vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+ struct data_reference *dra = DDR_A (ddr);
+ struct data_reference *drb = DDR_B (ddr);
+ stmt_vec_info stmtinfo_a = vinfo_for_stmt (DR_STMT (dra));
+ stmt_vec_info stmtinfo_b = vinfo_for_stmt (DR_STMT (drb));
+ int dra_size = GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (dra))));
+ int drb_size = GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (drb))));
+ lambda_vector dist_v;
+ unsigned int loop_depth;
+
+ if (DDR_ARE_DEPENDENT (ddr) == chrec_known)
+ {
+ /* Independent data accesses. */
+ vect_check_interleaving (dra, drb);
+ return false;
+ }
+
+ if ((DR_IS_READ (dra) && DR_IS_READ (drb)) || dra == drb)
+ return false;
+
+ if (DDR_ARE_DEPENDENT (ddr) == chrec_dont_know)
+ {
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ {
+ fprintf (vect_dump,
+ "versioning for alias required: can't determine dependence between ");
+ print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM);
+ fprintf (vect_dump, " and ");
+ print_generic_expr (vect_dump, DR_REF (drb), TDF_SLIM);
+ }
+ /* Add to list of ddrs that need to be tested at run-time. */
+ return !vect_mark_for_runtime_alias_test (ddr, loop_vinfo);
+ }
+
+ if (DDR_NUM_DIST_VECTS (ddr) == 0)
+ {
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ {
+ fprintf (vect_dump, "versioning for alias required: bad dist vector for ");
+ print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM);
+ fprintf (vect_dump, " and ");
+ print_generic_expr (vect_dump, DR_REF (drb), TDF_SLIM);
+ }
+ /* Add to list of ddrs that need to be tested at run-time. */
+ return !vect_mark_for_runtime_alias_test (ddr, loop_vinfo);
+ }
+
+ loop_depth = index_in_loop_nest (loop->num, DDR_LOOP_NEST (ddr));
+ for (i = 0; VEC_iterate (lambda_vector, DDR_DIST_VECTS (ddr), i, dist_v); i++)
+ {
+ int dist = dist_v[loop_depth];
+
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ fprintf (vect_dump, "dependence distance = %d.", dist);
+
+ /* Same loop iteration. */
+ if (dist % vectorization_factor == 0 && dra_size == drb_size)
+ {
+ /* Two references with distance zero have the same alignment. */
+ VEC_safe_push (dr_p, heap, STMT_VINFO_SAME_ALIGN_REFS (stmtinfo_a), drb);
+ VEC_safe_push (dr_p, heap, STMT_VINFO_SAME_ALIGN_REFS (stmtinfo_b), dra);
+ if (vect_print_dump_info (REPORT_ALIGNMENT))
+ fprintf (vect_dump, "accesses have the same alignment.");
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ {
+ fprintf (vect_dump, "dependence distance modulo vf == 0 between ");
+ print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM);
+ fprintf (vect_dump, " and ");
+ print_generic_expr (vect_dump, DR_REF (drb), TDF_SLIM);
+ }
+
+ /* For interleaving, mark that there is a read-write dependency if
+ necessary. We check before that one of the data-refs is store. */
+ if (DR_IS_READ (dra))
+ DR_GROUP_READ_WRITE_DEPENDENCE (stmtinfo_a) = true;
+ else
+ {
+ if (DR_IS_READ (drb))
+ DR_GROUP_READ_WRITE_DEPENDENCE (stmtinfo_b) = true;
+ }
+
+ continue;
+ }
+
+ if (abs (dist) >= vectorization_factor
+ || (dist > 0 && DDR_REVERSED_P (ddr)))
+ {
+ /* Dependence distance does not create dependence, as far as
+ vectorization is concerned, in this case. If DDR_REVERSED_P the
+ order of the data-refs in DDR was reversed (to make distance
+ vector positive), and the actual distance is negative. */
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ fprintf (vect_dump, "dependence distance >= VF or negative.");
+ continue;
+ }
+
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump,
+ "not vectorized, possible dependence "
+ "between data-refs ");
+ print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM);
+ fprintf (vect_dump, " and ");
+ print_generic_expr (vect_dump, DR_REF (drb), TDF_SLIM);
+ }
+
+ return true;
+ }
+
+ return false;
+}
+
+/* Function vect_analyze_data_ref_dependences.
+
+ Examine all the data references in the loop, and make sure there do not
+ exist any data dependences between them. */
+
+bool
+vect_analyze_data_ref_dependences (loop_vec_info loop_vinfo)
+{
+ unsigned int i;
+ VEC (ddr_p, heap) * ddrs = LOOP_VINFO_DDRS (loop_vinfo);
+ struct data_dependence_relation *ddr;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_analyze_dependences ===");
+
+ for (i = 0; VEC_iterate (ddr_p, ddrs, i, ddr); i++)
+ if (vect_analyze_data_ref_dependence (ddr, loop_vinfo))
+ return false;
+
+ return true;
+}
+
+
+/* Function vect_compute_data_ref_alignment
+
+ Compute the misalignment of the data reference DR.
+
+ Output:
+ 1. If during the misalignment computation it is found that the data reference
+ cannot be vectorized then false is returned.
+ 2. DR_MISALIGNMENT (DR) is defined.
+
+ FOR NOW: No analysis is actually performed. Misalignment is calculated
+ only for trivial cases. TODO. */
+
+static bool
+vect_compute_data_ref_alignment (struct data_reference *dr)
+{
+ gimple stmt = DR_STMT (dr);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ tree ref = DR_REF (dr);
+ tree vectype;
+ tree base, base_addr;
+ bool base_aligned;
+ tree misalign;
+ tree aligned_to, alignment;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "vect_compute_data_ref_alignment:");
+
+ /* Initialize misalignment to unknown. */
+ SET_DR_MISALIGNMENT (dr, -1);
+
+ misalign = DR_INIT (dr);
+ aligned_to = DR_ALIGNED_TO (dr);
+ base_addr = DR_BASE_ADDRESS (dr);
+ vectype = STMT_VINFO_VECTYPE (stmt_info);
+
+ /* In case the dataref is in an inner-loop of the loop that is being
+ vectorized (LOOP), we use the base and misalignment information
+ relative to the outer-loop (LOOP). This is ok only if the misalignment
+ stays the same throughout the execution of the inner-loop, which is why
+ we have to check that the stride of the dataref in the inner-loop evenly
+ divides by the vector size. */
+ if (nested_in_vect_loop_p (loop, stmt))
+ {
+ tree step = DR_STEP (dr);
+ HOST_WIDE_INT dr_step = TREE_INT_CST_LOW (step);
+
+ if (dr_step % GET_MODE_SIZE (TYPE_MODE (vectype)) == 0)
+ {
+ if (vect_print_dump_info (REPORT_ALIGNMENT))
+ fprintf (vect_dump, "inner step divides the vector-size.");
+ misalign = STMT_VINFO_DR_INIT (stmt_info);
+ aligned_to = STMT_VINFO_DR_ALIGNED_TO (stmt_info);
+ base_addr = STMT_VINFO_DR_BASE_ADDRESS (stmt_info);
+ }
+ else
+ {
+ if (vect_print_dump_info (REPORT_ALIGNMENT))
+ fprintf (vect_dump, "inner step doesn't divide the vector-size.");
+ misalign = NULL_TREE;
+ }
+ }
+
+ base = build_fold_indirect_ref (base_addr);
+ alignment = ssize_int (TYPE_ALIGN (vectype)/BITS_PER_UNIT);
+
+ if ((aligned_to && tree_int_cst_compare (aligned_to, alignment) < 0)
+ || !misalign)
+ {
+ if (vect_print_dump_info (REPORT_ALIGNMENT))
+ {
+ fprintf (vect_dump, "Unknown alignment for access: ");
+ print_generic_expr (vect_dump, base, TDF_SLIM);
+ }
+ return true;
+ }
+
+ if ((DECL_P (base)
+ && tree_int_cst_compare (ssize_int (DECL_ALIGN_UNIT (base)),
+ alignment) >= 0)
+ || (TREE_CODE (base_addr) == SSA_NAME
+ && tree_int_cst_compare (ssize_int (TYPE_ALIGN_UNIT (TREE_TYPE (
+ TREE_TYPE (base_addr)))),
+ alignment) >= 0))
+ base_aligned = true;
+ else
+ base_aligned = false;
+
+ if (!base_aligned)
+ {
+ /* Do not change the alignment of global variables if
+ flag_section_anchors is enabled. */
+ if (!vect_can_force_dr_alignment_p (base, TYPE_ALIGN (vectype))
+ || (TREE_STATIC (base) && flag_section_anchors))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "can't force alignment of ref: ");
+ print_generic_expr (vect_dump, ref, TDF_SLIM);
+ }
+ return true;
+ }
+
+ /* Force the alignment of the decl.
+ NOTE: This is the only change to the code we make during
+ the analysis phase, before deciding to vectorize the loop. */
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "force alignment");
+ DECL_ALIGN (base) = TYPE_ALIGN (vectype);
+ DECL_USER_ALIGN (base) = 1;
+ }
+
+ /* At this point we assume that the base is aligned. */
+ gcc_assert (base_aligned
+ || (TREE_CODE (base) == VAR_DECL
+ && DECL_ALIGN (base) >= TYPE_ALIGN (vectype)));
+
+ /* Modulo alignment. */
+ misalign = size_binop (FLOOR_MOD_EXPR, misalign, alignment);
+
+ if (!host_integerp (misalign, 1))
+ {
+ /* Negative or overflowed misalignment value. */
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "unexpected misalign value");
+ return false;
+ }
+
+ SET_DR_MISALIGNMENT (dr, TREE_INT_CST_LOW (misalign));
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "misalign = %d bytes of ref ", DR_MISALIGNMENT (dr));
+ print_generic_expr (vect_dump, ref, TDF_SLIM);
+ }
+
+ return true;
+}
+
+
+/* Function vect_compute_data_refs_alignment
+
+ Compute the misalignment of data references in the loop.
+ Return FALSE if a data reference is found that cannot be vectorized. */
+
+static bool
+vect_compute_data_refs_alignment (loop_vec_info loop_vinfo)
+{
+ VEC (data_reference_p, heap) *datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
+ struct data_reference *dr;
+ unsigned int i;
+
+ for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
+ if (!vect_compute_data_ref_alignment (dr))
+ return false;
+
+ return true;
+}
+
+
+/* Function vect_update_misalignment_for_peel
+
+ DR - the data reference whose misalignment is to be adjusted.
+ DR_PEEL - the data reference whose misalignment is being made
+ zero in the vector loop by the peel.
+ NPEEL - the number of iterations in the peel loop if the misalignment
+ of DR_PEEL is known at compile time. */
+
+static void
+vect_update_misalignment_for_peel (struct data_reference *dr,
+ struct data_reference *dr_peel, int npeel)
+{
+ unsigned int i;
+ VEC(dr_p,heap) *same_align_drs;
+ struct data_reference *current_dr;
+ int dr_size = GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (dr))));
+ int dr_peel_size = GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (dr_peel))));
+ stmt_vec_info stmt_info = vinfo_for_stmt (DR_STMT (dr));
+ stmt_vec_info peel_stmt_info = vinfo_for_stmt (DR_STMT (dr_peel));
+
+ /* For interleaved data accesses the step in the loop must be multiplied by
+ the size of the interleaving group. */
+ if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
+ dr_size *= DR_GROUP_SIZE (vinfo_for_stmt (DR_GROUP_FIRST_DR (stmt_info)));
+ if (STMT_VINFO_STRIDED_ACCESS (peel_stmt_info))
+ dr_peel_size *= DR_GROUP_SIZE (peel_stmt_info);
+
+ /* It can be assumed that the data refs with the same alignment as dr_peel
+ are aligned in the vector loop. */
+ same_align_drs
+ = STMT_VINFO_SAME_ALIGN_REFS (vinfo_for_stmt (DR_STMT (dr_peel)));
+ for (i = 0; VEC_iterate (dr_p, same_align_drs, i, current_dr); i++)
+ {
+ if (current_dr != dr)
+ continue;
+ gcc_assert (DR_MISALIGNMENT (dr) / dr_size ==
+ DR_MISALIGNMENT (dr_peel) / dr_peel_size);
+ SET_DR_MISALIGNMENT (dr, 0);
+ return;
+ }
+
+ if (known_alignment_for_access_p (dr)
+ && known_alignment_for_access_p (dr_peel))
+ {
+ int misal = DR_MISALIGNMENT (dr);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ misal += npeel * dr_size;
+ misal %= GET_MODE_SIZE (TYPE_MODE (vectype));
+ SET_DR_MISALIGNMENT (dr, misal);
+ return;
+ }
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Setting misalignment to -1.");
+ SET_DR_MISALIGNMENT (dr, -1);
+}
+
+
+/* Function vect_verify_datarefs_alignment
+
+ Return TRUE if all data references in the loop can be
+ handled with respect to alignment. */
+
+static bool
+vect_verify_datarefs_alignment (loop_vec_info loop_vinfo)
+{
+ VEC (data_reference_p, heap) *datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
+ struct data_reference *dr;
+ enum dr_alignment_support supportable_dr_alignment;
+ unsigned int i;
+
+ for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
+ {
+ gimple stmt = DR_STMT (dr);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+
+ /* For interleaving, only the alignment of the first access matters. */
+ if (STMT_VINFO_STRIDED_ACCESS (stmt_info)
+ && DR_GROUP_FIRST_DR (stmt_info) != stmt)
+ continue;
+
+ supportable_dr_alignment = vect_supportable_dr_alignment (dr);
+ if (!supportable_dr_alignment)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ if (DR_IS_READ (dr))
+ fprintf (vect_dump,
+ "not vectorized: unsupported unaligned load.");
+ else
+ fprintf (vect_dump,
+ "not vectorized: unsupported unaligned store.");
+ }
+ return false;
+ }
+ if (supportable_dr_alignment != dr_aligned
+ && vect_print_dump_info (REPORT_ALIGNMENT))
+ fprintf (vect_dump, "Vectorizing an unaligned access.");
+ }
+ return true;
+}
+
+
+/* Function vector_alignment_reachable_p
+
+ Return true if vector alignment for DR is reachable by peeling
+ a few loop iterations. Return false otherwise. */
+
+static bool
+vector_alignment_reachable_p (struct data_reference *dr)
+{
+ gimple stmt = DR_STMT (dr);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+
+ if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
+ {
+ /* For interleaved access we peel only if number of iterations in
+ the prolog loop ({VF - misalignment}), is a multiple of the
+ number of the interleaved accesses. */
+ int elem_size, mis_in_elements;
+ int nelements = TYPE_VECTOR_SUBPARTS (vectype);
+
+ /* FORNOW: handle only known alignment. */
+ if (!known_alignment_for_access_p (dr))
+ return false;
+
+ elem_size = GET_MODE_SIZE (TYPE_MODE (vectype)) / nelements;
+ mis_in_elements = DR_MISALIGNMENT (dr) / elem_size;
+
+ if ((nelements - mis_in_elements) % DR_GROUP_SIZE (stmt_info))
+ return false;
+ }
+
+ /* If misalignment is known at the compile time then allow peeling
+ only if natural alignment is reachable through peeling. */
+ if (known_alignment_for_access_p (dr) && !aligned_access_p (dr))
+ {
+ HOST_WIDE_INT elmsize =
+ int_cst_value (TYPE_SIZE_UNIT (TREE_TYPE (vectype)));
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "data size =" HOST_WIDE_INT_PRINT_DEC, elmsize);
+ fprintf (vect_dump, ". misalignment = %d. ", DR_MISALIGNMENT (dr));
+ }
+ if (DR_MISALIGNMENT (dr) % elmsize)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "data size does not divide the misalignment.\n");
+ return false;
+ }
+ }
+
+ if (!known_alignment_for_access_p (dr))
+ {
+ tree type = (TREE_TYPE (DR_REF (dr)));
+ tree ba = DR_BASE_OBJECT (dr);
+ bool is_packed = false;
+
+ if (ba)
+ is_packed = contains_packed_reference (ba);
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Unknown misalignment, is_packed = %d",is_packed);
+ if (targetm.vectorize.vector_alignment_reachable (type, is_packed))
+ return true;
+ else
+ return false;
+ }
+
+ return true;
+}
+
+/* Function vect_enhance_data_refs_alignment
+
+ This pass will use loop versioning and loop peeling in order to enhance
+ the alignment of data references in the loop.
+
+ FOR NOW: we assume that whatever versioning/peeling takes place, only the
+ original loop is to be vectorized; Any other loops that are created by
+ the transformations performed in this pass - are not supposed to be
+ vectorized. This restriction will be relaxed.
+
+ This pass will require a cost model to guide it whether to apply peeling
+ or versioning or a combination of the two. For example, the scheme that
+ intel uses when given a loop with several memory accesses, is as follows:
+ choose one memory access ('p') which alignment you want to force by doing
+ peeling. Then, either (1) generate a loop in which 'p' is aligned and all
+ other accesses are not necessarily aligned, or (2) use loop versioning to
+ generate one loop in which all accesses are aligned, and another loop in
+ which only 'p' is necessarily aligned.
+
+ ("Automatic Intra-Register Vectorization for the Intel Architecture",
+ Aart J.C. Bik, Milind Girkar, Paul M. Grey and Ximmin Tian, International
+ Journal of Parallel Programming, Vol. 30, No. 2, April 2002.)
+
+ Devising a cost model is the most critical aspect of this work. It will
+ guide us on which access to peel for, whether to use loop versioning, how
+ many versions to create, etc. The cost model will probably consist of
+ generic considerations as well as target specific considerations (on
+ powerpc for example, misaligned stores are more painful than misaligned
+ loads).
+
+ Here are the general steps involved in alignment enhancements:
+
+ -- original loop, before alignment analysis:
+ for (i=0; i<N; i++){
+ x = q[i]; # DR_MISALIGNMENT(q) = unknown
+ p[i] = y; # DR_MISALIGNMENT(p) = unknown
+ }
+
+ -- After vect_compute_data_refs_alignment:
+ for (i=0; i<N; i++){
+ x = q[i]; # DR_MISALIGNMENT(q) = 3
+ p[i] = y; # DR_MISALIGNMENT(p) = unknown
+ }
+
+ -- Possibility 1: we do loop versioning:
+ if (p is aligned) {
+ for (i=0; i<N; i++){ # loop 1A
+ x = q[i]; # DR_MISALIGNMENT(q) = 3
+ p[i] = y; # DR_MISALIGNMENT(p) = 0
+ }
+ }
+ else {
+ for (i=0; i<N; i++){ # loop 1B
+ x = q[i]; # DR_MISALIGNMENT(q) = 3
+ p[i] = y; # DR_MISALIGNMENT(p) = unaligned
+ }
+ }
+
+ -- Possibility 2: we do loop peeling:
+ for (i = 0; i < 3; i++){ # (scalar loop, not to be vectorized).
+ x = q[i];
+ p[i] = y;
+ }
+ for (i = 3; i < N; i++){ # loop 2A
+ x = q[i]; # DR_MISALIGNMENT(q) = 0
+ p[i] = y; # DR_MISALIGNMENT(p) = unknown
+ }
+
+ -- Possibility 3: combination of loop peeling and versioning:
+ for (i = 0; i < 3; i++){ # (scalar loop, not to be vectorized).
+ x = q[i];
+ p[i] = y;
+ }
+ if (p is aligned) {
+ for (i = 3; i<N; i++){ # loop 3A
+ x = q[i]; # DR_MISALIGNMENT(q) = 0
+ p[i] = y; # DR_MISALIGNMENT(p) = 0
+ }
+ }
+ else {
+ for (i = 3; i<N; i++){ # loop 3B
+ x = q[i]; # DR_MISALIGNMENT(q) = 0
+ p[i] = y; # DR_MISALIGNMENT(p) = unaligned
+ }
+ }
+
+ These loops are later passed to loop_transform to be vectorized. The
+ vectorizer will use the alignment information to guide the transformation
+ (whether to generate regular loads/stores, or with special handling for
+ misalignment). */
+
+bool
+vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
+{
+ VEC (data_reference_p, heap) *datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ enum dr_alignment_support supportable_dr_alignment;
+ struct data_reference *dr0 = NULL;
+ struct data_reference *dr;
+ unsigned int i;
+ bool do_peeling = false;
+ bool do_versioning = false;
+ bool stat;
+ gimple stmt;
+ stmt_vec_info stmt_info;
+ int vect_versioning_for_alias_required;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_enhance_data_refs_alignment ===");
+
+ /* While cost model enhancements are expected in the future, the high level
+ view of the code at this time is as follows:
+
+ A) If there is a misaligned write then see if peeling to align this write
+ can make all data references satisfy vect_supportable_dr_alignment.
+ If so, update data structures as needed and return true. Note that
+ at this time vect_supportable_dr_alignment is known to return false
+ for a misaligned write.
+
+ B) If peeling wasn't possible and there is a data reference with an
+ unknown misalignment that does not satisfy vect_supportable_dr_alignment
+ then see if loop versioning checks can be used to make all data
+ references satisfy vect_supportable_dr_alignment. If so, update
+ data structures as needed and return true.
+
+ C) If neither peeling nor versioning were successful then return false if
+ any data reference does not satisfy vect_supportable_dr_alignment.
+
+ D) Return true (all data references satisfy vect_supportable_dr_alignment).
+
+ Note, Possibility 3 above (which is peeling and versioning together) is not
+ being done at this time. */
+
+ /* (1) Peeling to force alignment. */
+
+ /* (1.1) Decide whether to perform peeling, and how many iterations to peel:
+ Considerations:
+ + How many accesses will become aligned due to the peeling
+ - How many accesses will become unaligned due to the peeling,
+ and the cost of misaligned accesses.
+ - The cost of peeling (the extra runtime checks, the increase
+ in code size).
+
+ The scheme we use FORNOW: peel to force the alignment of the first
+ misaligned store in the loop.
+ Rationale: misaligned stores are not yet supported.
+
+ TODO: Use a cost model. */
+
+ for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
+ {
+ stmt = DR_STMT (dr);
+ stmt_info = vinfo_for_stmt (stmt);
+
+ /* For interleaving, only the alignment of the first access
+ matters. */
+ if (STMT_VINFO_STRIDED_ACCESS (stmt_info)
+ && DR_GROUP_FIRST_DR (stmt_info) != stmt)
+ continue;
+
+ if (!DR_IS_READ (dr) && !aligned_access_p (dr))
+ {
+ do_peeling = vector_alignment_reachable_p (dr);
+ if (do_peeling)
+ dr0 = dr;
+ if (!do_peeling && vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "vector alignment may not be reachable");
+ break;
+ }
+ }
+
+ vect_versioning_for_alias_required =
+ (VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)) > 0);
+
+ /* Temporarily, if versioning for alias is required, we disable peeling
+ until we support peeling and versioning. Often peeling for alignment
+ will require peeling for loop-bound, which in turn requires that we
+ know how to adjust the loop ivs after the loop. */
+ if (vect_versioning_for_alias_required
+ || !vect_can_advance_ivs_p (loop_vinfo)
+ || !slpeel_can_duplicate_loop_p (loop, single_exit (loop)))
+ do_peeling = false;
+
+ if (do_peeling)
+ {
+ int mis;
+ int npeel = 0;
+ gimple stmt = DR_STMT (dr0);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ int nelements = TYPE_VECTOR_SUBPARTS (vectype);
+
+ if (known_alignment_for_access_p (dr0))
+ {
+ /* Since it's known at compile time, compute the number of iterations
+ in the peeled loop (the peeling factor) for use in updating
+ DR_MISALIGNMENT values. The peeling factor is the vectorization
+ factor minus the misalignment as an element count. */
+ mis = DR_MISALIGNMENT (dr0);
+ mis /= GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (dr0))));
+ npeel = nelements - mis;
+
+ /* For interleaved data access every iteration accesses all the
+ members of the group, therefore we divide the number of iterations
+ by the group size. */
+ stmt_info = vinfo_for_stmt (DR_STMT (dr0));
+ if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
+ npeel /= DR_GROUP_SIZE (stmt_info);
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Try peeling by %d", npeel);
+ }
+
+ /* Ensure that all data refs can be vectorized after the peel. */
+ for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
+ {
+ int save_misalignment;
+
+ if (dr == dr0)
+ continue;
+
+ stmt = DR_STMT (dr);
+ stmt_info = vinfo_for_stmt (stmt);
+ /* For interleaving, only the alignment of the first access
+ matters. */
+ if (STMT_VINFO_STRIDED_ACCESS (stmt_info)
+ && DR_GROUP_FIRST_DR (stmt_info) != stmt)
+ continue;
+
+ save_misalignment = DR_MISALIGNMENT (dr);
+ vect_update_misalignment_for_peel (dr, dr0, npeel);
+ supportable_dr_alignment = vect_supportable_dr_alignment (dr);
+ SET_DR_MISALIGNMENT (dr, save_misalignment);
+
+ if (!supportable_dr_alignment)
+ {
+ do_peeling = false;
+ break;
+ }
+ }
+
+ if (do_peeling)
+ {
+ /* (1.2) Update the DR_MISALIGNMENT of each data reference DR_i.
+ If the misalignment of DR_i is identical to that of dr0 then set
+ DR_MISALIGNMENT (DR_i) to zero. If the misalignment of DR_i and
+ dr0 are known at compile time then increment DR_MISALIGNMENT (DR_i)
+ by the peeling factor times the element size of DR_i (MOD the
+ vectorization factor times the size). Otherwise, the
+ misalignment of DR_i must be set to unknown. */
+ for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
+ if (dr != dr0)
+ vect_update_misalignment_for_peel (dr, dr0, npeel);
+
+ LOOP_VINFO_UNALIGNED_DR (loop_vinfo) = dr0;
+ LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo) = DR_MISALIGNMENT (dr0);
+ SET_DR_MISALIGNMENT (dr0, 0);
+ if (vect_print_dump_info (REPORT_ALIGNMENT))
+ fprintf (vect_dump, "Alignment of access forced using peeling.");
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Peeling for alignment will be applied.");
+
+ stat = vect_verify_datarefs_alignment (loop_vinfo);
+ gcc_assert (stat);
+ return stat;
+ }
+ }
+
+
+ /* (2) Versioning to force alignment. */
+
+ /* Try versioning if:
+ 1) flag_tree_vect_loop_version is TRUE
+ 2) optimize loop for speed
+ 3) there is at least one unsupported misaligned data ref with an unknown
+ misalignment, and
+ 4) all misaligned data refs with a known misalignment are supported, and
+ 5) the number of runtime alignment checks is within reason. */
+
+ do_versioning =
+ flag_tree_vect_loop_version
+ && optimize_loop_nest_for_speed_p (loop)
+ && (!loop->inner); /* FORNOW */
+
+ if (do_versioning)
+ {
+ for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
+ {
+ stmt = DR_STMT (dr);
+ stmt_info = vinfo_for_stmt (stmt);
+
+ /* For interleaving, only the alignment of the first access
+ matters. */
+ if (aligned_access_p (dr)
+ || (STMT_VINFO_STRIDED_ACCESS (stmt_info)
+ && DR_GROUP_FIRST_DR (stmt_info) != stmt))
+ continue;
+
+ supportable_dr_alignment = vect_supportable_dr_alignment (dr);
+
+ if (!supportable_dr_alignment)
+ {
+ gimple stmt;
+ int mask;
+ tree vectype;
+
+ if (known_alignment_for_access_p (dr)
+ || VEC_length (gimple,
+ LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
+ >= (unsigned) PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIGNMENT_CHECKS))
+ {
+ do_versioning = false;
+ break;
+ }
+
+ stmt = DR_STMT (dr);
+ vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (stmt));
+ gcc_assert (vectype);
+
+ /* The rightmost bits of an aligned address must be zeros.
+ Construct the mask needed for this test. For example,
+ GET_MODE_SIZE for the vector mode V4SI is 16 bytes so the
+ mask must be 15 = 0xf. */
+ mask = GET_MODE_SIZE (TYPE_MODE (vectype)) - 1;
+
+ /* FORNOW: use the same mask to test all potentially unaligned
+ references in the loop. The vectorizer currently supports
+ a single vector size, see the reference to
+ GET_MODE_NUNITS (TYPE_MODE (vectype)) where the
+ vectorization factor is computed. */
+ gcc_assert (!LOOP_VINFO_PTR_MASK (loop_vinfo)
+ || LOOP_VINFO_PTR_MASK (loop_vinfo) == mask);
+ LOOP_VINFO_PTR_MASK (loop_vinfo) = mask;
+ VEC_safe_push (gimple, heap,
+ LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo),
+ DR_STMT (dr));
+ }
+ }
+
+ /* Versioning requires at least one misaligned data reference. */
+ if (VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo)) == 0)
+ do_versioning = false;
+ else if (!do_versioning)
+ VEC_truncate (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo), 0);
+ }
+
+ if (do_versioning)
+ {
+ VEC(gimple,heap) *may_misalign_stmts
+ = LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo);
+ gimple stmt;
+
+ /* It can now be assumed that the data references in the statements
+ in LOOP_VINFO_MAY_MISALIGN_STMTS will be aligned in the version
+ of the loop being vectorized. */
+ for (i = 0; VEC_iterate (gimple, may_misalign_stmts, i, stmt); i++)
+ {
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ dr = STMT_VINFO_DATA_REF (stmt_info);
+ SET_DR_MISALIGNMENT (dr, 0);
+ if (vect_print_dump_info (REPORT_ALIGNMENT))
+ fprintf (vect_dump, "Alignment of access forced using versioning.");
+ }
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Versioning for alignment will be applied.");
+
+ /* Peeling and versioning can't be done together at this time. */
+ gcc_assert (! (do_peeling && do_versioning));
+
+ stat = vect_verify_datarefs_alignment (loop_vinfo);
+ gcc_assert (stat);
+ return stat;
+ }
+
+ /* This point is reached if neither peeling nor versioning is being done. */
+ gcc_assert (! (do_peeling || do_versioning));
+
+ stat = vect_verify_datarefs_alignment (loop_vinfo);
+ return stat;
+}
+
+
+/* Function vect_analyze_data_refs_alignment
+
+ Analyze the alignment of the data-references in the loop.
+ Return FALSE if a data reference is found that cannot be vectorized. */
+
+bool
+vect_analyze_data_refs_alignment (loop_vec_info loop_vinfo)
+{
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_analyze_data_refs_alignment ===");
+
+ if (!vect_compute_data_refs_alignment (loop_vinfo))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump,
+ "not vectorized: can't calculate alignment for data ref.");
+ return false;
+ }
+
+ return true;
+}
+
+
+/* Analyze groups of strided accesses: check that DR belongs to a group of
+ strided accesses of legal size, step, etc. Detect gaps, single element
+ interleaving, and other special cases. Set strided access info.
+ Collect groups of strided stores for further use in SLP analysis. */
+
+static bool
+vect_analyze_group_access (struct data_reference *dr)
+{
+ tree step = DR_STEP (dr);
+ tree scalar_type = TREE_TYPE (DR_REF (dr));
+ HOST_WIDE_INT type_size = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (scalar_type));
+ gimple stmt = DR_STMT (dr);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ HOST_WIDE_INT dr_step = TREE_INT_CST_LOW (step);
+ HOST_WIDE_INT stride;
+ bool slp_impossible = false;
+
+ /* For interleaving, STRIDE is STEP counted in elements, i.e., the size of the
+ interleaving group (including gaps). */
+ stride = dr_step / type_size;
+
+ /* Not consecutive access is possible only if it is a part of interleaving. */
+ if (!DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)))
+ {
+ /* Check if it this DR is a part of interleaving, and is a single
+ element of the group that is accessed in the loop. */
+
+ /* Gaps are supported only for loads. STEP must be a multiple of the type
+ size. The size of the group must be a power of 2. */
+ if (DR_IS_READ (dr)
+ && (dr_step % type_size) == 0
+ && stride > 0
+ && exact_log2 (stride) != -1)
+ {
+ DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)) = stmt;
+ DR_GROUP_SIZE (vinfo_for_stmt (stmt)) = stride;
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ {
+ fprintf (vect_dump, "Detected single element interleaving %d ",
+ DR_GROUP_SIZE (vinfo_for_stmt (stmt)));
+ print_generic_expr (vect_dump, DR_REF (dr), TDF_SLIM);
+ fprintf (vect_dump, " step ");
+ print_generic_expr (vect_dump, step, TDF_SLIM);
+ }
+ return true;
+ }
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "not consecutive access");
+ return false;
+ }
+
+ if (DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)) == stmt)
+ {
+ /* First stmt in the interleaving chain. Check the chain. */
+ gimple next = DR_GROUP_NEXT_DR (vinfo_for_stmt (stmt));
+ struct data_reference *data_ref = dr;
+ unsigned int count = 1;
+ tree next_step;
+ tree prev_init = DR_INIT (data_ref);
+ gimple prev = stmt;
+ HOST_WIDE_INT diff, count_in_bytes;
+
+ while (next)
+ {
+ /* Skip same data-refs. In case that two or more stmts share data-ref
+ (supported only for loads), we vectorize only the first stmt, and
+ the rest get their vectorized loads from the first one. */
+ if (!tree_int_cst_compare (DR_INIT (data_ref),
+ DR_INIT (STMT_VINFO_DATA_REF (
+ vinfo_for_stmt (next)))))
+ {
+ if (!DR_IS_READ (data_ref))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Two store stmts share the same dr.");
+ return false;
+ }
+
+ /* Check that there is no load-store dependencies for this loads
+ to prevent a case of load-store-load to the same location. */
+ if (DR_GROUP_READ_WRITE_DEPENDENCE (vinfo_for_stmt (next))
+ || DR_GROUP_READ_WRITE_DEPENDENCE (vinfo_for_stmt (prev)))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump,
+ "READ_WRITE dependence in interleaving.");
+ return false;
+ }
+
+ /* For load use the same data-ref load. */
+ DR_GROUP_SAME_DR_STMT (vinfo_for_stmt (next)) = prev;
+
+ prev = next;
+ next = DR_GROUP_NEXT_DR (vinfo_for_stmt (next));
+ continue;
+ }
+ prev = next;
+
+ /* Check that all the accesses have the same STEP. */
+ next_step = DR_STEP (STMT_VINFO_DATA_REF (vinfo_for_stmt (next)));
+ if (tree_int_cst_compare (step, next_step))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "not consecutive access in interleaving");
+ return false;
+ }
+
+ data_ref = STMT_VINFO_DATA_REF (vinfo_for_stmt (next));
+ /* Check that the distance between two accesses is equal to the type
+ size. Otherwise, we have gaps. */
+ diff = (TREE_INT_CST_LOW (DR_INIT (data_ref))
+ - TREE_INT_CST_LOW (prev_init)) / type_size;
+ if (diff != 1)
+ {
+ /* FORNOW: SLP of accesses with gaps is not supported. */
+ slp_impossible = true;
+ if (!DR_IS_READ (data_ref))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "interleaved store with gaps");
+ return false;
+ }
+ }
+
+ /* Store the gap from the previous member of the group. If there is no
+ gap in the access, DR_GROUP_GAP is always 1. */
+ DR_GROUP_GAP (vinfo_for_stmt (next)) = diff;
+
+ prev_init = DR_INIT (data_ref);
+ next = DR_GROUP_NEXT_DR (vinfo_for_stmt (next));
+ /* Count the number of data-refs in the chain. */
+ count++;
+ }
+
+ /* COUNT is the number of accesses found, we multiply it by the size of
+ the type to get COUNT_IN_BYTES. */
+ count_in_bytes = type_size * count;
+
+ /* Check that the size of the interleaving is not greater than STEP. */
+ if (dr_step < count_in_bytes)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "interleaving size is greater than step for ");
+ print_generic_expr (vect_dump, DR_REF (dr), TDF_SLIM);
+ }
+ return false;
+ }
+
+ /* Check that the size of the interleaving is equal to STEP for stores,
+ i.e., that there are no gaps. */
+ if (dr_step != count_in_bytes)
+ {
+ if (DR_IS_READ (dr))
+ {
+ slp_impossible = true;
+ /* There is a gap after the last load in the group. This gap is a
+ difference between the stride and the number of elements. When
+ there is no gap, this difference should be 0. */
+ DR_GROUP_GAP (vinfo_for_stmt (stmt)) = stride - count;
+ }
+ else
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "interleaved store with gaps");
+ return false;
+ }
+ }
+
+ /* Check that STEP is a multiple of type size. */
+ if ((dr_step % type_size) != 0)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "step is not a multiple of type size: step ");
+ print_generic_expr (vect_dump, step, TDF_SLIM);
+ fprintf (vect_dump, " size ");
+ print_generic_expr (vect_dump, TYPE_SIZE_UNIT (scalar_type),
+ TDF_SLIM);
+ }
+ return false;
+ }
+
+ /* FORNOW: we handle only interleaving that is a power of 2.
+ We don't fail here if it may be still possible to vectorize the
+ group using SLP. If not, the size of the group will be checked in
+ vect_analyze_operations, and the vectorization will fail. */
+ if (exact_log2 (stride) == -1)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "interleaving is not a power of 2");
+
+ if (slp_impossible)
+ return false;
+ }
+ DR_GROUP_SIZE (vinfo_for_stmt (stmt)) = stride;
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Detected interleaving of size %d", (int)stride);
+
+ /* SLP: create an SLP data structure for every interleaving group of
+ stores for further analysis in vect_analyse_slp. */
+ if (!DR_IS_READ (dr) && !slp_impossible)
+ VEC_safe_push (gimple, heap, LOOP_VINFO_STRIDED_STORES (loop_vinfo), stmt);
+ }
+
+ return true;
+}
+
+
+/* Analyze the access pattern of the data-reference DR.
+ In case of non-consecutive accesses call vect_analyze_group_access() to
+ analyze groups of strided accesses. */
+
+static bool
+vect_analyze_data_ref_access (struct data_reference *dr)
+{
+ tree step = DR_STEP (dr);
+ tree scalar_type = TREE_TYPE (DR_REF (dr));
+ gimple stmt = DR_STMT (dr);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ HOST_WIDE_INT dr_step = TREE_INT_CST_LOW (step);
+
+ if (!step)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "bad data-ref access");
+ return false;
+ }
+
+ /* Don't allow invariant accesses. */
+ if (dr_step == 0)
+ return false;
+
+ if (nested_in_vect_loop_p (loop, stmt))
+ {
+ /* Interleaved accesses are not yet supported within outer-loop
+ vectorization for references in the inner-loop. */
+ DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)) = NULL;
+
+ /* For the rest of the analysis we use the outer-loop step. */
+ step = STMT_VINFO_DR_STEP (stmt_info);
+ dr_step = TREE_INT_CST_LOW (step);
+
+ if (dr_step == 0)
+ {
+ if (vect_print_dump_info (REPORT_ALIGNMENT))
+ fprintf (vect_dump, "zero step in outer loop.");
+ if (DR_IS_READ (dr))
+ return true;
+ else
+ return false;
+ }
+ }
+
+ /* Consecutive? */
+ if (!tree_int_cst_compare (step, TYPE_SIZE_UNIT (scalar_type)))
+ {
+ /* Mark that it is not interleaving. */
+ DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)) = NULL;
+ return true;
+ }
+
+ if (nested_in_vect_loop_p (loop, stmt))
+ {
+ if (vect_print_dump_info (REPORT_ALIGNMENT))
+ fprintf (vect_dump, "strided access in outer loop.");
+ return false;
+ }
+
+ /* Not consecutive access - check if it's a part of interleaving group. */
+ return vect_analyze_group_access (dr);
+}
+
+
+/* Function vect_analyze_data_ref_accesses.
+
+ Analyze the access pattern of all the data references in the loop.
+
+ FORNOW: the only access pattern that is considered vectorizable is a
+ simple step 1 (consecutive) access.
+
+ FORNOW: handle only arrays and pointer accesses. */
+
+bool
+vect_analyze_data_ref_accesses (loop_vec_info loop_vinfo)
+{
+ unsigned int i;
+ VEC (data_reference_p, heap) *datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
+ struct data_reference *dr;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_analyze_data_ref_accesses ===");
+
+ for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
+ if (!vect_analyze_data_ref_access (dr))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "not vectorized: complicated access pattern.");
+ return false;
+ }
+
+ return true;
+}
+
+/* Function vect_prune_runtime_alias_test_list.
+
+ Prune a list of ddrs to be tested at run-time by versioning for alias.
+ Return FALSE if resulting list of ddrs is longer then allowed by
+ PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS, otherwise return TRUE. */
+
+bool
+vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
+{
+ VEC (ddr_p, heap) * ddrs =
+ LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo);
+ unsigned i, j;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_prune_runtime_alias_test_list ===");
+
+ for (i = 0; i < VEC_length (ddr_p, ddrs); )
+ {
+ bool found;
+ ddr_p ddr_i;
+
+ ddr_i = VEC_index (ddr_p, ddrs, i);
+ found = false;
+
+ for (j = 0; j < i; j++)
+ {
+ ddr_p ddr_j = VEC_index (ddr_p, ddrs, j);
+
+ if (vect_vfa_range_equal (ddr_i, ddr_j))
+ {
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ {
+ fprintf (vect_dump, "found equal ranges ");
+ print_generic_expr (vect_dump, DR_REF (DDR_A (ddr_i)), TDF_SLIM);
+ fprintf (vect_dump, ", ");
+ print_generic_expr (vect_dump, DR_REF (DDR_B (ddr_i)), TDF_SLIM);
+ fprintf (vect_dump, " and ");
+ print_generic_expr (vect_dump, DR_REF (DDR_A (ddr_j)), TDF_SLIM);
+ fprintf (vect_dump, ", ");
+ print_generic_expr (vect_dump, DR_REF (DDR_B (ddr_j)), TDF_SLIM);
+ }
+ found = true;
+ break;
+ }
+ }
+
+ if (found)
+ {
+ VEC_ordered_remove (ddr_p, ddrs, i);
+ continue;
+ }
+ i++;
+ }
+
+ if (VEC_length (ddr_p, ddrs) >
+ (unsigned) PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS))
+ {
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ {
+ fprintf (vect_dump,
+ "disable versioning for alias - max number of generated "
+ "checks exceeded.");
+ }
+
+ VEC_truncate (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo), 0);
+
+ return false;
+ }
+
+ return true;
+}
+
+
+/* Function vect_analyze_data_refs.
+
+ Find all the data references in the loop.
+
+ The general structure of the analysis of data refs in the vectorizer is as
+ follows:
+ 1- vect_analyze_data_refs(loop): call compute_data_dependences_for_loop to
+ find and analyze all data-refs in the loop and their dependences.
+ 2- vect_analyze_dependences(): apply dependence testing using ddrs.
+ 3- vect_analyze_drs_alignment(): check that ref_stmt.alignment is ok.
+ 4- vect_analyze_drs_access(): check that ref_stmt.step is ok.
+
+*/
+
+bool
+vect_analyze_data_refs (loop_vec_info loop_vinfo)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ unsigned int i;
+ VEC (data_reference_p, heap) *datarefs;
+ struct data_reference *dr;
+ tree scalar_type;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_analyze_data_refs ===\n");
+
+ compute_data_dependences_for_loop (loop, true,
+ &LOOP_VINFO_DATAREFS (loop_vinfo),
+ &LOOP_VINFO_DDRS (loop_vinfo));
+
+ /* Go through the data-refs, check that the analysis succeeded. Update pointer
+ from stmt_vec_info struct to DR and vectype. */
+ datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
+
+ for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
+ {
+ gimple stmt;
+ stmt_vec_info stmt_info;
+ basic_block bb;
+ tree base, offset, init;
+
+ if (!dr || !DR_REF (dr))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "not vectorized: unhandled data-ref ");
+ return false;
+ }
+
+ stmt = DR_STMT (dr);
+ stmt_info = vinfo_for_stmt (stmt);
+
+ /* Check that analysis of the data-ref succeeded. */
+ if (!DR_BASE_ADDRESS (dr) || !DR_OFFSET (dr) || !DR_INIT (dr)
+ || !DR_STEP (dr))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump, "not vectorized: data ref analysis failed ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+ return false;
+ }
+
+ if (TREE_CODE (DR_BASE_ADDRESS (dr)) == INTEGER_CST)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "not vectorized: base addr of dr is a "
+ "constant");
+ return false;
+ }
+
+ if (!DR_SYMBOL_TAG (dr))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump, "not vectorized: no memory tag for ");
+ print_generic_expr (vect_dump, DR_REF (dr), TDF_SLIM);
+ }
+ return false;
+ }
+
+ base = unshare_expr (DR_BASE_ADDRESS (dr));
+ offset = unshare_expr (DR_OFFSET (dr));
+ init = unshare_expr (DR_INIT (dr));
+
+ /* Update DR field in stmt_vec_info struct. */
+ bb = gimple_bb (stmt);
+
+ /* If the dataref is in an inner-loop of the loop that is considered for
+ for vectorization, we also want to analyze the access relative to
+ the outer-loop (DR contains information only relative to the
+ inner-most enclosing loop). We do that by building a reference to the
+ first location accessed by the inner-loop, and analyze it relative to
+ the outer-loop. */
+ if (nested_in_vect_loop_p (loop, stmt))
+ {
+ tree outer_step, outer_base, outer_init;
+ HOST_WIDE_INT pbitsize, pbitpos;
+ tree poffset;
+ enum machine_mode pmode;
+ int punsignedp, pvolatilep;
+ affine_iv base_iv, offset_iv;
+ tree dinit;
+
+ /* Build a reference to the first location accessed by the
+ inner-loop: *(BASE+INIT). (The first location is actually
+ BASE+INIT+OFFSET, but we add OFFSET separately later). */
+ tree inner_base = build_fold_indirect_ref
+ (fold_build2 (POINTER_PLUS_EXPR,
+ TREE_TYPE (base), base,
+ fold_convert (sizetype, init)));
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "analyze in outer-loop: ");
+ print_generic_expr (vect_dump, inner_base, TDF_SLIM);
+ }
+
+ outer_base = get_inner_reference (inner_base, &pbitsize, &pbitpos,
+ &poffset, &pmode, &punsignedp, &pvolatilep, false);
+ gcc_assert (outer_base != NULL_TREE);
+
+ if (pbitpos % BITS_PER_UNIT != 0)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "failed: bit offset alignment.\n");
+ return false;
+ }
+
+ outer_base = build_fold_addr_expr (outer_base);
+ if (!simple_iv (loop, loop_containing_stmt (stmt), outer_base,
+ &base_iv, false))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "failed: evolution of base is not affine.\n");
+ return false;
+ }
+
+ if (offset)
+ {
+ if (poffset)
+ poffset = fold_build2 (PLUS_EXPR, TREE_TYPE (offset), offset,
+ poffset);
+ else
+ poffset = offset;
+ }
+
+ if (!poffset)
+ {
+ offset_iv.base = ssize_int (0);
+ offset_iv.step = ssize_int (0);
+ }
+ else if (!simple_iv (loop, loop_containing_stmt (stmt), poffset,
+ &offset_iv, false))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "evolution of offset is not affine.\n");
+ return false;
+ }
+
+ outer_init = ssize_int (pbitpos / BITS_PER_UNIT);
+ split_constant_offset (base_iv.base, &base_iv.base, &dinit);
+ outer_init = size_binop (PLUS_EXPR, outer_init, dinit);
+ split_constant_offset (offset_iv.base, &offset_iv.base, &dinit);
+ outer_init = size_binop (PLUS_EXPR, outer_init, dinit);
+
+ outer_step = size_binop (PLUS_EXPR,
+ fold_convert (ssizetype, base_iv.step),
+ fold_convert (ssizetype, offset_iv.step));
+
+ STMT_VINFO_DR_STEP (stmt_info) = outer_step;
+ /* FIXME: Use canonicalize_base_object_address (base_iv.base); */
+ STMT_VINFO_DR_BASE_ADDRESS (stmt_info) = base_iv.base;
+ STMT_VINFO_DR_INIT (stmt_info) = outer_init;
+ STMT_VINFO_DR_OFFSET (stmt_info) =
+ fold_convert (ssizetype, offset_iv.base);
+ STMT_VINFO_DR_ALIGNED_TO (stmt_info) =
+ size_int (highest_pow2_factor (offset_iv.base));
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "\touter base_address: ");
+ print_generic_expr (vect_dump, STMT_VINFO_DR_BASE_ADDRESS (stmt_info), TDF_SLIM);
+ fprintf (vect_dump, "\n\touter offset from base address: ");
+ print_generic_expr (vect_dump, STMT_VINFO_DR_OFFSET (stmt_info), TDF_SLIM);
+ fprintf (vect_dump, "\n\touter constant offset from base address: ");
+ print_generic_expr (vect_dump, STMT_VINFO_DR_INIT (stmt_info), TDF_SLIM);
+ fprintf (vect_dump, "\n\touter step: ");
+ print_generic_expr (vect_dump, STMT_VINFO_DR_STEP (stmt_info), TDF_SLIM);
+ fprintf (vect_dump, "\n\touter aligned to: ");
+ print_generic_expr (vect_dump, STMT_VINFO_DR_ALIGNED_TO (stmt_info), TDF_SLIM);
+ }
+ }
+
+ if (STMT_VINFO_DATA_REF (stmt_info))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump,
+ "not vectorized: more than one data ref in stmt: ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+ return false;
+ }
+ STMT_VINFO_DATA_REF (stmt_info) = dr;
+
+ /* Set vectype for STMT. */
+ scalar_type = TREE_TYPE (DR_REF (dr));
+ STMT_VINFO_VECTYPE (stmt_info) =
+ get_vectype_for_scalar_type (scalar_type);
+ if (!STMT_VINFO_VECTYPE (stmt_info))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump,
+ "not vectorized: no vectype for stmt: ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ fprintf (vect_dump, " scalar_type: ");
+ print_generic_expr (vect_dump, scalar_type, TDF_DETAILS);
+ }
+ return false;
+ }
+ }
+
+ return true;
+}
+
+
+/* Function vect_get_new_vect_var.
+
+ Returns a name for a new variable. The current naming scheme appends the
+ prefix "vect_" or "vect_p" (depending on the value of VAR_KIND) to
+ the name of vectorizer generated variables, and appends that to NAME if
+ provided. */
+
+tree
+vect_get_new_vect_var (tree type, enum vect_var_kind var_kind, const char *name)
+{
+ const char *prefix;
+ tree new_vect_var;
+
+ switch (var_kind)
+ {
+ case vect_simple_var:
+ prefix = "vect_";
+ break;
+ case vect_scalar_var:
+ prefix = "stmp_";
+ break;
+ case vect_pointer_var:
+ prefix = "vect_p";
+ break;
+ default:
+ gcc_unreachable ();
+ }
+
+ if (name)
+ {
+ char* tmp = concat (prefix, name, NULL);
+ new_vect_var = create_tmp_var (type, tmp);
+ free (tmp);
+ }
+ else
+ new_vect_var = create_tmp_var (type, prefix);
+
+ /* Mark vector typed variable as a gimple register variable. */
+ if (TREE_CODE (type) == VECTOR_TYPE)
+ DECL_GIMPLE_REG_P (new_vect_var) = true;
+
+ return new_vect_var;
+}
+
+
+/* Function vect_create_addr_base_for_vector_ref.
+
+ Create an expression that computes the address of the first memory location
+ that will be accessed for a data reference.
+
+ Input:
+ STMT: The statement containing the data reference.
+ NEW_STMT_LIST: Must be initialized to NULL_TREE or a statement list.
+ OFFSET: Optional. If supplied, it is be added to the initial address.
+ LOOP: Specify relative to which loop-nest should the address be computed.
+ For example, when the dataref is in an inner-loop nested in an
+ outer-loop that is now being vectorized, LOOP can be either the
+ outer-loop, or the inner-loop. The first memory location accessed
+ by the following dataref ('in' points to short):
+
+ for (i=0; i<N; i++)
+ for (j=0; j<M; j++)
+ s += in[i+j]
+
+ is as follows:
+ if LOOP=i_loop: &in (relative to i_loop)
+ if LOOP=j_loop: &in+i*2B (relative to j_loop)
+
+ Output:
+ 1. Return an SSA_NAME whose value is the address of the memory location of
+ the first vector of the data reference.
+ 2. If new_stmt_list is not NULL_TREE after return then the caller must insert
+ these statement(s) which define the returned SSA_NAME.
+
+ FORNOW: We are only handling array accesses with step 1. */
+
+tree
+vect_create_addr_base_for_vector_ref (gimple stmt,
+ gimple_seq *new_stmt_list,
+ tree offset,
+ struct loop *loop)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
+ struct loop *containing_loop = (gimple_bb (stmt))->loop_father;
+ tree data_ref_base = unshare_expr (DR_BASE_ADDRESS (dr));
+ tree base_name;
+ tree data_ref_base_var;
+ tree vec_stmt;
+ tree addr_base, addr_expr;
+ tree dest;
+ gimple_seq seq = NULL;
+ tree base_offset = unshare_expr (DR_OFFSET (dr));
+ tree init = unshare_expr (DR_INIT (dr));
+ tree vect_ptr_type, addr_expr2;
+ tree step = TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (dr)));
+
+ gcc_assert (loop);
+ if (loop != containing_loop)
+ {
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+
+ gcc_assert (nested_in_vect_loop_p (loop, stmt));
+
+ data_ref_base = unshare_expr (STMT_VINFO_DR_BASE_ADDRESS (stmt_info));
+ base_offset = unshare_expr (STMT_VINFO_DR_OFFSET (stmt_info));
+ init = unshare_expr (STMT_VINFO_DR_INIT (stmt_info));
+ }
+
+ /* Create data_ref_base */
+ base_name = build_fold_indirect_ref (data_ref_base);
+ data_ref_base_var = create_tmp_var (TREE_TYPE (data_ref_base), "batmp");
+ add_referenced_var (data_ref_base_var);
+ data_ref_base = force_gimple_operand (data_ref_base, &seq, true,
+ data_ref_base_var);
+ gimple_seq_add_seq (new_stmt_list, seq);
+
+ /* Create base_offset */
+ base_offset = size_binop (PLUS_EXPR,
+ fold_convert (sizetype, base_offset),
+ fold_convert (sizetype, init));
+ dest = create_tmp_var (sizetype, "base_off");
+ add_referenced_var (dest);
+ base_offset = force_gimple_operand (base_offset, &seq, true, dest);
+ gimple_seq_add_seq (new_stmt_list, seq);
+
+ if (offset)
+ {
+ tree tmp = create_tmp_var (sizetype, "offset");
+
+ add_referenced_var (tmp);
+ offset = fold_build2 (MULT_EXPR, sizetype,
+ fold_convert (sizetype, offset), step);
+ base_offset = fold_build2 (PLUS_EXPR, sizetype,
+ base_offset, offset);
+ base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
+ gimple_seq_add_seq (new_stmt_list, seq);
+ }
+
+ /* base + base_offset */
+ addr_base = fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (data_ref_base),
+ data_ref_base, base_offset);
+
+ vect_ptr_type = build_pointer_type (STMT_VINFO_VECTYPE (stmt_info));
+
+ /* addr_expr = addr_base */
+ addr_expr = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
+ get_name (base_name));
+ add_referenced_var (addr_expr);
+ vec_stmt = fold_convert (vect_ptr_type, addr_base);
+ addr_expr2 = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
+ get_name (base_name));
+ add_referenced_var (addr_expr2);
+ vec_stmt = force_gimple_operand (vec_stmt, &seq, false, addr_expr2);
+ gimple_seq_add_seq (new_stmt_list, seq);
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "created ");
+ print_generic_expr (vect_dump, vec_stmt, TDF_SLIM);
+ }
+ return vec_stmt;
+}
+
+
+/* Function vect_create_data_ref_ptr.
+
+ Create a new pointer to vector type (vp), that points to the first location
+ accessed in the loop by STMT, along with the def-use update chain to
+ appropriately advance the pointer through the loop iterations. Also set
+ aliasing information for the pointer. This vector pointer is used by the
+ callers to this function to create a memory reference expression for vector
+ load/store access.
+
+ Input:
+ 1. STMT: a stmt that references memory. Expected to be of the form
+ GIMPLE_ASSIGN <name, data-ref> or
+ GIMPLE_ASSIGN <data-ref, name>.
+ 2. AT_LOOP: the loop where the vector memref is to be created.
+ 3. OFFSET (optional): an offset to be added to the initial address accessed
+ by the data-ref in STMT.
+ 4. ONLY_INIT: indicate if vp is to be updated in the loop, or remain
+ pointing to the initial address.
+ 5. TYPE: if not NULL indicates the required type of the data-ref.
+
+ Output:
+ 1. Declare a new ptr to vector_type, and have it point to the base of the
+ data reference (initial addressed accessed by the data reference).
+ For example, for vector of type V8HI, the following code is generated:
+
+ v8hi *vp;
+ vp = (v8hi *)initial_address;
+
+ if OFFSET is not supplied:
+ initial_address = &a[init];
+ if OFFSET is supplied:
+ initial_address = &a[init + OFFSET];
+
+ Return the initial_address in INITIAL_ADDRESS.
+
+ 2. If ONLY_INIT is true, just return the initial pointer. Otherwise, also
+ update the pointer in each iteration of the loop.
+
+ Return the increment stmt that updates the pointer in PTR_INCR.
+
+ 3. Set INV_P to true if the access pattern of the data reference in the
+ vectorized loop is invariant. Set it to false otherwise.
+
+ 4. Return the pointer. */
+
+tree
+vect_create_data_ref_ptr (gimple stmt, struct loop *at_loop,
+ tree offset, tree *initial_address, gimple *ptr_incr,
+ bool only_init, bool *inv_p, tree type)
+{
+ tree base_name;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ bool nested_in_vect_loop = nested_in_vect_loop_p (loop, stmt);
+ struct loop *containing_loop = (gimple_bb (stmt))->loop_father;
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ tree vect_ptr_type;
+ tree vect_ptr;
+ tree tag;
+ tree new_temp;
+ gimple vec_stmt;
+ gimple_seq new_stmt_list = NULL;
+ edge pe;
+ basic_block new_bb;
+ tree vect_ptr_init;
+ struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
+ tree vptr;
+ gimple_stmt_iterator incr_gsi;
+ bool insert_after;
+ tree indx_before_incr, indx_after_incr;
+ gimple incr;
+ tree step;
+
+ /* Check the step (evolution) of the load in LOOP, and record
+ whether it's invariant. */
+ if (nested_in_vect_loop)
+ step = STMT_VINFO_DR_STEP (stmt_info);
+ else
+ step = DR_STEP (STMT_VINFO_DATA_REF (stmt_info));
+
+ if (tree_int_cst_compare (step, size_zero_node) == 0)
+ *inv_p = true;
+ else
+ *inv_p = false;
+
+ /* Create an expression for the first address accessed by this load
+ in LOOP. */
+ base_name = build_fold_indirect_ref (unshare_expr (DR_BASE_ADDRESS (dr)));
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ tree data_ref_base = base_name;
+ fprintf (vect_dump, "create vector-pointer variable to type: ");
+ print_generic_expr (vect_dump, vectype, TDF_SLIM);
+ if (TREE_CODE (data_ref_base) == VAR_DECL)
+ fprintf (vect_dump, " vectorizing a one dimensional array ref: ");
+ else if (TREE_CODE (data_ref_base) == ARRAY_REF)
+ fprintf (vect_dump, " vectorizing a multidimensional array ref: ");
+ else if (TREE_CODE (data_ref_base) == COMPONENT_REF)
+ fprintf (vect_dump, " vectorizing a record based array ref: ");
+ else if (TREE_CODE (data_ref_base) == SSA_NAME)
+ fprintf (vect_dump, " vectorizing a pointer ref: ");
+ print_generic_expr (vect_dump, base_name, TDF_SLIM);
+ }
+
+ /** (1) Create the new vector-pointer variable: **/
+ if (type)
+ vect_ptr_type = build_pointer_type (type);
+ else
+ vect_ptr_type = build_pointer_type (vectype);
+
+ if (TREE_CODE (DR_BASE_ADDRESS (dr)) == SSA_NAME
+ && TYPE_RESTRICT (TREE_TYPE (DR_BASE_ADDRESS (dr))))
+ vect_ptr_type = build_qualified_type (vect_ptr_type, TYPE_QUAL_RESTRICT);
+ vect_ptr = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
+ get_name (base_name));
+ if (TREE_CODE (DR_BASE_ADDRESS (dr)) == SSA_NAME
+ && TYPE_RESTRICT (TREE_TYPE (DR_BASE_ADDRESS (dr))))
+ {
+ get_alias_set (base_name);
+ DECL_POINTER_ALIAS_SET (vect_ptr)
+ = DECL_POINTER_ALIAS_SET (SSA_NAME_VAR (DR_BASE_ADDRESS (dr)));
+ }
+
+ add_referenced_var (vect_ptr);
+
+ /** (2) Add aliasing information to the new vector-pointer:
+ (The points-to info (DR_PTR_INFO) may be defined later.) **/
+
+ tag = DR_SYMBOL_TAG (dr);
+ gcc_assert (tag);
+
+ /* If tag is a variable (and NOT_A_TAG) than a new symbol memory
+ tag must be created with tag added to its may alias list. */
+ if (!MTAG_P (tag))
+ new_type_alias (vect_ptr, tag, DR_REF (dr));
+ else
+ {
+ set_symbol_mem_tag (vect_ptr, tag);
+ mark_sym_for_renaming (tag);
+ }
+
+ /** Note: If the dataref is in an inner-loop nested in LOOP, and we are
+ vectorizing LOOP (i.e. outer-loop vectorization), we need to create two
+ def-use update cycles for the pointer: One relative to the outer-loop
+ (LOOP), which is what steps (3) and (4) below do. The other is relative
+ to the inner-loop (which is the inner-most loop containing the dataref),
+ and this is done be step (5) below.
+
+ When vectorizing inner-most loops, the vectorized loop (LOOP) is also the
+ inner-most loop, and so steps (3),(4) work the same, and step (5) is
+ redundant. Steps (3),(4) create the following:
+
+ vp0 = &base_addr;
+ LOOP: vp1 = phi(vp0,vp2)
+ ...
+ ...
+ vp2 = vp1 + step
+ goto LOOP
+
+ If there is an inner-loop nested in loop, then step (5) will also be
+ applied, and an additional update in the inner-loop will be created:
+
+ vp0 = &base_addr;
+ LOOP: vp1 = phi(vp0,vp2)
+ ...
+ inner: vp3 = phi(vp1,vp4)
+ vp4 = vp3 + inner_step
+ if () goto inner
+ ...
+ vp2 = vp1 + step
+ if () goto LOOP */
+
+ /** (3) Calculate the initial address the vector-pointer, and set
+ the vector-pointer to point to it before the loop: **/
+
+ /* Create: (&(base[init_val+offset]) in the loop preheader. */
+
+ new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
+ offset, loop);
+ pe = loop_preheader_edge (loop);
+ if (new_stmt_list)
+ {
+ new_bb = gsi_insert_seq_on_edge_immediate (pe, new_stmt_list);
+ gcc_assert (!new_bb);
+ }
+
+ *initial_address = new_temp;
+
+ /* Create: p = (vectype *) initial_base */
+ vec_stmt = gimple_build_assign (vect_ptr,
+ fold_convert (vect_ptr_type, new_temp));
+ vect_ptr_init = make_ssa_name (vect_ptr, vec_stmt);
+ gimple_assign_set_lhs (vec_stmt, vect_ptr_init);
+ new_bb = gsi_insert_on_edge_immediate (pe, vec_stmt);
+ gcc_assert (!new_bb);
+
+
+ /** (4) Handle the updating of the vector-pointer inside the loop.
+ This is needed when ONLY_INIT is false, and also when AT_LOOP
+ is the inner-loop nested in LOOP (during outer-loop vectorization).
+ **/
+
+ if (only_init && at_loop == loop) /* No update in loop is required. */
+ {
+ /* Copy the points-to information if it exists. */
+ if (DR_PTR_INFO (dr))
+ duplicate_ssa_name_ptr_info (vect_ptr_init, DR_PTR_INFO (dr));
+ vptr = vect_ptr_init;
+ }
+ else
+ {
+ /* The step of the vector pointer is the Vector Size. */
+ tree step = TYPE_SIZE_UNIT (vectype);
+ /* One exception to the above is when the scalar step of the load in
+ LOOP is zero. In this case the step here is also zero. */
+ if (*inv_p)
+ step = size_zero_node;
+
+ standard_iv_increment_position (loop, &incr_gsi, &insert_after);
+
+ create_iv (vect_ptr_init,
+ fold_convert (vect_ptr_type, step),
+ vect_ptr, loop, &incr_gsi, insert_after,
+ &indx_before_incr, &indx_after_incr);
+ incr = gsi_stmt (incr_gsi);
+ set_vinfo_for_stmt (incr, new_stmt_vec_info (incr, loop_vinfo));
+
+ /* Copy the points-to information if it exists. */
+ if (DR_PTR_INFO (dr))
+ {
+ duplicate_ssa_name_ptr_info (indx_before_incr, DR_PTR_INFO (dr));
+ duplicate_ssa_name_ptr_info (indx_after_incr, DR_PTR_INFO (dr));
+ }
+ merge_alias_info (vect_ptr_init, indx_before_incr);
+ merge_alias_info (vect_ptr_init, indx_after_incr);
+ if (ptr_incr)
+ *ptr_incr = incr;
+
+ vptr = indx_before_incr;
+ }
+
+ if (!nested_in_vect_loop || only_init)
+ return vptr;
+
+
+ /** (5) Handle the updating of the vector-pointer inside the inner-loop
+ nested in LOOP, if exists: **/
+
+ gcc_assert (nested_in_vect_loop);
+ if (!only_init)
+ {
+ standard_iv_increment_position (containing_loop, &incr_gsi,
+ &insert_after);
+ create_iv (vptr, fold_convert (vect_ptr_type, DR_STEP (dr)), vect_ptr,
+ containing_loop, &incr_gsi, insert_after, &indx_before_incr,
+ &indx_after_incr);
+ incr = gsi_stmt (incr_gsi);
+ set_vinfo_for_stmt (incr, new_stmt_vec_info (incr, loop_vinfo));
+
+ /* Copy the points-to information if it exists. */
+ if (DR_PTR_INFO (dr))
+ {
+ duplicate_ssa_name_ptr_info (indx_before_incr, DR_PTR_INFO (dr));
+ duplicate_ssa_name_ptr_info (indx_after_incr, DR_PTR_INFO (dr));
+ }
+ merge_alias_info (vect_ptr_init, indx_before_incr);
+ merge_alias_info (vect_ptr_init, indx_after_incr);
+ if (ptr_incr)
+ *ptr_incr = incr;
+
+ return indx_before_incr;
+ }
+ else
+ gcc_unreachable ();
+}
+
+
+/* Function bump_vector_ptr
+
+ Increment a pointer (to a vector type) by vector-size. If requested,
+ i.e. if PTR-INCR is given, then also connect the new increment stmt
+ to the existing def-use update-chain of the pointer, by modifying
+ the PTR_INCR as illustrated below:
+
+ The pointer def-use update-chain before this function:
+ DATAREF_PTR = phi (p_0, p_2)
+ ....
+ PTR_INCR: p_2 = DATAREF_PTR + step
+
+ The pointer def-use update-chain after this function:
+ DATAREF_PTR = phi (p_0, p_2)
+ ....
+ NEW_DATAREF_PTR = DATAREF_PTR + BUMP
+ ....
+ PTR_INCR: p_2 = NEW_DATAREF_PTR + step
+
+ Input:
+ DATAREF_PTR - ssa_name of a pointer (to vector type) that is being updated
+ in the loop.
+ PTR_INCR - optional. The stmt that updates the pointer in each iteration of
+ the loop. The increment amount across iterations is expected
+ to be vector_size.
+ BSI - location where the new update stmt is to be placed.
+ STMT - the original scalar memory-access stmt that is being vectorized.
+ BUMP - optional. The offset by which to bump the pointer. If not given,
+ the offset is assumed to be vector_size.
+
+ Output: Return NEW_DATAREF_PTR as illustrated above.
+
+*/
+
+tree
+bump_vector_ptr (tree dataref_ptr, gimple ptr_incr, gimple_stmt_iterator *gsi,
+ gimple stmt, tree bump)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ tree ptr_var = SSA_NAME_VAR (dataref_ptr);
+ tree update = TYPE_SIZE_UNIT (vectype);
+ gimple incr_stmt;
+ ssa_op_iter iter;
+ use_operand_p use_p;
+ tree new_dataref_ptr;
+
+ if (bump)
+ update = bump;
+
+ incr_stmt = gimple_build_assign_with_ops (POINTER_PLUS_EXPR, ptr_var,
+ dataref_ptr, update);
+ new_dataref_ptr = make_ssa_name (ptr_var, incr_stmt);
+ gimple_assign_set_lhs (incr_stmt, new_dataref_ptr);
+ vect_finish_stmt_generation (stmt, incr_stmt, gsi);
+
+ /* Copy the points-to information if it exists. */
+ if (DR_PTR_INFO (dr))
+ duplicate_ssa_name_ptr_info (new_dataref_ptr, DR_PTR_INFO (dr));
+ merge_alias_info (new_dataref_ptr, dataref_ptr);
+
+ if (!ptr_incr)
+ return new_dataref_ptr;
+
+ /* Update the vector-pointer's cross-iteration increment. */
+ FOR_EACH_SSA_USE_OPERAND (use_p, ptr_incr, iter, SSA_OP_USE)
+ {
+ tree use = USE_FROM_PTR (use_p);
+
+ if (use == dataref_ptr)
+ SET_USE (use_p, new_dataref_ptr);
+ else
+ gcc_assert (tree_int_cst_compare (use, update) == 0);
+ }
+
+ return new_dataref_ptr;
+}
+
+
+/* Function vect_create_destination_var.
+
+ Create a new temporary of type VECTYPE. */
+
+tree
+vect_create_destination_var (tree scalar_dest, tree vectype)
+{
+ tree vec_dest;
+ const char *new_name;
+ tree type;
+ enum vect_var_kind kind;
+
+ kind = vectype ? vect_simple_var : vect_scalar_var;
+ type = vectype ? vectype : TREE_TYPE (scalar_dest);
+
+ gcc_assert (TREE_CODE (scalar_dest) == SSA_NAME);
+
+ new_name = get_name (scalar_dest);
+ if (!new_name)
+ new_name = "var_";
+ vec_dest = vect_get_new_vect_var (type, kind, new_name);
+ add_referenced_var (vec_dest);
+
+ return vec_dest;
+}
+
+/* Function vect_strided_store_supported.
+
+ Returns TRUE is INTERLEAVE_HIGH and INTERLEAVE_LOW operations are supported,
+ and FALSE otherwise. */
+
+bool
+vect_strided_store_supported (tree vectype)
+{
+ optab interleave_high_optab, interleave_low_optab;
+ int mode;
+
+ mode = (int) TYPE_MODE (vectype);
+
+ /* Check that the operation is supported. */
+ interleave_high_optab = optab_for_tree_code (VEC_INTERLEAVE_HIGH_EXPR,
+ vectype, optab_default);
+ interleave_low_optab = optab_for_tree_code (VEC_INTERLEAVE_LOW_EXPR,
+ vectype, optab_default);
+ if (!interleave_high_optab || !interleave_low_optab)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "no optab for interleave.");
+ return false;
+ }
+
+ if (optab_handler (interleave_high_optab, mode)->insn_code
+ == CODE_FOR_nothing
+ || optab_handler (interleave_low_optab, mode)->insn_code
+ == CODE_FOR_nothing)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "interleave op not supported by target.");
+ return false;
+ }
+
+ return true;
+}
+
+
+/* Function vect_permute_store_chain.
+
+ Given a chain of interleaved stores in DR_CHAIN of LENGTH that must be
+ a power of 2, generate interleave_high/low stmts to reorder the data
+ correctly for the stores. Return the final references for stores in
+ RESULT_CHAIN.
+
+ E.g., LENGTH is 4 and the scalar type is short, i.e., VF is 8.
+ The input is 4 vectors each containing 8 elements. We assign a number to each
+ element, the input sequence is:
+
+ 1st vec: 0 1 2 3 4 5 6 7
+ 2nd vec: 8 9 10 11 12 13 14 15
+ 3rd vec: 16 17 18 19 20 21 22 23
+ 4th vec: 24 25 26 27 28 29 30 31
+
+ The output sequence should be:
+
+ 1st vec: 0 8 16 24 1 9 17 25
+ 2nd vec: 2 10 18 26 3 11 19 27
+ 3rd vec: 4 12 20 28 5 13 21 30
+ 4th vec: 6 14 22 30 7 15 23 31
+
+ i.e., we interleave the contents of the four vectors in their order.
+
+ We use interleave_high/low instructions to create such output. The input of
+ each interleave_high/low operation is two vectors:
+ 1st vec 2nd vec
+ 0 1 2 3 4 5 6 7
+ the even elements of the result vector are obtained left-to-right from the
+ high/low elements of the first vector. The odd elements of the result are
+ obtained left-to-right from the high/low elements of the second vector.
+ The output of interleave_high will be: 0 4 1 5
+ and of interleave_low: 2 6 3 7
+
+
+ The permutation is done in log LENGTH stages. In each stage interleave_high
+ and interleave_low stmts are created for each pair of vectors in DR_CHAIN,
+ where the first argument is taken from the first half of DR_CHAIN and the
+ second argument from it's second half.
+ In our example,
+
+ I1: interleave_high (1st vec, 3rd vec)
+ I2: interleave_low (1st vec, 3rd vec)
+ I3: interleave_high (2nd vec, 4th vec)
+ I4: interleave_low (2nd vec, 4th vec)
+
+ The output for the first stage is:
+
+ I1: 0 16 1 17 2 18 3 19
+ I2: 4 20 5 21 6 22 7 23
+ I3: 8 24 9 25 10 26 11 27
+ I4: 12 28 13 29 14 30 15 31
+
+ The output of the second stage, i.e. the final result is:
+
+ I1: 0 8 16 24 1 9 17 25
+ I2: 2 10 18 26 3 11 19 27
+ I3: 4 12 20 28 5 13 21 30
+ I4: 6 14 22 30 7 15 23 31. */
+
+bool
+vect_permute_store_chain (VEC(tree,heap) *dr_chain,
+ unsigned int length,
+ gimple stmt,
+ gimple_stmt_iterator *gsi,
+ VEC(tree,heap) **result_chain)
+{
+ tree perm_dest, vect1, vect2, high, low;
+ gimple perm_stmt;
+ tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (stmt));
+ tree scalar_dest;
+ int i;
+ unsigned int j;
+ enum tree_code high_code, low_code;
+
+ scalar_dest = gimple_assign_lhs (stmt);
+
+ /* Check that the operation is supported. */
+ if (!vect_strided_store_supported (vectype))
+ return false;
+
+ *result_chain = VEC_copy (tree, heap, dr_chain);
+
+ for (i = 0; i < exact_log2 (length); i++)
+ {
+ for (j = 0; j < length/2; j++)
+ {
+ vect1 = VEC_index (tree, dr_chain, j);
+ vect2 = VEC_index (tree, dr_chain, j+length/2);
+
+ /* Create interleaving stmt:
+ in the case of big endian:
+ high = interleave_high (vect1, vect2)
+ and in the case of little endian:
+ high = interleave_low (vect1, vect2). */
+ perm_dest = create_tmp_var (vectype, "vect_inter_high");
+ DECL_GIMPLE_REG_P (perm_dest) = 1;
+ add_referenced_var (perm_dest);
+ if (BYTES_BIG_ENDIAN)
+ {
+ high_code = VEC_INTERLEAVE_HIGH_EXPR;
+ low_code = VEC_INTERLEAVE_LOW_EXPR;
+ }
+ else
+ {
+ low_code = VEC_INTERLEAVE_HIGH_EXPR;
+ high_code = VEC_INTERLEAVE_LOW_EXPR;
+ }
+ perm_stmt = gimple_build_assign_with_ops (high_code, perm_dest,
+ vect1, vect2);
+ high = make_ssa_name (perm_dest, perm_stmt);
+ gimple_assign_set_lhs (perm_stmt, high);
+ vect_finish_stmt_generation (stmt, perm_stmt, gsi);
+ VEC_replace (tree, *result_chain, 2*j, high);
+
+ /* Create interleaving stmt:
+ in the case of big endian:
+ low = interleave_low (vect1, vect2)
+ and in the case of little endian:
+ low = interleave_high (vect1, vect2). */
+ perm_dest = create_tmp_var (vectype, "vect_inter_low");
+ DECL_GIMPLE_REG_P (perm_dest) = 1;
+ add_referenced_var (perm_dest);
+ perm_stmt = gimple_build_assign_with_ops (low_code, perm_dest,
+ vect1, vect2);
+ low = make_ssa_name (perm_dest, perm_stmt);
+ gimple_assign_set_lhs (perm_stmt, low);
+ vect_finish_stmt_generation (stmt, perm_stmt, gsi);
+ VEC_replace (tree, *result_chain, 2*j+1, low);
+ }
+ dr_chain = VEC_copy (tree, heap, *result_chain);
+ }
+ return true;
+}
+
+/* Function vect_setup_realignment
+
+ This function is called when vectorizing an unaligned load using
+ the dr_explicit_realign[_optimized] scheme.
+ This function generates the following code at the loop prolog:
+
+ p = initial_addr;
+ x msq_init = *(floor(p)); # prolog load
+ realignment_token = call target_builtin;
+ loop:
+ x msq = phi (msq_init, ---)
+
+ The stmts marked with x are generated only for the case of
+ dr_explicit_realign_optimized.
+
+ The code above sets up a new (vector) pointer, pointing to the first
+ location accessed by STMT, and a "floor-aligned" load using that pointer.
+ It also generates code to compute the "realignment-token" (if the relevant
+ target hook was defined), and creates a phi-node at the loop-header bb
+ whose arguments are the result of the prolog-load (created by this
+ function) and the result of a load that takes place in the loop (to be
+ created by the caller to this function).
+
+ For the case of dr_explicit_realign_optimized:
+ The caller to this function uses the phi-result (msq) to create the
+ realignment code inside the loop, and sets up the missing phi argument,
+ as follows:
+ loop:
+ msq = phi (msq_init, lsq)
+ lsq = *(floor(p')); # load in loop
+ result = realign_load (msq, lsq, realignment_token);
+
+ For the case of dr_explicit_realign:
+ loop:
+ msq = *(floor(p)); # load in loop
+ p' = p + (VS-1);
+ lsq = *(floor(p')); # load in loop
+ result = realign_load (msq, lsq, realignment_token);
+
+ Input:
+ STMT - (scalar) load stmt to be vectorized. This load accesses
+ a memory location that may be unaligned.
+ BSI - place where new code is to be inserted.
+ ALIGNMENT_SUPPORT_SCHEME - which of the two misalignment handling schemes
+ is used.
+
+ Output:
+ REALIGNMENT_TOKEN - the result of a call to the builtin_mask_for_load
+ target hook, if defined.
+ Return value - the result of the loop-header phi node. */
+
+tree
+vect_setup_realignment (gimple stmt, gimple_stmt_iterator *gsi,
+ tree *realignment_token,
+ enum dr_alignment_support alignment_support_scheme,
+ tree init_addr,
+ struct loop **at_loop)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ edge pe;
+ tree scalar_dest = gimple_assign_lhs (stmt);
+ tree vec_dest;
+ gimple inc;
+ tree ptr;
+ tree data_ref;
+ gimple new_stmt;
+ basic_block new_bb;
+ tree msq_init = NULL_TREE;
+ tree new_temp;
+ gimple phi_stmt;
+ tree msq = NULL_TREE;
+ gimple_seq stmts = NULL;
+ bool inv_p;
+ bool compute_in_loop = false;
+ bool nested_in_vect_loop = nested_in_vect_loop_p (loop, stmt);
+ struct loop *containing_loop = (gimple_bb (stmt))->loop_father;
+ struct loop *loop_for_initial_load;
+
+ gcc_assert (alignment_support_scheme == dr_explicit_realign
+ || alignment_support_scheme == dr_explicit_realign_optimized);
+
+ /* We need to generate three things:
+ 1. the misalignment computation
+ 2. the extra vector load (for the optimized realignment scheme).
+ 3. the phi node for the two vectors from which the realignment is
+ done (for the optimized realignment scheme).
+ */
+
+ /* 1. Determine where to generate the misalignment computation.
+
+ If INIT_ADDR is NULL_TREE, this indicates that the misalignment
+ calculation will be generated by this function, outside the loop (in the
+ preheader). Otherwise, INIT_ADDR had already been computed for us by the
+ caller, inside the loop.
+
+ Background: If the misalignment remains fixed throughout the iterations of
+ the loop, then both realignment schemes are applicable, and also the
+ misalignment computation can be done outside LOOP. This is because we are
+ vectorizing LOOP, and so the memory accesses in LOOP advance in steps that
+ are a multiple of VS (the Vector Size), and therefore the misalignment in
+ different vectorized LOOP iterations is always the same.
+ The problem arises only if the memory access is in an inner-loop nested
+ inside LOOP, which is now being vectorized using outer-loop vectorization.
+ This is the only case when the misalignment of the memory access may not
+ remain fixed throughout the iterations of the inner-loop (as explained in
+ detail in vect_supportable_dr_alignment). In this case, not only is the
+ optimized realignment scheme not applicable, but also the misalignment
+ computation (and generation of the realignment token that is passed to
+ REALIGN_LOAD) have to be done inside the loop.
+
+ In short, INIT_ADDR indicates whether we are in a COMPUTE_IN_LOOP mode
+ or not, which in turn determines if the misalignment is computed inside
+ the inner-loop, or outside LOOP. */
+
+ if (init_addr != NULL_TREE)
+ {
+ compute_in_loop = true;
+ gcc_assert (alignment_support_scheme == dr_explicit_realign);
+ }
+
+
+ /* 2. Determine where to generate the extra vector load.
+
+ For the optimized realignment scheme, instead of generating two vector
+ loads in each iteration, we generate a single extra vector load in the
+ preheader of the loop, and in each iteration reuse the result of the
+ vector load from the previous iteration. In case the memory access is in
+ an inner-loop nested inside LOOP, which is now being vectorized using
+ outer-loop vectorization, we need to determine whether this initial vector
+ load should be generated at the preheader of the inner-loop, or can be
+ generated at the preheader of LOOP. If the memory access has no evolution
+ in LOOP, it can be generated in the preheader of LOOP. Otherwise, it has
+ to be generated inside LOOP (in the preheader of the inner-loop). */
+
+ if (nested_in_vect_loop)
+ {
+ tree outerloop_step = STMT_VINFO_DR_STEP (stmt_info);
+ bool invariant_in_outerloop =
+ (tree_int_cst_compare (outerloop_step, size_zero_node) == 0);
+ loop_for_initial_load = (invariant_in_outerloop ? loop : loop->inner);
+ }
+ else
+ loop_for_initial_load = loop;
+ if (at_loop)
+ *at_loop = loop_for_initial_load;
+
+ /* 3. For the case of the optimized realignment, create the first vector
+ load at the loop preheader. */
+
+ if (alignment_support_scheme == dr_explicit_realign_optimized)
+ {
+ /* Create msq_init = *(floor(p1)) in the loop preheader */
+
+ gcc_assert (!compute_in_loop);
+ pe = loop_preheader_edge (loop_for_initial_load);
+ vec_dest = vect_create_destination_var (scalar_dest, vectype);
+ ptr = vect_create_data_ref_ptr (stmt, loop_for_initial_load, NULL_TREE,
+ &init_addr, &inc, true, &inv_p, NULL_TREE);
+ data_ref = build1 (ALIGN_INDIRECT_REF, vectype, ptr);
+ new_stmt = gimple_build_assign (vec_dest, data_ref);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_assign_set_lhs (new_stmt, new_temp);
+ mark_symbols_for_renaming (new_stmt);
+ new_bb = gsi_insert_on_edge_immediate (pe, new_stmt);
+ gcc_assert (!new_bb);
+ msq_init = gimple_assign_lhs (new_stmt);
+ }
+
+ /* 4. Create realignment token using a target builtin, if available.
+ It is done either inside the containing loop, or before LOOP (as
+ determined above). */
+
+ if (targetm.vectorize.builtin_mask_for_load)
+ {
+ tree builtin_decl;
+
+ /* Compute INIT_ADDR - the initial addressed accessed by this memref. */
+ if (compute_in_loop)
+ gcc_assert (init_addr); /* already computed by the caller. */
+ else
+ {
+ /* Generate the INIT_ADDR computation outside LOOP. */
+ init_addr = vect_create_addr_base_for_vector_ref (stmt, &stmts,
+ NULL_TREE, loop);
+ pe = loop_preheader_edge (loop);
+ new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
+ gcc_assert (!new_bb);
+ }
+
+ builtin_decl = targetm.vectorize.builtin_mask_for_load ();
+ new_stmt = gimple_build_call (builtin_decl, 1, init_addr);
+ vec_dest =
+ vect_create_destination_var (scalar_dest,
+ gimple_call_return_type (new_stmt));
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_call_set_lhs (new_stmt, new_temp);
+
+ if (compute_in_loop)
+ gsi_insert_before (gsi, new_stmt, GSI_SAME_STMT);
+ else
+ {
+ /* Generate the misalignment computation outside LOOP. */
+ pe = loop_preheader_edge (loop);
+ new_bb = gsi_insert_on_edge_immediate (pe, new_stmt);
+ gcc_assert (!new_bb);
+ }
+
+ *realignment_token = gimple_call_lhs (new_stmt);
+
+ /* The result of the CALL_EXPR to this builtin is determined from
+ the value of the parameter and no global variables are touched
+ which makes the builtin a "const" function. Requiring the
+ builtin to have the "const" attribute makes it unnecessary
+ to call mark_call_clobbered. */
+ gcc_assert (TREE_READONLY (builtin_decl));
+ }
+
+ if (alignment_support_scheme == dr_explicit_realign)
+ return msq;
+
+ gcc_assert (!compute_in_loop);
+ gcc_assert (alignment_support_scheme == dr_explicit_realign_optimized);
+
+
+ /* 5. Create msq = phi <msq_init, lsq> in loop */
+
+ pe = loop_preheader_edge (containing_loop);
+ vec_dest = vect_create_destination_var (scalar_dest, vectype);
+ msq = make_ssa_name (vec_dest, NULL);
+ phi_stmt = create_phi_node (msq, containing_loop->header);
+ SSA_NAME_DEF_STMT (msq) = phi_stmt;
+ add_phi_arg (phi_stmt, msq_init, pe);
+
+ return msq;
+}
+
+
+/* Function vect_strided_load_supported.
+
+ Returns TRUE is EXTRACT_EVEN and EXTRACT_ODD operations are supported,
+ and FALSE otherwise. */
+
+bool
+vect_strided_load_supported (tree vectype)
+{
+ optab perm_even_optab, perm_odd_optab;
+ int mode;
+
+ mode = (int) TYPE_MODE (vectype);
+
+ perm_even_optab = optab_for_tree_code (VEC_EXTRACT_EVEN_EXPR, vectype,
+ optab_default);
+ if (!perm_even_optab)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "no optab for perm_even.");
+ return false;
+ }
+
+ if (optab_handler (perm_even_optab, mode)->insn_code == CODE_FOR_nothing)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "perm_even op not supported by target.");
+ return false;
+ }
+
+ perm_odd_optab = optab_for_tree_code (VEC_EXTRACT_ODD_EXPR, vectype,
+ optab_default);
+ if (!perm_odd_optab)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "no optab for perm_odd.");
+ return false;
+ }
+
+ if (optab_handler (perm_odd_optab, mode)->insn_code == CODE_FOR_nothing)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "perm_odd op not supported by target.");
+ return false;
+ }
+ return true;
+}
+
+
+/* Function vect_permute_load_chain.
+
+ Given a chain of interleaved loads in DR_CHAIN of LENGTH that must be
+ a power of 2, generate extract_even/odd stmts to reorder the input data
+ correctly. Return the final references for loads in RESULT_CHAIN.
+
+ E.g., LENGTH is 4 and the scalar type is short, i.e., VF is 8.
+ The input is 4 vectors each containing 8 elements. We assign a number to each
+ element, the input sequence is:
+
+ 1st vec: 0 1 2 3 4 5 6 7
+ 2nd vec: 8 9 10 11 12 13 14 15
+ 3rd vec: 16 17 18 19 20 21 22 23
+ 4th vec: 24 25 26 27 28 29 30 31
+
+ The output sequence should be:
+
+ 1st vec: 0 4 8 12 16 20 24 28
+ 2nd vec: 1 5 9 13 17 21 25 29
+ 3rd vec: 2 6 10 14 18 22 26 30
+ 4th vec: 3 7 11 15 19 23 27 31
+
+ i.e., the first output vector should contain the first elements of each
+ interleaving group, etc.
+
+ We use extract_even/odd instructions to create such output. The input of each
+ extract_even/odd operation is two vectors
+ 1st vec 2nd vec
+ 0 1 2 3 4 5 6 7
+
+ and the output is the vector of extracted even/odd elements. The output of
+ extract_even will be: 0 2 4 6
+ and of extract_odd: 1 3 5 7
+
+
+ The permutation is done in log LENGTH stages. In each stage extract_even and
+ extract_odd stmts are created for each pair of vectors in DR_CHAIN in their
+ order. In our example,
+
+ E1: extract_even (1st vec, 2nd vec)
+ E2: extract_odd (1st vec, 2nd vec)
+ E3: extract_even (3rd vec, 4th vec)
+ E4: extract_odd (3rd vec, 4th vec)
+
+ The output for the first stage will be:
+
+ E1: 0 2 4 6 8 10 12 14
+ E2: 1 3 5 7 9 11 13 15
+ E3: 16 18 20 22 24 26 28 30
+ E4: 17 19 21 23 25 27 29 31
+
+ In order to proceed and create the correct sequence for the next stage (or
+ for the correct output, if the second stage is the last one, as in our
+ example), we first put the output of extract_even operation and then the
+ output of extract_odd in RESULT_CHAIN (which is then copied to DR_CHAIN).
+ The input for the second stage is:
+
+ 1st vec (E1): 0 2 4 6 8 10 12 14
+ 2nd vec (E3): 16 18 20 22 24 26 28 30
+ 3rd vec (E2): 1 3 5 7 9 11 13 15
+ 4th vec (E4): 17 19 21 23 25 27 29 31
+
+ The output of the second stage:
+
+ E1: 0 4 8 12 16 20 24 28
+ E2: 2 6 10 14 18 22 26 30
+ E3: 1 5 9 13 17 21 25 29
+ E4: 3 7 11 15 19 23 27 31
+
+ And RESULT_CHAIN after reordering:
+
+ 1st vec (E1): 0 4 8 12 16 20 24 28
+ 2nd vec (E3): 1 5 9 13 17 21 25 29
+ 3rd vec (E2): 2 6 10 14 18 22 26 30
+ 4th vec (E4): 3 7 11 15 19 23 27 31. */
+
+bool
+vect_permute_load_chain (VEC(tree,heap) *dr_chain,
+ unsigned int length,
+ gimple stmt,
+ gimple_stmt_iterator *gsi,
+ VEC(tree,heap) **result_chain)
+{
+ tree perm_dest, data_ref, first_vect, second_vect;
+ gimple perm_stmt;
+ tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (stmt));
+ int i;
+ unsigned int j;
+
+ /* Check that the operation is supported. */
+ if (!vect_strided_load_supported (vectype))
+ return false;
+
+ *result_chain = VEC_copy (tree, heap, dr_chain);
+ for (i = 0; i < exact_log2 (length); i++)
+ {
+ for (j = 0; j < length; j +=2)
+ {
+ first_vect = VEC_index (tree, dr_chain, j);
+ second_vect = VEC_index (tree, dr_chain, j+1);
+
+ /* data_ref = permute_even (first_data_ref, second_data_ref); */
+ perm_dest = create_tmp_var (vectype, "vect_perm_even");
+ DECL_GIMPLE_REG_P (perm_dest) = 1;
+ add_referenced_var (perm_dest);
+
+ perm_stmt = gimple_build_assign_with_ops (VEC_EXTRACT_EVEN_EXPR,
+ perm_dest, first_vect,
+ second_vect);
+
+ data_ref = make_ssa_name (perm_dest, perm_stmt);
+ gimple_assign_set_lhs (perm_stmt, data_ref);
+ vect_finish_stmt_generation (stmt, perm_stmt, gsi);
+ mark_symbols_for_renaming (perm_stmt);
+
+ VEC_replace (tree, *result_chain, j/2, data_ref);
+
+ /* data_ref = permute_odd (first_data_ref, second_data_ref); */
+ perm_dest = create_tmp_var (vectype, "vect_perm_odd");
+ DECL_GIMPLE_REG_P (perm_dest) = 1;
+ add_referenced_var (perm_dest);
+
+ perm_stmt = gimple_build_assign_with_ops (VEC_EXTRACT_ODD_EXPR,
+ perm_dest, first_vect,
+ second_vect);
+ data_ref = make_ssa_name (perm_dest, perm_stmt);
+ gimple_assign_set_lhs (perm_stmt, data_ref);
+ vect_finish_stmt_generation (stmt, perm_stmt, gsi);
+ mark_symbols_for_renaming (perm_stmt);
+
+ VEC_replace (tree, *result_chain, j/2+length/2, data_ref);
+ }
+ dr_chain = VEC_copy (tree, heap, *result_chain);
+ }
+ return true;
+}
+
+
+/* Function vect_transform_strided_load.
+
+ Given a chain of input interleaved data-refs (in DR_CHAIN), build statements
+ to perform their permutation and ascribe the result vectorized statements to
+ the scalar statements.
+*/
+
+bool
+vect_transform_strided_load (gimple stmt, VEC(tree,heap) *dr_chain, int size,
+ gimple_stmt_iterator *gsi)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ gimple first_stmt = DR_GROUP_FIRST_DR (stmt_info);
+ gimple next_stmt, new_stmt;
+ VEC(tree,heap) *result_chain = NULL;
+ unsigned int i, gap_count;
+ tree tmp_data_ref;
+
+ /* DR_CHAIN contains input data-refs that are a part of the interleaving.
+ RESULT_CHAIN is the output of vect_permute_load_chain, it contains permuted
+ vectors, that are ready for vector computation. */
+ result_chain = VEC_alloc (tree, heap, size);
+ /* Permute. */
+ if (!vect_permute_load_chain (dr_chain, size, stmt, gsi, &result_chain))
+ return false;
+
+ /* Put a permuted data-ref in the VECTORIZED_STMT field.
+ Since we scan the chain starting from it's first node, their order
+ corresponds the order of data-refs in RESULT_CHAIN. */
+ next_stmt = first_stmt;
+ gap_count = 1;
+ for (i = 0; VEC_iterate (tree, result_chain, i, tmp_data_ref); i++)
+ {
+ if (!next_stmt)
+ break;
+
+ /* Skip the gaps. Loads created for the gaps will be removed by dead
+ code elimination pass later. No need to check for the first stmt in
+ the group, since it always exists.
+ DR_GROUP_GAP is the number of steps in elements from the previous
+ access (if there is no gap DR_GROUP_GAP is 1). We skip loads that
+ correspond to the gaps.
+ */
+ if (next_stmt != first_stmt
+ && gap_count < DR_GROUP_GAP (vinfo_for_stmt (next_stmt)))
+ {
+ gap_count++;
+ continue;
+ }
+
+ while (next_stmt)
+ {
+ new_stmt = SSA_NAME_DEF_STMT (tmp_data_ref);
+ /* We assume that if VEC_STMT is not NULL, this is a case of multiple
+ copies, and we put the new vector statement in the first available
+ RELATED_STMT. */
+ if (!STMT_VINFO_VEC_STMT (vinfo_for_stmt (next_stmt)))
+ STMT_VINFO_VEC_STMT (vinfo_for_stmt (next_stmt)) = new_stmt;
+ else
+ {
+ if (!DR_GROUP_SAME_DR_STMT (vinfo_for_stmt (next_stmt)))
+ {
+ gimple prev_stmt =
+ STMT_VINFO_VEC_STMT (vinfo_for_stmt (next_stmt));
+ gimple rel_stmt =
+ STMT_VINFO_RELATED_STMT (vinfo_for_stmt (prev_stmt));
+ while (rel_stmt)
+ {
+ prev_stmt = rel_stmt;
+ rel_stmt =
+ STMT_VINFO_RELATED_STMT (vinfo_for_stmt (rel_stmt));
+ }
+
+ STMT_VINFO_RELATED_STMT (vinfo_for_stmt (prev_stmt)) =
+ new_stmt;
+ }
+ }
+
+ next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
+ gap_count = 1;
+ /* If NEXT_STMT accesses the same DR as the previous statement,
+ put the same TMP_DATA_REF as its vectorized statement; otherwise
+ get the next data-ref from RESULT_CHAIN. */
+ if (!next_stmt || !DR_GROUP_SAME_DR_STMT (vinfo_for_stmt (next_stmt)))
+ break;
+ }
+ }
+
+ VEC_free (tree, heap, result_chain);
+ return true;
+}
+
+/* Function vect_force_dr_alignment_p.
+
+ Returns whether the alignment of a DECL can be forced to be aligned
+ on ALIGNMENT bit boundary. */
+
+bool
+vect_can_force_dr_alignment_p (const_tree decl, unsigned int alignment)
+{
+ if (TREE_CODE (decl) != VAR_DECL)
+ return false;
+
+ if (DECL_EXTERNAL (decl))
+ return false;
+
+ if (TREE_ASM_WRITTEN (decl))
+ return false;
+
+ if (TREE_STATIC (decl))
+ return (alignment <= MAX_OFILE_ALIGNMENT);
+ else
+ return (alignment <= MAX_STACK_ALIGNMENT);
+}
+
+/* Function vect_supportable_dr_alignment
+
+ Return whether the data reference DR is supported with respect to its
+ alignment. */
+
+enum dr_alignment_support
+vect_supportable_dr_alignment (struct data_reference *dr)
+{
+ gimple stmt = DR_STMT (dr);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ enum machine_mode mode = (int) TYPE_MODE (vectype);
+ struct loop *vect_loop = LOOP_VINFO_LOOP (STMT_VINFO_LOOP_VINFO (stmt_info));
+ bool nested_in_vect_loop = nested_in_vect_loop_p (vect_loop, stmt);
+ bool invariant_in_outerloop = false;
+
+ if (aligned_access_p (dr))
+ return dr_aligned;
+
+ if (nested_in_vect_loop)
+ {
+ tree outerloop_step = STMT_VINFO_DR_STEP (stmt_info);
+ invariant_in_outerloop =
+ (tree_int_cst_compare (outerloop_step, size_zero_node) == 0);
+ }
+
+ /* Possibly unaligned access. */
+
+ /* We can choose between using the implicit realignment scheme (generating
+ a misaligned_move stmt) and the explicit realignment scheme (generating
+ aligned loads with a REALIGN_LOAD). There are two variants to the explicit
+ realignment scheme: optimized, and unoptimized.
+ We can optimize the realignment only if the step between consecutive
+ vector loads is equal to the vector size. Since the vector memory
+ accesses advance in steps of VS (Vector Size) in the vectorized loop, it
+ is guaranteed that the misalignment amount remains the same throughout the
+ execution of the vectorized loop. Therefore, we can create the
+ "realignment token" (the permutation mask that is passed to REALIGN_LOAD)
+ at the loop preheader.
+
+ However, in the case of outer-loop vectorization, when vectorizing a
+ memory access in the inner-loop nested within the LOOP that is now being
+ vectorized, while it is guaranteed that the misalignment of the
+ vectorized memory access will remain the same in different outer-loop
+ iterations, it is *not* guaranteed that is will remain the same throughout
+ the execution of the inner-loop. This is because the inner-loop advances
+ with the original scalar step (and not in steps of VS). If the inner-loop
+ step happens to be a multiple of VS, then the misalignment remains fixed
+ and we can use the optimized realignment scheme. For example:
+
+ for (i=0; i<N; i++)
+ for (j=0; j<M; j++)
+ s += a[i+j];
+
+ When vectorizing the i-loop in the above example, the step between
+ consecutive vector loads is 1, and so the misalignment does not remain
+ fixed across the execution of the inner-loop, and the realignment cannot
+ be optimized (as illustrated in the following pseudo vectorized loop):
+
+ for (i=0; i<N; i+=4)
+ for (j=0; j<M; j++){
+ vs += vp[i+j]; // misalignment of &vp[i+j] is {0,1,2,3,0,1,2,3,...}
+ // when j is {0,1,2,3,4,5,6,7,...} respectively.
+ // (assuming that we start from an aligned address).
+ }
+
+ We therefore have to use the unoptimized realignment scheme:
+
+ for (i=0; i<N; i+=4)
+ for (j=k; j<M; j+=4)
+ vs += vp[i+j]; // misalignment of &vp[i+j] is always k (assuming
+ // that the misalignment of the initial address is
+ // 0).
+
+ The loop can then be vectorized as follows:
+
+ for (k=0; k<4; k++){
+ rt = get_realignment_token (&vp[k]);
+ for (i=0; i<N; i+=4){
+ v1 = vp[i+k];
+ for (j=k; j<M; j+=4){
+ v2 = vp[i+j+VS-1];
+ va = REALIGN_LOAD <v1,v2,rt>;
+ vs += va;
+ v1 = v2;
+ }
+ }
+ } */
+
+ if (DR_IS_READ (dr))
+ {
+ if (optab_handler (vec_realign_load_optab, mode)->insn_code !=
+ CODE_FOR_nothing
+ && (!targetm.vectorize.builtin_mask_for_load
+ || targetm.vectorize.builtin_mask_for_load ()))
+ {
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ if (nested_in_vect_loop
+ && (TREE_INT_CST_LOW (DR_STEP (dr))
+ != GET_MODE_SIZE (TYPE_MODE (vectype))))
+ return dr_explicit_realign;
+ else
+ return dr_explicit_realign_optimized;
+ }
+
+ if (optab_handler (movmisalign_optab, mode)->insn_code !=
+ CODE_FOR_nothing)
+ /* Can't software pipeline the loads, but can at least do them. */
+ return dr_unaligned_supported;
+ }
+
+ /* Unsupported. */
+ return dr_unaligned_unsupported;
+}
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
new file mode 100644
index 00000000000..22d515fe29f
--- /dev/null
+++ b/gcc/tree-vect-loop-manip.c
@@ -0,0 +1,2363 @@
+/* Vectorizer Specific Loop Manipulations
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+ Foundation, Inc.
+ Contributed by Dorit Naishlos <dorit@il.ibm.com>
+ and Ira Rosen <irar@il.ibm.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 "ggc.h"
+#include "tree.h"
+#include "basic-block.h"
+#include "diagnostic.h"
+#include "tree-flow.h"
+#include "tree-dump.h"
+#include "cfgloop.h"
+#include "cfglayout.h"
+#include "expr.h"
+#include "toplev.h"
+#include "tree-scalar-evolution.h"
+#include "tree-vectorizer.h"
+#include "langhooks.h"
+
+/*************************************************************************
+ Simple Loop Peeling Utilities
+
+ Utilities to support loop peeling for vectorization purposes.
+ *************************************************************************/
+
+
+/* Renames the use *OP_P. */
+
+static void
+rename_use_op (use_operand_p op_p)
+{
+ tree new_name;
+
+ if (TREE_CODE (USE_FROM_PTR (op_p)) != SSA_NAME)
+ return;
+
+ new_name = get_current_def (USE_FROM_PTR (op_p));
+
+ /* Something defined outside of the loop. */
+ if (!new_name)
+ return;
+
+ /* An ordinary ssa name defined in the loop. */
+
+ SET_USE (op_p, new_name);
+}
+
+
+/* Renames the variables in basic block BB. */
+
+void
+rename_variables_in_bb (basic_block bb)
+{
+ gimple_stmt_iterator gsi;
+ gimple stmt;
+ use_operand_p use_p;
+ ssa_op_iter iter;
+ edge e;
+ edge_iterator ei;
+ struct loop *loop = bb->loop_father;
+
+ for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+ {
+ stmt = gsi_stmt (gsi);
+ FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES)
+ rename_use_op (use_p);
+ }
+
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ {
+ if (!flow_bb_inside_loop_p (loop, e->dest))
+ continue;
+ for (gsi = gsi_start_phis (e->dest); !gsi_end_p (gsi); gsi_next (&gsi))
+ rename_use_op (PHI_ARG_DEF_PTR_FROM_EDGE (gsi_stmt (gsi), e));
+ }
+}
+
+
+/* Renames variables in new generated LOOP. */
+
+void
+rename_variables_in_loop (struct loop *loop)
+{
+ unsigned i;
+ basic_block *bbs;
+
+ bbs = get_loop_body (loop);
+
+ for (i = 0; i < loop->num_nodes; i++)
+ rename_variables_in_bb (bbs[i]);
+
+ free (bbs);
+}
+
+
+/* Update the PHI nodes of NEW_LOOP.
+
+ NEW_LOOP is a duplicate of ORIG_LOOP.
+ AFTER indicates whether NEW_LOOP executes before or after ORIG_LOOP:
+ AFTER is true if NEW_LOOP executes after ORIG_LOOP, and false if it
+ executes before it. */
+
+static void
+slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
+ struct loop *new_loop, bool after)
+{
+ tree new_ssa_name;
+ gimple phi_new, phi_orig;
+ tree def;
+ edge orig_loop_latch = loop_latch_edge (orig_loop);
+ edge orig_entry_e = loop_preheader_edge (orig_loop);
+ edge new_loop_exit_e = single_exit (new_loop);
+ edge new_loop_entry_e = loop_preheader_edge (new_loop);
+ edge entry_arg_e = (after ? orig_loop_latch : orig_entry_e);
+ gimple_stmt_iterator gsi_new, gsi_orig;
+
+ /*
+ step 1. For each loop-header-phi:
+ Add the first phi argument for the phi in NEW_LOOP
+ (the one associated with the entry of NEW_LOOP)
+
+ step 2. For each loop-header-phi:
+ Add the second phi argument for the phi in NEW_LOOP
+ (the one associated with the latch of NEW_LOOP)
+
+ step 3. Update the phis in the successor block of NEW_LOOP.
+
+ case 1: NEW_LOOP was placed before ORIG_LOOP:
+ The successor block of NEW_LOOP is the header of ORIG_LOOP.
+ Updating the phis in the successor block can therefore be done
+ along with the scanning of the loop header phis, because the
+ header blocks of ORIG_LOOP and NEW_LOOP have exactly the same
+ phi nodes, organized in the same order.
+
+ case 2: NEW_LOOP was placed after ORIG_LOOP:
+ The successor block of NEW_LOOP is the original exit block of
+ ORIG_LOOP - the phis to be updated are the loop-closed-ssa phis.
+ We postpone updating these phis to a later stage (when
+ loop guards are added).
+ */
+
+
+ /* Scan the phis in the headers of the old and new loops
+ (they are organized in exactly the same order). */
+
+ for (gsi_new = gsi_start_phis (new_loop->header),
+ gsi_orig = gsi_start_phis (orig_loop->header);
+ !gsi_end_p (gsi_new) && !gsi_end_p (gsi_orig);
+ gsi_next (&gsi_new), gsi_next (&gsi_orig))
+ {
+ phi_new = gsi_stmt (gsi_new);
+ phi_orig = gsi_stmt (gsi_orig);
+
+ /* step 1. */
+ def = PHI_ARG_DEF_FROM_EDGE (phi_orig, entry_arg_e);
+ add_phi_arg (phi_new, def, new_loop_entry_e);
+
+ /* step 2. */
+ def = PHI_ARG_DEF_FROM_EDGE (phi_orig, orig_loop_latch);
+ if (TREE_CODE (def) != SSA_NAME)
+ continue;
+
+ new_ssa_name = get_current_def (def);
+ if (!new_ssa_name)
+ {
+ /* This only happens if there are no definitions
+ inside the loop. use the phi_result in this case. */
+ new_ssa_name = PHI_RESULT (phi_new);
+ }
+
+ /* An ordinary ssa name defined in the loop. */
+ add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop));
+
+ /* step 3 (case 1). */
+ if (!after)
+ {
+ gcc_assert (new_loop_exit_e == orig_entry_e);
+ SET_PHI_ARG_DEF (phi_orig,
+ new_loop_exit_e->dest_idx,
+ new_ssa_name);
+ }
+ }
+}
+
+
+/* Update PHI nodes for a guard of the LOOP.
+
+ Input:
+ - LOOP, GUARD_EDGE: LOOP is a loop for which we added guard code that
+ controls whether LOOP is to be executed. GUARD_EDGE is the edge that
+ originates from the guard-bb, skips LOOP and reaches the (unique) exit
+ bb of LOOP. This loop-exit-bb is an empty bb with one successor.
+ We denote this bb NEW_MERGE_BB because before the guard code was added
+ it had a single predecessor (the LOOP header), and now it became a merge
+ point of two paths - the path that ends with the LOOP exit-edge, and
+ the path that ends with GUARD_EDGE.
+ - NEW_EXIT_BB: New basic block that is added by this function between LOOP
+ and NEW_MERGE_BB. It is used to place loop-closed-ssa-form exit-phis.
+
+ ===> The CFG before the guard-code was added:
+ LOOP_header_bb:
+ loop_body
+ if (exit_loop) goto update_bb
+ else goto LOOP_header_bb
+ update_bb:
+
+ ==> The CFG after the guard-code was added:
+ guard_bb:
+ if (LOOP_guard_condition) goto new_merge_bb
+ else goto LOOP_header_bb
+ LOOP_header_bb:
+ loop_body
+ if (exit_loop_condition) goto new_merge_bb
+ else goto LOOP_header_bb
+ new_merge_bb:
+ goto update_bb
+ update_bb:
+
+ ==> The CFG after this function:
+ guard_bb:
+ if (LOOP_guard_condition) goto new_merge_bb
+ else goto LOOP_header_bb
+ LOOP_header_bb:
+ loop_body
+ if (exit_loop_condition) goto new_exit_bb
+ else goto LOOP_header_bb
+ new_exit_bb:
+ new_merge_bb:
+ goto update_bb
+ update_bb:
+
+ This function:
+ 1. creates and updates the relevant phi nodes to account for the new
+ incoming edge (GUARD_EDGE) into NEW_MERGE_BB. This involves:
+ 1.1. Create phi nodes at NEW_MERGE_BB.
+ 1.2. Update the phi nodes at the successor of NEW_MERGE_BB (denoted
+ UPDATE_BB). UPDATE_BB was the exit-bb of LOOP before NEW_MERGE_BB
+ 2. preserves loop-closed-ssa-form by creating the required phi nodes
+ at the exit of LOOP (i.e, in NEW_EXIT_BB).
+
+ There are two flavors to this function:
+
+ slpeel_update_phi_nodes_for_guard1:
+ Here the guard controls whether we enter or skip LOOP, where LOOP is a
+ prolog_loop (loop1 below), and the new phis created in NEW_MERGE_BB are
+ for variables that have phis in the loop header.
+
+ slpeel_update_phi_nodes_for_guard2:
+ Here the guard controls whether we enter or skip LOOP, where LOOP is an
+ epilog_loop (loop2 below), and the new phis created in NEW_MERGE_BB are
+ for variables that have phis in the loop exit.
+
+ I.E., the overall structure is:
+
+ loop1_preheader_bb:
+ guard1 (goto loop1/merge1_bb)
+ loop1
+ loop1_exit_bb:
+ guard2 (goto merge1_bb/merge2_bb)
+ merge1_bb
+ loop2
+ loop2_exit_bb
+ merge2_bb
+ next_bb
+
+ slpeel_update_phi_nodes_for_guard1 takes care of creating phis in
+ loop1_exit_bb and merge1_bb. These are entry phis (phis for the vars
+ that have phis in loop1->header).
+
+ slpeel_update_phi_nodes_for_guard2 takes care of creating phis in
+ loop2_exit_bb and merge2_bb. These are exit phis (phis for the vars
+ that have phis in next_bb). It also adds some of these phis to
+ loop1_exit_bb.
+
+ slpeel_update_phi_nodes_for_guard1 is always called before
+ slpeel_update_phi_nodes_for_guard2. They are both needed in order
+ to create correct data-flow and loop-closed-ssa-form.
+
+ Generally slpeel_update_phi_nodes_for_guard1 creates phis for variables
+ that change between iterations of a loop (and therefore have a phi-node
+ at the loop entry), whereas slpeel_update_phi_nodes_for_guard2 creates
+ phis for variables that are used out of the loop (and therefore have
+ loop-closed exit phis). Some variables may be both updated between
+ iterations and used after the loop. This is why in loop1_exit_bb we
+ may need both entry_phis (created by slpeel_update_phi_nodes_for_guard1)
+ and exit phis (created by slpeel_update_phi_nodes_for_guard2).
+
+ - IS_NEW_LOOP: if IS_NEW_LOOP is true, then LOOP is a newly created copy of
+ an original loop. i.e., we have:
+
+ orig_loop
+ guard_bb (goto LOOP/new_merge)
+ new_loop <-- LOOP
+ new_exit
+ new_merge
+ next_bb
+
+ If IS_NEW_LOOP is false, then LOOP is an original loop, in which case we
+ have:
+
+ new_loop
+ guard_bb (goto LOOP/new_merge)
+ orig_loop <-- LOOP
+ new_exit
+ new_merge
+ next_bb
+
+ The SSA names defined in the original loop have a current
+ reaching definition that that records the corresponding new
+ ssa-name used in the new duplicated loop copy.
+ */
+
+/* Function slpeel_update_phi_nodes_for_guard1
+
+ Input:
+ - GUARD_EDGE, LOOP, IS_NEW_LOOP, NEW_EXIT_BB - as explained above.
+ - DEFS - a bitmap of ssa names to mark new names for which we recorded
+ information.
+
+ In the context of the overall structure, we have:
+
+ loop1_preheader_bb:
+ guard1 (goto loop1/merge1_bb)
+LOOP-> loop1
+ loop1_exit_bb:
+ guard2 (goto merge1_bb/merge2_bb)
+ merge1_bb
+ loop2
+ loop2_exit_bb
+ merge2_bb
+ next_bb
+
+ For each name updated between loop iterations (i.e - for each name that has
+ an entry (loop-header) phi in LOOP) we create a new phi in:
+ 1. merge1_bb (to account for the edge from guard1)
+ 2. loop1_exit_bb (an exit-phi to keep LOOP in loop-closed form)
+*/
+
+static void
+slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop,
+ bool is_new_loop, basic_block *new_exit_bb,
+ bitmap *defs)
+{
+ gimple orig_phi, new_phi;
+ gimple update_phi, update_phi2;
+ tree guard_arg, loop_arg;
+ basic_block new_merge_bb = guard_edge->dest;
+ edge e = EDGE_SUCC (new_merge_bb, 0);
+ basic_block update_bb = e->dest;
+ basic_block orig_bb = loop->header;
+ edge new_exit_e;
+ tree current_new_name;
+ tree name;
+ gimple_stmt_iterator gsi_orig, gsi_update;
+
+ /* Create new bb between loop and new_merge_bb. */
+ *new_exit_bb = split_edge (single_exit (loop));
+
+ new_exit_e = EDGE_SUCC (*new_exit_bb, 0);
+
+ for (gsi_orig = gsi_start_phis (orig_bb),
+ gsi_update = gsi_start_phis (update_bb);
+ !gsi_end_p (gsi_orig) && !gsi_end_p (gsi_update);
+ gsi_next (&gsi_orig), gsi_next (&gsi_update))
+ {
+ orig_phi = gsi_stmt (gsi_orig);
+ update_phi = gsi_stmt (gsi_update);
+
+ /* Virtual phi; Mark it for renaming. We actually want to call
+ mar_sym_for_renaming, but since all ssa renaming datastructures
+ are going to be freed before we get to call ssa_update, we just
+ record this name for now in a bitmap, and will mark it for
+ renaming later. */
+ name = PHI_RESULT (orig_phi);
+ if (!is_gimple_reg (SSA_NAME_VAR (name)))
+ bitmap_set_bit (vect_memsyms_to_rename, DECL_UID (SSA_NAME_VAR (name)));
+
+ /** 1. Handle new-merge-point phis **/
+
+ /* 1.1. Generate new phi node in NEW_MERGE_BB: */
+ new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
+ new_merge_bb);
+
+ /* 1.2. NEW_MERGE_BB has two incoming edges: GUARD_EDGE and the exit-edge
+ of LOOP. Set the two phi args in NEW_PHI for these edges: */
+ loop_arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, EDGE_SUCC (loop->latch, 0));
+ guard_arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, loop_preheader_edge (loop));
+
+ add_phi_arg (new_phi, loop_arg, new_exit_e);
+ add_phi_arg (new_phi, guard_arg, guard_edge);
+
+ /* 1.3. Update phi in successor block. */
+ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == loop_arg
+ || PHI_ARG_DEF_FROM_EDGE (update_phi, e) == guard_arg);
+ SET_PHI_ARG_DEF (update_phi, e->dest_idx, PHI_RESULT (new_phi));
+ update_phi2 = new_phi;
+
+
+ /** 2. Handle loop-closed-ssa-form phis **/
+
+ if (!is_gimple_reg (PHI_RESULT (orig_phi)))
+ continue;
+
+ /* 2.1. Generate new phi node in NEW_EXIT_BB: */
+ new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
+ *new_exit_bb);
+
+ /* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop. */
+ add_phi_arg (new_phi, loop_arg, single_exit (loop));
+
+ /* 2.3. Update phi in successor of NEW_EXIT_BB: */
+ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, new_exit_e) == loop_arg);
+ SET_PHI_ARG_DEF (update_phi2, new_exit_e->dest_idx, PHI_RESULT (new_phi));
+
+ /* 2.4. Record the newly created name with set_current_def.
+ We want to find a name such that
+ name = get_current_def (orig_loop_name)
+ and to set its current definition as follows:
+ set_current_def (name, new_phi_name)
+
+ If LOOP is a new loop then loop_arg is already the name we're
+ looking for. If LOOP is the original loop, then loop_arg is
+ the orig_loop_name and the relevant name is recorded in its
+ current reaching definition. */
+ if (is_new_loop)
+ current_new_name = loop_arg;
+ else
+ {
+ current_new_name = get_current_def (loop_arg);
+ /* current_def is not available only if the variable does not
+ change inside the loop, in which case we also don't care
+ about recording a current_def for it because we won't be
+ trying to create loop-exit-phis for it. */
+ if (!current_new_name)
+ continue;
+ }
+ gcc_assert (get_current_def (current_new_name) == NULL_TREE);
+
+ set_current_def (current_new_name, PHI_RESULT (new_phi));
+ bitmap_set_bit (*defs, SSA_NAME_VERSION (current_new_name));
+ }
+}
+
+
+/* Function slpeel_update_phi_nodes_for_guard2
+
+ Input:
+ - GUARD_EDGE, LOOP, IS_NEW_LOOP, NEW_EXIT_BB - as explained above.
+
+ In the context of the overall structure, we have:
+
+ loop1_preheader_bb:
+ guard1 (goto loop1/merge1_bb)
+ loop1
+ loop1_exit_bb:
+ guard2 (goto merge1_bb/merge2_bb)
+ merge1_bb
+LOOP-> loop2
+ loop2_exit_bb
+ merge2_bb
+ next_bb
+
+ For each name used out side the loop (i.e - for each name that has an exit
+ phi in next_bb) we create a new phi in:
+ 1. merge2_bb (to account for the edge from guard_bb)
+ 2. loop2_exit_bb (an exit-phi to keep LOOP in loop-closed form)
+ 3. guard2 bb (an exit phi to keep the preceding loop in loop-closed form),
+ if needed (if it wasn't handled by slpeel_update_phis_nodes_for_phi1).
+*/
+
+static void
+slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop,
+ bool is_new_loop, basic_block *new_exit_bb)
+{
+ gimple orig_phi, new_phi;
+ gimple update_phi, update_phi2;
+ tree guard_arg, loop_arg;
+ basic_block new_merge_bb = guard_edge->dest;
+ edge e = EDGE_SUCC (new_merge_bb, 0);
+ basic_block update_bb = e->dest;
+ edge new_exit_e;
+ tree orig_def, orig_def_new_name;
+ tree new_name, new_name2;
+ tree arg;
+ gimple_stmt_iterator gsi;
+
+ /* Create new bb between loop and new_merge_bb. */
+ *new_exit_bb = split_edge (single_exit (loop));
+
+ new_exit_e = EDGE_SUCC (*new_exit_bb, 0);
+
+ for (gsi = gsi_start_phis (update_bb); !gsi_end_p (gsi); gsi_next (&gsi))
+ {
+ update_phi = gsi_stmt (gsi);
+ orig_phi = update_phi;
+ orig_def = PHI_ARG_DEF_FROM_EDGE (orig_phi, e);
+ /* This loop-closed-phi actually doesn't represent a use
+ out of the loop - the phi arg is a constant. */
+ if (TREE_CODE (orig_def) != SSA_NAME)
+ continue;
+ orig_def_new_name = get_current_def (orig_def);
+ arg = NULL_TREE;
+
+ /** 1. Handle new-merge-point phis **/
+
+ /* 1.1. Generate new phi node in NEW_MERGE_BB: */
+ new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
+ new_merge_bb);
+
+ /* 1.2. NEW_MERGE_BB has two incoming edges: GUARD_EDGE and the exit-edge
+ of LOOP. Set the two PHI args in NEW_PHI for these edges: */
+ new_name = orig_def;
+ new_name2 = NULL_TREE;
+ if (orig_def_new_name)
+ {
+ new_name = orig_def_new_name;
+ /* Some variables have both loop-entry-phis and loop-exit-phis.
+ Such variables were given yet newer names by phis placed in
+ guard_bb by slpeel_update_phi_nodes_for_guard1. I.e:
+ new_name2 = get_current_def (get_current_def (orig_name)). */
+ new_name2 = get_current_def (new_name);
+ }
+
+ if (is_new_loop)
+ {
+ guard_arg = orig_def;
+ loop_arg = new_name;
+ }
+ else
+ {
+ guard_arg = new_name;
+ loop_arg = orig_def;
+ }
+ if (new_name2)
+ guard_arg = new_name2;
+
+ add_phi_arg (new_phi, loop_arg, new_exit_e);
+ add_phi_arg (new_phi, guard_arg, guard_edge);
+
+ /* 1.3. Update phi in successor block. */
+ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == orig_def);
+ SET_PHI_ARG_DEF (update_phi, e->dest_idx, PHI_RESULT (new_phi));
+ update_phi2 = new_phi;
+
+
+ /** 2. Handle loop-closed-ssa-form phis **/
+
+ /* 2.1. Generate new phi node in NEW_EXIT_BB: */
+ new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
+ *new_exit_bb);
+
+ /* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop. */
+ add_phi_arg (new_phi, loop_arg, single_exit (loop));
+
+ /* 2.3. Update phi in successor of NEW_EXIT_BB: */
+ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, new_exit_e) == loop_arg);
+ SET_PHI_ARG_DEF (update_phi2, new_exit_e->dest_idx, PHI_RESULT (new_phi));
+
+
+ /** 3. Handle loop-closed-ssa-form phis for first loop **/
+
+ /* 3.1. Find the relevant names that need an exit-phi in
+ GUARD_BB, i.e. names for which
+ slpeel_update_phi_nodes_for_guard1 had not already created a
+ phi node. This is the case for names that are used outside
+ the loop (and therefore need an exit phi) but are not updated
+ across loop iterations (and therefore don't have a
+ loop-header-phi).
+
+ slpeel_update_phi_nodes_for_guard1 is responsible for
+ creating loop-exit phis in GUARD_BB for names that have a
+ loop-header-phi. When such a phi is created we also record
+ the new name in its current definition. If this new name
+ exists, then guard_arg was set to this new name (see 1.2
+ above). Therefore, if guard_arg is not this new name, this
+ is an indication that an exit-phi in GUARD_BB was not yet
+ created, so we take care of it here. */
+ if (guard_arg == new_name2)
+ continue;
+ arg = guard_arg;
+
+ /* 3.2. Generate new phi node in GUARD_BB: */
+ new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
+ guard_edge->src);
+
+ /* 3.3. GUARD_BB has one incoming edge: */
+ gcc_assert (EDGE_COUNT (guard_edge->src->preds) == 1);
+ add_phi_arg (new_phi, arg, EDGE_PRED (guard_edge->src, 0));
+
+ /* 3.4. Update phi in successor of GUARD_BB: */
+ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, guard_edge)
+ == guard_arg);
+ SET_PHI_ARG_DEF (update_phi2, guard_edge->dest_idx, PHI_RESULT (new_phi));
+ }
+}
+
+
+/* Make the LOOP iterate NITERS times. This is done by adding a new IV
+ that starts at zero, increases by one and its limit is NITERS.
+
+ Assumption: the exit-condition of LOOP is the last stmt in the loop. */
+
+void
+slpeel_make_loop_iterate_ntimes (struct loop *loop, tree niters)
+{
+ tree indx_before_incr, indx_after_incr;
+ gimple cond_stmt;
+ gimple orig_cond;
+ edge exit_edge = single_exit (loop);
+ gimple_stmt_iterator loop_cond_gsi;
+ gimple_stmt_iterator incr_gsi;
+ bool insert_after;
+ tree init = build_int_cst (TREE_TYPE (niters), 0);
+ tree step = build_int_cst (TREE_TYPE (niters), 1);
+ LOC loop_loc;
+ enum tree_code code;
+
+ orig_cond = get_loop_exit_condition (loop);
+ gcc_assert (orig_cond);
+ loop_cond_gsi = gsi_for_stmt (orig_cond);
+
+ standard_iv_increment_position (loop, &incr_gsi, &insert_after);
+ create_iv (init, step, NULL_TREE, loop,
+ &incr_gsi, insert_after, &indx_before_incr, &indx_after_incr);
+
+ indx_after_incr = force_gimple_operand_gsi (&loop_cond_gsi, indx_after_incr,
+ true, NULL_TREE, true,
+ GSI_SAME_STMT);
+ niters = force_gimple_operand_gsi (&loop_cond_gsi, niters, true, NULL_TREE,
+ true, GSI_SAME_STMT);
+
+ code = (exit_edge->flags & EDGE_TRUE_VALUE) ? GE_EXPR : LT_EXPR;
+ cond_stmt = gimple_build_cond (code, indx_after_incr, niters, NULL_TREE,
+ NULL_TREE);
+
+ gsi_insert_before (&loop_cond_gsi, cond_stmt, GSI_SAME_STMT);
+
+ /* Remove old loop exit test: */
+ gsi_remove (&loop_cond_gsi, true);
+
+ loop_loc = find_loop_location (loop);
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ if (loop_loc != UNKNOWN_LOC)
+ fprintf (dump_file, "\nloop at %s:%d: ",
+ LOC_FILE (loop_loc), LOC_LINE (loop_loc));
+ print_gimple_stmt (dump_file, cond_stmt, 0, TDF_SLIM);
+ }
+
+ loop->nb_iterations = niters;
+}
+
+
+/* Given LOOP this function generates a new copy of it and puts it
+ on E which is either the entry or exit of LOOP. */
+
+struct loop *
+slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *loop, edge e)
+{
+ struct loop *new_loop;
+ basic_block *new_bbs, *bbs;
+ bool at_exit;
+ bool was_imm_dom;
+ basic_block exit_dest;
+ gimple phi;
+ tree phi_arg;
+ edge exit, new_exit;
+ gimple_stmt_iterator gsi;
+
+ at_exit = (e == single_exit (loop));
+ if (!at_exit && e != loop_preheader_edge (loop))
+ return NULL;
+
+ bbs = get_loop_body (loop);
+
+ /* Check whether duplication is possible. */
+ if (!can_copy_bbs_p (bbs, loop->num_nodes))
+ {
+ free (bbs);
+ return NULL;
+ }
+
+ /* Generate new loop structure. */
+ new_loop = duplicate_loop (loop, loop_outer (loop));
+ if (!new_loop)
+ {
+ free (bbs);
+ return NULL;
+ }
+
+ exit_dest = single_exit (loop)->dest;
+ was_imm_dom = (get_immediate_dominator (CDI_DOMINATORS,
+ exit_dest) == loop->header ?
+ true : false);
+
+ new_bbs = XNEWVEC (basic_block, loop->num_nodes);
+
+ exit = single_exit (loop);
+ copy_bbs (bbs, loop->num_nodes, new_bbs,
+ &exit, 1, &new_exit, NULL,
+ e->src);
+
+ /* Duplicating phi args at exit bbs as coming
+ also from exit of duplicated loop. */
+ for (gsi = gsi_start_phis (exit_dest); !gsi_end_p (gsi); gsi_next (&gsi))
+ {
+ phi = gsi_stmt (gsi);
+ phi_arg = PHI_ARG_DEF_FROM_EDGE (phi, single_exit (loop));
+ if (phi_arg)
+ {
+ edge new_loop_exit_edge;
+
+ if (EDGE_SUCC (new_loop->header, 0)->dest == new_loop->latch)
+ new_loop_exit_edge = EDGE_SUCC (new_loop->header, 1);
+ else
+ new_loop_exit_edge = EDGE_SUCC (new_loop->header, 0);
+
+ add_phi_arg (phi, phi_arg, new_loop_exit_edge);
+ }
+ }
+
+ if (at_exit) /* Add the loop copy at exit. */
+ {
+ redirect_edge_and_branch_force (e, new_loop->header);
+ PENDING_STMT (e) = NULL;
+ set_immediate_dominator (CDI_DOMINATORS, new_loop->header, e->src);
+ if (was_imm_dom)
+ set_immediate_dominator (CDI_DOMINATORS, exit_dest, new_loop->header);
+ }
+ else /* Add the copy at entry. */
+ {
+ edge new_exit_e;
+ edge entry_e = loop_preheader_edge (loop);
+ basic_block preheader = entry_e->src;
+
+ if (!flow_bb_inside_loop_p (new_loop,
+ EDGE_SUCC (new_loop->header, 0)->dest))
+ new_exit_e = EDGE_SUCC (new_loop->header, 0);
+ else
+ new_exit_e = EDGE_SUCC (new_loop->header, 1);
+
+ redirect_edge_and_branch_force (new_exit_e, loop->header);
+ PENDING_STMT (new_exit_e) = NULL;
+ set_immediate_dominator (CDI_DOMINATORS, loop->header,
+ new_exit_e->src);
+
+ /* We have to add phi args to the loop->header here as coming
+ from new_exit_e edge. */
+ for (gsi = gsi_start_phis (loop->header);
+ !gsi_end_p (gsi);
+ gsi_next (&gsi))
+ {
+ phi = gsi_stmt (gsi);
+ phi_arg = PHI_ARG_DEF_FROM_EDGE (phi, entry_e);
+ if (phi_arg)
+ add_phi_arg (phi, phi_arg, new_exit_e);
+ }
+
+ redirect_edge_and_branch_force (entry_e, new_loop->header);
+ PENDING_STMT (entry_e) = NULL;
+ set_immediate_dominator (CDI_DOMINATORS, new_loop->header, preheader);
+ }
+
+ free (new_bbs);
+ free (bbs);
+
+ return new_loop;
+}
+
+
+/* Given the condition statement COND, put it as the last statement
+ of GUARD_BB; EXIT_BB is the basic block to skip the loop;
+ Assumes that this is the single exit of the guarded loop.
+ Returns the skip edge. */
+
+static edge
+slpeel_add_loop_guard (basic_block guard_bb, tree cond, basic_block exit_bb,
+ basic_block dom_bb)
+{
+ gimple_stmt_iterator gsi;
+ edge new_e, enter_e;
+ gimple cond_stmt;
+ gimple_seq gimplify_stmt_list = NULL;
+
+ enter_e = EDGE_SUCC (guard_bb, 0);
+ enter_e->flags &= ~EDGE_FALLTHRU;
+ enter_e->flags |= EDGE_FALSE_VALUE;
+ gsi = gsi_last_bb (guard_bb);
+
+ cond = force_gimple_operand (cond, &gimplify_stmt_list, true, NULL_TREE);
+ cond_stmt = gimple_build_cond (NE_EXPR,
+ cond, build_int_cst (TREE_TYPE (cond), 0),
+ NULL_TREE, NULL_TREE);
+ if (gimplify_stmt_list)
+ gsi_insert_seq_after (&gsi, gimplify_stmt_list, GSI_NEW_STMT);
+
+ gsi = gsi_last_bb (guard_bb);
+ gsi_insert_after (&gsi, cond_stmt, GSI_NEW_STMT);
+
+ /* Add new edge to connect guard block to the merge/loop-exit block. */
+ new_e = make_edge (guard_bb, exit_bb, EDGE_TRUE_VALUE);
+ set_immediate_dominator (CDI_DOMINATORS, exit_bb, dom_bb);
+ return new_e;
+}
+
+
+/* This function verifies that the following restrictions apply to LOOP:
+ (1) it is innermost
+ (2) it consists of exactly 2 basic blocks - header, and an empty latch.
+ (3) it is single entry, single exit
+ (4) its exit condition is the last stmt in the header
+ (5) E is the entry/exit edge of LOOP.
+ */
+
+bool
+slpeel_can_duplicate_loop_p (const struct loop *loop, const_edge e)
+{
+ edge exit_e = single_exit (loop);
+ edge entry_e = loop_preheader_edge (loop);
+ gimple orig_cond = get_loop_exit_condition (loop);
+ gimple_stmt_iterator loop_exit_gsi = gsi_last_bb (exit_e->src);
+
+ if (need_ssa_update_p ())
+ return false;
+
+ if (loop->inner
+ /* All loops have an outer scope; the only case loop->outer is NULL is for
+ the function itself. */
+ || !loop_outer (loop)
+ || loop->num_nodes != 2
+ || !empty_block_p (loop->latch)
+ || !single_exit (loop)
+ /* Verify that new loop exit condition can be trivially modified. */
+ || (!orig_cond || orig_cond != gsi_stmt (loop_exit_gsi))
+ || (e != exit_e && e != entry_e))
+ return false;
+
+ return true;
+}
+
+#ifdef ENABLE_CHECKING
+static void
+slpeel_verify_cfg_after_peeling (struct loop *first_loop,
+ struct loop *second_loop)
+{
+ basic_block loop1_exit_bb = single_exit (first_loop)->dest;
+ basic_block loop2_entry_bb = loop_preheader_edge (second_loop)->src;
+ basic_block loop1_entry_bb = loop_preheader_edge (first_loop)->src;
+
+ /* A guard that controls whether the second_loop is to be executed or skipped
+ is placed in first_loop->exit. first_loop->exit therefore has two
+ successors - one is the preheader of second_loop, and the other is a bb
+ after second_loop.
+ */
+ gcc_assert (EDGE_COUNT (loop1_exit_bb->succs) == 2);
+
+ /* 1. Verify that one of the successors of first_loop->exit is the preheader
+ of second_loop. */
+
+ /* The preheader of new_loop is expected to have two predecessors:
+ first_loop->exit and the block that precedes first_loop. */
+
+ gcc_assert (EDGE_COUNT (loop2_entry_bb->preds) == 2
+ && ((EDGE_PRED (loop2_entry_bb, 0)->src == loop1_exit_bb
+ && EDGE_PRED (loop2_entry_bb, 1)->src == loop1_entry_bb)
+ || (EDGE_PRED (loop2_entry_bb, 1)->src == loop1_exit_bb
+ && EDGE_PRED (loop2_entry_bb, 0)->src == loop1_entry_bb)));
+
+ /* Verify that the other successor of first_loop->exit is after the
+ second_loop. */
+ /* TODO */
+}
+#endif
+
+/* If the run time cost model check determines that vectorization is
+ not profitable and hence scalar loop should be generated then set
+ FIRST_NITERS to prologue peeled iterations. This will allow all the
+ iterations to be executed in the prologue peeled scalar loop. */
+
+static void
+set_prologue_iterations (basic_block bb_before_first_loop,
+ tree first_niters,
+ struct loop *loop,
+ unsigned int th)
+{
+ edge e;
+ basic_block cond_bb, then_bb;
+ tree var, prologue_after_cost_adjust_name;
+ gimple_stmt_iterator gsi;
+ gimple newphi;
+ edge e_true, e_false, e_fallthru;
+ gimple cond_stmt;
+ gimple_seq gimplify_stmt_list = NULL, stmts = NULL;
+ tree cost_pre_condition = NULL_TREE;
+ tree scalar_loop_iters =
+ unshare_expr (LOOP_VINFO_NITERS_UNCHANGED (loop_vec_info_for_loop (loop)));
+
+ e = single_pred_edge (bb_before_first_loop);
+ cond_bb = split_edge(e);
+
+ e = single_pred_edge (bb_before_first_loop);
+ then_bb = split_edge(e);
+ set_immediate_dominator (CDI_DOMINATORS, then_bb, cond_bb);
+
+ e_false = make_single_succ_edge (cond_bb, bb_before_first_loop,
+ EDGE_FALSE_VALUE);
+ set_immediate_dominator (CDI_DOMINATORS, bb_before_first_loop, cond_bb);
+
+ e_true = EDGE_PRED (then_bb, 0);
+ e_true->flags &= ~EDGE_FALLTHRU;
+ e_true->flags |= EDGE_TRUE_VALUE;
+
+ e_fallthru = EDGE_SUCC (then_bb, 0);
+
+ cost_pre_condition =
+ fold_build2 (LE_EXPR, boolean_type_node, scalar_loop_iters,
+ build_int_cst (TREE_TYPE (scalar_loop_iters), th));
+ cost_pre_condition =
+ force_gimple_operand (cost_pre_condition, &gimplify_stmt_list,
+ true, NULL_TREE);
+ cond_stmt = gimple_build_cond (NE_EXPR, cost_pre_condition,
+ build_int_cst (TREE_TYPE (cost_pre_condition),
+ 0), NULL_TREE, NULL_TREE);
+
+ gsi = gsi_last_bb (cond_bb);
+ if (gimplify_stmt_list)
+ gsi_insert_seq_after (&gsi, gimplify_stmt_list, GSI_NEW_STMT);
+
+ gsi = gsi_last_bb (cond_bb);
+ gsi_insert_after (&gsi, cond_stmt, GSI_NEW_STMT);
+
+ var = create_tmp_var (TREE_TYPE (scalar_loop_iters),
+ "prologue_after_cost_adjust");
+ add_referenced_var (var);
+ prologue_after_cost_adjust_name =
+ force_gimple_operand (scalar_loop_iters, &stmts, false, var);
+
+ gsi = gsi_last_bb (then_bb);
+ if (stmts)
+ gsi_insert_seq_after (&gsi, stmts, GSI_NEW_STMT);
+
+ newphi = create_phi_node (var, bb_before_first_loop);
+ add_phi_arg (newphi, prologue_after_cost_adjust_name, e_fallthru);
+ add_phi_arg (newphi, first_niters, e_false);
+
+ first_niters = PHI_RESULT (newphi);
+}
+
+
+/* Function slpeel_tree_peel_loop_to_edge.
+
+ Peel the first (last) iterations of LOOP into a new prolog (epilog) loop
+ that is placed on the entry (exit) edge E of LOOP. After this transformation
+ we have two loops one after the other - first-loop iterates FIRST_NITERS
+ times, and second-loop iterates the remainder NITERS - FIRST_NITERS times.
+ If the cost model indicates that it is profitable to emit a scalar
+ loop instead of the vector one, then the prolog (epilog) loop will iterate
+ for the entire unchanged scalar iterations of the loop.
+
+ Input:
+ - LOOP: the loop to be peeled.
+ - E: the exit or entry edge of LOOP.
+ If it is the entry edge, we peel the first iterations of LOOP. In this
+ case first-loop is LOOP, and second-loop is the newly created loop.
+ If it is the exit edge, we peel the last iterations of LOOP. In this
+ case, first-loop is the newly created loop, and second-loop is LOOP.
+ - NITERS: the number of iterations that LOOP iterates.
+ - FIRST_NITERS: the number of iterations that the first-loop should iterate.
+ - UPDATE_FIRST_LOOP_COUNT: specified whether this function is responsible
+ for updating the loop bound of the first-loop to FIRST_NITERS. If it
+ is false, the caller of this function may want to take care of this
+ (this can be useful if we don't want new stmts added to first-loop).
+ - TH: cost model profitability threshold of iterations for vectorization.
+ - CHECK_PROFITABILITY: specify whether cost model check has not occurred
+ during versioning and hence needs to occur during
+ prologue generation or whether cost model check
+ has not occurred during prologue generation and hence
+ needs to occur during epilogue generation.
+
+
+ Output:
+ The function returns a pointer to the new loop-copy, or NULL if it failed
+ to perform the transformation.
+
+ The function generates two if-then-else guards: one before the first loop,
+ and the other before the second loop:
+ The first guard is:
+ if (FIRST_NITERS == 0) then skip the first loop,
+ and go directly to the second loop.
+ The second guard is:
+ if (FIRST_NITERS == NITERS) then skip the second loop.
+
+ FORNOW only simple loops are supported (see slpeel_can_duplicate_loop_p).
+ FORNOW the resulting code will not be in loop-closed-ssa form.
+*/
+
+static struct loop*
+slpeel_tree_peel_loop_to_edge (struct loop *loop,
+ edge e, tree first_niters,
+ tree niters, bool update_first_loop_count,
+ unsigned int th, bool check_profitability)
+{
+ struct loop *new_loop = NULL, *first_loop, *second_loop;
+ edge skip_e;
+ tree pre_condition = NULL_TREE;
+ bitmap definitions;
+ basic_block bb_before_second_loop, bb_after_second_loop;
+ basic_block bb_before_first_loop;
+ basic_block bb_between_loops;
+ basic_block new_exit_bb;
+ edge exit_e = single_exit (loop);
+ LOC loop_loc;
+ tree cost_pre_condition = NULL_TREE;
+
+ if (!slpeel_can_duplicate_loop_p (loop, e))
+ return NULL;
+
+ /* We have to initialize cfg_hooks. Then, when calling
+ cfg_hooks->split_edge, the function tree_split_edge
+ is actually called and, when calling cfg_hooks->duplicate_block,
+ the function tree_duplicate_bb is called. */
+ gimple_register_cfg_hooks ();
+
+
+ /* 1. Generate a copy of LOOP and put it on E (E is the entry/exit of LOOP).
+ Resulting CFG would be:
+
+ first_loop:
+ do {
+ } while ...
+
+ second_loop:
+ do {
+ } while ...
+
+ orig_exit_bb:
+ */
+
+ if (!(new_loop = slpeel_tree_duplicate_loop_to_edge_cfg (loop, e)))
+ {
+ loop_loc = find_loop_location (loop);
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ if (loop_loc != UNKNOWN_LOC)
+ fprintf (dump_file, "\n%s:%d: note: ",
+ LOC_FILE (loop_loc), LOC_LINE (loop_loc));
+ fprintf (dump_file, "tree_duplicate_loop_to_edge_cfg failed.\n");
+ }
+ return NULL;
+ }
+
+ if (e == exit_e)
+ {
+ /* NEW_LOOP was placed after LOOP. */
+ first_loop = loop;
+ second_loop = new_loop;
+ }
+ else
+ {
+ /* NEW_LOOP was placed before LOOP. */
+ first_loop = new_loop;
+ second_loop = loop;
+ }
+
+ definitions = ssa_names_to_replace ();
+ slpeel_update_phis_for_duplicate_loop (loop, new_loop, e == exit_e);
+ rename_variables_in_loop (new_loop);
+
+
+ /* 2. Add the guard code in one of the following ways:
+
+ 2.a Add the guard that controls whether the first loop is executed.
+ This occurs when this function is invoked for prologue or epilogue
+ generation and when the cost model check can be done at compile time.
+
+ Resulting CFG would be:
+
+ bb_before_first_loop:
+ if (FIRST_NITERS == 0) GOTO bb_before_second_loop
+ GOTO first-loop
+
+ first_loop:
+ do {
+ } while ...
+
+ bb_before_second_loop:
+
+ second_loop:
+ do {
+ } while ...
+
+ orig_exit_bb:
+
+ 2.b Add the cost model check that allows the prologue
+ to iterate for the entire unchanged scalar
+ iterations of the loop in the event that the cost
+ model indicates that the scalar loop is more
+ profitable than the vector one. This occurs when
+ this function is invoked for prologue generation
+ and the cost model check needs to be done at run
+ time.
+
+ Resulting CFG after prologue peeling would be:
+
+ if (scalar_loop_iterations <= th)
+ FIRST_NITERS = scalar_loop_iterations
+
+ bb_before_first_loop:
+ if (FIRST_NITERS == 0) GOTO bb_before_second_loop
+ GOTO first-loop
+
+ first_loop:
+ do {
+ } while ...
+
+ bb_before_second_loop:
+
+ second_loop:
+ do {
+ } while ...
+
+ orig_exit_bb:
+
+ 2.c Add the cost model check that allows the epilogue
+ to iterate for the entire unchanged scalar
+ iterations of the loop in the event that the cost
+ model indicates that the scalar loop is more
+ profitable than the vector one. This occurs when
+ this function is invoked for epilogue generation
+ and the cost model check needs to be done at run
+ time.
+
+ Resulting CFG after prologue peeling would be:
+
+ bb_before_first_loop:
+ if ((scalar_loop_iterations <= th)
+ ||
+ FIRST_NITERS == 0) GOTO bb_before_second_loop
+ GOTO first-loop
+
+ first_loop:
+ do {
+ } while ...
+
+ bb_before_second_loop:
+
+ second_loop:
+ do {
+ } while ...
+
+ orig_exit_bb:
+ */
+
+ bb_before_first_loop = split_edge (loop_preheader_edge (first_loop));
+ bb_before_second_loop = split_edge (single_exit (first_loop));
+
+ /* Epilogue peeling. */
+ if (!update_first_loop_count)
+ {
+ pre_condition =
+ fold_build2 (LE_EXPR, boolean_type_node, first_niters,
+ build_int_cst (TREE_TYPE (first_niters), 0));
+ if (check_profitability)
+ {
+ tree scalar_loop_iters
+ = unshare_expr (LOOP_VINFO_NITERS_UNCHANGED
+ (loop_vec_info_for_loop (loop)));
+ cost_pre_condition =
+ fold_build2 (LE_EXPR, boolean_type_node, scalar_loop_iters,
+ build_int_cst (TREE_TYPE (scalar_loop_iters), th));
+
+ pre_condition = fold_build2 (TRUTH_OR_EXPR, boolean_type_node,
+ cost_pre_condition, pre_condition);
+ }
+ }
+
+ /* Prologue peeling. */
+ else
+ {
+ if (check_profitability)
+ set_prologue_iterations (bb_before_first_loop, first_niters,
+ loop, th);
+
+ pre_condition =
+ fold_build2 (LE_EXPR, boolean_type_node, first_niters,
+ build_int_cst (TREE_TYPE (first_niters), 0));
+ }
+
+ skip_e = slpeel_add_loop_guard (bb_before_first_loop, pre_condition,
+ bb_before_second_loop, bb_before_first_loop);
+ slpeel_update_phi_nodes_for_guard1 (skip_e, first_loop,
+ first_loop == new_loop,
+ &new_exit_bb, &definitions);
+
+
+ /* 3. Add the guard that controls whether the second loop is executed.
+ Resulting CFG would be:
+
+ bb_before_first_loop:
+ if (FIRST_NITERS == 0) GOTO bb_before_second_loop (skip first loop)
+ GOTO first-loop
+
+ first_loop:
+ do {
+ } while ...
+
+ bb_between_loops:
+ if (FIRST_NITERS == NITERS) GOTO bb_after_second_loop (skip second loop)
+ GOTO bb_before_second_loop
+
+ bb_before_second_loop:
+
+ second_loop:
+ do {
+ } while ...
+
+ bb_after_second_loop:
+
+ orig_exit_bb:
+ */
+
+ bb_between_loops = new_exit_bb;
+ bb_after_second_loop = split_edge (single_exit (second_loop));
+
+ pre_condition =
+ fold_build2 (EQ_EXPR, boolean_type_node, first_niters, niters);
+ skip_e = slpeel_add_loop_guard (bb_between_loops, pre_condition,
+ bb_after_second_loop, bb_before_first_loop);
+ slpeel_update_phi_nodes_for_guard2 (skip_e, second_loop,
+ second_loop == new_loop, &new_exit_bb);
+
+ /* 4. Make first-loop iterate FIRST_NITERS times, if requested.
+ */
+ if (update_first_loop_count)
+ slpeel_make_loop_iterate_ntimes (first_loop, first_niters);
+
+ BITMAP_FREE (definitions);
+ delete_update_ssa ();
+
+ return new_loop;
+}
+
+/* Function vect_get_loop_location.
+
+ Extract the location of the loop in the source code.
+ If the loop is not well formed for vectorization, an estimated
+ location is calculated.
+ Return the loop location if succeed and NULL if not. */
+
+LOC
+find_loop_location (struct loop *loop)
+{
+ gimple stmt = NULL;
+ basic_block bb;
+ gimple_stmt_iterator si;
+
+ if (!loop)
+ return UNKNOWN_LOC;
+
+ stmt = get_loop_exit_condition (loop);
+
+ if (stmt && gimple_location (stmt) != UNKNOWN_LOC)
+ return gimple_location (stmt);
+
+ /* If we got here the loop is probably not "well formed",
+ try to estimate the loop location */
+
+ if (!loop->header)
+ return UNKNOWN_LOC;
+
+ bb = loop->header;
+
+ for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ stmt = gsi_stmt (si);
+ if (gimple_location (stmt) != UNKNOWN_LOC)
+ return gimple_location (stmt);
+ }
+
+ return UNKNOWN_LOC;
+}
+
+
+/* This function builds ni_name = number of iterations loop executes
+ on the loop preheader. */
+
+static tree
+vect_build_loop_niters (loop_vec_info loop_vinfo)
+{
+ tree ni_name, var;
+ gimple_seq stmts = NULL;
+ edge pe;
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ tree ni = unshare_expr (LOOP_VINFO_NITERS (loop_vinfo));
+
+ var = create_tmp_var (TREE_TYPE (ni), "niters");
+ add_referenced_var (var);
+ ni_name = force_gimple_operand (ni, &stmts, false, var);
+
+ pe = loop_preheader_edge (loop);
+ if (stmts)
+ {
+ basic_block new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
+ gcc_assert (!new_bb);
+ }
+
+ return ni_name;
+}
+
+
+/* This function generates the following statements:
+
+ ni_name = number of iterations loop executes
+ ratio = ni_name / vf
+ ratio_mult_vf_name = ratio * vf
+
+ and places them at the loop preheader edge. */
+
+static void
+vect_generate_tmps_on_preheader (loop_vec_info loop_vinfo,
+ tree *ni_name_ptr,
+ tree *ratio_mult_vf_name_ptr,
+ tree *ratio_name_ptr)
+{
+
+ edge pe;
+ basic_block new_bb;
+ gimple_seq stmts;
+ tree ni_name;
+ tree var;
+ tree ratio_name;
+ tree ratio_mult_vf_name;
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ tree ni = LOOP_VINFO_NITERS (loop_vinfo);
+ int vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+ tree log_vf;
+
+ pe = loop_preheader_edge (loop);
+
+ /* Generate temporary variable that contains
+ number of iterations loop executes. */
+
+ ni_name = vect_build_loop_niters (loop_vinfo);
+ log_vf = build_int_cst (TREE_TYPE (ni), exact_log2 (vf));
+
+ /* Create: ratio = ni >> log2(vf) */
+
+ ratio_name = fold_build2 (RSHIFT_EXPR, TREE_TYPE (ni_name), ni_name, log_vf);
+ if (!is_gimple_val (ratio_name))
+ {
+ var = create_tmp_var (TREE_TYPE (ni), "bnd");
+ add_referenced_var (var);
+
+ stmts = NULL;
+ ratio_name = force_gimple_operand (ratio_name, &stmts, true, var);
+ pe = loop_preheader_edge (loop);
+ new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
+ gcc_assert (!new_bb);
+ }
+
+ /* Create: ratio_mult_vf = ratio << log2 (vf). */
+
+ ratio_mult_vf_name = fold_build2 (LSHIFT_EXPR, TREE_TYPE (ratio_name),
+ ratio_name, log_vf);
+ if (!is_gimple_val (ratio_mult_vf_name))
+ {
+ var = create_tmp_var (TREE_TYPE (ni), "ratio_mult_vf");
+ add_referenced_var (var);
+
+ stmts = NULL;
+ ratio_mult_vf_name = force_gimple_operand (ratio_mult_vf_name, &stmts,
+ true, var);
+ pe = loop_preheader_edge (loop);
+ new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
+ gcc_assert (!new_bb);
+ }
+
+ *ni_name_ptr = ni_name;
+ *ratio_mult_vf_name_ptr = ratio_mult_vf_name;
+ *ratio_name_ptr = ratio_name;
+
+ return;
+}
+
+/* Function vect_can_advance_ivs_p
+
+ In case the number of iterations that LOOP iterates is unknown at compile
+ time, an epilog loop will be generated, and the loop induction variables
+ (IVs) will be "advanced" to the value they are supposed to take just before
+ the epilog loop. Here we check that the access function of the loop IVs
+ and the expression that represents the loop bound are simple enough.
+ These restrictions will be relaxed in the future. */
+
+bool
+vect_can_advance_ivs_p (loop_vec_info loop_vinfo)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ basic_block bb = loop->header;
+ gimple phi;
+ gimple_stmt_iterator gsi;
+
+ /* Analyze phi functions of the loop header. */
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "vect_can_advance_ivs_p:");
+
+ for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+ {
+ tree access_fn = NULL;
+ tree evolution_part;
+
+ phi = gsi_stmt (gsi);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "Analyze phi: ");
+ print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
+ }
+
+ /* Skip virtual phi's. The data dependences that are associated with
+ virtual defs/uses (i.e., memory accesses) are analyzed elsewhere. */
+
+ if (!is_gimple_reg (SSA_NAME_VAR (PHI_RESULT (phi))))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "virtual phi. skip.");
+ continue;
+ }
+
+ /* Skip reduction phis. */
+
+ if (STMT_VINFO_DEF_TYPE (vinfo_for_stmt (phi)) == vect_reduction_def)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "reduc phi. skip.");
+ continue;
+ }
+
+ /* Analyze the evolution function. */
+
+ access_fn = instantiate_parameters
+ (loop, analyze_scalar_evolution (loop, PHI_RESULT (phi)));
+
+ if (!access_fn)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "No Access function.");
+ return false;
+ }
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "Access function of PHI: ");
+ print_generic_expr (vect_dump, access_fn, TDF_SLIM);
+ }
+
+ evolution_part = evolution_part_in_loop_num (access_fn, loop->num);
+
+ if (evolution_part == NULL_TREE)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "No evolution.");
+ return false;
+ }
+
+ /* FORNOW: We do not transform initial conditions of IVs
+ which evolution functions are a polynomial of degree >= 2. */
+
+ if (tree_is_chrec (evolution_part))
+ return false;
+ }
+
+ return true;
+}
+
+
+/* Function vect_update_ivs_after_vectorizer.
+
+ "Advance" the induction variables of LOOP to the value they should take
+ after the execution of LOOP. This is currently necessary because the
+ vectorizer does not handle induction variables that are used after the
+ loop. Such a situation occurs when the last iterations of LOOP are
+ peeled, because:
+ 1. We introduced new uses after LOOP for IVs that were not originally used
+ after LOOP: the IVs of LOOP are now used by an epilog loop.
+ 2. LOOP is going to be vectorized; this means that it will iterate N/VF
+ times, whereas the loop IVs should be bumped N times.
+
+ Input:
+ - LOOP - a loop that is going to be vectorized. The last few iterations
+ of LOOP were peeled.
+ - NITERS - the number of iterations that LOOP executes (before it is
+ vectorized). i.e, the number of times the ivs should be bumped.
+ - UPDATE_E - a successor edge of LOOP->exit that is on the (only) path
+ coming out from LOOP on which there are uses of the LOOP ivs
+ (this is the path from LOOP->exit to epilog_loop->preheader).
+
+ The new definitions of the ivs are placed in LOOP->exit.
+ The phi args associated with the edge UPDATE_E in the bb
+ UPDATE_E->dest are updated accordingly.
+
+ Assumption 1: Like the rest of the vectorizer, this function assumes
+ a single loop exit that has a single predecessor.
+
+ Assumption 2: The phi nodes in the LOOP header and in update_bb are
+ organized in the same order.
+
+ Assumption 3: The access function of the ivs is simple enough (see
+ vect_can_advance_ivs_p). This assumption will be relaxed in the future.
+
+ Assumption 4: Exactly one of the successors of LOOP exit-bb is on a path
+ coming out of LOOP on which the ivs of LOOP are used (this is the path
+ that leads to the epilog loop; other paths skip the epilog loop). This
+ path starts with the edge UPDATE_E, and its destination (denoted update_bb)
+ needs to have its phis updated.
+ */
+
+static void
+vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters,
+ edge update_e)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ basic_block exit_bb = single_exit (loop)->dest;
+ gimple phi, phi1;
+ gimple_stmt_iterator gsi, gsi1;
+ basic_block update_bb = update_e->dest;
+
+ /* gcc_assert (vect_can_advance_ivs_p (loop_vinfo)); */
+
+ /* Make sure there exists a single-predecessor exit bb: */
+ gcc_assert (single_pred_p (exit_bb));
+
+ for (gsi = gsi_start_phis (loop->header), gsi1 = gsi_start_phis (update_bb);
+ !gsi_end_p (gsi) && !gsi_end_p (gsi1);
+ gsi_next (&gsi), gsi_next (&gsi1))
+ {
+ tree access_fn = NULL;
+ tree evolution_part;
+ tree init_expr;
+ tree step_expr;
+ tree var, ni, ni_name;
+ gimple_stmt_iterator last_gsi;
+
+ phi = gsi_stmt (gsi);
+ phi1 = gsi_stmt (gsi1);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "vect_update_ivs_after_vectorizer: phi: ");
+ print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
+ }
+
+ /* Skip virtual phi's. */
+ if (!is_gimple_reg (SSA_NAME_VAR (PHI_RESULT (phi))))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "virtual phi. skip.");
+ continue;
+ }
+
+ /* Skip reduction phis. */
+ if (STMT_VINFO_DEF_TYPE (vinfo_for_stmt (phi)) == vect_reduction_def)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "reduc phi. skip.");
+ continue;
+ }
+
+ access_fn = analyze_scalar_evolution (loop, PHI_RESULT (phi));
+ gcc_assert (access_fn);
+ STRIP_NOPS (access_fn);
+ evolution_part =
+ unshare_expr (evolution_part_in_loop_num (access_fn, loop->num));
+ gcc_assert (evolution_part != NULL_TREE);
+
+ /* FORNOW: We do not support IVs whose evolution function is a polynomial
+ of degree >= 2 or exponential. */
+ gcc_assert (!tree_is_chrec (evolution_part));
+
+ step_expr = evolution_part;
+ init_expr = unshare_expr (initial_condition_in_loop_num (access_fn,
+ loop->num));
+
+ if (POINTER_TYPE_P (TREE_TYPE (init_expr)))
+ ni = fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (init_expr),
+ init_expr,
+ fold_convert (sizetype,
+ fold_build2 (MULT_EXPR, TREE_TYPE (niters),
+ niters, step_expr)));
+ else
+ ni = fold_build2 (PLUS_EXPR, TREE_TYPE (init_expr),
+ fold_build2 (MULT_EXPR, TREE_TYPE (init_expr),
+ fold_convert (TREE_TYPE (init_expr),
+ niters),
+ step_expr),
+ init_expr);
+
+
+
+ var = create_tmp_var (TREE_TYPE (init_expr), "tmp");
+ add_referenced_var (var);
+
+ last_gsi = gsi_last_bb (exit_bb);
+ ni_name = force_gimple_operand_gsi (&last_gsi, ni, false, var,
+ true, GSI_SAME_STMT);
+
+ /* Fix phi expressions in the successor bb. */
+ SET_PHI_ARG_DEF (phi1, update_e->dest_idx, ni_name);
+ }
+}
+
+/* Return the more conservative threshold between the
+ min_profitable_iters returned by the cost model and the user
+ specified threshold, if provided. */
+
+static unsigned int
+conservative_cost_threshold (loop_vec_info loop_vinfo,
+ int min_profitable_iters)
+{
+ unsigned int th;
+ int min_scalar_loop_bound;
+
+ min_scalar_loop_bound = ((PARAM_VALUE (PARAM_MIN_VECT_LOOP_BOUND)
+ * LOOP_VINFO_VECT_FACTOR (loop_vinfo)) - 1);
+
+ /* Use the cost model only if it is more conservative than user specified
+ threshold. */
+ th = (unsigned) min_scalar_loop_bound;
+ if (min_profitable_iters
+ && (!min_scalar_loop_bound
+ || min_profitable_iters > min_scalar_loop_bound))
+ th = (unsigned) min_profitable_iters;
+
+ if (th && vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "Vectorization may not be profitable.");
+
+ return th;
+}
+
+/* Function vect_do_peeling_for_loop_bound
+
+ Peel the last iterations of the loop represented by LOOP_VINFO.
+ The peeled iterations form a new epilog loop. Given that the loop now
+ iterates NITERS times, the new epilog loop iterates
+ NITERS % VECTORIZATION_FACTOR times.
+
+ The original loop will later be made to iterate
+ NITERS / VECTORIZATION_FACTOR times (this value is placed into RATIO). */
+
+void
+vect_do_peeling_for_loop_bound (loop_vec_info loop_vinfo, tree *ratio)
+{
+ tree ni_name, ratio_mult_vf_name;
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ struct loop *new_loop;
+ edge update_e;
+ basic_block preheader;
+ int loop_num;
+ bool check_profitability = false;
+ unsigned int th = 0;
+ int min_profitable_iters;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_do_peeling_for_loop_bound ===");
+
+ initialize_original_copy_tables ();
+
+ /* Generate the following variables on the preheader of original loop:
+
+ ni_name = number of iteration the original loop executes
+ ratio = ni_name / vf
+ ratio_mult_vf_name = ratio * vf */
+ vect_generate_tmps_on_preheader (loop_vinfo, &ni_name,
+ &ratio_mult_vf_name, ratio);
+
+ loop_num = loop->num;
+
+ /* If cost model check not done during versioning and
+ peeling for alignment. */
+ if (!VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
+ && !VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo))
+ && !LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo))
+ {
+ check_profitability = true;
+
+ /* Get profitability threshold for vectorized loop. */
+ min_profitable_iters = LOOP_VINFO_COST_MODEL_MIN_ITERS (loop_vinfo);
+
+ th = conservative_cost_threshold (loop_vinfo,
+ min_profitable_iters);
+ }
+
+ new_loop = slpeel_tree_peel_loop_to_edge (loop, single_exit (loop),
+ ratio_mult_vf_name, ni_name, false,
+ th, check_profitability);
+ gcc_assert (new_loop);
+ gcc_assert (loop_num == loop->num);
+#ifdef ENABLE_CHECKING
+ slpeel_verify_cfg_after_peeling (loop, new_loop);
+#endif
+
+ /* A guard that controls whether the new_loop is to be executed or skipped
+ is placed in LOOP->exit. LOOP->exit therefore has two successors - one
+ is the preheader of NEW_LOOP, where the IVs from LOOP are used. The other
+ is a bb after NEW_LOOP, where these IVs are not used. Find the edge that
+ is on the path where the LOOP IVs are used and need to be updated. */
+
+ preheader = loop_preheader_edge (new_loop)->src;
+ if (EDGE_PRED (preheader, 0)->src == single_exit (loop)->dest)
+ update_e = EDGE_PRED (preheader, 0);
+ else
+ update_e = EDGE_PRED (preheader, 1);
+
+ /* Update IVs of original loop as if they were advanced
+ by ratio_mult_vf_name steps. */
+ vect_update_ivs_after_vectorizer (loop_vinfo, ratio_mult_vf_name, update_e);
+
+ /* After peeling we have to reset scalar evolution analyzer. */
+ scev_reset ();
+
+ free_original_copy_tables ();
+}
+
+
+/* Function vect_gen_niters_for_prolog_loop
+
+ Set the number of iterations for the loop represented by LOOP_VINFO
+ to the minimum between LOOP_NITERS (the original iteration count of the loop)
+ and the misalignment of DR - the data reference recorded in
+ LOOP_VINFO_UNALIGNED_DR (LOOP_VINFO). As a result, after the execution of
+ this loop, the data reference DR will refer to an aligned location.
+
+ The following computation is generated:
+
+ If the misalignment of DR is known at compile time:
+ addr_mis = int mis = DR_MISALIGNMENT (dr);
+ Else, compute address misalignment in bytes:
+ addr_mis = addr & (vectype_size - 1)
+
+ prolog_niters = min (LOOP_NITERS, ((VF - addr_mis/elem_size)&(VF-1))/step)
+
+ (elem_size = element type size; an element is the scalar element whose type
+ is the inner type of the vectype)
+
+ When the step of the data-ref in the loop is not 1 (as in interleaved data
+ and SLP), the number of iterations of the prolog must be divided by the step
+ (which is equal to the size of interleaved group).
+
+ The above formulas assume that VF == number of elements in the vector. This
+ may not hold when there are multiple-types in the loop.
+ In this case, for some data-references in the loop the VF does not represent
+ the number of elements that fit in the vector. Therefore, instead of VF we
+ use TYPE_VECTOR_SUBPARTS. */
+
+static tree
+vect_gen_niters_for_prolog_loop (loop_vec_info loop_vinfo, tree loop_niters)
+{
+ struct data_reference *dr = LOOP_VINFO_UNALIGNED_DR (loop_vinfo);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ tree var;
+ gimple_seq stmts;
+ tree iters, iters_name;
+ edge pe;
+ basic_block new_bb;
+ gimple dr_stmt = DR_STMT (dr);
+ stmt_vec_info stmt_info = vinfo_for_stmt (dr_stmt);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ int vectype_align = TYPE_ALIGN (vectype) / BITS_PER_UNIT;
+ tree niters_type = TREE_TYPE (loop_niters);
+ int step = 1;
+ int element_size = GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (dr))));
+ int nelements = TYPE_VECTOR_SUBPARTS (vectype);
+
+ if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
+ step = DR_GROUP_SIZE (vinfo_for_stmt (DR_GROUP_FIRST_DR (stmt_info)));
+
+ pe = loop_preheader_edge (loop);
+
+ if (LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo) > 0)
+ {
+ int byte_misalign = LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo);
+ int elem_misalign = byte_misalign / element_size;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "known alignment = %d.", byte_misalign);
+
+ iters = build_int_cst (niters_type,
+ (((nelements - elem_misalign) & (nelements - 1)) / step));
+ }
+ else
+ {
+ gimple_seq new_stmts = NULL;
+ tree start_addr = vect_create_addr_base_for_vector_ref (dr_stmt,
+ &new_stmts, NULL_TREE, loop);
+ tree ptr_type = TREE_TYPE (start_addr);
+ tree size = TYPE_SIZE (ptr_type);
+ tree type = lang_hooks.types.type_for_size (tree_low_cst (size, 1), 1);
+ tree vectype_size_minus_1 = build_int_cst (type, vectype_align - 1);
+ tree elem_size_log =
+ build_int_cst (type, exact_log2 (vectype_align/nelements));
+ tree nelements_minus_1 = build_int_cst (type, nelements - 1);
+ tree nelements_tree = build_int_cst (type, nelements);
+ tree byte_misalign;
+ tree elem_misalign;
+
+ new_bb = gsi_insert_seq_on_edge_immediate (pe, new_stmts);
+ gcc_assert (!new_bb);
+
+ /* Create: byte_misalign = addr & (vectype_size - 1) */
+ byte_misalign =
+ fold_build2 (BIT_AND_EXPR, type, fold_convert (type, start_addr), vectype_size_minus_1);
+
+ /* Create: elem_misalign = byte_misalign / element_size */
+ elem_misalign =
+ fold_build2 (RSHIFT_EXPR, type, byte_misalign, elem_size_log);
+
+ /* Create: (niters_type) (nelements - elem_misalign)&(nelements - 1) */
+ iters = fold_build2 (MINUS_EXPR, type, nelements_tree, elem_misalign);
+ iters = fold_build2 (BIT_AND_EXPR, type, iters, nelements_minus_1);
+ iters = fold_convert (niters_type, iters);
+ }
+
+ /* Create: prolog_loop_niters = min (iters, loop_niters) */
+ /* If the loop bound is known at compile time we already verified that it is
+ greater than vf; since the misalignment ('iters') is at most vf, there's
+ no need to generate the MIN_EXPR in this case. */
+ if (TREE_CODE (loop_niters) != INTEGER_CST)
+ iters = fold_build2 (MIN_EXPR, niters_type, iters, loop_niters);
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "niters for prolog loop: ");
+ print_generic_expr (vect_dump, iters, TDF_SLIM);
+ }
+
+ var = create_tmp_var (niters_type, "prolog_loop_niters");
+ add_referenced_var (var);
+ stmts = NULL;
+ iters_name = force_gimple_operand (iters, &stmts, false, var);
+
+ /* Insert stmt on loop preheader edge. */
+ if (stmts)
+ {
+ basic_block new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
+ gcc_assert (!new_bb);
+ }
+
+ return iters_name;
+}
+
+
+/* Function vect_update_init_of_dr
+
+ NITERS iterations were peeled from LOOP. DR represents a data reference
+ in LOOP. This function updates the information recorded in DR to
+ account for the fact that the first NITERS iterations had already been
+ executed. Specifically, it updates the OFFSET field of DR. */
+
+static void
+vect_update_init_of_dr (struct data_reference *dr, tree niters)
+{
+ tree offset = DR_OFFSET (dr);
+
+ niters = fold_build2 (MULT_EXPR, sizetype,
+ fold_convert (sizetype, niters),
+ fold_convert (sizetype, DR_STEP (dr)));
+ offset = fold_build2 (PLUS_EXPR, sizetype, offset, niters);
+ DR_OFFSET (dr) = offset;
+}
+
+
+/* Function vect_update_inits_of_drs
+
+ NITERS iterations were peeled from the loop represented by LOOP_VINFO.
+ This function updates the information recorded for the data references in
+ the loop to account for the fact that the first NITERS iterations had
+ already been executed. Specifically, it updates the initial_condition of
+ the access_function of all the data_references in the loop. */
+
+static void
+vect_update_inits_of_drs (loop_vec_info loop_vinfo, tree niters)
+{
+ unsigned int i;
+ VEC (data_reference_p, heap) *datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
+ struct data_reference *dr;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_update_inits_of_dr ===");
+
+ for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
+ vect_update_init_of_dr (dr, niters);
+}
+
+
+/* Function vect_do_peeling_for_alignment
+
+ Peel the first 'niters' iterations of the loop represented by LOOP_VINFO.
+ 'niters' is set to the misalignment of one of the data references in the
+ loop, thereby forcing it to refer to an aligned location at the beginning
+ of the execution of this loop. The data reference for which we are
+ peeling is recorded in LOOP_VINFO_UNALIGNED_DR. */
+
+void
+vect_do_peeling_for_alignment (loop_vec_info loop_vinfo)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ tree niters_of_prolog_loop, ni_name;
+ tree n_iters;
+ struct loop *new_loop;
+ bool check_profitability = false;
+ unsigned int th = 0;
+ int min_profitable_iters;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_do_peeling_for_alignment ===");
+
+ initialize_original_copy_tables ();
+
+ ni_name = vect_build_loop_niters (loop_vinfo);
+ niters_of_prolog_loop = vect_gen_niters_for_prolog_loop (loop_vinfo, ni_name);
+
+
+ /* If cost model check not done during versioning. */
+ if (!VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
+ && !VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
+ {
+ check_profitability = true;
+
+ /* Get profitability threshold for vectorized loop. */
+ min_profitable_iters = LOOP_VINFO_COST_MODEL_MIN_ITERS (loop_vinfo);
+
+ th = conservative_cost_threshold (loop_vinfo,
+ min_profitable_iters);
+ }
+
+ /* Peel the prolog loop and iterate it niters_of_prolog_loop. */
+ new_loop =
+ slpeel_tree_peel_loop_to_edge (loop, loop_preheader_edge (loop),
+ niters_of_prolog_loop, ni_name, true,
+ th, check_profitability);
+
+ gcc_assert (new_loop);
+#ifdef ENABLE_CHECKING
+ slpeel_verify_cfg_after_peeling (new_loop, loop);
+#endif
+
+ /* Update number of times loop executes. */
+ n_iters = LOOP_VINFO_NITERS (loop_vinfo);
+ LOOP_VINFO_NITERS (loop_vinfo) = fold_build2 (MINUS_EXPR,
+ TREE_TYPE (n_iters), n_iters, niters_of_prolog_loop);
+
+ /* Update the init conditions of the access functions of all data refs. */
+ vect_update_inits_of_drs (loop_vinfo, niters_of_prolog_loop);
+
+ /* After peeling we have to reset scalar evolution analyzer. */
+ scev_reset ();
+
+ free_original_copy_tables ();
+}
+
+
+/* Function vect_create_cond_for_align_checks.
+
+ Create a conditional expression that represents the alignment checks for
+ all of data references (array element references) whose alignment must be
+ checked at runtime.
+
+ Input:
+ COND_EXPR - input conditional expression. New conditions will be chained
+ with logical AND operation.
+ LOOP_VINFO - two fields of the loop information are used.
+ LOOP_VINFO_PTR_MASK is the mask used to check the alignment.
+ LOOP_VINFO_MAY_MISALIGN_STMTS contains the refs to be checked.
+
+ Output:
+ COND_EXPR_STMT_LIST - statements needed to construct the conditional
+ expression.
+ The returned value is the conditional expression to be used in the if
+ statement that controls which version of the loop gets executed at runtime.
+
+ The algorithm makes two assumptions:
+ 1) The number of bytes "n" in a vector is a power of 2.
+ 2) An address "a" is aligned if a%n is zero and that this
+ test can be done as a&(n-1) == 0. For example, for 16
+ byte vectors the test is a&0xf == 0. */
+
+static void
+vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
+ tree *cond_expr,
+ gimple_seq *cond_expr_stmt_list)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ VEC(gimple,heap) *may_misalign_stmts
+ = LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo);
+ gimple ref_stmt;
+ int mask = LOOP_VINFO_PTR_MASK (loop_vinfo);
+ tree mask_cst;
+ unsigned int i;
+ tree psize;
+ tree int_ptrsize_type;
+ char tmp_name[20];
+ tree or_tmp_name = NULL_TREE;
+ tree and_tmp, and_tmp_name;
+ gimple and_stmt;
+ tree ptrsize_zero;
+ tree part_cond_expr;
+
+ /* Check that mask is one less than a power of 2, i.e., mask is
+ all zeros followed by all ones. */
+ gcc_assert ((mask != 0) && ((mask & (mask+1)) == 0));
+
+ /* CHECKME: what is the best integer or unsigned type to use to hold a
+ cast from a pointer value? */
+ psize = TYPE_SIZE (ptr_type_node);
+ int_ptrsize_type
+ = lang_hooks.types.type_for_size (tree_low_cst (psize, 1), 0);
+
+ /* Create expression (mask & (dr_1 || ... || dr_n)) where dr_i is the address
+ of the first vector of the i'th data reference. */
+
+ for (i = 0; VEC_iterate (gimple, may_misalign_stmts, i, ref_stmt); i++)
+ {
+ gimple_seq new_stmt_list = NULL;
+ tree addr_base;
+ tree addr_tmp, addr_tmp_name;
+ tree or_tmp, new_or_tmp_name;
+ gimple addr_stmt, or_stmt;
+
+ /* create: addr_tmp = (int)(address_of_first_vector) */
+ addr_base =
+ vect_create_addr_base_for_vector_ref (ref_stmt, &new_stmt_list,
+ NULL_TREE, loop);
+ if (new_stmt_list != NULL)
+ gimple_seq_add_seq (cond_expr_stmt_list, new_stmt_list);
+
+ sprintf (tmp_name, "%s%d", "addr2int", i);
+ addr_tmp = create_tmp_var (int_ptrsize_type, tmp_name);
+ add_referenced_var (addr_tmp);
+ addr_tmp_name = make_ssa_name (addr_tmp, NULL);
+ addr_stmt = gimple_build_assign_with_ops (NOP_EXPR, addr_tmp_name,
+ addr_base, NULL_TREE);
+ SSA_NAME_DEF_STMT (addr_tmp_name) = addr_stmt;
+ gimple_seq_add_stmt (cond_expr_stmt_list, addr_stmt);
+
+ /* The addresses are OR together. */
+
+ if (or_tmp_name != NULL_TREE)
+ {
+ /* create: or_tmp = or_tmp | addr_tmp */
+ sprintf (tmp_name, "%s%d", "orptrs", i);
+ or_tmp = create_tmp_var (int_ptrsize_type, tmp_name);
+ add_referenced_var (or_tmp);
+ new_or_tmp_name = make_ssa_name (or_tmp, NULL);
+ or_stmt = gimple_build_assign_with_ops (BIT_IOR_EXPR,
+ new_or_tmp_name,
+ or_tmp_name, addr_tmp_name);
+ SSA_NAME_DEF_STMT (new_or_tmp_name) = or_stmt;
+ gimple_seq_add_stmt (cond_expr_stmt_list, or_stmt);
+ or_tmp_name = new_or_tmp_name;
+ }
+ else
+ or_tmp_name = addr_tmp_name;
+
+ } /* end for i */
+
+ mask_cst = build_int_cst (int_ptrsize_type, mask);
+
+ /* create: and_tmp = or_tmp & mask */
+ and_tmp = create_tmp_var (int_ptrsize_type, "andmask" );
+ add_referenced_var (and_tmp);
+ and_tmp_name = make_ssa_name (and_tmp, NULL);
+
+ and_stmt = gimple_build_assign_with_ops (BIT_AND_EXPR, and_tmp_name,
+ or_tmp_name, mask_cst);
+ SSA_NAME_DEF_STMT (and_tmp_name) = and_stmt;
+ gimple_seq_add_stmt (cond_expr_stmt_list, and_stmt);
+
+ /* Make and_tmp the left operand of the conditional test against zero.
+ if and_tmp has a nonzero bit then some address is unaligned. */
+ ptrsize_zero = build_int_cst (int_ptrsize_type, 0);
+ part_cond_expr = fold_build2 (EQ_EXPR, boolean_type_node,
+ and_tmp_name, ptrsize_zero);
+ if (*cond_expr)
+ *cond_expr = fold_build2 (TRUTH_AND_EXPR, boolean_type_node,
+ *cond_expr, part_cond_expr);
+ else
+ *cond_expr = part_cond_expr;
+}
+
+
+/* Function vect_vfa_segment_size.
+
+ Create an expression that computes the size of segment
+ that will be accessed for a data reference. The functions takes into
+ account that realignment loads may access one more vector.
+
+ Input:
+ DR: The data reference.
+ VECT_FACTOR: vectorization factor.
+
+ Return an expression whose value is the size of segment which will be
+ accessed by DR. */
+
+static tree
+vect_vfa_segment_size (struct data_reference *dr, tree vect_factor)
+{
+ tree segment_length = fold_build2 (MULT_EXPR, integer_type_node,
+ DR_STEP (dr), vect_factor);
+
+ if (vect_supportable_dr_alignment (dr) == dr_explicit_realign_optimized)
+ {
+ tree vector_size = TYPE_SIZE_UNIT
+ (STMT_VINFO_VECTYPE (vinfo_for_stmt (DR_STMT (dr))));
+
+ segment_length = fold_build2 (PLUS_EXPR, integer_type_node,
+ segment_length, vector_size);
+ }
+ return fold_convert (sizetype, segment_length);
+}
+
+
+/* Function vect_create_cond_for_alias_checks.
+
+ Create a conditional expression that represents the run-time checks for
+ overlapping of address ranges represented by a list of data references
+ relations passed as input.
+
+ Input:
+ COND_EXPR - input conditional expression. New conditions will be chained
+ with logical AND operation.
+ LOOP_VINFO - field LOOP_VINFO_MAY_ALIAS_STMTS contains the list of ddrs
+ to be checked.
+
+ Output:
+ COND_EXPR - conditional expression.
+ COND_EXPR_STMT_LIST - statements needed to construct the conditional
+ expression.
+
+
+ The returned value is the conditional expression to be used in the if
+ statement that controls which version of the loop gets executed at runtime.
+*/
+
+static void
+vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo,
+ tree * cond_expr,
+ gimple_seq * cond_expr_stmt_list)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ VEC (ddr_p, heap) * may_alias_ddrs =
+ LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo);
+ tree vect_factor =
+ build_int_cst (integer_type_node, LOOP_VINFO_VECT_FACTOR (loop_vinfo));
+
+ ddr_p ddr;
+ unsigned int i;
+ tree part_cond_expr;
+
+ /* Create expression
+ ((store_ptr_0 + store_segment_length_0) < load_ptr_0)
+ || (load_ptr_0 + load_segment_length_0) < store_ptr_0))
+ &&
+ ...
+ &&
+ ((store_ptr_n + store_segment_length_n) < load_ptr_n)
+ || (load_ptr_n + load_segment_length_n) < store_ptr_n)) */
+
+ if (VEC_empty (ddr_p, may_alias_ddrs))
+ return;
+
+ for (i = 0; VEC_iterate (ddr_p, may_alias_ddrs, i, ddr); i++)
+ {
+ struct data_reference *dr_a, *dr_b;
+ gimple dr_group_first_a, dr_group_first_b;
+ tree addr_base_a, addr_base_b;
+ tree segment_length_a, segment_length_b;
+ gimple stmt_a, stmt_b;
+
+ dr_a = DDR_A (ddr);
+ stmt_a = DR_STMT (DDR_A (ddr));
+ dr_group_first_a = DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt_a));
+ if (dr_group_first_a)
+ {
+ stmt_a = dr_group_first_a;
+ dr_a = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt_a));
+ }
+
+ dr_b = DDR_B (ddr);
+ stmt_b = DR_STMT (DDR_B (ddr));
+ dr_group_first_b = DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt_b));
+ if (dr_group_first_b)
+ {
+ stmt_b = dr_group_first_b;
+ dr_b = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt_b));
+ }
+
+ addr_base_a =
+ vect_create_addr_base_for_vector_ref (stmt_a, cond_expr_stmt_list,
+ NULL_TREE, loop);
+ addr_base_b =
+ vect_create_addr_base_for_vector_ref (stmt_b, cond_expr_stmt_list,
+ NULL_TREE, loop);
+
+ segment_length_a = vect_vfa_segment_size (dr_a, vect_factor);
+ segment_length_b = vect_vfa_segment_size (dr_b, vect_factor);
+
+ if (vect_print_dump_info (REPORT_DR_DETAILS))
+ {
+ fprintf (vect_dump,
+ "create runtime check for data references ");
+ print_generic_expr (vect_dump, DR_REF (dr_a), TDF_SLIM);
+ fprintf (vect_dump, " and ");
+ print_generic_expr (vect_dump, DR_REF (dr_b), TDF_SLIM);
+ }
+
+
+ part_cond_expr =
+ fold_build2 (TRUTH_OR_EXPR, boolean_type_node,
+ fold_build2 (LT_EXPR, boolean_type_node,
+ fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (addr_base_a),
+ addr_base_a,
+ segment_length_a),
+ addr_base_b),
+ fold_build2 (LT_EXPR, boolean_type_node,
+ fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (addr_base_b),
+ addr_base_b,
+ segment_length_b),
+ addr_base_a));
+
+ if (*cond_expr)
+ *cond_expr = fold_build2 (TRUTH_AND_EXPR, boolean_type_node,
+ *cond_expr, part_cond_expr);
+ else
+ *cond_expr = part_cond_expr;
+ }
+ if (vect_print_dump_info (REPORT_VECTORIZED_LOOPS))
+ fprintf (vect_dump, "created %u versioning for alias checks.\n",
+ VEC_length (ddr_p, may_alias_ddrs));
+
+}
+
+
+/* Function vect_loop_versioning.
+
+ If the loop has data references that may or may not be aligned or/and
+ has data reference relations whose independence was not proven then
+ two versions of the loop need to be generated, one which is vectorized
+ and one which isn't. A test is then generated to control which of the
+ loops is executed. The test checks for the alignment of all of the
+ data references that may or may not be aligned. An additional
+ sequence of runtime tests is generated for each pairs of DDRs whose
+ independence was not proven. The vectorized version of loop is
+ executed only if both alias and alignment tests are passed.
+
+ The test generated to check which version of loop is executed
+ is modified to also check for profitability as indicated by the
+ cost model initially. */
+
+void
+vect_loop_versioning (loop_vec_info loop_vinfo)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ struct loop *nloop;
+ tree cond_expr = NULL_TREE;
+ gimple_seq cond_expr_stmt_list = NULL;
+ basic_block condition_bb;
+ gimple_stmt_iterator gsi, cond_exp_gsi;
+ basic_block merge_bb;
+ basic_block new_exit_bb;
+ edge new_exit_e, e;
+ gimple orig_phi, new_phi;
+ tree arg;
+ unsigned prob = 4 * REG_BR_PROB_BASE / 5;
+ gimple_seq gimplify_stmt_list = NULL;
+ tree scalar_loop_iters = LOOP_VINFO_NITERS (loop_vinfo);
+ int min_profitable_iters = 0;
+ unsigned int th;
+
+ /* Get profitability threshold for vectorized loop. */
+ min_profitable_iters = LOOP_VINFO_COST_MODEL_MIN_ITERS (loop_vinfo);
+
+ th = conservative_cost_threshold (loop_vinfo,
+ min_profitable_iters);
+
+ cond_expr =
+ fold_build2 (GT_EXPR, boolean_type_node, scalar_loop_iters,
+ build_int_cst (TREE_TYPE (scalar_loop_iters), th));
+
+ cond_expr = force_gimple_operand (cond_expr, &cond_expr_stmt_list,
+ false, NULL_TREE);
+
+ if (VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo)))
+ vect_create_cond_for_align_checks (loop_vinfo, &cond_expr,
+ &cond_expr_stmt_list);
+
+ if (VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
+ vect_create_cond_for_alias_checks (loop_vinfo, &cond_expr,
+ &cond_expr_stmt_list);
+
+ cond_expr =
+ fold_build2 (NE_EXPR, boolean_type_node, cond_expr, integer_zero_node);
+ cond_expr =
+ force_gimple_operand (cond_expr, &gimplify_stmt_list, true, NULL_TREE);
+ gimple_seq_add_seq (&cond_expr_stmt_list, gimplify_stmt_list);
+
+ initialize_original_copy_tables ();
+ nloop = loop_version (loop, cond_expr, &condition_bb,
+ prob, prob, REG_BR_PROB_BASE - prob, true);
+ free_original_copy_tables();
+
+ /* Loop versioning violates an assumption we try to maintain during
+ vectorization - that the loop exit block has a single predecessor.
+ After versioning, the exit block of both loop versions is the same
+ basic block (i.e. it has two predecessors). Just in order to simplify
+ following transformations in the vectorizer, we fix this situation
+ here by adding a new (empty) block on the exit-edge of the loop,
+ with the proper loop-exit phis to maintain loop-closed-form. */
+
+ merge_bb = single_exit (loop)->dest;
+ gcc_assert (EDGE_COUNT (merge_bb->preds) == 2);
+ new_exit_bb = split_edge (single_exit (loop));
+ new_exit_e = single_exit (loop);
+ e = EDGE_SUCC (new_exit_bb, 0);
+
+ for (gsi = gsi_start_phis (merge_bb); !gsi_end_p (gsi); gsi_next (&gsi))
+ {
+ orig_phi = gsi_stmt (gsi);
+ new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
+ new_exit_bb);
+ arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, e);
+ add_phi_arg (new_phi, arg, new_exit_e);
+ SET_PHI_ARG_DEF (orig_phi, e->dest_idx, PHI_RESULT (new_phi));
+ }
+
+ /* End loop-exit-fixes after versioning. */
+
+ update_ssa (TODO_update_ssa);
+ if (cond_expr_stmt_list)
+ {
+ cond_exp_gsi = gsi_last_bb (condition_bb);
+ gsi_insert_seq_before (&cond_exp_gsi, cond_expr_stmt_list, GSI_SAME_STMT);
+ }
+}
+
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
new file mode 100644
index 00000000000..77dcdd6137a
--- /dev/null
+++ b/gcc/tree-vect-loop.c
@@ -0,0 +1,3587 @@
+/* Loop Vectorization
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+ Foundation, Inc.
+ Contributed by Dorit Naishlos <dorit@il.ibm.com> and
+ Ira Rosen <irar@il.ibm.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 "ggc.h"
+#include "tree.h"
+#include "basic-block.h"
+#include "diagnostic.h"
+#include "tree-flow.h"
+#include "tree-dump.h"
+#include "cfgloop.h"
+#include "cfglayout.h"
+#include "expr.h"
+#include "recog.h"
+#include "optabs.h"
+#include "params.h"
+#include "toplev.h"
+#include "tree-chrec.h"
+#include "tree-scalar-evolution.h"
+#include "tree-vectorizer.h"
+
+/* Loop Vectorization Pass.
+
+ This pass tries to vectorize loops.
+
+ For example, the vectorizer transforms the following simple loop:
+
+ short a[N]; short b[N]; short c[N]; int i;
+
+ for (i=0; i<N; i++){
+ a[i] = b[i] + c[i];
+ }
+
+ as if it was manually vectorized by rewriting the source code into:
+
+ typedef int __attribute__((mode(V8HI))) v8hi;
+ short a[N]; short b[N]; short c[N]; int i;
+ v8hi *pa = (v8hi*)a, *pb = (v8hi*)b, *pc = (v8hi*)c;
+ v8hi va, vb, vc;
+
+ for (i=0; i<N/8; i++){
+ vb = pb[i];
+ vc = pc[i];
+ va = vb + vc;
+ pa[i] = va;
+ }
+
+ The main entry to this pass is vectorize_loops(), in which
+ the vectorizer applies a set of analyses on a given set of loops,
+ followed by the actual vectorization transformation for the loops that
+ had successfully passed the analysis phase.
+ Throughout this pass we make a distinction between two types of
+ data: scalars (which are represented by SSA_NAMES), and memory references
+ ("data-refs"). These two types of data require different handling both
+ during analysis and transformation. The types of data-refs that the
+ vectorizer currently supports are ARRAY_REFS which base is an array DECL
+ (not a pointer), and INDIRECT_REFS through pointers; both array and pointer
+ accesses are required to have a simple (consecutive) access pattern.
+
+ Analysis phase:
+ ===============
+ The driver for the analysis phase is vect_analyze_loop().
+ It applies a set of analyses, some of which rely on the scalar evolution
+ analyzer (scev) developed by Sebastian Pop.
+
+ During the analysis phase the vectorizer records some information
+ per stmt in a "stmt_vec_info" struct which is attached to each stmt in the
+ loop, as well as general information about the loop as a whole, which is
+ recorded in a "loop_vec_info" struct attached to each loop.
+
+ Transformation phase:
+ =====================
+ The loop transformation phase scans all the stmts in the loop, and
+ creates a vector stmt (or a sequence of stmts) for each scalar stmt S in
+ the loop that needs to be vectorized. It inserts the vector code sequence
+ just before the scalar stmt S, and records a pointer to the vector code
+ in STMT_VINFO_VEC_STMT (stmt_info) (stmt_info is the stmt_vec_info struct
+ attached to S). This pointer will be used for the vectorization of following
+ stmts which use the def of stmt S. Stmt S is removed if it writes to memory;
+ otherwise, we rely on dead code elimination for removing it.
+
+ For example, say stmt S1 was vectorized into stmt VS1:
+
+ VS1: vb = px[i];
+ S1: b = x[i]; STMT_VINFO_VEC_STMT (stmt_info (S1)) = VS1
+ S2: a = b;
+
+ To vectorize stmt S2, the vectorizer first finds the stmt that defines
+ the operand 'b' (S1), and gets the relevant vector def 'vb' from the
+ vector stmt VS1 pointed to by STMT_VINFO_VEC_STMT (stmt_info (S1)). The
+ resulting sequence would be:
+
+ VS1: vb = px[i];
+ S1: b = x[i]; STMT_VINFO_VEC_STMT (stmt_info (S1)) = VS1
+ VS2: va = vb;
+ S2: a = b; STMT_VINFO_VEC_STMT (stmt_info (S2)) = VS2
+
+ Operands that are not SSA_NAMEs, are data-refs that appear in
+ load/store operations (like 'x[i]' in S1), and are handled differently.
+
+ Target modeling:
+ =================
+ Currently the only target specific information that is used is the
+ size of the vector (in bytes) - "UNITS_PER_SIMD_WORD". Targets that can
+ support different sizes of vectors, for now will need to specify one value
+ for "UNITS_PER_SIMD_WORD". More flexibility will be added in the future.
+
+ Since we only vectorize operations which vector form can be
+ expressed using existing tree codes, to verify that an operation is
+ supported, the vectorizer checks the relevant optab at the relevant
+ machine_mode (e.g, optab_handler (add_optab, V8HImode)->insn_code). If
+ the value found is CODE_FOR_nothing, then there's no target support, and
+ we can't vectorize the stmt.
+
+ For additional information on this project see:
+ http://gcc.gnu.org/projects/tree-ssa/vectorization.html
+*/
+
+/* Function vect_determine_vectorization_factor
+
+ Determine the vectorization factor (VF). VF is the number of data elements
+ that are operated upon in parallel in a single iteration of the vectorized
+ loop. For example, when vectorizing a loop that operates on 4byte elements,
+ on a target with vector size (VS) 16byte, the VF is set to 4, since 4
+ elements can fit in a single vector register.
+
+ We currently support vectorization of loops in which all types operated upon
+ are of the same size. Therefore this function currently sets VF according to
+ the size of the types operated upon, and fails if there are multiple sizes
+ in the loop.
+
+ VF is also the factor by which the loop iterations are strip-mined, e.g.:
+ original loop:
+ for (i=0; i<N; i++){
+ a[i] = b[i] + c[i];
+ }
+
+ vectorized loop:
+ for (i=0; i<N; i+=VF){
+ a[i:VF] = b[i:VF] + c[i:VF];
+ }
+*/
+
+static bool
+vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
+ int nbbs = loop->num_nodes;
+ gimple_stmt_iterator si;
+ unsigned int vectorization_factor = 0;
+ tree scalar_type;
+ gimple phi;
+ tree vectype;
+ unsigned int nunits;
+ stmt_vec_info stmt_info;
+ int i;
+ HOST_WIDE_INT dummy;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_determine_vectorization_factor ===");
+
+ for (i = 0; i < nbbs; i++)
+ {
+ basic_block bb = bbs[i];
+
+ for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ phi = gsi_stmt (si);
+ stmt_info = vinfo_for_stmt (phi);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "==> examining phi: ");
+ print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
+ }
+
+ gcc_assert (stmt_info);
+
+ if (STMT_VINFO_RELEVANT_P (stmt_info))
+ {
+ gcc_assert (!STMT_VINFO_VECTYPE (stmt_info));
+ scalar_type = TREE_TYPE (PHI_RESULT (phi));
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "get vectype for scalar type: ");
+ print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
+ }
+
+ vectype = get_vectype_for_scalar_type (scalar_type);
+ if (!vectype)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump,
+ "not vectorized: unsupported data-type ");
+ print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
+ }
+ return false;
+ }
+ STMT_VINFO_VECTYPE (stmt_info) = vectype;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "vectype: ");
+ print_generic_expr (vect_dump, vectype, TDF_SLIM);
+ }
+
+ nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "nunits = %d", nunits);
+
+ if (!vectorization_factor
+ || (nunits > vectorization_factor))
+ vectorization_factor = nunits;
+ }
+ }
+
+ for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ gimple stmt = gsi_stmt (si);
+ stmt_info = vinfo_for_stmt (stmt);
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "==> examining statement: ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ gcc_assert (stmt_info);
+
+ /* skip stmts which do not need to be vectorized. */
+ if (!STMT_VINFO_RELEVANT_P (stmt_info)
+ && !STMT_VINFO_LIVE_P (stmt_info))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "skip.");
+ continue;
+ }
+
+ if (gimple_get_lhs (stmt) == NULL_TREE)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump, "not vectorized: irregular stmt.");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+ return false;
+ }
+
+ if (VECTOR_MODE_P (TYPE_MODE (gimple_expr_type (stmt))))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump, "not vectorized: vector stmt in loop:");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+ return false;
+ }
+
+ if (STMT_VINFO_VECTYPE (stmt_info))
+ {
+ /* The only case when a vectype had been already set is for stmts
+ that contain a dataref, or for "pattern-stmts" (stmts generated
+ by the vectorizer to represent/replace a certain idiom). */
+ gcc_assert (STMT_VINFO_DATA_REF (stmt_info)
+ || is_pattern_stmt_p (stmt_info));
+ vectype = STMT_VINFO_VECTYPE (stmt_info);
+ }
+ else
+ {
+
+ gcc_assert (! STMT_VINFO_DATA_REF (stmt_info)
+ && !is_pattern_stmt_p (stmt_info));
+
+ scalar_type = vect_get_smallest_scalar_type (stmt, &dummy,
+ &dummy);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "get vectype for scalar type: ");
+ print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
+ }
+
+ vectype = get_vectype_for_scalar_type (scalar_type);
+ if (!vectype)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump,
+ "not vectorized: unsupported data-type ");
+ print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
+ }
+ return false;
+ }
+ STMT_VINFO_VECTYPE (stmt_info) = vectype;
+ }
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "vectype: ");
+ print_generic_expr (vect_dump, vectype, TDF_SLIM);
+ }
+
+ nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "nunits = %d", nunits);
+
+ if (!vectorization_factor
+ || (nunits > vectorization_factor))
+ vectorization_factor = nunits;
+
+ }
+ }
+
+ /* TODO: Analyze cost. Decide if worth while to vectorize. */
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "vectorization factor = %d", vectorization_factor);
+ if (vectorization_factor <= 1)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "not vectorized: unsupported data-type");
+ return false;
+ }
+ LOOP_VINFO_VECT_FACTOR (loop_vinfo) = vectorization_factor;
+
+ return true;
+}
+
+
+/* Function vect_is_simple_iv_evolution.
+
+ FORNOW: A simple evolution of an induction variables in the loop is
+ considered a polynomial evolution with constant step. */
+
+static bool
+vect_is_simple_iv_evolution (unsigned loop_nb, tree access_fn, tree * init,
+ tree * step)
+{
+ tree init_expr;
+ tree step_expr;
+ tree evolution_part = evolution_part_in_loop_num (access_fn, loop_nb);
+
+ /* When there is no evolution in this loop, the evolution function
+ is not "simple". */
+ if (evolution_part == NULL_TREE)
+ return false;
+
+ /* When the evolution is a polynomial of degree >= 2
+ the evolution function is not "simple". */
+ if (tree_is_chrec (evolution_part))
+ return false;
+
+ step_expr = evolution_part;
+ init_expr = unshare_expr (initial_condition_in_loop_num (access_fn, loop_nb));
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "step: ");
+ print_generic_expr (vect_dump, step_expr, TDF_SLIM);
+ fprintf (vect_dump, ", init: ");
+ print_generic_expr (vect_dump, init_expr, TDF_SLIM);
+ }
+
+ *init = init_expr;
+ *step = step_expr;
+
+ if (TREE_CODE (step_expr) != INTEGER_CST)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "step unknown.");
+ return false;
+ }
+
+ return true;
+}
+
+/* Function vect_analyze_scalar_cycles_1.
+
+ Examine the cross iteration def-use cycles of scalar variables
+ in LOOP. LOOP_VINFO represents the loop that is now being
+ considered for vectorization (can be LOOP, or an outer-loop
+ enclosing LOOP). */
+
+static void
+vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
+{
+ basic_block bb = loop->header;
+ tree dumy;
+ VEC(gimple,heap) *worklist = VEC_alloc (gimple, heap, 64);
+ gimple_stmt_iterator gsi;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_analyze_scalar_cycles ===");
+
+ /* First - identify all inductions. */
+ for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+ {
+ gimple phi = gsi_stmt (gsi);
+ tree access_fn = NULL;
+ tree def = PHI_RESULT (phi);
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (phi);
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "Analyze phi: ");
+ print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
+ }
+
+ /* Skip virtual phi's. The data dependences that are associated with
+ virtual defs/uses (i.e., memory accesses) are analyzed elsewhere. */
+ if (!is_gimple_reg (SSA_NAME_VAR (def)))
+ continue;
+
+ STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_unknown_def_type;
+
+ /* Analyze the evolution function. */
+ access_fn = analyze_scalar_evolution (loop, def);
+ if (access_fn && vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "Access function of PHI: ");
+ print_generic_expr (vect_dump, access_fn, TDF_SLIM);
+ }
+
+ if (!access_fn
+ || !vect_is_simple_iv_evolution (loop->num, access_fn, &dumy, &dumy))
+ {
+ VEC_safe_push (gimple, heap, worklist, phi);
+ continue;
+ }
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Detected induction.");
+ STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_induction_def;
+ }
+
+
+ /* Second - identify all reductions. */
+ while (VEC_length (gimple, worklist) > 0)
+ {
+ gimple phi = VEC_pop (gimple, worklist);
+ tree def = PHI_RESULT (phi);
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (phi);
+ gimple reduc_stmt;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "Analyze phi: ");
+ print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
+ }
+
+ gcc_assert (is_gimple_reg (SSA_NAME_VAR (def)));
+ gcc_assert (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_unknown_def_type);
+
+ reduc_stmt = vect_is_simple_reduction (loop_vinfo, phi);
+ if (reduc_stmt)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Detected reduction.");
+ STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_reduction_def;
+ STMT_VINFO_DEF_TYPE (vinfo_for_stmt (reduc_stmt)) =
+ vect_reduction_def;
+ }
+ else
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Unknown def-use cycle pattern.");
+ }
+
+ VEC_free (gimple, heap, worklist);
+ return;
+}
+
+
+/* Function vect_analyze_scalar_cycles.
+
+ Examine the cross iteration def-use cycles of scalar variables, by
+ analyzing the loop-header PHIs of scalar variables; Classify each
+ cycle as one of the following: invariant, induction, reduction, unknown.
+ We do that for the loop represented by LOOP_VINFO, and also to its
+ inner-loop, if exists.
+ Examples for scalar cycles:
+
+ Example1: reduction:
+
+ loop1:
+ for (i=0; i<N; i++)
+ sum += a[i];
+
+ Example2: induction:
+
+ loop2:
+ for (i=0; i<N; i++)
+ a[i] = i; */
+
+static void
+vect_analyze_scalar_cycles (loop_vec_info loop_vinfo)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+
+ vect_analyze_scalar_cycles_1 (loop_vinfo, loop);
+
+ /* When vectorizing an outer-loop, the inner-loop is executed sequentially.
+ Reductions in such inner-loop therefore have different properties than
+ the reductions in the nest that gets vectorized:
+ 1. When vectorized, they are executed in the same order as in the original
+ scalar loop, so we can't change the order of computation when
+ vectorizing them.
+ 2. FIXME: Inner-loop reductions can be used in the inner-loop, so the
+ current checks are too strict. */
+
+ if (loop->inner)
+ vect_analyze_scalar_cycles_1 (loop_vinfo, loop->inner);
+}
+
+
+/* Function vect_get_loop_niters.
+
+ Determine how many iterations the loop is executed.
+ If an expression that represents the number of iterations
+ can be constructed, place it in NUMBER_OF_ITERATIONS.
+ Return the loop exit condition. */
+
+static gimple
+vect_get_loop_niters (struct loop *loop, tree *number_of_iterations)
+{
+ tree niters;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== get_loop_niters ===");
+
+ niters = number_of_exit_cond_executions (loop);
+
+ if (niters != NULL_TREE
+ && niters != chrec_dont_know)
+ {
+ *number_of_iterations = niters;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "==> get_loop_niters:" );
+ print_generic_expr (vect_dump, *number_of_iterations, TDF_SLIM);
+ }
+ }
+
+ return get_loop_exit_condition (loop);
+}
+
+
+/* Function bb_in_loop_p
+
+ Used as predicate for dfs order traversal of the loop bbs. */
+
+static bool
+bb_in_loop_p (const_basic_block bb, const void *data)
+{
+ const struct loop *const loop = (const struct loop *)data;
+ if (flow_bb_inside_loop_p (loop, bb))
+ return true;
+ return false;
+}
+
+
+/* Function new_loop_vec_info.
+
+ Create and initialize a new loop_vec_info struct for LOOP, as well as
+ stmt_vec_info structs for all the stmts in LOOP. */
+
+static loop_vec_info
+new_loop_vec_info (struct loop *loop)
+{
+ loop_vec_info res;
+ basic_block *bbs;
+ gimple_stmt_iterator si;
+ unsigned int i, nbbs;
+
+ res = (loop_vec_info) xcalloc (1, sizeof (struct _loop_vec_info));
+ LOOP_VINFO_LOOP (res) = loop;
+
+ bbs = get_loop_body (loop);
+
+ /* Create/Update stmt_info for all stmts in the loop. */
+ for (i = 0; i < loop->num_nodes; i++)
+ {
+ basic_block bb = bbs[i];
+
+ /* BBs in a nested inner-loop will have been already processed (because
+ we will have called vect_analyze_loop_form for any nested inner-loop).
+ Therefore, for stmts in an inner-loop we just want to update the
+ STMT_VINFO_LOOP_VINFO field of their stmt_info to point to the new
+ loop_info of the outer-loop we are currently considering to vectorize
+ (instead of the loop_info of the inner-loop).
+ For stmts in other BBs we need to create a stmt_info from scratch. */
+ if (bb->loop_father != loop)
+ {
+ /* Inner-loop bb. */
+ gcc_assert (loop->inner && bb->loop_father == loop->inner);
+ for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ gimple phi = gsi_stmt (si);
+ stmt_vec_info stmt_info = vinfo_for_stmt (phi);
+ loop_vec_info inner_loop_vinfo =
+ STMT_VINFO_LOOP_VINFO (stmt_info);
+ gcc_assert (loop->inner == LOOP_VINFO_LOOP (inner_loop_vinfo));
+ STMT_VINFO_LOOP_VINFO (stmt_info) = res;
+ }
+ for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ gimple stmt = gsi_stmt (si);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ loop_vec_info inner_loop_vinfo =
+ STMT_VINFO_LOOP_VINFO (stmt_info);
+ gcc_assert (loop->inner == LOOP_VINFO_LOOP (inner_loop_vinfo));
+ STMT_VINFO_LOOP_VINFO (stmt_info) = res;
+ }
+ }
+ else
+ {
+ /* bb in current nest. */
+ for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ gimple phi = gsi_stmt (si);
+ gimple_set_uid (phi, 0);
+ set_vinfo_for_stmt (phi, new_stmt_vec_info (phi, res));
+ }
+
+ for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ gimple stmt = gsi_stmt (si);
+ gimple_set_uid (stmt, 0);
+ set_vinfo_for_stmt (stmt, new_stmt_vec_info (stmt, res));
+ }
+ }
+ }
+
+ /* CHECKME: We want to visit all BBs before their successors (except for
+ latch blocks, for which this assertion wouldn't hold). In the simple
+ case of the loop forms we allow, a dfs order of the BBs would the same
+ as reversed postorder traversal, so we are safe. */
+
+ free (bbs);
+ bbs = XCNEWVEC (basic_block, loop->num_nodes);
+ nbbs = dfs_enumerate_from (loop->header, 0, bb_in_loop_p,
+ bbs, loop->num_nodes, loop);
+ gcc_assert (nbbs == loop->num_nodes);
+
+ LOOP_VINFO_BBS (res) = bbs;
+ LOOP_VINFO_NITERS (res) = NULL;
+ LOOP_VINFO_NITERS_UNCHANGED (res) = NULL;
+ LOOP_VINFO_COST_MODEL_MIN_ITERS (res) = 0;
+ LOOP_VINFO_VECTORIZABLE_P (res) = 0;
+ LOOP_PEELING_FOR_ALIGNMENT (res) = 0;
+ LOOP_VINFO_VECT_FACTOR (res) = 0;
+ LOOP_VINFO_DATAREFS (res) = VEC_alloc (data_reference_p, heap, 10);
+ LOOP_VINFO_DDRS (res) = VEC_alloc (ddr_p, heap, 10 * 10);
+ LOOP_VINFO_UNALIGNED_DR (res) = NULL;
+ LOOP_VINFO_MAY_MISALIGN_STMTS (res) =
+ VEC_alloc (gimple, heap,
+ PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIGNMENT_CHECKS));
+ LOOP_VINFO_MAY_ALIAS_DDRS (res) =
+ VEC_alloc (ddr_p, heap,
+ PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS));
+ LOOP_VINFO_STRIDED_STORES (res) = VEC_alloc (gimple, heap, 10);
+ LOOP_VINFO_SLP_INSTANCES (res) = VEC_alloc (slp_instance, heap, 10);
+ LOOP_VINFO_SLP_UNROLLING_FACTOR (res) = 1;
+
+ return res;
+}
+
+
+/* Function destroy_loop_vec_info.
+
+ Free LOOP_VINFO struct, as well as all the stmt_vec_info structs of all the
+ stmts in the loop. */
+
+void
+destroy_loop_vec_info (loop_vec_info loop_vinfo, bool clean_stmts)
+{
+ struct loop *loop;
+ basic_block *bbs;
+ int nbbs;
+ gimple_stmt_iterator si;
+ int j;
+ VEC (slp_instance, heap) *slp_instances;
+ slp_instance instance;
+
+ if (!loop_vinfo)
+ return;
+
+ loop = LOOP_VINFO_LOOP (loop_vinfo);
+
+ bbs = LOOP_VINFO_BBS (loop_vinfo);
+ nbbs = loop->num_nodes;
+
+ if (!clean_stmts)
+ {
+ free (LOOP_VINFO_BBS (loop_vinfo));
+ free_data_refs (LOOP_VINFO_DATAREFS (loop_vinfo));
+ free_dependence_relations (LOOP_VINFO_DDRS (loop_vinfo));
+ VEC_free (gimple, heap, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo));
+
+ free (loop_vinfo);
+ loop->aux = NULL;
+ return;
+ }
+
+ for (j = 0; j < nbbs; j++)
+ {
+ basic_block bb = bbs[j];
+ for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
+ free_stmt_vec_info (gsi_stmt (si));
+
+ for (si = gsi_start_bb (bb); !gsi_end_p (si); )
+ {
+ gimple stmt = gsi_stmt (si);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+
+ if (stmt_info)
+ {
+ /* Check if this is a "pattern stmt" (introduced by the
+ vectorizer during the pattern recognition pass). */
+ bool remove_stmt_p = false;
+ gimple orig_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
+ if (orig_stmt)
+ {
+ stmt_vec_info orig_stmt_info = vinfo_for_stmt (orig_stmt);
+ if (orig_stmt_info
+ && STMT_VINFO_IN_PATTERN_P (orig_stmt_info))
+ remove_stmt_p = true;
+ }
+
+ /* Free stmt_vec_info. */
+ free_stmt_vec_info (stmt);
+
+ /* Remove dead "pattern stmts". */
+ if (remove_stmt_p)
+ gsi_remove (&si, true);
+ }
+ gsi_next (&si);
+ }
+ }
+
+ free (LOOP_VINFO_BBS (loop_vinfo));
+ free_data_refs (LOOP_VINFO_DATAREFS (loop_vinfo));
+ free_dependence_relations (LOOP_VINFO_DDRS (loop_vinfo));
+ VEC_free (gimple, heap, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo));
+ VEC_free (ddr_p, heap, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo));
+ slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
+ for (j = 0; VEC_iterate (slp_instance, slp_instances, j, instance); j++)
+ vect_free_slp_instance (instance);
+
+ VEC_free (slp_instance, heap, LOOP_VINFO_SLP_INSTANCES (loop_vinfo));
+ VEC_free (gimple, heap, LOOP_VINFO_STRIDED_STORES (loop_vinfo));
+
+ free (loop_vinfo);
+ loop->aux = NULL;
+}
+
+
+/* Function vect_analyze_loop_1.
+
+ Apply a set of analyses on LOOP, and create a loop_vec_info struct
+ for it. The different analyses will record information in the
+ loop_vec_info struct. This is a subset of the analyses applied in
+ vect_analyze_loop, to be applied on an inner-loop nested in the loop
+ that is now considered for (outer-loop) vectorization. */
+
+static loop_vec_info
+vect_analyze_loop_1 (struct loop *loop)
+{
+ loop_vec_info loop_vinfo;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "===== analyze_loop_nest_1 =====");
+
+ /* Check the CFG characteristics of the loop (nesting, entry/exit, etc. */
+
+ loop_vinfo = vect_analyze_loop_form (loop);
+ if (!loop_vinfo)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "bad inner-loop form.");
+ return NULL;
+ }
+
+ return loop_vinfo;
+}
+
+
+/* Function vect_analyze_loop_form.
+
+ Verify that certain CFG restrictions hold, including:
+ - the loop has a pre-header
+ - the loop has a single entry and exit
+ - the loop exit condition is simple enough, and the number of iterations
+ can be analyzed (a countable loop). */
+
+loop_vec_info
+vect_analyze_loop_form (struct loop *loop)
+{
+ loop_vec_info loop_vinfo;
+ gimple loop_cond;
+ tree number_of_iterations = NULL;
+ loop_vec_info inner_loop_vinfo = NULL;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_analyze_loop_form ===");
+
+ /* Different restrictions apply when we are considering an inner-most loop,
+ vs. an outer (nested) loop.
+ (FORNOW. May want to relax some of these restrictions in the future). */
+
+ if (!loop->inner)
+ {
+ /* Inner-most loop. We currently require that the number of BBs is
+ exactly 2 (the header and latch). Vectorizable inner-most loops
+ look like this:
+
+ (pre-header)
+ |
+ header <--------+
+ | | |
+ | +--> latch --+
+ |
+ (exit-bb) */
+
+ if (loop->num_nodes != 2)
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ fprintf (vect_dump, "not vectorized: too many BBs in loop.");
+ return NULL;
+ }
+
+ if (empty_block_p (loop->header))
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ fprintf (vect_dump, "not vectorized: empty loop.");
+ return NULL;
+ }
+ }
+ else
+ {
+ struct loop *innerloop = loop->inner;
+ edge backedge, entryedge;
+
+ /* Nested loop. We currently require that the loop is doubly-nested,
+ contains a single inner loop, and the number of BBs is exactly 5.
+ Vectorizable outer-loops look like this:
+
+ (pre-header)
+ |
+ header <---+
+ | |
+ inner-loop |
+ | |
+ tail ------+
+ |
+ (exit-bb)
+
+ The inner-loop has the properties expected of inner-most loops
+ as described above. */
+
+ if ((loop->inner)->inner || (loop->inner)->next)
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ fprintf (vect_dump, "not vectorized: multiple nested loops.");
+ return NULL;
+ }
+
+ /* Analyze the inner-loop. */
+ inner_loop_vinfo = vect_analyze_loop_1 (loop->inner);
+ if (!inner_loop_vinfo)
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ fprintf (vect_dump, "not vectorized: Bad inner loop.");
+ return NULL;
+ }
+
+ if (!expr_invariant_in_loop_p (loop,
+ LOOP_VINFO_NITERS (inner_loop_vinfo)))
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ fprintf (vect_dump,
+ "not vectorized: inner-loop count not invariant.");
+ destroy_loop_vec_info (inner_loop_vinfo, true);
+ return NULL;
+ }
+
+ if (loop->num_nodes != 5)
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ fprintf (vect_dump, "not vectorized: too many BBs in loop.");
+ destroy_loop_vec_info (inner_loop_vinfo, true);
+ return NULL;
+ }
+
+ gcc_assert (EDGE_COUNT (innerloop->header->preds) == 2);
+ backedge = EDGE_PRED (innerloop->header, 1);
+ entryedge = EDGE_PRED (innerloop->header, 0);
+ if (EDGE_PRED (innerloop->header, 0)->src == innerloop->latch)
+ {
+ backedge = EDGE_PRED (innerloop->header, 0);
+ entryedge = EDGE_PRED (innerloop->header, 1);
+ }
+
+ if (entryedge->src != loop->header
+ || !single_exit (innerloop)
+ || single_exit (innerloop)->dest != EDGE_PRED (loop->latch, 0)->src)
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ fprintf (vect_dump, "not vectorized: unsupported outerloop form.");
+ destroy_loop_vec_info (inner_loop_vinfo, true);
+ return NULL;
+ }
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Considering outer-loop vectorization.");
+ }
+
+ if (!single_exit (loop)
+ || EDGE_COUNT (loop->header->preds) != 2)
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ {
+ if (!single_exit (loop))
+ fprintf (vect_dump, "not vectorized: multiple exits.");
+ else if (EDGE_COUNT (loop->header->preds) != 2)
+ fprintf (vect_dump, "not vectorized: too many incoming edges.");
+ }
+ if (inner_loop_vinfo)
+ destroy_loop_vec_info (inner_loop_vinfo, true);
+ return NULL;
+ }
+
+ /* We assume that the loop exit condition is at the end of the loop. i.e,
+ that the loop is represented as a do-while (with a proper if-guard
+ before the loop if needed), where the loop header contains all the
+ executable statements, and the latch is empty. */
+ if (!empty_block_p (loop->latch)
+ || phi_nodes (loop->latch))
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ fprintf (vect_dump, "not vectorized: unexpected loop form.");
+ if (inner_loop_vinfo)
+ destroy_loop_vec_info (inner_loop_vinfo, true);
+ return NULL;
+ }
+
+ /* Make sure there exists a single-predecessor exit bb: */
+ if (!single_pred_p (single_exit (loop)->dest))
+ {
+ edge e = single_exit (loop);
+ if (!(e->flags & EDGE_ABNORMAL))
+ {
+ split_loop_exit_edge (e);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "split exit edge.");
+ }
+ else
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ fprintf (vect_dump, "not vectorized: abnormal loop exit edge.");
+ if (inner_loop_vinfo)
+ destroy_loop_vec_info (inner_loop_vinfo, true);
+ return NULL;
+ }
+ }
+
+ loop_cond = vect_get_loop_niters (loop, &number_of_iterations);
+ if (!loop_cond)
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ fprintf (vect_dump, "not vectorized: complicated exit condition.");
+ if (inner_loop_vinfo)
+ destroy_loop_vec_info (inner_loop_vinfo, true);
+ return NULL;
+ }
+
+ if (!number_of_iterations)
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ fprintf (vect_dump,
+ "not vectorized: number of iterations cannot be computed.");
+ if (inner_loop_vinfo)
+ destroy_loop_vec_info (inner_loop_vinfo, true);
+ return NULL;
+ }
+
+ if (chrec_contains_undetermined (number_of_iterations))
+ {
+ if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS))
+ fprintf (vect_dump, "Infinite number of iterations.");
+ if (inner_loop_vinfo)
+ destroy_loop_vec_info (inner_loop_vinfo, true);
+ return NULL;
+ }
+
+ if (!NITERS_KNOWN_P (number_of_iterations))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "Symbolic number of iterations is ");
+ print_generic_expr (vect_dump, number_of_iterations, TDF_DETAILS);
+ }
+ }
+ else if (TREE_INT_CST_LOW (number_of_iterations) == 0)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "not vectorized: number of iterations = 0.");
+ if (inner_loop_vinfo)
+ destroy_loop_vec_info (inner_loop_vinfo, false);
+ return NULL;
+ }
+
+ loop_vinfo = new_loop_vec_info (loop);
+ LOOP_VINFO_NITERS (loop_vinfo) = number_of_iterations;
+ LOOP_VINFO_NITERS_UNCHANGED (loop_vinfo) = number_of_iterations;
+
+ STMT_VINFO_TYPE (vinfo_for_stmt (loop_cond)) = loop_exit_ctrl_vec_info_type;
+
+ /* CHECKME: May want to keep it around it in the future. */
+ if (inner_loop_vinfo)
+ destroy_loop_vec_info (inner_loop_vinfo, false);
+
+ gcc_assert (!loop->aux);
+ loop->aux = loop_vinfo;
+ return loop_vinfo;
+}
+
+/* Function vect_analyze_loop.
+
+ Apply a set of analyses on LOOP, and create a loop_vec_info struct
+ for it. The different analyses will record information in the
+ loop_vec_info struct. */
+loop_vec_info
+vect_analyze_loop (struct loop *loop)
+{
+ bool ok;
+ loop_vec_info loop_vinfo;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "===== analyze_loop_nest =====");
+
+ if (loop_outer (loop)
+ && loop_vec_info_for_loop (loop_outer (loop))
+ && LOOP_VINFO_VECTORIZABLE_P (loop_vec_info_for_loop (loop_outer (loop))))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "outer-loop already vectorized.");
+ return NULL;
+ }
+
+ /* Check the CFG characteristics of the loop (nesting, entry/exit, etc. */
+
+ loop_vinfo = vect_analyze_loop_form (loop);
+ if (!loop_vinfo)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "bad loop form.");
+ return NULL;
+ }
+
+ /* Find all data references in the loop (which correspond to vdefs/vuses)
+ and analyze their evolution in the loop.
+
+ FORNOW: Handle only simple, array references, which
+ alignment can be forced, and aligned pointer-references. */
+
+ ok = vect_analyze_data_refs (loop_vinfo);
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "bad data references.");
+ destroy_loop_vec_info (loop_vinfo, true);
+ return NULL;
+ }
+
+ /* Classify all cross-iteration scalar data-flow cycles.
+ Cross-iteration cycles caused by virtual phis are analyzed separately. */
+
+ vect_analyze_scalar_cycles (loop_vinfo);
+
+ vect_pattern_recog (loop_vinfo);
+
+ /* Data-flow analysis to detect stmts that do not need to be vectorized. */
+
+ ok = vect_mark_stmts_to_be_vectorized (loop_vinfo);
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "unexpected pattern.");
+ destroy_loop_vec_info (loop_vinfo, true);
+ return NULL;
+ }
+
+ /* Analyze the alignment of the data-refs in the loop.
+ Fail if a data reference is found that cannot be vectorized. */
+
+ ok = vect_analyze_data_refs_alignment (loop_vinfo);
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "bad data alignment.");
+ destroy_loop_vec_info (loop_vinfo, true);
+ return NULL;
+ }
+
+ ok = vect_determine_vectorization_factor (loop_vinfo);
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "can't determine vectorization factor.");
+ destroy_loop_vec_info (loop_vinfo, true);
+ return NULL;
+ }
+
+ /* Analyze data dependences between the data-refs in the loop.
+ FORNOW: fail at the first data dependence that we encounter. */
+
+ ok = vect_analyze_data_ref_dependences (loop_vinfo);
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "bad data dependence.");
+ destroy_loop_vec_info (loop_vinfo, true);
+ return NULL;
+ }
+
+ /* Analyze the access patterns of the data-refs in the loop (consecutive,
+ complex, etc.). FORNOW: Only handle consecutive access pattern. */
+
+ ok = vect_analyze_data_ref_accesses (loop_vinfo);
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "bad data access.");
+ destroy_loop_vec_info (loop_vinfo, true);
+ return NULL;
+ }
+
+ /* Prune the list of ddrs to be tested at run-time by versioning for alias.
+ It is important to call pruning after vect_analyze_data_ref_accesses,
+ since we use grouping information gathered by interleaving analysis. */
+ ok = vect_prune_runtime_alias_test_list (loop_vinfo);
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "too long list of versioning for alias "
+ "run-time tests.");
+ destroy_loop_vec_info (loop_vinfo, true);
+ return NULL;
+ }
+
+ /* Check the SLP opportunities in the loop, analyze and build SLP trees. */
+ ok = vect_analyze_slp (loop_vinfo);
+ if (ok)
+ {
+ /* Decide which possible SLP instances to SLP. */
+ vect_make_slp_decision (loop_vinfo);
+
+ /* Find stmts that need to be both vectorized and SLPed. */
+ vect_detect_hybrid_slp (loop_vinfo);
+ }
+
+ /* This pass will decide on using loop versioning and/or loop peeling in
+ order to enhance the alignment of data references in the loop. */
+
+ ok = vect_enhance_data_refs_alignment (loop_vinfo);
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "bad data alignment.");
+ destroy_loop_vec_info (loop_vinfo, true);
+ return NULL;
+ }
+
+ /* Scan all the operations in the loop and make sure they are
+ vectorizable. */
+
+ ok = vect_analyze_operations (loop_vinfo);
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "bad operation or unsupported loop bound.");
+ destroy_loop_vec_info (loop_vinfo, true);
+ return NULL;
+ }
+
+ LOOP_VINFO_VECTORIZABLE_P (loop_vinfo) = 1;
+
+ return loop_vinfo;
+}
+
+
+/* Function reduction_code_for_scalar_code
+
+ Input:
+ CODE - tree_code of a reduction operations.
+
+ Output:
+ REDUC_CODE - the corresponding tree-code to be used to reduce the
+ vector of partial results into a single scalar result (which
+ will also reside in a vector).
+
+ Return TRUE if a corresponding REDUC_CODE was found, FALSE otherwise. */
+
+static bool
+reduction_code_for_scalar_code (enum tree_code code,
+ enum tree_code *reduc_code)
+{
+ switch (code)
+ {
+ case MAX_EXPR:
+ *reduc_code = REDUC_MAX_EXPR;
+ return true;
+
+ case MIN_EXPR:
+ *reduc_code = REDUC_MIN_EXPR;
+ return true;
+
+ case PLUS_EXPR:
+ *reduc_code = REDUC_PLUS_EXPR;
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+
+/* Error reporting helper for vect_is_simple_reduction below. GIMPLE statement
+ STMT is printed with a message MSG. */
+
+static void
+report_vect_op (gimple stmt, const char *msg)
+{
+ fprintf (vect_dump, "%s", msg);
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+}
+
+
+/* Function vect_is_simple_reduction
+
+ Detect a cross-iteration def-use cycle that represents a simple
+ reduction computation. We look for the following pattern:
+
+ loop_header:
+ a1 = phi < a0, a2 >
+ a3 = ...
+ a2 = operation (a3, a1)
+
+ such that:
+ 1. operation is commutative and associative and it is safe to
+ change the order of the computation.
+ 2. no uses for a2 in the loop (a2 is used out of the loop)
+ 3. no uses of a1 in the loop besides the reduction operation.
+
+ Condition 1 is tested here.
+ Conditions 2,3 are tested in vect_mark_stmts_to_be_vectorized. */
+
+gimple
+vect_is_simple_reduction (loop_vec_info loop_info, gimple phi)
+{
+ struct loop *loop = (gimple_bb (phi))->loop_father;
+ struct loop *vect_loop = LOOP_VINFO_LOOP (loop_info);
+ edge latch_e = loop_latch_edge (loop);
+ tree loop_arg = PHI_ARG_DEF_FROM_EDGE (phi, latch_e);
+ gimple def_stmt, def1, def2;
+ enum tree_code code;
+ tree op1, op2;
+ tree type;
+ int nloop_uses;
+ tree name;
+ imm_use_iterator imm_iter;
+ use_operand_p use_p;
+
+ gcc_assert (loop == vect_loop || flow_loop_nested_p (vect_loop, loop));
+
+ name = PHI_RESULT (phi);
+ nloop_uses = 0;
+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, name)
+ {
+ gimple use_stmt = USE_STMT (use_p);
+ if (flow_bb_inside_loop_p (loop, gimple_bb (use_stmt))
+ && vinfo_for_stmt (use_stmt)
+ && !is_pattern_stmt_p (vinfo_for_stmt (use_stmt)))
+ nloop_uses++;
+ if (nloop_uses > 1)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "reduction used in loop.");
+ return NULL;
+ }
+ }
+
+ if (TREE_CODE (loop_arg) != SSA_NAME)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "reduction: not ssa_name: ");
+ print_generic_expr (vect_dump, loop_arg, TDF_SLIM);
+ }
+ return NULL;
+ }
+
+ def_stmt = SSA_NAME_DEF_STMT (loop_arg);
+ if (!def_stmt)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "reduction: no def_stmt.");
+ return NULL;
+ }
+
+ if (!is_gimple_assign (def_stmt))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ print_gimple_stmt (vect_dump, def_stmt, 0, TDF_SLIM);
+ return NULL;
+ }
+
+ name = gimple_assign_lhs (def_stmt);
+ nloop_uses = 0;
+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, name)
+ {
+ gimple use_stmt = USE_STMT (use_p);
+ if (flow_bb_inside_loop_p (loop, gimple_bb (use_stmt))
+ && vinfo_for_stmt (use_stmt)
+ && !is_pattern_stmt_p (vinfo_for_stmt (use_stmt)))
+ nloop_uses++;
+ if (nloop_uses > 1)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "reduction used in loop.");
+ return NULL;
+ }
+ }
+
+ code = gimple_assign_rhs_code (def_stmt);
+
+ if (!commutative_tree_code (code) || !associative_tree_code (code))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ report_vect_op (def_stmt, "reduction: not commutative/associative: ");
+ return NULL;
+ }
+
+ if (get_gimple_rhs_class (code) != GIMPLE_BINARY_RHS)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ report_vect_op (def_stmt, "reduction: not binary operation: ");
+ return NULL;
+ }
+
+ op1 = gimple_assign_rhs1 (def_stmt);
+ op2 = gimple_assign_rhs2 (def_stmt);
+ if (TREE_CODE (op1) != SSA_NAME || TREE_CODE (op2) != SSA_NAME)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ report_vect_op (def_stmt, "reduction: uses not ssa_names: ");
+ return NULL;
+ }
+
+ /* Check that it's ok to change the order of the computation. */
+ type = TREE_TYPE (gimple_assign_lhs (def_stmt));
+ if (TYPE_MAIN_VARIANT (type) != TYPE_MAIN_VARIANT (TREE_TYPE (op1))
+ || TYPE_MAIN_VARIANT (type) != TYPE_MAIN_VARIANT (TREE_TYPE (op2)))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "reduction: multiple types: operation type: ");
+ print_generic_expr (vect_dump, type, TDF_SLIM);
+ fprintf (vect_dump, ", operands types: ");
+ print_generic_expr (vect_dump, TREE_TYPE (op1), TDF_SLIM);
+ fprintf (vect_dump, ",");
+ print_generic_expr (vect_dump, TREE_TYPE (op2), TDF_SLIM);
+ }
+ return NULL;
+ }
+
+ /* Generally, when vectorizing a reduction we change the order of the
+ computation. This may change the behavior of the program in some
+ cases, so we need to check that this is ok. One exception is when
+ vectorizing an outer-loop: the inner-loop is executed sequentially,
+ and therefore vectorizing reductions in the inner-loop during
+ outer-loop vectorization is safe. */
+
+ /* CHECKME: check for !flag_finite_math_only too? */
+ if (SCALAR_FLOAT_TYPE_P (type) && !flag_associative_math
+ && !nested_in_vect_loop_p (vect_loop, def_stmt))
+ {
+ /* Changing the order of operations changes the semantics. */
+ if (vect_print_dump_info (REPORT_DETAILS))
+ report_vect_op (def_stmt, "reduction: unsafe fp math optimization: ");
+ return NULL;
+ }
+ else if (INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_TRAPS (type)
+ && !nested_in_vect_loop_p (vect_loop, def_stmt))
+ {
+ /* Changing the order of operations changes the semantics. */
+ if (vect_print_dump_info (REPORT_DETAILS))
+ report_vect_op (def_stmt, "reduction: unsafe int math optimization: ");
+ return NULL;
+ }
+ else if (SAT_FIXED_POINT_TYPE_P (type))
+ {
+ /* Changing the order of operations changes the semantics. */
+ if (vect_print_dump_info (REPORT_DETAILS))
+ report_vect_op (def_stmt,
+ "reduction: unsafe fixed-point math optimization: ");
+ return NULL;
+ }
+
+ /* reduction is safe. we're dealing with one of the following:
+ 1) integer arithmetic and no trapv
+ 2) floating point arithmetic, and special flags permit this optimization.
+ */
+ def1 = SSA_NAME_DEF_STMT (op1);
+ def2 = SSA_NAME_DEF_STMT (op2);
+ if (!def1 || !def2 || gimple_nop_p (def1) || gimple_nop_p (def2))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ report_vect_op (def_stmt, "reduction: no defs for operands: ");
+ return NULL;
+ }
+
+
+ /* Check that one def is the reduction def, defined by PHI,
+ the other def is either defined in the loop ("vect_loop_def"),
+ or it's an induction (defined by a loop-header phi-node). */
+
+ if (def2 == phi
+ && flow_bb_inside_loop_p (loop, gimple_bb (def1))
+ && (is_gimple_assign (def1)
+ || STMT_VINFO_DEF_TYPE (vinfo_for_stmt (def1)) == vect_induction_def
+ || (gimple_code (def1) == GIMPLE_PHI
+ && STMT_VINFO_DEF_TYPE (vinfo_for_stmt (def1)) == vect_loop_def
+ && !is_loop_header_bb_p (gimple_bb (def1)))))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ report_vect_op (def_stmt, "detected reduction:");
+ return def_stmt;
+ }
+ else if (def1 == phi
+ && flow_bb_inside_loop_p (loop, gimple_bb (def2))
+ && (is_gimple_assign (def2)
+ || STMT_VINFO_DEF_TYPE (vinfo_for_stmt (def2)) == vect_induction_def
+ || (gimple_code (def2) == GIMPLE_PHI
+ && STMT_VINFO_DEF_TYPE (vinfo_for_stmt (def2)) == vect_loop_def
+ && !is_loop_header_bb_p (gimple_bb (def2)))))
+ {
+ /* Swap operands (just for simplicity - so that the rest of the code
+ can assume that the reduction variable is always the last (second)
+ argument). */
+ if (vect_print_dump_info (REPORT_DETAILS))
+ report_vect_op (def_stmt ,
+ "detected reduction: need to swap operands:");
+ swap_tree_operands (def_stmt, gimple_assign_rhs1_ptr (def_stmt),
+ gimple_assign_rhs2_ptr (def_stmt));
+ return def_stmt;
+ }
+ else
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ report_vect_op (def_stmt, "reduction: unknown pattern.");
+ return NULL;
+ }
+}
+
+
+/* Function vect_estimate_min_profitable_iters
+
+ Return the number of iterations required for the vector version of the
+ loop to be profitable relative to the cost of the scalar version of the
+ loop.
+
+ TODO: Take profile info into account before making vectorization
+ decisions, if available. */
+
+int
+vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo)
+{
+ int i;
+ int min_profitable_iters;
+ int peel_iters_prologue;
+ int peel_iters_epilogue;
+ int vec_inside_cost = 0;
+ int vec_outside_cost = 0;
+ int scalar_single_iter_cost = 0;
+ int scalar_outside_cost = 0;
+ int vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
+ int nbbs = loop->num_nodes;
+ int byte_misalign = LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo);
+ int peel_guard_costs = 0;
+ int innerloop_iters = 0, factor;
+ VEC (slp_instance, heap) *slp_instances;
+ slp_instance instance;
+
+ /* Cost model disabled. */
+ if (!flag_vect_cost_model)
+ {
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "cost model disabled.");
+ return 0;
+ }
+
+ /* Requires loop versioning tests to handle misalignment. */
+ if (VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo)))
+ {
+ /* FIXME: Make cost depend on complexity of individual check. */
+ vec_outside_cost +=
+ VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo));
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "cost model: Adding cost of checks for loop "
+ "versioning to treat misalignment.\n");
+ }
+
+ if (VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
+ {
+ /* FIXME: Make cost depend on complexity of individual check. */
+ vec_outside_cost +=
+ VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo));
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "cost model: Adding cost of checks for loop "
+ "versioning aliasing.\n");
+ }
+
+ if (VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
+ || VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
+ {
+ vec_outside_cost += TARG_COND_TAKEN_BRANCH_COST;
+ }
+
+ /* Count statements in scalar loop. Using this as scalar cost for a single
+ iteration for now.
+
+ TODO: Add outer loop support.
+
+ TODO: Consider assigning different costs to different scalar
+ statements. */
+
+ /* FORNOW. */
+ if (loop->inner)
+ innerloop_iters = 50; /* FIXME */
+
+ for (i = 0; i < nbbs; i++)
+ {
+ gimple_stmt_iterator si;
+ basic_block bb = bbs[i];
+
+ if (bb->loop_father == loop->inner)
+ factor = innerloop_iters;
+ else
+ factor = 1;
+
+ for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ gimple stmt = gsi_stmt (si);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ /* Skip stmts that are not vectorized inside the loop. */
+ if (!STMT_VINFO_RELEVANT_P (stmt_info)
+ && (!STMT_VINFO_LIVE_P (stmt_info)
+ || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
+ continue;
+ scalar_single_iter_cost += cost_for_stmt (stmt) * factor;
+ vec_inside_cost += STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) * factor;
+ /* FIXME: for stmts in the inner-loop in outer-loop vectorization,
+ some of the "outside" costs are generated inside the outer-loop. */
+ vec_outside_cost += STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info);
+ }
+ }
+
+ /* Add additional cost for the peeled instructions in prologue and epilogue
+ loop.
+
+ FORNOW: If we don't know the value of peel_iters for prologue or epilogue
+ at compile-time - we assume it's vf/2 (the worst would be vf-1).
+
+ TODO: Build an expression that represents peel_iters for prologue and
+ epilogue to be used in a run-time test. */
+
+ if (byte_misalign < 0)
+ {
+ peel_iters_prologue = vf/2;
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "cost model: "
+ "prologue peel iters set to vf/2.");
+
+ /* If peeling for alignment is unknown, loop bound of main loop becomes
+ unknown. */
+ peel_iters_epilogue = vf/2;
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "cost model: "
+ "epilogue peel iters set to vf/2 because "
+ "peeling for alignment is unknown .");
+
+ /* If peeled iterations are unknown, count a taken branch and a not taken
+ branch per peeled loop. Even if scalar loop iterations are known,
+ vector iterations are not known since peeled prologue iterations are
+ not known. Hence guards remain the same. */
+ peel_guard_costs += 2 * (TARG_COND_TAKEN_BRANCH_COST
+ + TARG_COND_NOT_TAKEN_BRANCH_COST);
+ }
+ else
+ {
+ if (byte_misalign)
+ {
+ struct data_reference *dr = LOOP_VINFO_UNALIGNED_DR (loop_vinfo);
+ int element_size = GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (dr))));
+ tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (DR_STMT (dr)));
+ int nelements = TYPE_VECTOR_SUBPARTS (vectype);
+
+ peel_iters_prologue = nelements - (byte_misalign / element_size);
+ }
+ else
+ peel_iters_prologue = 0;
+
+ if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo))
+ {
+ peel_iters_epilogue = vf/2;
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "cost model: "
+ "epilogue peel iters set to vf/2 because "
+ "loop iterations are unknown .");
+
+ /* If peeled iterations are known but number of scalar loop
+ iterations are unknown, count a taken branch per peeled loop. */
+ peel_guard_costs += 2 * TARG_COND_TAKEN_BRANCH_COST;
+
+ }
+ else
+ {
+ int niters = LOOP_VINFO_INT_NITERS (loop_vinfo);
+ peel_iters_prologue = niters < peel_iters_prologue ?
+ niters : peel_iters_prologue;
+ peel_iters_epilogue = (niters - peel_iters_prologue) % vf;
+ }
+ }
+
+ vec_outside_cost += (peel_iters_prologue * scalar_single_iter_cost)
+ + (peel_iters_epilogue * scalar_single_iter_cost)
+ + peel_guard_costs;
+
+ /* FORNOW: The scalar outside cost is incremented in one of the
+ following ways:
+
+ 1. The vectorizer checks for alignment and aliasing and generates
+ a condition that allows dynamic vectorization. A cost model
+ check is ANDED with the versioning condition. Hence scalar code
+ path now has the added cost of the versioning check.
+
+ if (cost > th & versioning_check)
+ jmp to vector code
+
+ Hence run-time scalar is incremented by not-taken branch cost.
+
+ 2. The vectorizer then checks if a prologue is required. If the
+ cost model check was not done before during versioning, it has to
+ be done before the prologue check.
+
+ if (cost <= th)
+ prologue = scalar_iters
+ if (prologue == 0)
+ jmp to vector code
+ else
+ execute prologue
+ if (prologue == num_iters)
+ go to exit
+
+ Hence the run-time scalar cost is incremented by a taken branch,
+ plus a not-taken branch, plus a taken branch cost.
+
+ 3. The vectorizer then checks if an epilogue is required. If the
+ cost model check was not done before during prologue check, it
+ has to be done with the epilogue check.
+
+ if (prologue == 0)
+ jmp to vector code
+ else
+ execute prologue
+ if (prologue == num_iters)
+ go to exit
+ vector code:
+ if ((cost <= th) | (scalar_iters-prologue-epilogue == 0))
+ jmp to epilogue
+
+ Hence the run-time scalar cost should be incremented by 2 taken
+ branches.
+
+ TODO: The back end may reorder the BBS's differently and reverse
+ conditions/branch directions. Change the estimates below to
+ something more reasonable. */
+
+ /* If the number of iterations is known and we do not do versioning, we can
+ decide whether to vectorize at compile time. Hence the scalar version
+ do not carry cost model guard costs. */
+ if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
+ || VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
+ || VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
+ {
+ /* Cost model check occurs at versioning. */
+ if (VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
+ || VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
+ scalar_outside_cost += TARG_COND_NOT_TAKEN_BRANCH_COST;
+ else
+ {
+ /* Cost model check occurs at prologue generation. */
+ if (LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo) < 0)
+ scalar_outside_cost += 2 * TARG_COND_TAKEN_BRANCH_COST
+ + TARG_COND_NOT_TAKEN_BRANCH_COST;
+ /* Cost model check occurs at epilogue generation. */
+ else
+ scalar_outside_cost += 2 * TARG_COND_TAKEN_BRANCH_COST;
+ }
+ }
+
+ /* Add SLP costs. */
+ slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
+ for (i = 0; VEC_iterate (slp_instance, slp_instances, i, instance); i++)
+ {
+ vec_outside_cost += SLP_INSTANCE_OUTSIDE_OF_LOOP_COST (instance);
+ vec_inside_cost += SLP_INSTANCE_INSIDE_OF_LOOP_COST (instance);
+ }
+
+ /* Calculate number of iterations required to make the vector version
+ profitable, relative to the loop bodies only. The following condition
+ must hold true:
+ SIC * niters + SOC > VIC * ((niters-PL_ITERS-EP_ITERS)/VF) + VOC
+ where
+ SIC = scalar iteration cost, VIC = vector iteration cost,
+ VOC = vector outside cost, VF = vectorization factor,
+ PL_ITERS = prologue iterations, EP_ITERS= epilogue iterations
+ SOC = scalar outside cost for run time cost model check. */
+
+ if ((scalar_single_iter_cost * vf) > vec_inside_cost)
+ {
+ if (vec_outside_cost <= 0)
+ min_profitable_iters = 1;
+ else
+ {
+ min_profitable_iters = ((vec_outside_cost - scalar_outside_cost) * vf
+ - vec_inside_cost * peel_iters_prologue
+ - vec_inside_cost * peel_iters_epilogue)
+ / ((scalar_single_iter_cost * vf)
+ - vec_inside_cost);
+
+ if ((scalar_single_iter_cost * vf * min_profitable_iters)
+ <= ((vec_inside_cost * min_profitable_iters)
+ + ((vec_outside_cost - scalar_outside_cost) * vf)))
+ min_profitable_iters++;
+ }
+ }
+ /* vector version will never be profitable. */
+ else
+ {
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "cost model: vector iteration cost = %d "
+ "is divisible by scalar iteration cost = %d by a factor "
+ "greater than or equal to the vectorization factor = %d .",
+ vec_inside_cost, scalar_single_iter_cost, vf);
+ return -1;
+ }
+
+ if (vect_print_dump_info (REPORT_COST))
+ {
+ fprintf (vect_dump, "Cost model analysis: \n");
+ fprintf (vect_dump, " Vector inside of loop cost: %d\n",
+ vec_inside_cost);
+ fprintf (vect_dump, " Vector outside of loop cost: %d\n",
+ vec_outside_cost);
+ fprintf (vect_dump, " Scalar iteration cost: %d\n",
+ scalar_single_iter_cost);
+ fprintf (vect_dump, " Scalar outside cost: %d\n", scalar_outside_cost);
+ fprintf (vect_dump, " prologue iterations: %d\n",
+ peel_iters_prologue);
+ fprintf (vect_dump, " epilogue iterations: %d\n",
+ peel_iters_epilogue);
+ fprintf (vect_dump, " Calculated minimum iters for profitability: %d\n",
+ min_profitable_iters);
+ }
+
+ min_profitable_iters =
+ min_profitable_iters < vf ? vf : min_profitable_iters;
+
+ /* Because the condition we create is:
+ if (niters <= min_profitable_iters)
+ then skip the vectorized loop. */
+ min_profitable_iters--;
+
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, " Profitability threshold = %d\n",
+ min_profitable_iters);
+
+ return min_profitable_iters;
+}
+
+
+/* TODO: Close dependency between vect_model_*_cost and vectorizable_*
+ functions. Design better to avoid maintenance issues. */
+
+/* Function vect_model_reduction_cost.
+
+ Models cost for a reduction operation, including the vector ops
+ generated within the strip-mine loop, the initial definition before
+ the loop, and the epilogue code that must be generated. */
+
+static bool
+vect_model_reduction_cost (stmt_vec_info stmt_info, enum tree_code reduc_code,
+ int ncopies)
+{
+ int outer_cost = 0;
+ enum tree_code code;
+ optab optab;
+ tree vectype;
+ gimple stmt, orig_stmt;
+ tree reduction_op;
+ enum machine_mode mode;
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+
+
+ /* Cost of reduction op inside loop. */
+ STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) += ncopies * TARG_VEC_STMT_COST;
+
+ stmt = STMT_VINFO_STMT (stmt_info);
+
+ switch (get_gimple_rhs_class (gimple_assign_rhs_code (stmt)))
+ {
+ case GIMPLE_SINGLE_RHS:
+ gcc_assert (TREE_OPERAND_LENGTH (gimple_assign_rhs1 (stmt)) == ternary_op);
+ reduction_op = TREE_OPERAND (gimple_assign_rhs1 (stmt), 2);
+ break;
+ case GIMPLE_UNARY_RHS:
+ reduction_op = gimple_assign_rhs1 (stmt);
+ break;
+ case GIMPLE_BINARY_RHS:
+ reduction_op = gimple_assign_rhs2 (stmt);
+ break;
+ default:
+ gcc_unreachable ();
+ }
+
+ vectype = get_vectype_for_scalar_type (TREE_TYPE (reduction_op));
+ if (!vectype)
+ {
+ if (vect_print_dump_info (REPORT_COST))
+ {
+ fprintf (vect_dump, "unsupported data-type ");
+ print_generic_expr (vect_dump, TREE_TYPE (reduction_op), TDF_SLIM);
+ }
+ return false;
+ }
+
+ mode = TYPE_MODE (vectype);
+ orig_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
+
+ if (!orig_stmt)
+ orig_stmt = STMT_VINFO_STMT (stmt_info);
+
+ code = gimple_assign_rhs_code (orig_stmt);
+
+ /* Add in cost for initial definition. */
+ outer_cost += TARG_SCALAR_TO_VEC_COST;
+
+ /* Determine cost of epilogue code.
+
+ We have a reduction operator that will reduce the vector in one statement.
+ Also requires scalar extract. */
+
+ if (!nested_in_vect_loop_p (loop, orig_stmt))
+ {
+ if (reduc_code < NUM_TREE_CODES)
+ outer_cost += TARG_VEC_STMT_COST + TARG_VEC_TO_SCALAR_COST;
+ else
+ {
+ int vec_size_in_bits = tree_low_cst (TYPE_SIZE (vectype), 1);
+ tree bitsize =
+ TYPE_SIZE (TREE_TYPE (gimple_assign_lhs (orig_stmt)));
+ int element_bitsize = tree_low_cst (bitsize, 1);
+ int nelements = vec_size_in_bits / element_bitsize;
+
+ optab = optab_for_tree_code (code, vectype, optab_default);
+
+ /* We have a whole vector shift available. */
+ if (VECTOR_MODE_P (mode)
+ && optab_handler (optab, mode)->insn_code != CODE_FOR_nothing
+ && optab_handler (vec_shr_optab, mode)->insn_code != CODE_FOR_nothing)
+ /* Final reduction via vector shifts and the reduction operator. Also
+ requires scalar extract. */
+ outer_cost += ((exact_log2(nelements) * 2) * TARG_VEC_STMT_COST
+ + TARG_VEC_TO_SCALAR_COST);
+ else
+ /* Use extracts and reduction op for final reduction. For N elements,
+ we have N extracts and N-1 reduction ops. */
+ outer_cost += ((nelements + nelements - 1) * TARG_VEC_STMT_COST);
+ }
+ }
+
+ STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info) = outer_cost;
+
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "vect_model_reduction_cost: inside_cost = %d, "
+ "outside_cost = %d .", STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info),
+ STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info));
+
+ return true;
+}
+
+
+/* Function vect_model_induction_cost.
+
+ Models cost for induction operations. */
+
+static void
+vect_model_induction_cost (stmt_vec_info stmt_info, int ncopies)
+{
+ /* loop cost for vec_loop. */
+ STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) = ncopies * TARG_VEC_STMT_COST;
+ /* prologue cost for vec_init and vec_step. */
+ STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info) = 2 * TARG_SCALAR_TO_VEC_COST;
+
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "vect_model_induction_cost: inside_cost = %d, "
+ "outside_cost = %d .", STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info),
+ STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info));
+}
+
+
+/* Function get_initial_def_for_induction
+
+ Input:
+ STMT - a stmt that performs an induction operation in the loop.
+ IV_PHI - the initial value of the induction variable
+
+ Output:
+ Return a vector variable, initialized with the first VF values of
+ the induction variable. E.g., for an iv with IV_PHI='X' and
+ evolution S, for a vector of 4 units, we want to return:
+ [X, X + S, X + 2*S, X + 3*S]. */
+
+static tree
+get_initial_def_for_induction (gimple iv_phi)
+{
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (iv_phi);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ tree scalar_type = TREE_TYPE (gimple_phi_result (iv_phi));
+ tree vectype;
+ int nunits;
+ edge pe = loop_preheader_edge (loop);
+ struct loop *iv_loop;
+ basic_block new_bb;
+ tree vec, vec_init, vec_step, t;
+ tree access_fn;
+ tree new_var;
+ tree new_name;
+ gimple init_stmt, induction_phi, new_stmt;
+ tree induc_def, vec_def, vec_dest;
+ tree init_expr, step_expr;
+ int vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+ int i;
+ bool ok;
+ int ncopies;
+ tree expr;
+ stmt_vec_info phi_info = vinfo_for_stmt (iv_phi);
+ bool nested_in_vect_loop = false;
+ gimple_seq stmts = NULL;
+ imm_use_iterator imm_iter;
+ use_operand_p use_p;
+ gimple exit_phi;
+ edge latch_e;
+ tree loop_arg;
+ gimple_stmt_iterator si;
+ basic_block bb = gimple_bb (iv_phi);
+
+ vectype = get_vectype_for_scalar_type (scalar_type);
+ gcc_assert (vectype);
+ nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ ncopies = vf / nunits;
+
+ gcc_assert (phi_info);
+ gcc_assert (ncopies >= 1);
+
+ /* Find the first insertion point in the BB. */
+ si = gsi_after_labels (bb);
+
+ if (INTEGRAL_TYPE_P (scalar_type) || POINTER_TYPE_P (scalar_type))
+ step_expr = build_int_cst (scalar_type, 0);
+ else
+ step_expr = build_real (scalar_type, dconst0);
+
+ /* Is phi in an inner-loop, while vectorizing an enclosing outer-loop? */
+ if (nested_in_vect_loop_p (loop, iv_phi))
+ {
+ nested_in_vect_loop = true;
+ iv_loop = loop->inner;
+ }
+ else
+ iv_loop = loop;
+ gcc_assert (iv_loop == (gimple_bb (iv_phi))->loop_father);
+
+ latch_e = loop_latch_edge (iv_loop);
+ loop_arg = PHI_ARG_DEF_FROM_EDGE (iv_phi, latch_e);
+
+ access_fn = analyze_scalar_evolution (iv_loop, PHI_RESULT (iv_phi));
+ gcc_assert (access_fn);
+ ok = vect_is_simple_iv_evolution (iv_loop->num, access_fn,
+ &init_expr, &step_expr);
+ gcc_assert (ok);
+ pe = loop_preheader_edge (iv_loop);
+
+ /* Create the vector that holds the initial_value of the induction. */
+ if (nested_in_vect_loop)
+ {
+ /* iv_loop is nested in the loop to be vectorized. init_expr had already
+ been created during vectorization of previous stmts; We obtain it from
+ the STMT_VINFO_VEC_STMT of the defining stmt. */
+ tree iv_def = PHI_ARG_DEF_FROM_EDGE (iv_phi, loop_preheader_edge (iv_loop));
+ vec_init = vect_get_vec_def_for_operand (iv_def, iv_phi, NULL);
+ }
+ else
+ {
+ /* iv_loop is the loop to be vectorized. Create:
+ vec_init = [X, X+S, X+2*S, X+3*S] (S = step_expr, X = init_expr) */
+ new_var = vect_get_new_vect_var (scalar_type, vect_scalar_var, "var_");
+ add_referenced_var (new_var);
+
+ new_name = force_gimple_operand (init_expr, &stmts, false, new_var);
+ if (stmts)
+ {
+ new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
+ gcc_assert (!new_bb);
+ }
+
+ t = NULL_TREE;
+ t = tree_cons (NULL_TREE, init_expr, t);
+ for (i = 1; i < nunits; i++)
+ {
+ /* Create: new_name_i = new_name + step_expr */
+ enum tree_code code = POINTER_TYPE_P (scalar_type)
+ ? POINTER_PLUS_EXPR : PLUS_EXPR;
+ init_stmt = gimple_build_assign_with_ops (code, new_var,
+ new_name, step_expr);
+ new_name = make_ssa_name (new_var, init_stmt);
+ gimple_assign_set_lhs (init_stmt, new_name);
+
+ new_bb = gsi_insert_on_edge_immediate (pe, init_stmt);
+ gcc_assert (!new_bb);
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "created new init_stmt: ");
+ print_gimple_stmt (vect_dump, init_stmt, 0, TDF_SLIM);
+ }
+ t = tree_cons (NULL_TREE, new_name, t);
+ }
+ /* Create a vector from [new_name_0, new_name_1, ..., new_name_nunits-1] */
+ vec = build_constructor_from_list (vectype, nreverse (t));
+ vec_init = vect_init_vector (iv_phi, vec, vectype, NULL);
+ }
+
+
+ /* Create the vector that holds the step of the induction. */
+ if (nested_in_vect_loop)
+ /* iv_loop is nested in the loop to be vectorized. Generate:
+ vec_step = [S, S, S, S] */
+ new_name = step_expr;
+ else
+ {
+ /* iv_loop is the loop to be vectorized. Generate:
+ vec_step = [VF*S, VF*S, VF*S, VF*S] */
+ expr = build_int_cst (scalar_type, vf);
+ new_name = fold_build2 (MULT_EXPR, scalar_type, expr, step_expr);
+ }
+
+ t = NULL_TREE;
+ for (i = 0; i < nunits; i++)
+ t = tree_cons (NULL_TREE, unshare_expr (new_name), t);
+ gcc_assert (CONSTANT_CLASS_P (new_name));
+ vec = build_vector (vectype, t);
+ vec_step = vect_init_vector (iv_phi, vec, vectype, NULL);
+
+
+ /* Create the following def-use cycle:
+ loop prolog:
+ vec_init = ...
+ vec_step = ...
+ loop:
+ vec_iv = PHI <vec_init, vec_loop>
+ ...
+ STMT
+ ...
+ vec_loop = vec_iv + vec_step; */
+
+ /* Create the induction-phi that defines the induction-operand. */
+ vec_dest = vect_get_new_vect_var (vectype, vect_simple_var, "vec_iv_");
+ add_referenced_var (vec_dest);
+ induction_phi = create_phi_node (vec_dest, iv_loop->header);
+ set_vinfo_for_stmt (induction_phi,
+ new_stmt_vec_info (induction_phi, loop_vinfo));
+ induc_def = PHI_RESULT (induction_phi);
+
+ /* Create the iv update inside the loop */
+ new_stmt = gimple_build_assign_with_ops (PLUS_EXPR, vec_dest,
+ induc_def, vec_step);
+ vec_def = make_ssa_name (vec_dest, new_stmt);
+ gimple_assign_set_lhs (new_stmt, vec_def);
+ gsi_insert_before (&si, new_stmt, GSI_SAME_STMT);
+ set_vinfo_for_stmt (new_stmt, new_stmt_vec_info (new_stmt, loop_vinfo));
+
+ /* Set the arguments of the phi node: */
+ add_phi_arg (induction_phi, vec_init, pe);
+ add_phi_arg (induction_phi, vec_def, loop_latch_edge (iv_loop));
+
+
+ /* In case that vectorization factor (VF) is bigger than the number
+ of elements that we can fit in a vectype (nunits), we have to generate
+ more than one vector stmt - i.e - we need to "unroll" the
+ vector stmt by a factor VF/nunits. For more details see documentation
+ in vectorizable_operation. */
+
+ if (ncopies > 1)
+ {
+ stmt_vec_info prev_stmt_vinfo;
+ /* FORNOW. This restriction should be relaxed. */
+ gcc_assert (!nested_in_vect_loop);
+
+ /* Create the vector that holds the step of the induction. */
+ expr = build_int_cst (scalar_type, nunits);
+ new_name = fold_build2 (MULT_EXPR, scalar_type, expr, step_expr);
+ t = NULL_TREE;
+ for (i = 0; i < nunits; i++)
+ t = tree_cons (NULL_TREE, unshare_expr (new_name), t);
+ gcc_assert (CONSTANT_CLASS_P (new_name));
+ vec = build_vector (vectype, t);
+ vec_step = vect_init_vector (iv_phi, vec, vectype, NULL);
+
+ vec_def = induc_def;
+ prev_stmt_vinfo = vinfo_for_stmt (induction_phi);
+ for (i = 1; i < ncopies; i++)
+ {
+ /* vec_i = vec_prev + vec_step */
+ new_stmt = gimple_build_assign_with_ops (PLUS_EXPR, vec_dest,
+ vec_def, vec_step);
+ vec_def = make_ssa_name (vec_dest, new_stmt);
+ gimple_assign_set_lhs (new_stmt, vec_def);
+
+ gsi_insert_before (&si, new_stmt, GSI_SAME_STMT);
+ set_vinfo_for_stmt (new_stmt,
+ new_stmt_vec_info (new_stmt, loop_vinfo));
+ STMT_VINFO_RELATED_STMT (prev_stmt_vinfo) = new_stmt;
+ prev_stmt_vinfo = vinfo_for_stmt (new_stmt);
+ }
+ }
+
+ if (nested_in_vect_loop)
+ {
+ /* Find the loop-closed exit-phi of the induction, and record
+ the final vector of induction results: */
+ exit_phi = NULL;
+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, loop_arg)
+ {
+ if (!flow_bb_inside_loop_p (iv_loop, gimple_bb (USE_STMT (use_p))))
+ {
+ exit_phi = USE_STMT (use_p);
+ break;
+ }
+ }
+ if (exit_phi)
+ {
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (exit_phi);
+ /* FORNOW. Currently not supporting the case that an inner-loop induction
+ is not used in the outer-loop (i.e. only outside the outer-loop). */
+ gcc_assert (STMT_VINFO_RELEVANT_P (stmt_vinfo)
+ && !STMT_VINFO_LIVE_P (stmt_vinfo));
+
+ STMT_VINFO_VEC_STMT (stmt_vinfo) = new_stmt;
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "vector of inductions after inner-loop:");
+ print_gimple_stmt (vect_dump, new_stmt, 0, TDF_SLIM);
+ }
+ }
+ }
+
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "transform induction: created def-use cycle: ");
+ print_gimple_stmt (vect_dump, induction_phi, 0, TDF_SLIM);
+ fprintf (vect_dump, "\n");
+ print_gimple_stmt (vect_dump, SSA_NAME_DEF_STMT (vec_def), 0, TDF_SLIM);
+ }
+
+ STMT_VINFO_VEC_STMT (phi_info) = induction_phi;
+ return induc_def;
+}
+
+
+/* Function get_initial_def_for_reduction
+
+ Input:
+ STMT - a stmt that performs a reduction operation in the loop.
+ INIT_VAL - the initial value of the reduction variable
+
+ Output:
+ ADJUSTMENT_DEF - a tree that holds a value to be added to the final result
+ of the reduction (used for adjusting the epilog - see below).
+ Return a vector variable, initialized according to the operation that STMT
+ performs. This vector will be used as the initial value of the
+ vector of partial results.
+
+ Option1 (adjust in epilog): Initialize the vector as follows:
+ add: [0,0,...,0,0]
+ mult: [1,1,...,1,1]
+ min/max: [init_val,init_val,..,init_val,init_val]
+ bit and/or: [init_val,init_val,..,init_val,init_val]
+ and when necessary (e.g. add/mult case) let the caller know
+ that it needs to adjust the result by init_val.
+
+ Option2: Initialize the vector as follows:
+ add: [0,0,...,0,init_val]
+ mult: [1,1,...,1,init_val]
+ min/max: [init_val,init_val,...,init_val]
+ bit and/or: [init_val,init_val,...,init_val]
+ and no adjustments are needed.
+
+ For example, for the following code:
+
+ s = init_val;
+ for (i=0;i<n;i++)
+ s = s + a[i];
+
+ STMT is 's = s + a[i]', and the reduction variable is 's'.
+ For a vector of 4 units, we want to return either [0,0,0,init_val],
+ or [0,0,0,0] and let the caller know that it needs to adjust
+ the result at the end by 'init_val'.
+
+ FORNOW, we are using the 'adjust in epilog' scheme, because this way the
+ initialization vector is simpler (same element in all entries).
+ A cost model should help decide between these two schemes. */
+
+tree
+get_initial_def_for_reduction (gimple stmt, tree init_val, tree *adjustment_def)
+{
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo);
+ int nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ tree scalar_type = TREE_TYPE (vectype);
+ enum tree_code code = gimple_assign_rhs_code (stmt);
+ tree type = TREE_TYPE (init_val);
+ tree vecdef;
+ tree def_for_init;
+ tree init_def;
+ tree t = NULL_TREE;
+ int i;
+ bool nested_in_vect_loop = false;
+
+ gcc_assert (POINTER_TYPE_P (type) || INTEGRAL_TYPE_P (type) || SCALAR_FLOAT_TYPE_P (type));
+ if (nested_in_vect_loop_p (loop, stmt))
+ nested_in_vect_loop = true;
+ else
+ gcc_assert (loop == (gimple_bb (stmt))->loop_father);
+
+ vecdef = vect_get_vec_def_for_operand (init_val, stmt, NULL);
+
+ switch (code)
+ {
+ case WIDEN_SUM_EXPR:
+ case DOT_PROD_EXPR:
+ case PLUS_EXPR:
+ if (nested_in_vect_loop)
+ *adjustment_def = vecdef;
+ else
+ *adjustment_def = init_val;
+ /* Create a vector of zeros for init_def. */
+ if (SCALAR_FLOAT_TYPE_P (scalar_type))
+ def_for_init = build_real (scalar_type, dconst0);
+ else
+ def_for_init = build_int_cst (scalar_type, 0);
+
+ for (i = nunits - 1; i >= 0; --i)
+ t = tree_cons (NULL_TREE, def_for_init, t);
+ init_def = build_vector (vectype, t);
+ break;
+
+ case MIN_EXPR:
+ case MAX_EXPR:
+ *adjustment_def = NULL_TREE;
+ init_def = vecdef;
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
+
+ return init_def;
+}
+
+
+/* Function vect_create_epilog_for_reduction
+
+ Create code at the loop-epilog to finalize the result of a reduction
+ computation.
+
+ VECT_DEF is a vector of partial results.
+ REDUC_CODE is the tree-code for the epilog reduction.
+ NCOPIES is > 1 in case the vectorization factor (VF) is bigger than the
+ number of elements that we can fit in a vectype (nunits). In this case
+ we have to generate more than one vector stmt - i.e - we need to "unroll"
+ the vector stmt by a factor VF/nunits. For more details see documentation
+ in vectorizable_operation.
+ STMT is the scalar reduction stmt that is being vectorized.
+ REDUCTION_PHI is the phi-node that carries the reduction computation.
+
+ This function:
+ 1. Creates the reduction def-use cycle: sets the arguments for
+ REDUCTION_PHI:
+ The loop-entry argument is the vectorized initial-value of the reduction.
+ The loop-latch argument is VECT_DEF - the vector of partial sums.
+ 2. "Reduces" the vector of partial results VECT_DEF into a single result,
+ by applying the operation specified by REDUC_CODE if available, or by
+ other means (whole-vector shifts or a scalar loop).
+ The function also creates a new phi node at the loop exit to preserve
+ loop-closed form, as illustrated below.
+
+ The flow at the entry to this function:
+
+ loop:
+ vec_def = phi <null, null> # REDUCTION_PHI
+ VECT_DEF = vector_stmt # vectorized form of STMT
+ s_loop = scalar_stmt # (scalar) STMT
+ loop_exit:
+ s_out0 = phi <s_loop> # (scalar) EXIT_PHI
+ use <s_out0>
+ use <s_out0>
+
+ The above is transformed by this function into:
+
+ loop:
+ vec_def = phi <vec_init, VECT_DEF> # REDUCTION_PHI
+ VECT_DEF = vector_stmt # vectorized form of STMT
+ s_loop = scalar_stmt # (scalar) STMT
+ loop_exit:
+ s_out0 = phi <s_loop> # (scalar) EXIT_PHI
+ v_out1 = phi <VECT_DEF> # NEW_EXIT_PHI
+ v_out2 = reduce <v_out1>
+ s_out3 = extract_field <v_out2, 0>
+ s_out4 = adjust_result <s_out3>
+ use <s_out4>
+ use <s_out4>
+*/
+
+static void
+vect_create_epilog_for_reduction (tree vect_def, gimple stmt,
+ int ncopies,
+ enum tree_code reduc_code,
+ gimple reduction_phi)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ stmt_vec_info prev_phi_info;
+ tree vectype;
+ enum machine_mode mode;
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ basic_block exit_bb;
+ tree scalar_dest;
+ tree scalar_type;
+ gimple new_phi = NULL, phi;
+ gimple_stmt_iterator exit_gsi;
+ tree vec_dest;
+ tree new_temp = NULL_TREE;
+ tree new_name;
+ gimple epilog_stmt = NULL;
+ tree new_scalar_dest, new_dest;
+ gimple exit_phi;
+ tree bitsize, bitpos, bytesize;
+ enum tree_code code = gimple_assign_rhs_code (stmt);
+ tree adjustment_def;
+ tree vec_initial_def, def;
+ tree orig_name;
+ imm_use_iterator imm_iter;
+ use_operand_p use_p;
+ bool extract_scalar_result = false;
+ tree reduction_op, expr;
+ gimple orig_stmt;
+ gimple use_stmt;
+ bool nested_in_vect_loop = false;
+ VEC(gimple,heap) *phis = NULL;
+ enum vect_def_type dt = vect_unknown_def_type;
+ int j, i;
+
+ if (nested_in_vect_loop_p (loop, stmt))
+ {
+ loop = loop->inner;
+ nested_in_vect_loop = true;
+ }
+
+ switch (get_gimple_rhs_class (gimple_assign_rhs_code (stmt)))
+ {
+ case GIMPLE_SINGLE_RHS:
+ gcc_assert (TREE_OPERAND_LENGTH (gimple_assign_rhs1 (stmt)) == ternary_op);
+ reduction_op = TREE_OPERAND (gimple_assign_rhs1 (stmt), 2);
+ break;
+ case GIMPLE_UNARY_RHS:
+ reduction_op = gimple_assign_rhs1 (stmt);
+ break;
+ case GIMPLE_BINARY_RHS:
+ reduction_op = gimple_assign_rhs2 (stmt);
+ break;
+ default:
+ gcc_unreachable ();
+ }
+
+ vectype = get_vectype_for_scalar_type (TREE_TYPE (reduction_op));
+ gcc_assert (vectype);
+ mode = TYPE_MODE (vectype);
+
+ /*** 1. Create the reduction def-use cycle ***/
+
+ /* For the case of reduction, vect_get_vec_def_for_operand returns
+ the scalar def before the loop, that defines the initial value
+ of the reduction variable. */
+ vec_initial_def = vect_get_vec_def_for_operand (reduction_op, stmt,
+ &adjustment_def);
+
+ phi = reduction_phi;
+ def = vect_def;
+ for (j = 0; j < ncopies; j++)
+ {
+ /* 1.1 set the loop-entry arg of the reduction-phi: */
+ add_phi_arg (phi, vec_initial_def, loop_preheader_edge (loop));
+
+ /* 1.2 set the loop-latch arg for the reduction-phi: */
+ if (j > 0)
+ def = vect_get_vec_def_for_stmt_copy (dt, def);
+ add_phi_arg (phi, def, loop_latch_edge (loop));
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "transform reduction: created def-use cycle: ");
+ print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
+ fprintf (vect_dump, "\n");
+ print_gimple_stmt (vect_dump, SSA_NAME_DEF_STMT (def), 0, TDF_SLIM);
+ }
+
+ phi = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (phi));
+ }
+
+ /*** 2. Create epilog code
+ The reduction epilog code operates across the elements of the vector
+ of partial results computed by the vectorized loop.
+ The reduction epilog code consists of:
+ step 1: compute the scalar result in a vector (v_out2)
+ step 2: extract the scalar result (s_out3) from the vector (v_out2)
+ step 3: adjust the scalar result (s_out3) if needed.
+
+ Step 1 can be accomplished using one the following three schemes:
+ (scheme 1) using reduc_code, if available.
+ (scheme 2) using whole-vector shifts, if available.
+ (scheme 3) using a scalar loop. In this case steps 1+2 above are
+ combined.
+
+ The overall epilog code looks like this:
+
+ s_out0 = phi <s_loop> # original EXIT_PHI
+ v_out1 = phi <VECT_DEF> # NEW_EXIT_PHI
+ v_out2 = reduce <v_out1> # step 1
+ s_out3 = extract_field <v_out2, 0> # step 2
+ s_out4 = adjust_result <s_out3> # step 3
+
+ (step 3 is optional, and steps 1 and 2 may be combined).
+ Lastly, the uses of s_out0 are replaced by s_out4.
+
+ ***/
+
+ /* 2.1 Create new loop-exit-phi to preserve loop-closed form:
+ v_out1 = phi <v_loop> */
+
+ exit_bb = single_exit (loop)->dest;
+ def = vect_def;
+ prev_phi_info = NULL;
+ for (j = 0; j < ncopies; j++)
+ {
+ phi = create_phi_node (SSA_NAME_VAR (vect_def), exit_bb);
+ set_vinfo_for_stmt (phi, new_stmt_vec_info (phi, loop_vinfo));
+ if (j == 0)
+ new_phi = phi;
+ else
+ {
+ def = vect_get_vec_def_for_stmt_copy (dt, def);
+ STMT_VINFO_RELATED_STMT (prev_phi_info) = phi;
+ }
+ SET_PHI_ARG_DEF (phi, single_exit (loop)->dest_idx, def);
+ prev_phi_info = vinfo_for_stmt (phi);
+ }
+ exit_gsi = gsi_after_labels (exit_bb);
+
+ /* 2.2 Get the relevant tree-code to use in the epilog for schemes 2,3
+ (i.e. when reduc_code is not available) and in the final adjustment
+ code (if needed). Also get the original scalar reduction variable as
+ defined in the loop. In case STMT is a "pattern-stmt" (i.e. - it
+ represents a reduction pattern), the tree-code and scalar-def are
+ taken from the original stmt that the pattern-stmt (STMT) replaces.
+ Otherwise (it is a regular reduction) - the tree-code and scalar-def
+ are taken from STMT. */
+
+ orig_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
+ if (!orig_stmt)
+ {
+ /* Regular reduction */
+ orig_stmt = stmt;
+ }
+ else
+ {
+ /* Reduction pattern */
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (orig_stmt);
+ gcc_assert (STMT_VINFO_IN_PATTERN_P (stmt_vinfo));
+ gcc_assert (STMT_VINFO_RELATED_STMT (stmt_vinfo) == stmt);
+ }
+ code = gimple_assign_rhs_code (orig_stmt);
+ scalar_dest = gimple_assign_lhs (orig_stmt);
+ scalar_type = TREE_TYPE (scalar_dest);
+ new_scalar_dest = vect_create_destination_var (scalar_dest, NULL);
+ bitsize = TYPE_SIZE (scalar_type);
+ bytesize = TYPE_SIZE_UNIT (scalar_type);
+
+
+ /* In case this is a reduction in an inner-loop while vectorizing an outer
+ loop - we don't need to extract a single scalar result at the end of the
+ inner-loop. The final vector of partial results will be used in the
+ vectorized outer-loop, or reduced to a scalar result at the end of the
+ outer-loop. */
+ if (nested_in_vect_loop)
+ goto vect_finalize_reduction;
+
+ /* FORNOW */
+ gcc_assert (ncopies == 1);
+
+ /* 2.3 Create the reduction code, using one of the three schemes described
+ above. */
+
+ if (reduc_code < NUM_TREE_CODES)
+ {
+ tree tmp;
+
+ /*** Case 1: Create:
+ v_out2 = reduc_expr <v_out1> */
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Reduce using direct vector reduction.");
+
+ vec_dest = vect_create_destination_var (scalar_dest, vectype);
+ tmp = build1 (reduc_code, vectype, PHI_RESULT (new_phi));
+ epilog_stmt = gimple_build_assign (vec_dest, tmp);
+ new_temp = make_ssa_name (vec_dest, epilog_stmt);
+ gimple_assign_set_lhs (epilog_stmt, new_temp);
+ gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
+
+ extract_scalar_result = true;
+ }
+ else
+ {
+ enum tree_code shift_code = 0;
+ bool have_whole_vector_shift = true;
+ int bit_offset;
+ int element_bitsize = tree_low_cst (bitsize, 1);
+ int vec_size_in_bits = tree_low_cst (TYPE_SIZE (vectype), 1);
+ tree vec_temp;
+
+ if (optab_handler (vec_shr_optab, mode)->insn_code != CODE_FOR_nothing)
+ shift_code = VEC_RSHIFT_EXPR;
+ else
+ have_whole_vector_shift = false;
+
+ /* Regardless of whether we have a whole vector shift, if we're
+ emulating the operation via tree-vect-generic, we don't want
+ to use it. Only the first round of the reduction is likely
+ to still be profitable via emulation. */
+ /* ??? It might be better to emit a reduction tree code here, so that
+ tree-vect-generic can expand the first round via bit tricks. */
+ if (!VECTOR_MODE_P (mode))
+ have_whole_vector_shift = false;
+ else
+ {
+ optab optab = optab_for_tree_code (code, vectype, optab_default);
+ if (optab_handler (optab, mode)->insn_code == CODE_FOR_nothing)
+ have_whole_vector_shift = false;
+ }
+
+ if (have_whole_vector_shift)
+ {
+ /*** Case 2: Create:
+ for (offset = VS/2; offset >= element_size; offset/=2)
+ {
+ Create: va' = vec_shift <va, offset>
+ Create: va = vop <va, va'>
+ } */
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Reduce using vector shifts");
+
+ vec_dest = vect_create_destination_var (scalar_dest, vectype);
+ new_temp = PHI_RESULT (new_phi);
+
+ for (bit_offset = vec_size_in_bits/2;
+ bit_offset >= element_bitsize;
+ bit_offset /= 2)
+ {
+ tree bitpos = size_int (bit_offset);
+ epilog_stmt = gimple_build_assign_with_ops (shift_code, vec_dest,
+ new_temp, bitpos);
+ new_name = make_ssa_name (vec_dest, epilog_stmt);
+ gimple_assign_set_lhs (epilog_stmt, new_name);
+ gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
+
+ epilog_stmt = gimple_build_assign_with_ops (code, vec_dest,
+ new_name, new_temp);
+ new_temp = make_ssa_name (vec_dest, epilog_stmt);
+ gimple_assign_set_lhs (epilog_stmt, new_temp);
+ gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
+ }
+
+ extract_scalar_result = true;
+ }
+ else
+ {
+ tree rhs;
+
+ /*** Case 3: Create:
+ s = extract_field <v_out2, 0>
+ for (offset = element_size;
+ offset < vector_size;
+ offset += element_size;)
+ {
+ Create: s' = extract_field <v_out2, offset>
+ Create: s = op <s, s'>
+ } */
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Reduce using scalar code. ");
+
+ vec_temp = PHI_RESULT (new_phi);
+ vec_size_in_bits = tree_low_cst (TYPE_SIZE (vectype), 1);
+ rhs = build3 (BIT_FIELD_REF, scalar_type, vec_temp, bitsize,
+ bitsize_zero_node);
+ epilog_stmt = gimple_build_assign (new_scalar_dest, rhs);
+ new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
+ gimple_assign_set_lhs (epilog_stmt, new_temp);
+ gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
+
+ for (bit_offset = element_bitsize;
+ bit_offset < vec_size_in_bits;
+ bit_offset += element_bitsize)
+ {
+ tree bitpos = bitsize_int (bit_offset);
+ tree rhs = build3 (BIT_FIELD_REF, scalar_type, vec_temp, bitsize,
+ bitpos);
+
+ epilog_stmt = gimple_build_assign (new_scalar_dest, rhs);
+ new_name = make_ssa_name (new_scalar_dest, epilog_stmt);
+ gimple_assign_set_lhs (epilog_stmt, new_name);
+ gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
+
+ epilog_stmt = gimple_build_assign_with_ops (code,
+ new_scalar_dest,
+ new_name, new_temp);
+ new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
+ gimple_assign_set_lhs (epilog_stmt, new_temp);
+ gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
+ }
+
+ extract_scalar_result = false;
+ }
+ }
+
+ /* 2.4 Extract the final scalar result. Create:
+ s_out3 = extract_field <v_out2, bitpos> */
+
+ if (extract_scalar_result)
+ {
+ tree rhs;
+
+ gcc_assert (!nested_in_vect_loop);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "extract scalar result");
+
+ if (BYTES_BIG_ENDIAN)
+ bitpos = size_binop (MULT_EXPR,
+ bitsize_int (TYPE_VECTOR_SUBPARTS (vectype) - 1),
+ TYPE_SIZE (scalar_type));
+ else
+ bitpos = bitsize_zero_node;
+
+ rhs = build3 (BIT_FIELD_REF, scalar_type, new_temp, bitsize, bitpos);
+ epilog_stmt = gimple_build_assign (new_scalar_dest, rhs);
+ new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
+ gimple_assign_set_lhs (epilog_stmt, new_temp);
+ gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
+ }
+
+vect_finalize_reduction:
+
+ /* 2.5 Adjust the final result by the initial value of the reduction
+ variable. (When such adjustment is not needed, then
+ 'adjustment_def' is zero). For example, if code is PLUS we create:
+ new_temp = loop_exit_def + adjustment_def */
+
+ if (adjustment_def)
+ {
+ if (nested_in_vect_loop)
+ {
+ gcc_assert (TREE_CODE (TREE_TYPE (adjustment_def)) == VECTOR_TYPE);
+ expr = build2 (code, vectype, PHI_RESULT (new_phi), adjustment_def);
+ new_dest = vect_create_destination_var (scalar_dest, vectype);
+ }
+ else
+ {
+ gcc_assert (TREE_CODE (TREE_TYPE (adjustment_def)) != VECTOR_TYPE);
+ expr = build2 (code, scalar_type, new_temp, adjustment_def);
+ new_dest = vect_create_destination_var (scalar_dest, scalar_type);
+ }
+ epilog_stmt = gimple_build_assign (new_dest, expr);
+ new_temp = make_ssa_name (new_dest, epilog_stmt);
+ gimple_assign_set_lhs (epilog_stmt, new_temp);
+ SSA_NAME_DEF_STMT (new_temp) = epilog_stmt;
+ gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
+ }
+
+
+ /* 2.6 Handle the loop-exit phi */
+
+ /* Replace uses of s_out0 with uses of s_out3:
+ Find the loop-closed-use at the loop exit of the original scalar result.
+ (The reduction result is expected to have two immediate uses - one at the
+ latch block, and one at the loop exit). */
+ phis = VEC_alloc (gimple, heap, 10);
+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, scalar_dest)
+ {
+ if (!flow_bb_inside_loop_p (loop, gimple_bb (USE_STMT (use_p))))
+ {
+ exit_phi = USE_STMT (use_p);
+ VEC_quick_push (gimple, phis, exit_phi);
+ }
+ }
+ /* We expect to have found an exit_phi because of loop-closed-ssa form. */
+ gcc_assert (!VEC_empty (gimple, phis));
+
+ for (i = 0; VEC_iterate (gimple, phis, i, exit_phi); i++)
+ {
+ if (nested_in_vect_loop)
+ {
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (exit_phi);
+
+ /* FORNOW. Currently not supporting the case that an inner-loop
+ reduction is not used in the outer-loop (but only outside the
+ outer-loop). */
+ gcc_assert (STMT_VINFO_RELEVANT_P (stmt_vinfo)
+ && !STMT_VINFO_LIVE_P (stmt_vinfo));
+
+ epilog_stmt = adjustment_def ? epilog_stmt : new_phi;
+ STMT_VINFO_VEC_STMT (stmt_vinfo) = epilog_stmt;
+ set_vinfo_for_stmt (epilog_stmt,
+ new_stmt_vec_info (epilog_stmt, loop_vinfo));
+ if (adjustment_def)
+ STMT_VINFO_RELATED_STMT (vinfo_for_stmt (epilog_stmt)) =
+ STMT_VINFO_RELATED_STMT (vinfo_for_stmt (new_phi));
+ continue;
+ }
+
+ /* Replace the uses: */
+ orig_name = PHI_RESULT (exit_phi);
+ FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, orig_name)
+ FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter)
+ SET_USE (use_p, new_temp);
+ }
+ VEC_free (gimple, heap, phis);
+}
+
+
+/* Function vectorizable_reduction.
+
+ Check if STMT performs a reduction operation that can be vectorized.
+ If VEC_STMT is also passed, vectorize the STMT: create a vectorized
+ stmt to replace it, put it in VEC_STMT, and insert it at BSI.
+ Return FALSE if not a vectorizable STMT, TRUE otherwise.
+
+ This function also handles reduction idioms (patterns) that have been
+ recognized in advance during vect_pattern_recog. In this case, STMT may be
+ of this form:
+ X = pattern_expr (arg0, arg1, ..., X)
+ and it's STMT_VINFO_RELATED_STMT points to the last stmt in the original
+ sequence that had been detected and replaced by the pattern-stmt (STMT).
+
+ In some cases of reduction patterns, the type of the reduction variable X is
+ different than the type of the other arguments of STMT.
+ In such cases, the vectype that is used when transforming STMT into a vector
+ stmt is different than the vectype that is used to determine the
+ vectorization factor, because it consists of a different number of elements
+ than the actual number of elements that are being operated upon in parallel.
+
+ For example, consider an accumulation of shorts into an int accumulator.
+ On some targets it's possible to vectorize this pattern operating on 8
+ shorts at a time (hence, the vectype for purposes of determining the
+ vectorization factor should be V8HI); on the other hand, the vectype that
+ is used to create the vector form is actually V4SI (the type of the result).
+
+ Upon entry to this function, STMT_VINFO_VECTYPE records the vectype that
+ indicates what is the actual level of parallelism (V8HI in the example), so
+ that the right vectorization factor would be derived. This vectype
+ corresponds to the type of arguments to the reduction stmt, and should *NOT*
+ be used to create the vectorized stmt. The right vectype for the vectorized
+ stmt is obtained from the type of the result X:
+ get_vectype_for_scalar_type (TREE_TYPE (X))
+
+ This means that, contrary to "regular" reductions (or "regular" stmts in
+ general), the following equation:
+ STMT_VINFO_VECTYPE == get_vectype_for_scalar_type (TREE_TYPE (X))
+ does *NOT* necessarily hold for reduction patterns. */
+
+bool
+vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
+ gimple *vec_stmt)
+{
+ tree vec_dest;
+ tree scalar_dest;
+ tree loop_vec_def0 = NULL_TREE, loop_vec_def1 = NULL_TREE;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ enum tree_code code, orig_code, epilog_reduc_code = 0;
+ enum machine_mode vec_mode;
+ int op_type;
+ optab optab, reduc_optab;
+ tree new_temp = NULL_TREE;
+ tree def;
+ gimple def_stmt;
+ enum vect_def_type dt;
+ gimple new_phi = NULL;
+ tree scalar_type;
+ bool is_simple_use;
+ gimple orig_stmt;
+ stmt_vec_info orig_stmt_info;
+ tree expr = NULL_TREE;
+ int i;
+ int nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ int ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
+ int epilog_copies;
+ stmt_vec_info prev_stmt_info, prev_phi_info;
+ gimple first_phi = NULL;
+ bool single_defuse_cycle = false;
+ tree reduc_def;
+ gimple new_stmt = NULL;
+ int j;
+ tree ops[3];
+
+ if (nested_in_vect_loop_p (loop, stmt))
+ loop = loop->inner;
+
+ gcc_assert (ncopies >= 1);
+
+ /* FORNOW: SLP not supported. */
+ if (STMT_SLP_TYPE (stmt_info))
+ return false;
+
+ /* 1. Is vectorizable reduction? */
+
+ /* Not supportable if the reduction variable is used in the loop. */
+ if (STMT_VINFO_RELEVANT (stmt_info) > vect_used_in_outer)
+ return false;
+
+ /* Reductions that are not used even in an enclosing outer-loop,
+ are expected to be "live" (used out of the loop). */
+ if (STMT_VINFO_RELEVANT (stmt_info) == vect_unused_in_loop
+ && !STMT_VINFO_LIVE_P (stmt_info))
+ return false;
+
+ /* Make sure it was already recognized as a reduction computation. */
+ if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def)
+ return false;
+
+ /* 2. Has this been recognized as a reduction pattern?
+
+ Check if STMT represents a pattern that has been recognized
+ in earlier analysis stages. For stmts that represent a pattern,
+ the STMT_VINFO_RELATED_STMT field records the last stmt in
+ the original sequence that constitutes the pattern. */
+
+ orig_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
+ if (orig_stmt)
+ {
+ orig_stmt_info = vinfo_for_stmt (orig_stmt);
+ gcc_assert (STMT_VINFO_RELATED_STMT (orig_stmt_info) == stmt);
+ gcc_assert (STMT_VINFO_IN_PATTERN_P (orig_stmt_info));
+ gcc_assert (!STMT_VINFO_IN_PATTERN_P (stmt_info));
+ }
+
+ /* 3. Check the operands of the operation. The first operands are defined
+ inside the loop body. The last operand is the reduction variable,
+ which is defined by the loop-header-phi. */
+
+ gcc_assert (is_gimple_assign (stmt));
+
+ /* Flatten RHS */
+ switch (get_gimple_rhs_class (gimple_assign_rhs_code (stmt)))
+ {
+ case GIMPLE_SINGLE_RHS:
+ op_type = TREE_OPERAND_LENGTH (gimple_assign_rhs1 (stmt));
+ if (op_type == ternary_op)
+ {
+ tree rhs = gimple_assign_rhs1 (stmt);
+ ops[0] = TREE_OPERAND (rhs, 0);
+ ops[1] = TREE_OPERAND (rhs, 1);
+ ops[2] = TREE_OPERAND (rhs, 2);
+ code = TREE_CODE (rhs);
+ }
+ else
+ return false;
+ break;
+
+ case GIMPLE_BINARY_RHS:
+ code = gimple_assign_rhs_code (stmt);
+ op_type = TREE_CODE_LENGTH (code);
+ gcc_assert (op_type == binary_op);
+ ops[0] = gimple_assign_rhs1 (stmt);
+ ops[1] = gimple_assign_rhs2 (stmt);
+ break;
+
+ case GIMPLE_UNARY_RHS:
+ return false;
+
+ default:
+ gcc_unreachable ();
+ }
+
+ scalar_dest = gimple_assign_lhs (stmt);
+ scalar_type = TREE_TYPE (scalar_dest);
+ if (!POINTER_TYPE_P (scalar_type) && !INTEGRAL_TYPE_P (scalar_type)
+ && !SCALAR_FLOAT_TYPE_P (scalar_type))
+ return false;
+
+ /* All uses but the last are expected to be defined in the loop.
+ The last use is the reduction variable. */
+ for (i = 0; i < op_type-1; i++)
+ {
+ is_simple_use = vect_is_simple_use (ops[i], loop_vinfo, &def_stmt,
+ &def, &dt);
+ gcc_assert (is_simple_use);
+ if (dt != vect_loop_def
+ && dt != vect_invariant_def
+ && dt != vect_constant_def
+ && dt != vect_induction_def)
+ return false;
+ }
+
+ is_simple_use = vect_is_simple_use (ops[i], loop_vinfo, &def_stmt, &def, &dt);
+ gcc_assert (is_simple_use);
+ gcc_assert (dt == vect_reduction_def);
+ gcc_assert (gimple_code (def_stmt) == GIMPLE_PHI);
+ if (orig_stmt)
+ gcc_assert (orig_stmt == vect_is_simple_reduction (loop_vinfo, def_stmt));
+ else
+ gcc_assert (stmt == vect_is_simple_reduction (loop_vinfo, def_stmt));
+
+ if (STMT_VINFO_LIVE_P (vinfo_for_stmt (def_stmt)))
+ return false;
+
+ /* 4. Supportable by target? */
+
+ /* 4.1. check support for the operation in the loop */
+ optab = optab_for_tree_code (code, vectype, optab_default);
+ if (!optab)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "no optab.");
+ return false;
+ }
+ vec_mode = TYPE_MODE (vectype);
+ if (optab_handler (optab, vec_mode)->insn_code == CODE_FOR_nothing)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "op not supported by target.");
+ if (GET_MODE_SIZE (vec_mode) != UNITS_PER_WORD
+ || LOOP_VINFO_VECT_FACTOR (loop_vinfo)
+ < vect_min_worthwhile_factor (code))
+ return false;
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "proceeding using word mode.");
+ }
+
+ /* Worthwhile without SIMD support? */
+ if (!VECTOR_MODE_P (TYPE_MODE (vectype))
+ && LOOP_VINFO_VECT_FACTOR (loop_vinfo)
+ < vect_min_worthwhile_factor (code))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "not worthwhile without SIMD support.");
+ return false;
+ }
+
+ /* 4.2. Check support for the epilog operation.
+
+ If STMT represents a reduction pattern, then the type of the
+ reduction variable may be different than the type of the rest
+ of the arguments. For example, consider the case of accumulation
+ of shorts into an int accumulator; The original code:
+ S1: int_a = (int) short_a;
+ orig_stmt-> S2: int_acc = plus <int_a ,int_acc>;
+
+ was replaced with:
+ STMT: int_acc = widen_sum <short_a, int_acc>
+
+ This means that:
+ 1. The tree-code that is used to create the vector operation in the
+ epilog code (that reduces the partial results) is not the
+ tree-code of STMT, but is rather the tree-code of the original
+ stmt from the pattern that STMT is replacing. I.e, in the example
+ above we want to use 'widen_sum' in the loop, but 'plus' in the
+ epilog.
+ 2. The type (mode) we use to check available target support
+ for the vector operation to be created in the *epilog*, is
+ determined by the type of the reduction variable (in the example
+ above we'd check this: plus_optab[vect_int_mode]).
+ However the type (mode) we use to check available target support
+ for the vector operation to be created *inside the loop*, is
+ determined by the type of the other arguments to STMT (in the
+ example we'd check this: widen_sum_optab[vect_short_mode]).
+
+ This is contrary to "regular" reductions, in which the types of all
+ the arguments are the same as the type of the reduction variable.
+ For "regular" reductions we can therefore use the same vector type
+ (and also the same tree-code) when generating the epilog code and
+ when generating the code inside the loop. */
+
+ if (orig_stmt)
+ {
+ /* This is a reduction pattern: get the vectype from the type of the
+ reduction variable, and get the tree-code from orig_stmt. */
+ orig_code = gimple_assign_rhs_code (orig_stmt);
+ vectype = get_vectype_for_scalar_type (TREE_TYPE (def));
+ if (!vectype)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "unsupported data-type ");
+ print_generic_expr (vect_dump, TREE_TYPE (def), TDF_SLIM);
+ }
+ return false;
+ }
+
+ vec_mode = TYPE_MODE (vectype);
+ }
+ else
+ {
+ /* Regular reduction: use the same vectype and tree-code as used for
+ the vector code inside the loop can be used for the epilog code. */
+ orig_code = code;
+ }
+
+ if (!reduction_code_for_scalar_code (orig_code, &epilog_reduc_code))
+ return false;
+ reduc_optab = optab_for_tree_code (epilog_reduc_code, vectype, optab_default);
+ if (!reduc_optab)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "no optab for reduction.");
+ epilog_reduc_code = NUM_TREE_CODES;
+ }
+ if (optab_handler (reduc_optab, vec_mode)->insn_code == CODE_FOR_nothing)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "reduc op not supported by target.");
+ epilog_reduc_code = NUM_TREE_CODES;
+ }
+
+ if (!vec_stmt) /* transformation not required. */
+ {
+ STMT_VINFO_TYPE (stmt_info) = reduc_vec_info_type;
+ if (!vect_model_reduction_cost (stmt_info, epilog_reduc_code, ncopies))
+ return false;
+ return true;
+ }
+
+ /** Transform. **/
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "transform reduction.");
+
+ /* Create the destination vector */
+ vec_dest = vect_create_destination_var (scalar_dest, vectype);
+
+ /* In case the vectorization factor (VF) is bigger than the number
+ of elements that we can fit in a vectype (nunits), we have to generate
+ more than one vector stmt - i.e - we need to "unroll" the
+ vector stmt by a factor VF/nunits. For more details see documentation
+ in vectorizable_operation. */
+
+ /* If the reduction is used in an outer loop we need to generate
+ VF intermediate results, like so (e.g. for ncopies=2):
+ r0 = phi (init, r0)
+ r1 = phi (init, r1)
+ r0 = x0 + r0;
+ r1 = x1 + r1;
+ (i.e. we generate VF results in 2 registers).
+ In this case we have a separate def-use cycle for each copy, and therefore
+ for each copy we get the vector def for the reduction variable from the
+ respective phi node created for this copy.
+
+ Otherwise (the reduction is unused in the loop nest), we can combine
+ together intermediate results, like so (e.g. for ncopies=2):
+ r = phi (init, r)
+ r = x0 + r;
+ r = x1 + r;
+ (i.e. we generate VF/2 results in a single register).
+ In this case for each copy we get the vector def for the reduction variable
+ from the vectorized reduction operation generated in the previous iteration.
+ */
+
+ if (STMT_VINFO_RELEVANT (stmt_info) == vect_unused_in_loop)
+ {
+ single_defuse_cycle = true;
+ epilog_copies = 1;
+ }
+ else
+ epilog_copies = ncopies;
+
+ prev_stmt_info = NULL;
+ prev_phi_info = NULL;
+ for (j = 0; j < ncopies; j++)
+ {
+ if (j == 0 || !single_defuse_cycle)
+ {
+ /* Create the reduction-phi that defines the reduction-operand. */
+ new_phi = create_phi_node (vec_dest, loop->header);
+ set_vinfo_for_stmt (new_phi, new_stmt_vec_info (new_phi, loop_vinfo));
+ }
+
+ /* Handle uses. */
+ if (j == 0)
+ {
+ loop_vec_def0 = vect_get_vec_def_for_operand (ops[0], stmt, NULL);
+ if (op_type == ternary_op)
+ {
+ loop_vec_def1 = vect_get_vec_def_for_operand (ops[1], stmt, NULL);
+ }
+
+ /* Get the vector def for the reduction variable from the phi node */
+ reduc_def = PHI_RESULT (new_phi);
+ first_phi = new_phi;
+ }
+ else
+ {
+ enum vect_def_type dt = vect_unknown_def_type; /* Dummy */
+ loop_vec_def0 = vect_get_vec_def_for_stmt_copy (dt, loop_vec_def0);
+ if (op_type == ternary_op)
+ loop_vec_def1 = vect_get_vec_def_for_stmt_copy (dt, loop_vec_def1);
+
+ if (single_defuse_cycle)
+ reduc_def = gimple_assign_lhs (new_stmt);
+ else
+ reduc_def = PHI_RESULT (new_phi);
+
+ STMT_VINFO_RELATED_STMT (prev_phi_info) = new_phi;
+ }
+
+ /* Arguments are ready. create the new vector stmt. */
+ if (op_type == binary_op)
+ expr = build2 (code, vectype, loop_vec_def0, reduc_def);
+ else
+ expr = build3 (code, vectype, loop_vec_def0, loop_vec_def1,
+ reduc_def);
+ new_stmt = gimple_build_assign (vec_dest, expr);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_assign_set_lhs (new_stmt, new_temp);
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+
+ if (j == 0)
+ STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
+ else
+ STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
+ prev_stmt_info = vinfo_for_stmt (new_stmt);
+ prev_phi_info = vinfo_for_stmt (new_phi);
+ }
+
+ /* Finalize the reduction-phi (set its arguments) and create the
+ epilog reduction code. */
+ if (!single_defuse_cycle)
+ new_temp = gimple_assign_lhs (*vec_stmt);
+ vect_create_epilog_for_reduction (new_temp, stmt, epilog_copies,
+ epilog_reduc_code, first_phi);
+ return true;
+}
+
+/* Function vect_min_worthwhile_factor.
+
+ For a loop where we could vectorize the operation indicated by CODE,
+ return the minimum vectorization factor that makes it worthwhile
+ to use generic vectors. */
+int
+vect_min_worthwhile_factor (enum tree_code code)
+{
+ switch (code)
+ {
+ case PLUS_EXPR:
+ case MINUS_EXPR:
+ case NEGATE_EXPR:
+ return 4;
+
+ case BIT_AND_EXPR:
+ case BIT_IOR_EXPR:
+ case BIT_XOR_EXPR:
+ case BIT_NOT_EXPR:
+ return 2;
+
+ default:
+ return INT_MAX;
+ }
+}
+
+
+/* Function vectorizable_induction
+
+ Check if PHI performs an induction computation that can be vectorized.
+ If VEC_STMT is also passed, vectorize the induction PHI: create a vectorized
+ phi to replace it, put it in VEC_STMT, and add it to the same basic block.
+ Return FALSE if not a vectorizable STMT, TRUE otherwise. */
+
+bool
+vectorizable_induction (gimple phi, gimple_stmt_iterator *gsi ATTRIBUTE_UNUSED,
+ gimple *vec_stmt)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (phi);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ int nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ int ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
+ tree vec_def;
+
+ gcc_assert (ncopies >= 1);
+ /* FORNOW. This restriction should be relaxed. */
+ if (nested_in_vect_loop_p (loop, phi) && ncopies > 1)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "multiple types in nested loop.");
+ return false;
+ }
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info))
+ return false;
+
+ /* FORNOW: SLP not supported. */
+ if (STMT_SLP_TYPE (stmt_info))
+ return false;
+
+ gcc_assert (STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def);
+
+ if (gimple_code (phi) != GIMPLE_PHI)
+ return false;
+
+ if (!vec_stmt) /* transformation not required. */
+ {
+ STMT_VINFO_TYPE (stmt_info) = induc_vec_info_type;
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vectorizable_induction ===");
+ vect_model_induction_cost (stmt_info, ncopies);
+ return true;
+ }
+
+ /** Transform. **/
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "transform induction phi.");
+
+ vec_def = get_initial_def_for_induction (phi);
+ *vec_stmt = SSA_NAME_DEF_STMT (vec_def);
+ return true;
+}
+
+/* Function vectorizable_live_operation.
+
+ STMT computes a value that is used outside the loop. Check if
+ it can be supported. */
+
+bool
+vectorizable_live_operation (gimple stmt,
+ gimple_stmt_iterator *gsi ATTRIBUTE_UNUSED,
+ gimple *vec_stmt ATTRIBUTE_UNUSED)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ int i;
+ int op_type;
+ tree op;
+ tree def;
+ gimple def_stmt;
+ enum vect_def_type dt;
+ enum tree_code code;
+ enum gimple_rhs_class rhs_class;
+
+ gcc_assert (STMT_VINFO_LIVE_P (stmt_info));
+
+ if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def)
+ return false;
+
+ if (!is_gimple_assign (stmt))
+ return false;
+
+ if (TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME)
+ return false;
+
+ /* FORNOW. CHECKME. */
+ if (nested_in_vect_loop_p (loop, stmt))
+ return false;
+
+ code = gimple_assign_rhs_code (stmt);
+ op_type = TREE_CODE_LENGTH (code);
+ rhs_class = get_gimple_rhs_class (code);
+ gcc_assert (rhs_class != GIMPLE_UNARY_RHS || op_type == unary_op);
+ gcc_assert (rhs_class != GIMPLE_BINARY_RHS || op_type == binary_op);
+
+ /* FORNOW: support only if all uses are invariant. This means
+ that the scalar operations can remain in place, unvectorized.
+ The original last scalar value that they compute will be used. */
+
+ for (i = 0; i < op_type; i++)
+ {
+ if (rhs_class == GIMPLE_SINGLE_RHS)
+ op = TREE_OPERAND (gimple_op (stmt, 1), i);
+ else
+ op = gimple_op (stmt, i + 1);
+ if (op && !vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "use not simple.");
+ return false;
+ }
+
+ if (dt != vect_invariant_def && dt != vect_constant_def)
+ return false;
+ }
+
+ /* No transformation is required for the cases we currently support. */
+ return true;
+}
+
+/* Function vect_transform_loop.
+
+ The analysis phase has determined that the loop is vectorizable.
+ Vectorize the loop - created vectorized stmts to replace the scalar
+ stmts in the loop, and update the loop exit condition. */
+
+void
+vect_transform_loop (loop_vec_info loop_vinfo)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
+ int nbbs = loop->num_nodes;
+ gimple_stmt_iterator si;
+ int i;
+ tree ratio = NULL;
+ int vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+ bool strided_store;
+ bool slp_scheduled = false;
+ unsigned int nunits;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vec_transform_loop ===");
+
+ if (VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
+ || VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
+ vect_loop_versioning (loop_vinfo);
+
+ /* CHECKME: we wouldn't need this if we called update_ssa once
+ for all loops. */
+ bitmap_zero (vect_memsyms_to_rename);
+
+ /* Peel the loop if there are data refs with unknown alignment.
+ Only one data ref with unknown store is allowed. */
+
+ if (LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo))
+ vect_do_peeling_for_alignment (loop_vinfo);
+
+ /* If the loop has a symbolic number of iterations 'n' (i.e. it's not a
+ compile time constant), or it is a constant that doesn't divide by the
+ vectorization factor, then an epilog loop needs to be created.
+ We therefore duplicate the loop: the original loop will be vectorized,
+ and will compute the first (n/VF) iterations. The second copy of the loop
+ will remain scalar and will compute the remaining (n%VF) iterations.
+ (VF is the vectorization factor). */
+
+ if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
+ || (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
+ && LOOP_VINFO_INT_NITERS (loop_vinfo) % vectorization_factor != 0))
+ vect_do_peeling_for_loop_bound (loop_vinfo, &ratio);
+ else
+ ratio = build_int_cst (TREE_TYPE (LOOP_VINFO_NITERS (loop_vinfo)),
+ LOOP_VINFO_INT_NITERS (loop_vinfo) / vectorization_factor);
+
+ /* 1) Make sure the loop header has exactly two entries
+ 2) Make sure we have a preheader basic block. */
+
+ gcc_assert (EDGE_COUNT (loop->header->preds) == 2);
+
+ split_edge (loop_preheader_edge (loop));
+
+ /* FORNOW: the vectorizer supports only loops which body consist
+ of one basic block (header + empty latch). When the vectorizer will
+ support more involved loop forms, the order by which the BBs are
+ traversed need to be reconsidered. */
+
+ for (i = 0; i < nbbs; i++)
+ {
+ basic_block bb = bbs[i];
+ stmt_vec_info stmt_info;
+ gimple phi;
+
+ for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ phi = gsi_stmt (si);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "------>vectorizing phi: ");
+ print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
+ }
+ stmt_info = vinfo_for_stmt (phi);
+ if (!stmt_info)
+ continue;
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info)
+ && !STMT_VINFO_LIVE_P (stmt_info))
+ continue;
+
+ if ((TYPE_VECTOR_SUBPARTS (STMT_VINFO_VECTYPE (stmt_info))
+ != (unsigned HOST_WIDE_INT) vectorization_factor)
+ && vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "multiple-types.");
+
+ if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "transform phi.");
+ vect_transform_stmt (phi, NULL, NULL, NULL, NULL);
+ }
+ }
+
+ for (si = gsi_start_bb (bb); !gsi_end_p (si);)
+ {
+ gimple stmt = gsi_stmt (si);
+ bool is_store;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "------>vectorizing statement: ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ stmt_info = vinfo_for_stmt (stmt);
+
+ /* vector stmts created in the outer-loop during vectorization of
+ stmts in an inner-loop may not have a stmt_info, and do not
+ need to be vectorized. */
+ if (!stmt_info)
+ {
+ gsi_next (&si);
+ continue;
+ }
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info)
+ && !STMT_VINFO_LIVE_P (stmt_info))
+ {
+ gsi_next (&si);
+ continue;
+ }
+
+ gcc_assert (STMT_VINFO_VECTYPE (stmt_info));
+ nunits =
+ (unsigned int) TYPE_VECTOR_SUBPARTS (STMT_VINFO_VECTYPE (stmt_info));
+ if (!STMT_SLP_TYPE (stmt_info)
+ && nunits != (unsigned int) vectorization_factor
+ && vect_print_dump_info (REPORT_DETAILS))
+ /* For SLP VF is set according to unrolling factor, and not to
+ vector size, hence for SLP this print is not valid. */
+ fprintf (vect_dump, "multiple-types.");
+
+ /* SLP. Schedule all the SLP instances when the first SLP stmt is
+ reached. */
+ if (STMT_SLP_TYPE (stmt_info))
+ {
+ if (!slp_scheduled)
+ {
+ slp_scheduled = true;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== scheduling SLP instances ===");
+
+ is_store = vect_schedule_slp (loop_vinfo);
+
+ /* IS_STORE is true if STMT is a store. Stores cannot be of
+ hybrid SLP type. They are removed in
+ vect_schedule_slp_instance and their vinfo is destroyed. */
+ if (is_store)
+ {
+ gsi_next (&si);
+ continue;
+ }
+ }
+
+ /* Hybrid SLP stmts must be vectorized in addition to SLP. */
+ if (PURE_SLP_STMT (stmt_info))
+ {
+ gsi_next (&si);
+ continue;
+ }
+ }
+
+ /* -------- vectorize statement ------------ */
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "transform statement.");
+
+ strided_store = false;
+ is_store = vect_transform_stmt (stmt, &si, &strided_store, NULL, NULL);
+ if (is_store)
+ {
+ if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
+ {
+ /* Interleaving. If IS_STORE is TRUE, the vectorization of the
+ interleaving chain was completed - free all the stores in
+ the chain. */
+ vect_remove_stores (DR_GROUP_FIRST_DR (stmt_info));
+ gsi_remove (&si, true);
+ continue;
+ }
+ else
+ {
+ /* Free the attached stmt_vec_info and remove the stmt. */
+ free_stmt_vec_info (stmt);
+ gsi_remove (&si, true);
+ continue;
+ }
+ }
+ gsi_next (&si);
+ } /* stmts in BB */
+ } /* BBs in loop */
+
+ slpeel_make_loop_iterate_ntimes (loop, ratio);
+
+ mark_set_for_renaming (vect_memsyms_to_rename);
+
+ /* The memory tags and pointers in vectorized statements need to
+ have their SSA forms updated. FIXME, why can't this be delayed
+ until all the loops have been transformed? */
+ update_ssa (TODO_update_ssa);
+
+ if (vect_print_dump_info (REPORT_VECTORIZED_LOOPS))
+ fprintf (vect_dump, "LOOP VECTORIZED.");
+ if (loop->inner && vect_print_dump_info (REPORT_VECTORIZED_LOOPS))
+ fprintf (vect_dump, "OUTER LOOP VECTORIZED.");
+}
+
+
+
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 8486775ab77..372f836cf80 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -1,5 +1,5 @@
/* Analysis Utilities for Loop Vectorization.
- Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Dorit Nuzman <dorit@il.ibm.com>
This file is part of GCC.
@@ -24,13 +24,11 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "ggc.h"
#include "tree.h"
-
#include "target.h"
#include "basic-block.h"
#include "diagnostic.h"
#include "tree-flow.h"
#include "tree-dump.h"
-#include "timevar.h"
#include "cfgloop.h"
#include "expr.h"
#include "optabs.h"
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
new file mode 100644
index 00000000000..fe01a76beea
--- /dev/null
+++ b/gcc/tree-vect-slp.c
@@ -0,0 +1,1694 @@
+/* SLP - Basic Block Vectorization
+ Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+ Foundation, Inc.
+ Contributed by Dorit Naishlos <dorit@il.ibm.com>
+ and Ira Rosen <irar@il.ibm.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 "ggc.h"
+#include "tree.h"
+#include "target.h"
+#include "basic-block.h"
+#include "diagnostic.h"
+#include "tree-flow.h"
+#include "tree-dump.h"
+#include "cfgloop.h"
+#include "cfglayout.h"
+#include "expr.h"
+#include "recog.h"
+#include "optabs.h"
+#include "tree-vectorizer.h"
+
+/* Recursively free the memory allocated for the SLP tree rooted at NODE. */
+
+static void
+vect_free_slp_tree (slp_tree node)
+{
+ if (!node)
+ return;
+
+ if (SLP_TREE_LEFT (node))
+ vect_free_slp_tree (SLP_TREE_LEFT (node));
+
+ if (SLP_TREE_RIGHT (node))
+ vect_free_slp_tree (SLP_TREE_RIGHT (node));
+
+ VEC_free (gimple, heap, SLP_TREE_SCALAR_STMTS (node));
+
+ if (SLP_TREE_VEC_STMTS (node))
+ VEC_free (gimple, heap, SLP_TREE_VEC_STMTS (node));
+
+ free (node);
+}
+
+
+/* Free the memory allocated for the SLP instance. */
+
+void
+vect_free_slp_instance (slp_instance instance)
+{
+ vect_free_slp_tree (SLP_INSTANCE_TREE (instance));
+ VEC_free (int, heap, SLP_INSTANCE_LOAD_PERMUTATION (instance));
+ VEC_free (slp_tree, heap, SLP_INSTANCE_LOADS (instance));
+}
+
+
+/* Get the defs for the rhs of STMT (collect them in DEF_STMTS0/1), check that
+ they are of a legal type and that they match the defs of the first stmt of
+ the SLP group (stored in FIRST_STMT_...). */
+
+static bool
+vect_get_and_check_slp_defs (loop_vec_info loop_vinfo, slp_tree slp_node,
+ gimple stmt, VEC (gimple, heap) **def_stmts0,
+ VEC (gimple, heap) **def_stmts1,
+ enum vect_def_type *first_stmt_dt0,
+ enum vect_def_type *first_stmt_dt1,
+ tree *first_stmt_def0_type,
+ tree *first_stmt_def1_type,
+ tree *first_stmt_const_oprnd,
+ int ncopies_for_cost,
+ bool *pattern0, bool *pattern1)
+{
+ tree oprnd;
+ unsigned int i, number_of_oprnds;
+ tree def;
+ gimple def_stmt;
+ enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
+ stmt_vec_info stmt_info =
+ vinfo_for_stmt (VEC_index (gimple, SLP_TREE_SCALAR_STMTS (slp_node), 0));
+ enum gimple_rhs_class rhs_class;
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+
+ rhs_class = get_gimple_rhs_class (gimple_assign_rhs_code (stmt));
+ number_of_oprnds = gimple_num_ops (stmt) - 1; /* RHS only */
+
+ for (i = 0; i < number_of_oprnds; i++)
+ {
+ oprnd = gimple_op (stmt, i + 1);
+
+ if (!vect_is_simple_use (oprnd, loop_vinfo, &def_stmt, &def, &dt[i])
+ || (!def_stmt && dt[i] != vect_constant_def))
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Build SLP failed: can't find def for ");
+ print_generic_expr (vect_dump, oprnd, TDF_SLIM);
+ }
+
+ return false;
+ }
+
+ /* Check if DEF_STMT is a part of a pattern and get the def stmt from
+ the pattern. Check that all the stmts of the node are in the
+ pattern. */
+ if (def_stmt && gimple_bb (def_stmt)
+ && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
+ && vinfo_for_stmt (def_stmt)
+ && STMT_VINFO_IN_PATTERN_P (vinfo_for_stmt (def_stmt)))
+ {
+ if (!*first_stmt_dt0)
+ *pattern0 = true;
+ else
+ {
+ if (i == 1 && !*first_stmt_dt1)
+ *pattern1 = true;
+ else if ((i == 0 && !*pattern0) || (i == 1 && !*pattern1))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "Build SLP failed: some of the stmts"
+ " are in a pattern, and others are not ");
+ print_generic_expr (vect_dump, oprnd, TDF_SLIM);
+ }
+
+ return false;
+ }
+ }
+
+ def_stmt = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (def_stmt));
+ dt[i] = STMT_VINFO_DEF_TYPE (vinfo_for_stmt (def_stmt));
+
+ if (*dt == vect_unknown_def_type)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Unsupported pattern.");
+ return false;
+ }
+
+ switch (gimple_code (def_stmt))
+ {
+ case GIMPLE_PHI:
+ def = gimple_phi_result (def_stmt);
+ break;
+
+ case GIMPLE_ASSIGN:
+ def = gimple_assign_lhs (def_stmt);
+ break;
+
+ default:
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "unsupported defining stmt: ");
+ return false;
+ }
+ }
+
+ if (!*first_stmt_dt0)
+ {
+ /* op0 of the first stmt of the group - store its info. */
+ *first_stmt_dt0 = dt[i];
+ if (def)
+ *first_stmt_def0_type = TREE_TYPE (def);
+ else
+ *first_stmt_const_oprnd = oprnd;
+
+ /* Analyze costs (for the first stmt of the group only). */
+ if (rhs_class != GIMPLE_SINGLE_RHS)
+ /* Not memory operation (we don't call this functions for loads). */
+ vect_model_simple_cost (stmt_info, ncopies_for_cost, dt, slp_node);
+ else
+ /* Store. */
+ vect_model_store_cost (stmt_info, ncopies_for_cost, dt[0], slp_node);
+ }
+
+ else
+ {
+ if (!*first_stmt_dt1 && i == 1)
+ {
+ /* op1 of the first stmt of the group - store its info. */
+ *first_stmt_dt1 = dt[i];
+ if (def)
+ *first_stmt_def1_type = TREE_TYPE (def);
+ else
+ {
+ /* We assume that the stmt contains only one constant
+ operand. We fail otherwise, to be on the safe side. */
+ if (*first_stmt_const_oprnd)
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ fprintf (vect_dump, "Build SLP failed: two constant "
+ "oprnds in stmt");
+ return false;
+ }
+ *first_stmt_const_oprnd = oprnd;
+ }
+ }
+ else
+ {
+ /* Not first stmt of the group, check that the def-stmt/s match
+ the def-stmt/s of the first stmt. */
+ if ((i == 0
+ && (*first_stmt_dt0 != dt[i]
+ || (*first_stmt_def0_type && def
+ && *first_stmt_def0_type != TREE_TYPE (def))))
+ || (i == 1
+ && (*first_stmt_dt1 != dt[i]
+ || (*first_stmt_def1_type && def
+ && *first_stmt_def1_type != TREE_TYPE (def))))
+ || (!def
+ && TREE_TYPE (*first_stmt_const_oprnd)
+ != TREE_TYPE (oprnd)))
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ fprintf (vect_dump, "Build SLP failed: different types ");
+
+ return false;
+ }
+ }
+ }
+
+ /* Check the types of the definitions. */
+ switch (dt[i])
+ {
+ case vect_constant_def:
+ case vect_invariant_def:
+ break;
+
+ case vect_loop_def:
+ if (i == 0)
+ VEC_safe_push (gimple, heap, *def_stmts0, def_stmt);
+ else
+ VEC_safe_push (gimple, heap, *def_stmts1, def_stmt);
+ break;
+
+ default:
+ /* FORNOW: Not supported. */
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Build SLP failed: illegal type of def ");
+ print_generic_expr (vect_dump, def, TDF_SLIM);
+ }
+
+ return false;
+ }
+ }
+
+ return true;
+}
+
+
+/* Recursively build an SLP tree starting from NODE.
+ Fail (and return FALSE) if def-stmts are not isomorphic, require data
+ permutation or are of unsupported types of operation. Otherwise, return
+ TRUE. */
+
+static bool
+vect_build_slp_tree (loop_vec_info loop_vinfo, slp_tree *node,
+ unsigned int group_size,
+ int *inside_cost, int *outside_cost,
+ int ncopies_for_cost, unsigned int *max_nunits,
+ VEC (int, heap) **load_permutation,
+ VEC (slp_tree, heap) **loads)
+{
+ VEC (gimple, heap) *def_stmts0 = VEC_alloc (gimple, heap, group_size);
+ VEC (gimple, heap) *def_stmts1 = VEC_alloc (gimple, heap, group_size);
+ unsigned int i;
+ VEC (gimple, heap) *stmts = SLP_TREE_SCALAR_STMTS (*node);
+ gimple stmt = VEC_index (gimple, stmts, 0);
+ enum vect_def_type first_stmt_dt0 = 0, first_stmt_dt1 = 0;
+ enum tree_code first_stmt_code = 0, rhs_code;
+ tree first_stmt_def1_type = NULL_TREE, first_stmt_def0_type = NULL_TREE;
+ tree lhs;
+ bool stop_recursion = false, need_same_oprnds = false;
+ tree vectype, scalar_type, first_op1 = NULL_TREE;
+ unsigned int vectorization_factor = 0, ncopies;
+ optab optab;
+ int icode;
+ enum machine_mode optab_op2_mode;
+ enum machine_mode vec_mode;
+ tree first_stmt_const_oprnd = NULL_TREE;
+ struct data_reference *first_dr;
+ bool pattern0 = false, pattern1 = false;
+ HOST_WIDE_INT dummy;
+ bool permutation = false;
+ unsigned int load_place;
+ gimple first_load;
+
+ /* For every stmt in NODE find its def stmt/s. */
+ for (i = 0; VEC_iterate (gimple, stmts, i, stmt); i++)
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Build SLP for ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ lhs = gimple_get_lhs (stmt);
+ if (lhs == NULL_TREE)
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump,
+ "Build SLP failed: not GIMPLE_ASSIGN nor GIMPLE_CALL");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ return false;
+ }
+
+ scalar_type = vect_get_smallest_scalar_type (stmt, &dummy, &dummy);
+ vectype = get_vectype_for_scalar_type (scalar_type);
+ if (!vectype)
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Build SLP failed: unsupported data-type ");
+ print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
+ }
+ return false;
+ }
+
+ gcc_assert (LOOP_VINFO_VECT_FACTOR (loop_vinfo));
+ vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+ ncopies = vectorization_factor / TYPE_VECTOR_SUBPARTS (vectype);
+ if (ncopies > 1 && vect_print_dump_info (REPORT_SLP))
+ fprintf (vect_dump, "SLP with multiple types ");
+
+ /* In case of multiple types we need to detect the smallest type. */
+ if (*max_nunits < TYPE_VECTOR_SUBPARTS (vectype))
+ *max_nunits = TYPE_VECTOR_SUBPARTS (vectype);
+
+ if (is_gimple_call (stmt))
+ rhs_code = CALL_EXPR;
+ else
+ rhs_code = gimple_assign_rhs_code (stmt);
+
+ /* Check the operation. */
+ if (i == 0)
+ {
+ first_stmt_code = rhs_code;
+
+ /* Shift arguments should be equal in all the packed stmts for a
+ vector shift with scalar shift operand. */
+ if (rhs_code == LSHIFT_EXPR || rhs_code == RSHIFT_EXPR
+ || rhs_code == LROTATE_EXPR
+ || rhs_code == RROTATE_EXPR)
+ {
+ vec_mode = TYPE_MODE (vectype);
+
+ /* First see if we have a vector/vector shift. */
+ optab = optab_for_tree_code (rhs_code, vectype,
+ optab_vector);
+
+ if (!optab
+ || (optab->handlers[(int) vec_mode].insn_code
+ == CODE_FOR_nothing))
+ {
+ /* No vector/vector shift, try for a vector/scalar shift. */
+ optab = optab_for_tree_code (rhs_code, vectype,
+ optab_scalar);
+
+ if (!optab)
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ fprintf (vect_dump, "Build SLP failed: no optab.");
+ return false;
+ }
+ icode = (int) optab->handlers[(int) vec_mode].insn_code;
+ if (icode == CODE_FOR_nothing)
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ fprintf (vect_dump, "Build SLP failed: "
+ "op not supported by target.");
+ return false;
+ }
+ optab_op2_mode = insn_data[icode].operand[2].mode;
+ if (!VECTOR_MODE_P (optab_op2_mode))
+ {
+ need_same_oprnds = true;
+ first_op1 = gimple_assign_rhs2 (stmt);
+ }
+ }
+ }
+ }
+ else
+ {
+ if (first_stmt_code != rhs_code
+ && (first_stmt_code != IMAGPART_EXPR
+ || rhs_code != REALPART_EXPR)
+ && (first_stmt_code != REALPART_EXPR
+ || rhs_code != IMAGPART_EXPR))
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump,
+ "Build SLP failed: different operation in stmt ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ return false;
+ }
+
+ if (need_same_oprnds
+ && !operand_equal_p (first_op1, gimple_assign_rhs2 (stmt), 0))
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump,
+ "Build SLP failed: different shift arguments in ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ return false;
+ }
+ }
+
+ /* Strided store or load. */
+ if (STMT_VINFO_STRIDED_ACCESS (vinfo_for_stmt (stmt)))
+ {
+ if (REFERENCE_CLASS_P (lhs))
+ {
+ /* Store. */
+ if (!vect_get_and_check_slp_defs (loop_vinfo, *node, stmt,
+ &def_stmts0, &def_stmts1,
+ &first_stmt_dt0,
+ &first_stmt_dt1,
+ &first_stmt_def0_type,
+ &first_stmt_def1_type,
+ &first_stmt_const_oprnd,
+ ncopies_for_cost,
+ &pattern0, &pattern1))
+ return false;
+ }
+ else
+ {
+ /* Load. */
+ /* FORNOW: Check that there is no gap between the loads. */
+ if ((DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)) == stmt
+ && DR_GROUP_GAP (vinfo_for_stmt (stmt)) != 0)
+ || (DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt)) != stmt
+ && DR_GROUP_GAP (vinfo_for_stmt (stmt)) != 1))
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Build SLP failed: strided "
+ "loads have gaps ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ return false;
+ }
+
+ first_load = DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt));
+
+ if (first_load == stmt)
+ {
+ first_dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt));
+ if (vect_supportable_dr_alignment (first_dr)
+ == dr_unaligned_unsupported)
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Build SLP failed: unsupported "
+ "unaligned load ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ return false;
+ }
+
+ /* Analyze costs (for the first stmt in the group). */
+ vect_model_load_cost (vinfo_for_stmt (stmt),
+ ncopies_for_cost, *node);
+ }
+
+ /* Store the place of this load in the interleaving chain. In
+ case that permutation is needed we later decide if a specific
+ permutation is supported. */
+ load_place = vect_get_place_in_interleaving_chain (stmt,
+ first_load);
+ if (load_place != i)
+ permutation = true;
+
+ VEC_safe_push (int, heap, *load_permutation, load_place);
+
+ /* We stop the tree when we reach a group of loads. */
+ stop_recursion = true;
+ continue;
+ }
+ } /* Strided access. */
+ else
+ {
+ if (TREE_CODE_CLASS (rhs_code) == tcc_reference)
+ {
+ /* Not strided load. */
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Build SLP failed: not strided load ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ /* FORNOW: Not strided loads are not supported. */
+ return false;
+ }
+
+ /* Not memory operation. */
+ if (TREE_CODE_CLASS (rhs_code) != tcc_binary
+ && TREE_CODE_CLASS (rhs_code) != tcc_unary)
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Build SLP failed: operation");
+ fprintf (vect_dump, " unsupported ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ return false;
+ }
+
+ /* Find the def-stmts. */
+ if (!vect_get_and_check_slp_defs (loop_vinfo, *node, stmt,
+ &def_stmts0, &def_stmts1,
+ &first_stmt_dt0, &first_stmt_dt1,
+ &first_stmt_def0_type,
+ &first_stmt_def1_type,
+ &first_stmt_const_oprnd,
+ ncopies_for_cost,
+ &pattern0, &pattern1))
+ return false;
+ }
+ }
+
+ /* Add the costs of the node to the overall instance costs. */
+ *inside_cost += SLP_TREE_INSIDE_OF_LOOP_COST (*node);
+ *outside_cost += SLP_TREE_OUTSIDE_OF_LOOP_COST (*node);
+
+ /* Strided loads were reached - stop the recursion. */
+ if (stop_recursion)
+ {
+ if (permutation)
+ {
+ VEC_safe_push (slp_tree, heap, *loads, *node);
+ *inside_cost += TARG_VEC_PERMUTE_COST * group_size;
+ }
+
+ return true;
+ }
+
+ /* Create SLP_TREE nodes for the definition node/s. */
+ if (first_stmt_dt0 == vect_loop_def)
+ {
+ slp_tree left_node = XNEW (struct _slp_tree);
+ SLP_TREE_SCALAR_STMTS (left_node) = def_stmts0;
+ SLP_TREE_VEC_STMTS (left_node) = NULL;
+ SLP_TREE_LEFT (left_node) = NULL;
+ SLP_TREE_RIGHT (left_node) = NULL;
+ SLP_TREE_OUTSIDE_OF_LOOP_COST (left_node) = 0;
+ SLP_TREE_INSIDE_OF_LOOP_COST (left_node) = 0;
+ if (!vect_build_slp_tree (loop_vinfo, &left_node, group_size,
+ inside_cost, outside_cost, ncopies_for_cost,
+ max_nunits, load_permutation, loads))
+ return false;
+
+ SLP_TREE_LEFT (*node) = left_node;
+ }
+
+ if (first_stmt_dt1 == vect_loop_def)
+ {
+ slp_tree right_node = XNEW (struct _slp_tree);
+ SLP_TREE_SCALAR_STMTS (right_node) = def_stmts1;
+ SLP_TREE_VEC_STMTS (right_node) = NULL;
+ SLP_TREE_LEFT (right_node) = NULL;
+ SLP_TREE_RIGHT (right_node) = NULL;
+ SLP_TREE_OUTSIDE_OF_LOOP_COST (right_node) = 0;
+ SLP_TREE_INSIDE_OF_LOOP_COST (right_node) = 0;
+ if (!vect_build_slp_tree (loop_vinfo, &right_node, group_size,
+ inside_cost, outside_cost, ncopies_for_cost,
+ max_nunits, load_permutation, loads))
+ return false;
+
+ SLP_TREE_RIGHT (*node) = right_node;
+ }
+
+ return true;
+}
+
+
+static void
+vect_print_slp_tree (slp_tree node)
+{
+ int i;
+ gimple stmt;
+
+ if (!node)
+ return;
+
+ fprintf (vect_dump, "node ");
+ for (i = 0; VEC_iterate (gimple, SLP_TREE_SCALAR_STMTS (node), i, stmt); i++)
+ {
+ fprintf (vect_dump, "\n\tstmt %d ", i);
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+ fprintf (vect_dump, "\n");
+
+ vect_print_slp_tree (SLP_TREE_LEFT (node));
+ vect_print_slp_tree (SLP_TREE_RIGHT (node));
+}
+
+
+/* Mark the tree rooted at NODE with MARK (PURE_SLP or HYBRID).
+ If MARK is HYBRID, it refers to a specific stmt in NODE (the stmt at index
+ J). Otherwise, MARK is PURE_SLP and J is -1, which indicates that all the
+ stmts in NODE are to be marked. */
+
+static void
+vect_mark_slp_stmts (slp_tree node, enum slp_vect_type mark, int j)
+{
+ int i;
+ gimple stmt;
+
+ if (!node)
+ return;
+
+ for (i = 0; VEC_iterate (gimple, SLP_TREE_SCALAR_STMTS (node), i, stmt); i++)
+ if (j < 0 || i == j)
+ STMT_SLP_TYPE (vinfo_for_stmt (stmt)) = mark;
+
+ vect_mark_slp_stmts (SLP_TREE_LEFT (node), mark, j);
+ vect_mark_slp_stmts (SLP_TREE_RIGHT (node), mark, j);
+}
+
+
+/* Check if the permutation required by the SLP INSTANCE is supported.
+ Reorganize the SLP nodes stored in SLP_INSTANCE_LOADS if needed. */
+
+static bool
+vect_supported_slp_permutation_p (slp_instance instance)
+{
+ slp_tree node = VEC_index (slp_tree, SLP_INSTANCE_LOADS (instance), 0);
+ gimple stmt = VEC_index (gimple, SLP_TREE_SCALAR_STMTS (node), 0);
+ gimple first_load = DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt));
+ VEC (slp_tree, heap) *sorted_loads = NULL;
+ int index;
+ slp_tree *tmp_loads = NULL;
+ int group_size = SLP_INSTANCE_GROUP_SIZE (instance), i, j;
+ slp_tree load;
+
+ /* FORNOW: The only supported loads permutation is loads from the same
+ location in all the loads in the node, when the data-refs in
+ nodes of LOADS constitute an interleaving chain.
+ Sort the nodes according to the order of accesses in the chain. */
+ tmp_loads = (slp_tree *) xmalloc (sizeof (slp_tree) * group_size);
+ for (i = 0, j = 0;
+ VEC_iterate (int, SLP_INSTANCE_LOAD_PERMUTATION (instance), i, index)
+ && VEC_iterate (slp_tree, SLP_INSTANCE_LOADS (instance), j, load);
+ i += group_size, j++)
+ {
+ gimple scalar_stmt = VEC_index (gimple, SLP_TREE_SCALAR_STMTS (load), 0);
+ /* Check that the loads are all in the same interleaving chain. */
+ if (DR_GROUP_FIRST_DR (vinfo_for_stmt (scalar_stmt)) != first_load)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "Build SLP failed: unsupported data "
+ "permutation ");
+ print_gimple_stmt (vect_dump, scalar_stmt, 0, TDF_SLIM);
+ }
+
+ free (tmp_loads);
+ return false;
+ }
+
+ tmp_loads[index] = load;
+ }
+
+ sorted_loads = VEC_alloc (slp_tree, heap, group_size);
+ for (i = 0; i < group_size; i++)
+ VEC_safe_push (slp_tree, heap, sorted_loads, tmp_loads[i]);
+
+ VEC_free (slp_tree, heap, SLP_INSTANCE_LOADS (instance));
+ SLP_INSTANCE_LOADS (instance) = sorted_loads;
+ free (tmp_loads);
+
+ if (!vect_transform_slp_perm_load (stmt, NULL, NULL,
+ SLP_INSTANCE_UNROLLING_FACTOR (instance),
+ instance, true))
+ return false;
+
+ return true;
+}
+
+
+/* Check if the required load permutation is supported.
+ LOAD_PERMUTATION contains a list of indices of the loads.
+ In SLP this permutation is relative to the order of strided stores that are
+ the base of the SLP instance. */
+
+static bool
+vect_supported_load_permutation_p (slp_instance slp_instn, int group_size,
+ VEC (int, heap) *load_permutation)
+{
+ int i = 0, j, prev = -1, next, k;
+ bool supported;
+
+ /* FORNOW: permutations are only supported for loop-aware SLP. */
+ if (!slp_instn)
+ return false;
+
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Load permutation ");
+ for (i = 0; VEC_iterate (int, load_permutation, i, next); i++)
+ fprintf (vect_dump, "%d ", next);
+ }
+
+ /* FORNOW: the only supported permutation is 0..01..1.. of length equal to
+ GROUP_SIZE and where each sequence of same drs is of GROUP_SIZE length as
+ well. */
+ if (VEC_length (int, load_permutation)
+ != (unsigned int) (group_size * group_size))
+ return false;
+
+ supported = true;
+ for (j = 0; j < group_size; j++)
+ {
+ for (i = j * group_size, k = 0;
+ VEC_iterate (int, load_permutation, i, next) && k < group_size;
+ i++, k++)
+ {
+ if (i != j * group_size && next != prev)
+ {
+ supported = false;
+ break;
+ }
+
+ prev = next;
+ }
+ }
+
+ if (supported && i == group_size * group_size
+ && vect_supported_slp_permutation_p (slp_instn))
+ return true;
+
+ return false;
+}
+
+
+/* Find the first load in the loop that belongs to INSTANCE.
+ When loads are in several SLP nodes, there can be a case in which the first
+ load does not appear in the first SLP node to be transformed, causing
+ incorrect order of statements. Since we generate all the loads together,
+ they must be inserted before the first load of the SLP instance and not
+ before the first load of the first node of the instance. */
+static gimple
+vect_find_first_load_in_slp_instance (slp_instance instance)
+{
+ int i, j;
+ slp_tree load_node;
+ gimple first_load = NULL, load;
+
+ for (i = 0;
+ VEC_iterate (slp_tree, SLP_INSTANCE_LOADS (instance), i, load_node);
+ i++)
+ for (j = 0;
+ VEC_iterate (gimple, SLP_TREE_SCALAR_STMTS (load_node), j, load);
+ j++)
+ first_load = get_earlier_stmt (load, first_load);
+
+ return first_load;
+}
+
+
+/* Analyze an SLP instance starting from a group of strided stores. Call
+ vect_build_slp_tree to build a tree of packed stmts if possible.
+ Return FALSE if it's impossible to SLP any stmt in the loop. */
+
+static bool
+vect_analyze_slp_instance (loop_vec_info loop_vinfo, gimple stmt)
+{
+ slp_instance new_instance;
+ slp_tree node = XNEW (struct _slp_tree);
+ unsigned int group_size = DR_GROUP_SIZE (vinfo_for_stmt (stmt));
+ unsigned int unrolling_factor = 1, nunits;
+ tree vectype, scalar_type;
+ gimple next;
+ unsigned int vectorization_factor = 0, ncopies;
+ bool slp_impossible = false;
+ int inside_cost = 0, outside_cost = 0, ncopies_for_cost;
+ unsigned int max_nunits = 0;
+ VEC (int, heap) *load_permutation;
+ VEC (slp_tree, heap) *loads;
+
+ scalar_type = TREE_TYPE (DR_REF (STMT_VINFO_DATA_REF (
+ vinfo_for_stmt (stmt))));
+ vectype = get_vectype_for_scalar_type (scalar_type);
+ if (!vectype)
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Build SLP failed: unsupported data-type ");
+ print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
+ }
+ return false;
+ }
+
+ nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+ ncopies = vectorization_factor / nunits;
+
+ /* Create a node (a root of the SLP tree) for the packed strided stores. */
+ SLP_TREE_SCALAR_STMTS (node) = VEC_alloc (gimple, heap, group_size);
+ next = stmt;
+ /* Collect the stores and store them in SLP_TREE_SCALAR_STMTS. */
+ while (next)
+ {
+ VEC_safe_push (gimple, heap, SLP_TREE_SCALAR_STMTS (node), next);
+ next = DR_GROUP_NEXT_DR (vinfo_for_stmt (next));
+ }
+
+ SLP_TREE_VEC_STMTS (node) = NULL;
+ SLP_TREE_NUMBER_OF_VEC_STMTS (node) = 0;
+ SLP_TREE_LEFT (node) = NULL;
+ SLP_TREE_RIGHT (node) = NULL;
+ SLP_TREE_OUTSIDE_OF_LOOP_COST (node) = 0;
+ SLP_TREE_INSIDE_OF_LOOP_COST (node) = 0;
+
+ /* Calculate the unrolling factor. */
+ unrolling_factor = least_common_multiple (nunits, group_size) / group_size;
+
+ /* Calculate the number of vector stmts to create based on the unrolling
+ factor (number of vectors is 1 if NUNITS >= GROUP_SIZE, and is
+ GROUP_SIZE / NUNITS otherwise. */
+ ncopies_for_cost = unrolling_factor * group_size / nunits;
+
+ load_permutation = VEC_alloc (int, heap, group_size * group_size);
+ loads = VEC_alloc (slp_tree, heap, group_size);
+
+ /* Build the tree for the SLP instance. */
+ if (vect_build_slp_tree (loop_vinfo, &node, group_size, &inside_cost,
+ &outside_cost, ncopies_for_cost, &max_nunits,
+ &load_permutation, &loads))
+ {
+ /* Create a new SLP instance. */
+ new_instance = XNEW (struct _slp_instance);
+ SLP_INSTANCE_TREE (new_instance) = node;
+ SLP_INSTANCE_GROUP_SIZE (new_instance) = group_size;
+ /* Calculate the unrolling factor based on the smallest type in the
+ loop. */
+ if (max_nunits > nunits)
+ unrolling_factor = least_common_multiple (max_nunits, group_size)
+ / group_size;
+
+ SLP_INSTANCE_UNROLLING_FACTOR (new_instance) = unrolling_factor;
+ SLP_INSTANCE_OUTSIDE_OF_LOOP_COST (new_instance) = outside_cost;
+ SLP_INSTANCE_INSIDE_OF_LOOP_COST (new_instance) = inside_cost;
+ SLP_INSTANCE_LOADS (new_instance) = loads;
+ SLP_INSTANCE_FIRST_LOAD_STMT (new_instance) = NULL;
+ SLP_INSTANCE_LOAD_PERMUTATION (new_instance) = load_permutation;
+ if (VEC_length (slp_tree, loads))
+ {
+ if (!vect_supported_load_permutation_p (new_instance, group_size,
+ load_permutation))
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Build SLP failed: unsupported load "
+ "permutation ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ vect_free_slp_instance (new_instance);
+ return false;
+ }
+
+ SLP_INSTANCE_FIRST_LOAD_STMT (new_instance)
+ = vect_find_first_load_in_slp_instance (new_instance);
+ }
+ else
+ VEC_free (int, heap, SLP_INSTANCE_LOAD_PERMUTATION (new_instance));
+
+ VEC_safe_push (slp_instance, heap, LOOP_VINFO_SLP_INSTANCES (loop_vinfo),
+ new_instance);
+ if (vect_print_dump_info (REPORT_SLP))
+ vect_print_slp_tree (node);
+
+ return true;
+ }
+
+ /* Failed to SLP. */
+ /* Free the allocated memory. */
+ vect_free_slp_tree (node);
+ VEC_free (int, heap, load_permutation);
+ VEC_free (slp_tree, heap, loads);
+
+ if (slp_impossible)
+ return false;
+
+ /* SLP failed for this instance, but it is still possible to SLP other stmts
+ in the loop. */
+ return true;
+}
+
+
+/* Check if there are stmts in the loop can be vectorized using SLP. Build SLP
+ trees of packed scalar stmts if SLP is possible. */
+
+bool
+vect_analyze_slp (loop_vec_info loop_vinfo)
+{
+ unsigned int i;
+ VEC (gimple, heap) *strided_stores = LOOP_VINFO_STRIDED_STORES (loop_vinfo);
+ gimple store;
+
+ if (vect_print_dump_info (REPORT_SLP))
+ fprintf (vect_dump, "=== vect_analyze_slp ===");
+
+ for (i = 0; VEC_iterate (gimple, strided_stores, i, store); i++)
+ if (!vect_analyze_slp_instance (loop_vinfo, store))
+ {
+ /* SLP failed. No instance can be SLPed in the loop. */
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "SLP failed.");
+
+ return false;
+ }
+
+ return true;
+}
+
+
+/* For each possible SLP instance decide whether to SLP it and calculate overall
+ unrolling factor needed to SLP the loop. */
+
+void
+vect_make_slp_decision (loop_vec_info loop_vinfo)
+{
+ unsigned int i, unrolling_factor = 1;
+ VEC (slp_instance, heap) *slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
+ slp_instance instance;
+ int decided_to_slp = 0;
+
+ if (vect_print_dump_info (REPORT_SLP))
+ fprintf (vect_dump, "=== vect_make_slp_decision ===");
+
+ for (i = 0; VEC_iterate (slp_instance, slp_instances, i, instance); i++)
+ {
+ /* FORNOW: SLP if you can. */
+ if (unrolling_factor < SLP_INSTANCE_UNROLLING_FACTOR (instance))
+ unrolling_factor = SLP_INSTANCE_UNROLLING_FACTOR (instance);
+
+ /* Mark all the stmts that belong to INSTANCE as PURE_SLP stmts. Later we
+ call vect_detect_hybrid_slp () to find stmts that need hybrid SLP and
+ loop-based vectorization. Such stmts will be marked as HYBRID. */
+ vect_mark_slp_stmts (SLP_INSTANCE_TREE (instance), pure_slp, -1);
+ decided_to_slp++;
+ }
+
+ LOOP_VINFO_SLP_UNROLLING_FACTOR (loop_vinfo) = unrolling_factor;
+
+ if (decided_to_slp && vect_print_dump_info (REPORT_SLP))
+ fprintf (vect_dump, "Decided to SLP %d instances. Unrolling factor %d",
+ decided_to_slp, unrolling_factor);
+}
+
+
+/* Find stmts that must be both vectorized and SLPed (since they feed stmts that
+ can't be SLPed) in the tree rooted at NODE. Mark such stmts as HYBRID. */
+
+static void
+vect_detect_hybrid_slp_stmts (slp_tree node)
+{
+ int i;
+ gimple stmt;
+ imm_use_iterator imm_iter;
+ gimple use_stmt;
+
+ if (!node)
+ return;
+
+ for (i = 0; VEC_iterate (gimple, SLP_TREE_SCALAR_STMTS (node), i, stmt); i++)
+ if (PURE_SLP_STMT (vinfo_for_stmt (stmt))
+ && TREE_CODE (gimple_op (stmt, 0)) == SSA_NAME)
+ FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, gimple_op (stmt, 0))
+ if (vinfo_for_stmt (use_stmt)
+ && !STMT_SLP_TYPE (vinfo_for_stmt (use_stmt))
+ && STMT_VINFO_RELEVANT (vinfo_for_stmt (use_stmt)))
+ vect_mark_slp_stmts (node, hybrid, i);
+
+ vect_detect_hybrid_slp_stmts (SLP_TREE_LEFT (node));
+ vect_detect_hybrid_slp_stmts (SLP_TREE_RIGHT (node));
+}
+
+
+/* Find stmts that must be both vectorized and SLPed. */
+
+void
+vect_detect_hybrid_slp (loop_vec_info loop_vinfo)
+{
+ unsigned int i;
+ VEC (slp_instance, heap) *slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
+ slp_instance instance;
+
+ if (vect_print_dump_info (REPORT_SLP))
+ fprintf (vect_dump, "=== vect_detect_hybrid_slp ===");
+
+ for (i = 0; VEC_iterate (slp_instance, slp_instances, i, instance); i++)
+ vect_detect_hybrid_slp_stmts (SLP_INSTANCE_TREE (instance));
+}
+
+/* SLP costs are calculated according to SLP instance unrolling factor (i.e.,
+ the number of created vector stmts depends on the unrolling factor). However,
+ the actual number of vector stmts for every SLP node depends on VF which is
+ set later in vect_analyze_operations(). Hence, SLP costs should be updated.
+ In this function we assume that the inside costs calculated in
+ vect_model_xxx_cost are linear in ncopies. */
+
+void
+vect_update_slp_costs_according_to_vf (loop_vec_info loop_vinfo)
+{
+ unsigned int i, vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+ VEC (slp_instance, heap) *slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
+ slp_instance instance;
+
+ if (vect_print_dump_info (REPORT_SLP))
+ fprintf (vect_dump, "=== vect_update_slp_costs_according_to_vf ===");
+
+ for (i = 0; VEC_iterate (slp_instance, slp_instances, i, instance); i++)
+ /* We assume that costs are linear in ncopies. */
+ SLP_INSTANCE_INSIDE_OF_LOOP_COST (instance) *= vf
+ / SLP_INSTANCE_UNROLLING_FACTOR (instance);
+}
+
+/* For constant and loop invariant defs of SLP_NODE this function returns
+ (vector) defs (VEC_OPRNDS) that will be used in the vectorized stmts.
+ OP_NUM determines if we gather defs for operand 0 or operand 1 of the scalar
+ stmts. NUMBER_OF_VECTORS is the number of vector defs to create. */
+
+static void
+vect_get_constant_vectors (slp_tree slp_node, VEC(tree,heap) **vec_oprnds,
+ unsigned int op_num, unsigned int number_of_vectors)
+{
+ VEC (gimple, heap) *stmts = SLP_TREE_SCALAR_STMTS (slp_node);
+ gimple stmt = VEC_index (gimple, stmts, 0);
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo);
+ int nunits;
+ tree vec_cst;
+ tree t = NULL_TREE;
+ int j, number_of_places_left_in_vector;
+ tree vector_type;
+ tree op, vop;
+ int group_size = VEC_length (gimple, stmts);
+ unsigned int vec_num, i;
+ int number_of_copies = 1;
+ VEC (tree, heap) *voprnds = VEC_alloc (tree, heap, number_of_vectors);
+ bool constant_p, is_store;
+
+ if (STMT_VINFO_DATA_REF (stmt_vinfo))
+ {
+ is_store = true;
+ op = gimple_assign_rhs1 (stmt);
+ }
+ else
+ {
+ is_store = false;
+ op = gimple_op (stmt, op_num + 1);
+ }
+
+ if (CONSTANT_CLASS_P (op))
+ {
+ vector_type = vectype;
+ constant_p = true;
+ }
+ else
+ {
+ vector_type = get_vectype_for_scalar_type (TREE_TYPE (op));
+ gcc_assert (vector_type);
+ constant_p = false;
+ }
+
+ nunits = TYPE_VECTOR_SUBPARTS (vector_type);
+
+ /* NUMBER_OF_COPIES is the number of times we need to use the same values in
+ created vectors. It is greater than 1 if unrolling is performed.
+
+ For example, we have two scalar operands, s1 and s2 (e.g., group of
+ strided accesses of size two), while NUNITS is four (i.e., four scalars
+ of this type can be packed in a vector). The output vector will contain
+ two copies of each scalar operand: {s1, s2, s1, s2}. (NUMBER_OF_COPIES
+ will be 2).
+
+ If GROUP_SIZE > NUNITS, the scalars will be split into several vectors
+ containing the operands.
+
+ For example, NUNITS is four as before, and the group size is 8
+ (s1, s2, ..., s8). We will create two vectors {s1, s2, s3, s4} and
+ {s5, s6, s7, s8}. */
+
+ number_of_copies = least_common_multiple (nunits, group_size) / group_size;
+
+ number_of_places_left_in_vector = nunits;
+ for (j = 0; j < number_of_copies; j++)
+ {
+ for (i = group_size - 1; VEC_iterate (gimple, stmts, i, stmt); i--)
+ {
+ if (is_store)
+ op = gimple_assign_rhs1 (stmt);
+ else
+ op = gimple_op (stmt, op_num + 1);
+
+ /* Create 'vect_ = {op0,op1,...,opn}'. */
+ t = tree_cons (NULL_TREE, op, t);
+
+ number_of_places_left_in_vector--;
+
+ if (number_of_places_left_in_vector == 0)
+ {
+ number_of_places_left_in_vector = nunits;
+
+ if (constant_p)
+ vec_cst = build_vector (vector_type, t);
+ else
+ vec_cst = build_constructor_from_list (vector_type, t);
+ VEC_quick_push (tree, voprnds,
+ vect_init_vector (stmt, vec_cst, vector_type, NULL));
+ t = NULL_TREE;
+ }
+ }
+ }
+
+ /* Since the vectors are created in the reverse order, we should invert
+ them. */
+ vec_num = VEC_length (tree, voprnds);
+ for (j = vec_num - 1; j >= 0; j--)
+ {
+ vop = VEC_index (tree, voprnds, j);
+ VEC_quick_push (tree, *vec_oprnds, vop);
+ }
+
+ VEC_free (tree, heap, voprnds);
+
+ /* In case that VF is greater than the unrolling factor needed for the SLP
+ group of stmts, NUMBER_OF_VECTORS to be created is greater than
+ NUMBER_OF_SCALARS/NUNITS or NUNITS/NUMBER_OF_SCALARS, and hence we have
+ to replicate the vectors. */
+ while (number_of_vectors > VEC_length (tree, *vec_oprnds))
+ {
+ for (i = 0; VEC_iterate (tree, *vec_oprnds, i, vop) && i < vec_num; i++)
+ VEC_quick_push (tree, *vec_oprnds, vop);
+ }
+}
+
+
+/* Get vectorized definitions from SLP_NODE that contains corresponding
+ vectorized def-stmts. */
+
+static void
+vect_get_slp_vect_defs (slp_tree slp_node, VEC (tree,heap) **vec_oprnds)
+{
+ tree vec_oprnd;
+ gimple vec_def_stmt;
+ unsigned int i;
+
+ gcc_assert (SLP_TREE_VEC_STMTS (slp_node));
+
+ for (i = 0;
+ VEC_iterate (gimple, SLP_TREE_VEC_STMTS (slp_node), i, vec_def_stmt);
+ i++)
+ {
+ gcc_assert (vec_def_stmt);
+ vec_oprnd = gimple_get_lhs (vec_def_stmt);
+ VEC_quick_push (tree, *vec_oprnds, vec_oprnd);
+ }
+}
+
+
+/* Get vectorized definitions for SLP_NODE.
+ If the scalar definitions are loop invariants or constants, collect them and
+ call vect_get_constant_vectors() to create vector stmts.
+ Otherwise, the def-stmts must be already vectorized and the vectorized stmts
+ must be stored in the LEFT/RIGHT node of SLP_NODE, and we call
+ vect_get_slp_vect_defs() to retrieve them.
+ If VEC_OPRNDS1 is NULL, don't get vector defs for the second operand (from
+ the right node. This is used when the second operand must remain scalar. */
+
+void
+vect_get_slp_defs (slp_tree slp_node, VEC (tree,heap) **vec_oprnds0,
+ VEC (tree,heap) **vec_oprnds1)
+{
+ gimple first_stmt;
+ enum tree_code code;
+ int number_of_vects;
+ HOST_WIDE_INT lhs_size_unit, rhs_size_unit;
+
+ first_stmt = VEC_index (gimple, SLP_TREE_SCALAR_STMTS (slp_node), 0);
+ /* The number of vector defs is determined by the number of vector statements
+ in the node from which we get those statements. */
+ if (SLP_TREE_LEFT (slp_node))
+ number_of_vects = SLP_TREE_NUMBER_OF_VEC_STMTS (SLP_TREE_LEFT (slp_node));
+ else
+ {
+ number_of_vects = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
+ /* Number of vector stmts was calculated according to LHS in
+ vect_schedule_slp_instance(), fix it by replacing LHS with RHS, if
+ necessary. See vect_get_smallest_scalar_type() for details. */
+ vect_get_smallest_scalar_type (first_stmt, &lhs_size_unit,
+ &rhs_size_unit);
+ if (rhs_size_unit != lhs_size_unit)
+ {
+ number_of_vects *= rhs_size_unit;
+ number_of_vects /= lhs_size_unit;
+ }
+ }
+
+ /* Allocate memory for vectorized defs. */
+ *vec_oprnds0 = VEC_alloc (tree, heap, number_of_vects);
+
+ /* SLP_NODE corresponds either to a group of stores or to a group of
+ unary/binary operations. We don't call this function for loads. */
+ if (SLP_TREE_LEFT (slp_node))
+ /* The defs are already vectorized. */
+ vect_get_slp_vect_defs (SLP_TREE_LEFT (slp_node), vec_oprnds0);
+ else
+ /* Build vectors from scalar defs. */
+ vect_get_constant_vectors (slp_node, vec_oprnds0, 0, number_of_vects);
+
+ if (STMT_VINFO_DATA_REF (vinfo_for_stmt (first_stmt)))
+ /* Since we don't call this function with loads, this is a group of
+ stores. */
+ return;
+
+ code = gimple_assign_rhs_code (first_stmt);
+ if (get_gimple_rhs_class (code) != GIMPLE_BINARY_RHS || !vec_oprnds1)
+ return;
+
+ /* The number of vector defs is determined by the number of vector statements
+ in the node from which we get those statements. */
+ if (SLP_TREE_RIGHT (slp_node))
+ number_of_vects = SLP_TREE_NUMBER_OF_VEC_STMTS (SLP_TREE_RIGHT (slp_node));
+ else
+ number_of_vects = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
+
+ *vec_oprnds1 = VEC_alloc (tree, heap, number_of_vects);
+
+ if (SLP_TREE_RIGHT (slp_node))
+ /* The defs are already vectorized. */
+ vect_get_slp_vect_defs (SLP_TREE_RIGHT (slp_node), vec_oprnds1);
+ else
+ /* Build vectors from scalar defs. */
+ vect_get_constant_vectors (slp_node, vec_oprnds1, 1, number_of_vects);
+}
+
+/* Create NCOPIES permutation statements using the mask MASK_BYTES (by
+ building a vector of type MASK_TYPE from it) and two input vectors placed in
+ DR_CHAIN at FIRST_VEC_INDX and SECOND_VEC_INDX for the first copy and
+ shifting by STRIDE elements of DR_CHAIN for every copy.
+ (STRIDE is the number of vectorized stmts for NODE divided by the number of
+ copies).
+ VECT_STMTS_COUNTER specifies the index in the vectorized stmts of NODE, where
+ the created stmts must be inserted. */
+
+static inline void
+vect_create_mask_and_perm (gimple stmt, gimple next_scalar_stmt,
+ int *mask_array, int mask_nunits,
+ tree mask_element_type, tree mask_type,
+ int first_vec_indx, int second_vec_indx,
+ gimple_stmt_iterator *gsi, slp_tree node,
+ tree builtin_decl, tree vectype,
+ VEC(tree,heap) *dr_chain,
+ int ncopies, int vect_stmts_counter)
+{
+ tree t = NULL_TREE, mask_vec, mask, perm_dest;
+ gimple perm_stmt = NULL;
+ stmt_vec_info next_stmt_info;
+ int i, group_size, stride, dr_chain_size;
+ tree first_vec, second_vec, data_ref;
+ tree sym;
+ ssa_op_iter iter;
+ VEC (tree, heap) *params = NULL;
+
+ /* Create a vector mask. */
+ for (i = mask_nunits - 1; i >= 0; --i)
+ t = tree_cons (NULL_TREE, build_int_cst (mask_element_type, mask_array[i]),
+ t);
+ mask_vec = build_vector (mask_type, t);
+ mask = vect_init_vector (stmt, mask_vec, mask_type, NULL);
+
+ group_size = VEC_length (gimple, SLP_TREE_SCALAR_STMTS (node));
+ stride = SLP_TREE_NUMBER_OF_VEC_STMTS (node) / ncopies;
+ dr_chain_size = VEC_length (tree, dr_chain);
+
+ /* Initialize the vect stmts of NODE to properly insert the generated
+ stmts later. */
+ for (i = VEC_length (gimple, SLP_TREE_VEC_STMTS (node));
+ i < (int) SLP_TREE_NUMBER_OF_VEC_STMTS (node); i++)
+ VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (node), NULL);
+
+ perm_dest = vect_create_destination_var (gimple_assign_lhs (stmt), vectype);
+ for (i = 0; i < ncopies; i++)
+ {
+ first_vec = VEC_index (tree, dr_chain, first_vec_indx);
+ second_vec = VEC_index (tree, dr_chain, second_vec_indx);
+
+ /* Build argument list for the vectorized call. */
+ VEC_free (tree, heap, params);
+ params = VEC_alloc (tree, heap, 3);
+ VEC_quick_push (tree, params, first_vec);
+ VEC_quick_push (tree, params, second_vec);
+ VEC_quick_push (tree, params, mask);
+
+ /* Generate the permute statement. */
+ perm_stmt = gimple_build_call_vec (builtin_decl, params);
+ data_ref = make_ssa_name (perm_dest, perm_stmt);
+ gimple_call_set_lhs (perm_stmt, data_ref);
+ vect_finish_stmt_generation (stmt, perm_stmt, gsi);
+ FOR_EACH_SSA_TREE_OPERAND (sym, perm_stmt, iter, SSA_OP_ALL_VIRTUALS)
+ {
+ if (TREE_CODE (sym) == SSA_NAME)
+ sym = SSA_NAME_VAR (sym);
+ mark_sym_for_renaming (sym);
+ }
+
+ /* Store the vector statement in NODE. */
+ VEC_replace (gimple, SLP_TREE_VEC_STMTS (node),
+ stride * i + vect_stmts_counter, perm_stmt);
+
+ first_vec_indx += stride;
+ second_vec_indx += stride;
+ }
+
+ /* Mark the scalar stmt as vectorized. */
+ next_stmt_info = vinfo_for_stmt (next_scalar_stmt);
+ STMT_VINFO_VEC_STMT (next_stmt_info) = perm_stmt;
+}
+
+
+/* Given FIRST_MASK_ELEMENT - the mask element in element representation,
+ return in CURRENT_MASK_ELEMENT its equivalent in target specific
+ representation. Check that the mask is valid and return FALSE if not.
+ Return TRUE in NEED_NEXT_VECTOR if the permutation requires to move to
+ the next vector, i.e., the current first vector is not needed. */
+
+static bool
+vect_get_mask_element (gimple stmt, int first_mask_element, int m,
+ int mask_nunits, bool only_one_vec, int index,
+ int *mask, int *current_mask_element,
+ bool *need_next_vector)
+{
+ int i;
+ static int number_of_mask_fixes = 1;
+ static bool mask_fixed = false;
+ static bool needs_first_vector = false;
+
+ /* Convert to target specific representation. */
+ *current_mask_element = first_mask_element + m;
+ /* Adjust the value in case it's a mask for second and third vectors. */
+ *current_mask_element -= mask_nunits * (number_of_mask_fixes - 1);
+
+ if (*current_mask_element < mask_nunits)
+ needs_first_vector = true;
+
+ /* We have only one input vector to permute but the mask accesses values in
+ the next vector as well. */
+ if (only_one_vec && *current_mask_element >= mask_nunits)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "permutation requires at least two vectors ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ return false;
+ }
+
+ /* The mask requires the next vector. */
+ if (*current_mask_element >= mask_nunits * 2)
+ {
+ if (needs_first_vector || mask_fixed)
+ {
+ /* We either need the first vector too or have already moved to the
+ next vector. In both cases, this permutation needs three
+ vectors. */
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "permutation requires at "
+ "least three vectors ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ return false;
+ }
+
+ /* We move to the next vector, dropping the first one and working with
+ the second and the third - we need to adjust the values of the mask
+ accordingly. */
+ *current_mask_element -= mask_nunits * number_of_mask_fixes;
+
+ for (i = 0; i < index; i++)
+ mask[i] -= mask_nunits * number_of_mask_fixes;
+
+ (number_of_mask_fixes)++;
+ mask_fixed = true;
+ }
+
+ *need_next_vector = mask_fixed;
+
+ /* This was the last element of this mask. Start a new one. */
+ if (index == mask_nunits - 1)
+ {
+ number_of_mask_fixes = 1;
+ mask_fixed = false;
+ needs_first_vector = false;
+ }
+
+ return true;
+}
+
+
+/* Generate vector permute statements from a list of loads in DR_CHAIN.
+ If ANALYZE_ONLY is TRUE, only check that it is possible to create valid
+ permute statements for SLP_NODE_INSTANCE. */
+bool
+vect_transform_slp_perm_load (gimple stmt, VEC (tree, heap) *dr_chain,
+ gimple_stmt_iterator *gsi, int vf,
+ slp_instance slp_node_instance, bool analyze_only)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ tree mask_element_type = NULL_TREE, mask_type;
+ int i, j, k, m, scale, mask_nunits, nunits, vec_index = 0, scalar_index;
+ slp_tree node;
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info), builtin_decl;
+ gimple next_scalar_stmt;
+ int group_size = SLP_INSTANCE_GROUP_SIZE (slp_node_instance);
+ int first_mask_element;
+ int index, unroll_factor, *mask, current_mask_element, ncopies;
+ bool only_one_vec = false, need_next_vector = false;
+ int first_vec_index, second_vec_index, orig_vec_stmts_num, vect_stmts_counter;
+
+ if (!targetm.vectorize.builtin_vec_perm)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "no builtin for vect permute for ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ return false;
+ }
+
+ builtin_decl = targetm.vectorize.builtin_vec_perm (vectype,
+ &mask_element_type);
+ if (!builtin_decl || !mask_element_type)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "no builtin for vect permute for ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ return false;
+ }
+
+ mask_type = get_vectype_for_scalar_type (mask_element_type);
+ mask_nunits = TYPE_VECTOR_SUBPARTS (mask_type);
+ mask = (int *) xmalloc (sizeof (int) * mask_nunits);
+ nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ scale = mask_nunits / nunits;
+ unroll_factor = SLP_INSTANCE_UNROLLING_FACTOR (slp_node_instance);
+
+ /* The number of vector stmts to generate based only on SLP_NODE_INSTANCE
+ unrolling factor. */
+ orig_vec_stmts_num = group_size *
+ SLP_INSTANCE_UNROLLING_FACTOR (slp_node_instance) / nunits;
+ if (orig_vec_stmts_num == 1)
+ only_one_vec = true;
+
+ /* Number of copies is determined by the final vectorization factor
+ relatively to SLP_NODE_INSTANCE unrolling factor. */
+ ncopies = vf / SLP_INSTANCE_UNROLLING_FACTOR (slp_node_instance);
+
+ /* Generate permutation masks for every NODE. Number of masks for each NODE
+ is equal to GROUP_SIZE.
+ E.g., we have a group of three nodes with three loads from the same
+ location in each node, and the vector size is 4. I.e., we have a
+ a0b0c0a1b1c1... sequence and we need to create the following vectors:
+ for a's: a0a0a0a1 a1a1a2a2 a2a3a3a3
+ for b's: b0b0b0b1 b1b1b2b2 b2b3b3b3
+ ...
+
+ The masks for a's should be: {0,0,0,3} {3,3,6,6} {6,9,9,9} (in target
+ scpecific type, e.g., in bytes for Altivec.
+ The last mask is illegal since we assume two operands for permute
+ operation, and the mask element values can't be outside that range. Hence,
+ the last mask must be converted into {2,5,5,5}.
+ For the first two permutations we need the first and the second input
+ vectors: {a0,b0,c0,a1} and {b1,c1,a2,b2}, and for the last permutation
+ we need the second and the third vectors: {b1,c1,a2,b2} and
+ {c2,a3,b3,c3}. */
+
+ for (i = 0;
+ VEC_iterate (slp_tree, SLP_INSTANCE_LOADS (slp_node_instance),
+ i, node);
+ i++)
+ {
+ scalar_index = 0;
+ index = 0;
+ vect_stmts_counter = 0;
+ vec_index = 0;
+ first_vec_index = vec_index++;
+ if (only_one_vec)
+ second_vec_index = first_vec_index;
+ else
+ second_vec_index = vec_index++;
+
+ for (j = 0; j < unroll_factor; j++)
+ {
+ for (k = 0; k < group_size; k++)
+ {
+ first_mask_element = (i + j * group_size) * scale;
+ for (m = 0; m < scale; m++)
+ {
+ if (!vect_get_mask_element (stmt, first_mask_element, m,
+ mask_nunits, only_one_vec, index, mask,
+ &current_mask_element, &need_next_vector))
+ return false;
+
+ mask[index++] = current_mask_element;
+ }
+
+ if (index == mask_nunits)
+ {
+ index = 0;
+ if (!analyze_only)
+ {
+ if (need_next_vector)
+ {
+ first_vec_index = second_vec_index;
+ second_vec_index = vec_index;
+ }
+
+ next_scalar_stmt = VEC_index (gimple,
+ SLP_TREE_SCALAR_STMTS (node), scalar_index++);
+
+ vect_create_mask_and_perm (stmt, next_scalar_stmt,
+ mask, mask_nunits, mask_element_type, mask_type,
+ first_vec_index, second_vec_index, gsi, node,
+ builtin_decl, vectype, dr_chain, ncopies,
+ vect_stmts_counter++);
+ }
+ }
+ }
+ }
+ }
+
+ free (mask);
+ return true;
+}
+
+
+
+/* Vectorize SLP instance tree in postorder. */
+
+static bool
+vect_schedule_slp_instance (slp_tree node, slp_instance instance,
+ unsigned int vectorization_factor)
+{
+ gimple stmt;
+ bool strided_store, is_store;
+ gimple_stmt_iterator si;
+ stmt_vec_info stmt_info;
+ unsigned int vec_stmts_size, nunits, group_size;
+ tree vectype;
+ int i;
+ slp_tree loads_node;
+
+ if (!node)
+ return false;
+
+ vect_schedule_slp_instance (SLP_TREE_LEFT (node), instance,
+ vectorization_factor);
+ vect_schedule_slp_instance (SLP_TREE_RIGHT (node), instance,
+ vectorization_factor);
+
+ stmt = VEC_index (gimple, SLP_TREE_SCALAR_STMTS (node), 0);
+ stmt_info = vinfo_for_stmt (stmt);
+
+ /* VECTYPE is the type of the destination. */
+ vectype = get_vectype_for_scalar_type (TREE_TYPE (gimple_assign_lhs (stmt)));
+ nunits = (unsigned int) TYPE_VECTOR_SUBPARTS (vectype);
+ group_size = SLP_INSTANCE_GROUP_SIZE (instance);
+
+ /* For each SLP instance calculate number of vector stmts to be created
+ for the scalar stmts in each node of the SLP tree. Number of vector
+ elements in one vector iteration is the number of scalar elements in
+ one scalar iteration (GROUP_SIZE) multiplied by VF divided by vector
+ size. */
+ vec_stmts_size = (vectorization_factor * group_size) / nunits;
+
+ /* In case of load permutation we have to allocate vectorized statements for
+ all the nodes that participate in that permutation. */
+ if (SLP_INSTANCE_LOAD_PERMUTATION (instance))
+ {
+ for (i = 0;
+ VEC_iterate (slp_tree, SLP_INSTANCE_LOADS (instance), i, loads_node);
+ i++)
+ {
+ if (!SLP_TREE_VEC_STMTS (loads_node))
+ {
+ SLP_TREE_VEC_STMTS (loads_node) = VEC_alloc (gimple, heap,
+ vec_stmts_size);
+ SLP_TREE_NUMBER_OF_VEC_STMTS (loads_node) = vec_stmts_size;
+ }
+ }
+ }
+
+ if (!SLP_TREE_VEC_STMTS (node))
+ {
+ SLP_TREE_VEC_STMTS (node) = VEC_alloc (gimple, heap, vec_stmts_size);
+ SLP_TREE_NUMBER_OF_VEC_STMTS (node) = vec_stmts_size;
+ }
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "------>vectorizing SLP node starting from: ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ /* Loads should be inserted before the first load. */
+ if (SLP_INSTANCE_FIRST_LOAD_STMT (instance)
+ && STMT_VINFO_STRIDED_ACCESS (stmt_info)
+ && !REFERENCE_CLASS_P (gimple_get_lhs (stmt)))
+ si = gsi_for_stmt (SLP_INSTANCE_FIRST_LOAD_STMT (instance));
+ else
+ si = gsi_for_stmt (stmt);
+
+ is_store = vect_transform_stmt (stmt, &si, &strided_store, node, instance);
+ if (is_store)
+ {
+ if (DR_GROUP_FIRST_DR (stmt_info))
+ /* If IS_STORE is TRUE, the vectorization of the
+ interleaving chain was completed - free all the stores in
+ the chain. */
+ vect_remove_stores (DR_GROUP_FIRST_DR (stmt_info));
+ else
+ /* FORNOW: SLP originates only from strided stores. */
+ gcc_unreachable ();
+
+ return true;
+ }
+
+ /* FORNOW: SLP originates only from strided stores. */
+ return false;
+}
+
+
+bool
+vect_schedule_slp (loop_vec_info loop_vinfo)
+{
+ VEC (slp_instance, heap) *slp_instances =
+ LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
+ slp_instance instance;
+ unsigned int i;
+ bool is_store = false;
+
+ for (i = 0; VEC_iterate (slp_instance, slp_instances, i, instance); i++)
+ {
+ /* Schedule the tree of INSTANCE. */
+ is_store = vect_schedule_slp_instance (SLP_INSTANCE_TREE (instance),
+ instance, LOOP_VINFO_VECT_FACTOR (loop_vinfo));
+
+ if (vect_print_dump_info (REPORT_VECTORIZED_LOOPS)
+ || vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "vectorizing stmts using SLP.");
+ }
+
+ return is_store;
+}
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
new file mode 100644
index 00000000000..8efe4d39f53
--- /dev/null
+++ b/gcc/tree-vect-stmts.c
@@ -0,0 +1,4928 @@
+/* Statement Analysis and Transformation for Vectorization
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+ Foundation, Inc.
+ Contributed by Dorit Naishlos <dorit@il.ibm.com>
+ and Ira Rosen <irar@il.ibm.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 "ggc.h"
+#include "tree.h"
+#include "target.h"
+#include "basic-block.h"
+#include "diagnostic.h"
+#include "tree-flow.h"
+#include "tree-dump.h"
+#include "cfgloop.h"
+#include "cfglayout.h"
+#include "expr.h"
+#include "recog.h"
+#include "optabs.h"
+#include "toplev.h"
+#include "tree-vectorizer.h"
+#include "langhooks.h"
+
+
+/* Utility functions used by vect_mark_stmts_to_be_vectorized. */
+
+/* Function vect_mark_relevant.
+
+ Mark STMT as "relevant for vectorization" and add it to WORKLIST. */
+
+static void
+vect_mark_relevant (VEC(gimple,heap) **worklist, gimple stmt,
+ enum vect_relevant relevant, bool live_p)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ enum vect_relevant save_relevant = STMT_VINFO_RELEVANT (stmt_info);
+ bool save_live_p = STMT_VINFO_LIVE_P (stmt_info);
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "mark relevant %d, live %d.", relevant, live_p);
+
+ if (STMT_VINFO_IN_PATTERN_P (stmt_info))
+ {
+ gimple pattern_stmt;
+
+ /* This is the last stmt in a sequence that was detected as a
+ pattern that can potentially be vectorized. Don't mark the stmt
+ as relevant/live because it's not going to be vectorized.
+ Instead mark the pattern-stmt that replaces it. */
+
+ pattern_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "last stmt in pattern. don't mark relevant/live.");
+ stmt_info = vinfo_for_stmt (pattern_stmt);
+ gcc_assert (STMT_VINFO_RELATED_STMT (stmt_info) == stmt);
+ save_relevant = STMT_VINFO_RELEVANT (stmt_info);
+ save_live_p = STMT_VINFO_LIVE_P (stmt_info);
+ stmt = pattern_stmt;
+ }
+
+ STMT_VINFO_LIVE_P (stmt_info) |= live_p;
+ if (relevant > STMT_VINFO_RELEVANT (stmt_info))
+ STMT_VINFO_RELEVANT (stmt_info) = relevant;
+
+ if (STMT_VINFO_RELEVANT (stmt_info) == save_relevant
+ && STMT_VINFO_LIVE_P (stmt_info) == save_live_p)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "already marked relevant/live.");
+ return;
+ }
+
+ VEC_safe_push (gimple, heap, *worklist, stmt);
+}
+
+
+/* Function vect_stmt_relevant_p.
+
+ Return true if STMT in loop that is represented by LOOP_VINFO is
+ "relevant for vectorization".
+
+ A stmt is considered "relevant for vectorization" if:
+ - it has uses outside the loop.
+ - it has vdefs (it alters memory).
+ - control stmts in the loop (except for the exit condition).
+
+ CHECKME: what other side effects would the vectorizer allow? */
+
+static bool
+vect_stmt_relevant_p (gimple stmt, loop_vec_info loop_vinfo,
+ enum vect_relevant *relevant, bool *live_p)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ ssa_op_iter op_iter;
+ imm_use_iterator imm_iter;
+ use_operand_p use_p;
+ def_operand_p def_p;
+
+ *relevant = vect_unused_in_loop;
+ *live_p = false;
+
+ /* cond stmt other than loop exit cond. */
+ if (is_ctrl_stmt (stmt)
+ && STMT_VINFO_TYPE (vinfo_for_stmt (stmt)) != loop_exit_ctrl_vec_info_type)
+ *relevant = vect_used_in_loop;
+
+ /* changing memory. */
+ if (gimple_code (stmt) != GIMPLE_PHI)
+ if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_DEFS))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "vec_stmt_relevant_p: stmt has vdefs.");
+ *relevant = vect_used_in_loop;
+ }
+
+ /* uses outside the loop. */
+ FOR_EACH_PHI_OR_STMT_DEF (def_p, stmt, op_iter, SSA_OP_DEF)
+ {
+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, DEF_FROM_PTR (def_p))
+ {
+ basic_block bb = gimple_bb (USE_STMT (use_p));
+ if (!flow_bb_inside_loop_p (loop, bb))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "vec_stmt_relevant_p: used out of loop.");
+
+ /* We expect all such uses to be in the loop exit phis
+ (because of loop closed form) */
+ gcc_assert (gimple_code (USE_STMT (use_p)) == GIMPLE_PHI);
+ gcc_assert (bb == single_exit (loop)->dest);
+
+ *live_p = true;
+ }
+ }
+ }
+
+ return (*live_p || *relevant);
+}
+
+
+/* Function exist_non_indexing_operands_for_use_p
+
+ USE is one of the uses attached to STMT. Check if USE is
+ used in STMT for anything other than indexing an array. */
+
+static bool
+exist_non_indexing_operands_for_use_p (tree use, gimple stmt)
+{
+ tree operand;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+
+ /* USE corresponds to some operand in STMT. If there is no data
+ reference in STMT, then any operand that corresponds to USE
+ is not indexing an array. */
+ if (!STMT_VINFO_DATA_REF (stmt_info))
+ return true;
+
+ /* STMT has a data_ref. FORNOW this means that its of one of
+ the following forms:
+ -1- ARRAY_REF = var
+ -2- var = ARRAY_REF
+ (This should have been verified in analyze_data_refs).
+
+ 'var' in the second case corresponds to a def, not a use,
+ so USE cannot correspond to any operands that are not used
+ for array indexing.
+
+ Therefore, all we need to check is if STMT falls into the
+ first case, and whether var corresponds to USE. */
+
+ if (TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME)
+ return false;
+
+ if (!gimple_assign_copy_p (stmt))
+ return false;
+ operand = gimple_assign_rhs1 (stmt);
+
+ if (TREE_CODE (operand) != SSA_NAME)
+ return false;
+
+ if (operand == use)
+ return true;
+
+ return false;
+}
+
+
+/*
+ Function process_use.
+
+ Inputs:
+ - a USE in STMT in a loop represented by LOOP_VINFO
+ - LIVE_P, RELEVANT - enum values to be set in the STMT_VINFO of the stmt
+ that defined USE. This is done by calling mark_relevant and passing it
+ the WORKLIST (to add DEF_STMT to the WORKLIST in case it is relevant).
+
+ Outputs:
+ Generally, LIVE_P and RELEVANT are used to define the liveness and
+ relevance info of the DEF_STMT of this USE:
+ STMT_VINFO_LIVE_P (DEF_STMT_info) <-- live_p
+ STMT_VINFO_RELEVANT (DEF_STMT_info) <-- relevant
+ Exceptions:
+ - case 1: If USE is used only for address computations (e.g. array indexing),
+ which does not need to be directly vectorized, then the liveness/relevance
+ of the respective DEF_STMT is left unchanged.
+ - case 2: If STMT is a reduction phi and DEF_STMT is a reduction stmt, we
+ skip DEF_STMT cause it had already been processed.
+ - case 3: If DEF_STMT and STMT are in different nests, then "relevant" will
+ be modified accordingly.
+
+ Return true if everything is as expected. Return false otherwise. */
+
+static bool
+process_use (gimple stmt, tree use, loop_vec_info loop_vinfo, bool live_p,
+ enum vect_relevant relevant, VEC(gimple,heap) **worklist)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
+ stmt_vec_info dstmt_vinfo;
+ basic_block bb, def_bb;
+ tree def;
+ gimple def_stmt;
+ enum vect_def_type dt;
+
+ /* case 1: we are only interested in uses that need to be vectorized. Uses
+ that are used for address computation are not considered relevant. */
+ if (!exist_non_indexing_operands_for_use_p (use, stmt))
+ return true;
+
+ if (!vect_is_simple_use (use, loop_vinfo, &def_stmt, &def, &dt))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "not vectorized: unsupported use in stmt.");
+ return false;
+ }
+
+ if (!def_stmt || gimple_nop_p (def_stmt))
+ return true;
+
+ def_bb = gimple_bb (def_stmt);
+ if (!flow_bb_inside_loop_p (loop, def_bb))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "def_stmt is out of loop.");
+ return true;
+ }
+
+ /* case 2: A reduction phi (STMT) defined by a reduction stmt (DEF_STMT).
+ DEF_STMT must have already been processed, because this should be the
+ only way that STMT, which is a reduction-phi, was put in the worklist,
+ as there should be no other uses for DEF_STMT in the loop. So we just
+ check that everything is as expected, and we are done. */
+ dstmt_vinfo = vinfo_for_stmt (def_stmt);
+ bb = gimple_bb (stmt);
+ if (gimple_code (stmt) == GIMPLE_PHI
+ && STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def
+ && gimple_code (def_stmt) != GIMPLE_PHI
+ && STMT_VINFO_DEF_TYPE (dstmt_vinfo) == vect_reduction_def
+ && bb->loop_father == def_bb->loop_father)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "reduc-stmt defining reduc-phi in the same nest.");
+ if (STMT_VINFO_IN_PATTERN_P (dstmt_vinfo))
+ dstmt_vinfo = vinfo_for_stmt (STMT_VINFO_RELATED_STMT (dstmt_vinfo));
+ gcc_assert (STMT_VINFO_RELEVANT (dstmt_vinfo) < vect_used_by_reduction);
+ gcc_assert (STMT_VINFO_LIVE_P (dstmt_vinfo)
+ || STMT_VINFO_RELEVANT (dstmt_vinfo) > vect_unused_in_loop);
+ return true;
+ }
+
+ /* case 3a: outer-loop stmt defining an inner-loop stmt:
+ outer-loop-header-bb:
+ d = def_stmt
+ inner-loop:
+ stmt # use (d)
+ outer-loop-tail-bb:
+ ... */
+ if (flow_loop_nested_p (def_bb->loop_father, bb->loop_father))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "outer-loop def-stmt defining inner-loop stmt.");
+ switch (relevant)
+ {
+ case vect_unused_in_loop:
+ relevant = (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def) ?
+ vect_used_by_reduction : vect_unused_in_loop;
+ break;
+ case vect_used_in_outer_by_reduction:
+ relevant = vect_used_by_reduction;
+ break;
+ case vect_used_in_outer:
+ relevant = vect_used_in_loop;
+ break;
+ case vect_used_by_reduction:
+ case vect_used_in_loop:
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
+ }
+
+ /* case 3b: inner-loop stmt defining an outer-loop stmt:
+ outer-loop-header-bb:
+ ...
+ inner-loop:
+ d = def_stmt
+ outer-loop-tail-bb:
+ stmt # use (d) */
+ else if (flow_loop_nested_p (bb->loop_father, def_bb->loop_father))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "inner-loop def-stmt defining outer-loop stmt.");
+ switch (relevant)
+ {
+ case vect_unused_in_loop:
+ relevant = (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def) ?
+ vect_used_in_outer_by_reduction : vect_unused_in_loop;
+ break;
+
+ case vect_used_in_outer_by_reduction:
+ case vect_used_in_outer:
+ break;
+
+ case vect_used_by_reduction:
+ relevant = vect_used_in_outer_by_reduction;
+ break;
+
+ case vect_used_in_loop:
+ relevant = vect_used_in_outer;
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
+ }
+
+ vect_mark_relevant (worklist, def_stmt, relevant, live_p);
+ return true;
+}
+
+
+/* Function vect_mark_stmts_to_be_vectorized.
+
+ Not all stmts in the loop need to be vectorized. For example:
+
+ for i...
+ for j...
+ 1. T0 = i + j
+ 2. T1 = a[T0]
+
+ 3. j = j + 1
+
+ Stmt 1 and 3 do not need to be vectorized, because loop control and
+ addressing of vectorized data-refs are handled differently.
+
+ This pass detects such stmts. */
+
+bool
+vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo)
+{
+ VEC(gimple,heap) *worklist;
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
+ unsigned int nbbs = loop->num_nodes;
+ gimple_stmt_iterator si;
+ gimple stmt;
+ unsigned int i;
+ stmt_vec_info stmt_vinfo;
+ basic_block bb;
+ gimple phi;
+ bool live_p;
+ enum vect_relevant relevant;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_mark_stmts_to_be_vectorized ===");
+
+ worklist = VEC_alloc (gimple, heap, 64);
+
+ /* 1. Init worklist. */
+ for (i = 0; i < nbbs; i++)
+ {
+ bb = bbs[i];
+ for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ phi = gsi_stmt (si);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "init: phi relevant? ");
+ print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
+ }
+
+ if (vect_stmt_relevant_p (phi, loop_vinfo, &relevant, &live_p))
+ vect_mark_relevant (&worklist, phi, relevant, live_p);
+ }
+ for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ stmt = gsi_stmt (si);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "init: stmt relevant? ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ if (vect_stmt_relevant_p (stmt, loop_vinfo, &relevant, &live_p))
+ vect_mark_relevant (&worklist, stmt, relevant, live_p);
+ }
+ }
+
+ /* 2. Process_worklist */
+ while (VEC_length (gimple, worklist) > 0)
+ {
+ use_operand_p use_p;
+ ssa_op_iter iter;
+
+ stmt = VEC_pop (gimple, worklist);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "worklist: examine stmt: ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ /* Examine the USEs of STMT. For each USE, mark the stmt that defines it
+ (DEF_STMT) as relevant/irrelevant and live/dead according to the
+ liveness and relevance properties of STMT. */
+ stmt_vinfo = vinfo_for_stmt (stmt);
+ relevant = STMT_VINFO_RELEVANT (stmt_vinfo);
+ live_p = STMT_VINFO_LIVE_P (stmt_vinfo);
+
+ /* Generally, the liveness and relevance properties of STMT are
+ propagated as is to the DEF_STMTs of its USEs:
+ live_p <-- STMT_VINFO_LIVE_P (STMT_VINFO)
+ relevant <-- STMT_VINFO_RELEVANT (STMT_VINFO)
+
+ One exception is when STMT has been identified as defining a reduction
+ variable; in this case we set the liveness/relevance as follows:
+ live_p = false
+ relevant = vect_used_by_reduction
+ This is because we distinguish between two kinds of relevant stmts -
+ those that are used by a reduction computation, and those that are
+ (also) used by a regular computation. This allows us later on to
+ identify stmts that are used solely by a reduction, and therefore the
+ order of the results that they produce does not have to be kept.
+
+ Reduction phis are expected to be used by a reduction stmt, or by
+ in an outer loop; Other reduction stmts are expected to be
+ in the loop, and possibly used by a stmt in an outer loop.
+ Here are the expected values of "relevant" for reduction phis/stmts:
+
+ relevance: phi stmt
+ vect_unused_in_loop ok
+ vect_used_in_outer_by_reduction ok ok
+ vect_used_in_outer ok ok
+ vect_used_by_reduction ok
+ vect_used_in_loop */
+
+ if (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def)
+ {
+ enum vect_relevant tmp_relevant = relevant;
+ switch (tmp_relevant)
+ {
+ case vect_unused_in_loop:
+ gcc_assert (gimple_code (stmt) != GIMPLE_PHI);
+ relevant = vect_used_by_reduction;
+ break;
+
+ case vect_used_in_outer_by_reduction:
+ case vect_used_in_outer:
+ gcc_assert (gimple_code (stmt) != GIMPLE_ASSIGN
+ || (gimple_assign_rhs_code (stmt) != WIDEN_SUM_EXPR
+ && (gimple_assign_rhs_code (stmt)
+ != DOT_PROD_EXPR)));
+ break;
+
+ case vect_used_by_reduction:
+ if (gimple_code (stmt) == GIMPLE_PHI)
+ break;
+ /* fall through */
+ case vect_used_in_loop:
+ default:
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "unsupported use of reduction.");
+ VEC_free (gimple, heap, worklist);
+ return false;
+ }
+ live_p = false;
+ }
+
+ FOR_EACH_PHI_OR_STMT_USE (use_p, stmt, iter, SSA_OP_USE)
+ {
+ tree op = USE_FROM_PTR (use_p);
+ if (!process_use (stmt, op, loop_vinfo, live_p, relevant, &worklist))
+ {
+ VEC_free (gimple, heap, worklist);
+ return false;
+ }
+ }
+ } /* while worklist */
+
+ VEC_free (gimple, heap, worklist);
+ return true;
+}
+
+
+int
+cost_for_stmt (gimple stmt)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+
+ switch (STMT_VINFO_TYPE (stmt_info))
+ {
+ case load_vec_info_type:
+ return TARG_SCALAR_LOAD_COST;
+ case store_vec_info_type:
+ return TARG_SCALAR_STORE_COST;
+ case op_vec_info_type:
+ case condition_vec_info_type:
+ case assignment_vec_info_type:
+ case reduc_vec_info_type:
+ case induc_vec_info_type:
+ case type_promotion_vec_info_type:
+ case type_demotion_vec_info_type:
+ case type_conversion_vec_info_type:
+ case call_vec_info_type:
+ return TARG_SCALAR_STMT_COST;
+ case undef_vec_info_type:
+ default:
+ gcc_unreachable ();
+ }
+}
+
+/* Function vect_model_simple_cost.
+
+ Models cost for simple operations, i.e. those that only emit ncopies of a
+ single op. Right now, this does not account for multiple insns that could
+ be generated for the single vector op. We will handle that shortly. */
+
+void
+vect_model_simple_cost (stmt_vec_info stmt_info, int ncopies,
+ enum vect_def_type *dt, slp_tree slp_node)
+{
+ int i;
+ int inside_cost = 0, outside_cost = 0;
+
+ /* The SLP costs were already calculated during SLP tree build. */
+ if (PURE_SLP_STMT (stmt_info))
+ return;
+
+ inside_cost = ncopies * TARG_VEC_STMT_COST;
+
+ /* FORNOW: Assuming maximum 2 args per stmts. */
+ for (i = 0; i < 2; i++)
+ {
+ if (dt[i] == vect_constant_def || dt[i] == vect_invariant_def)
+ outside_cost += TARG_SCALAR_TO_VEC_COST;
+ }
+
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "vect_model_simple_cost: inside_cost = %d, "
+ "outside_cost = %d .", inside_cost, outside_cost);
+
+ /* Set the costs either in STMT_INFO or SLP_NODE (if exists). */
+ stmt_vinfo_set_inside_of_loop_cost (stmt_info, slp_node, inside_cost);
+ stmt_vinfo_set_outside_of_loop_cost (stmt_info, slp_node, outside_cost);
+}
+
+
+/* Function vect_cost_strided_group_size
+
+ For strided load or store, return the group_size only if it is the first
+ load or store of a group, else return 1. This ensures that group size is
+ only returned once per group. */
+
+static int
+vect_cost_strided_group_size (stmt_vec_info stmt_info)
+{
+ gimple first_stmt = DR_GROUP_FIRST_DR (stmt_info);
+
+ if (first_stmt == STMT_VINFO_STMT (stmt_info))
+ return DR_GROUP_SIZE (stmt_info);
+
+ return 1;
+}
+
+
+/* Function vect_model_store_cost
+
+ Models cost for stores. In the case of strided accesses, one access
+ has the overhead of the strided access attributed to it. */
+
+void
+vect_model_store_cost (stmt_vec_info stmt_info, int ncopies,
+ enum vect_def_type dt, slp_tree slp_node)
+{
+ int group_size;
+ int inside_cost = 0, outside_cost = 0;
+
+ /* The SLP costs were already calculated during SLP tree build. */
+ if (PURE_SLP_STMT (stmt_info))
+ return;
+
+ if (dt == vect_constant_def || dt == vect_invariant_def)
+ outside_cost = TARG_SCALAR_TO_VEC_COST;
+
+ /* Strided access? */
+ if (DR_GROUP_FIRST_DR (stmt_info) && !slp_node)
+ group_size = vect_cost_strided_group_size (stmt_info);
+ /* Not a strided access. */
+ else
+ group_size = 1;
+
+ /* Is this an access in a group of stores, which provide strided access?
+ If so, add in the cost of the permutes. */
+ if (group_size > 1)
+ {
+ /* Uses a high and low interleave operation for each needed permute. */
+ inside_cost = ncopies * exact_log2(group_size) * group_size
+ * TARG_VEC_STMT_COST;
+
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "vect_model_store_cost: strided group_size = %d .",
+ group_size);
+
+ }
+
+ /* Costs of the stores. */
+ inside_cost += ncopies * TARG_VEC_STORE_COST;
+
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "vect_model_store_cost: inside_cost = %d, "
+ "outside_cost = %d .", inside_cost, outside_cost);
+
+ /* Set the costs either in STMT_INFO or SLP_NODE (if exists). */
+ stmt_vinfo_set_inside_of_loop_cost (stmt_info, slp_node, inside_cost);
+ stmt_vinfo_set_outside_of_loop_cost (stmt_info, slp_node, outside_cost);
+}
+
+
+/* Function vect_model_load_cost
+
+ Models cost for loads. In the case of strided accesses, the last access
+ has the overhead of the strided access attributed to it. Since unaligned
+ accesses are supported for loads, we also account for the costs of the
+ access scheme chosen. */
+
+void
+vect_model_load_cost (stmt_vec_info stmt_info, int ncopies, slp_tree slp_node)
+
+{
+ int group_size;
+ int alignment_support_cheme;
+ gimple first_stmt;
+ struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info), *first_dr;
+ int inside_cost = 0, outside_cost = 0;
+
+ /* The SLP costs were already calculated during SLP tree build. */
+ if (PURE_SLP_STMT (stmt_info))
+ return;
+
+ /* Strided accesses? */
+ first_stmt = DR_GROUP_FIRST_DR (stmt_info);
+ if (first_stmt && !slp_node)
+ {
+ group_size = vect_cost_strided_group_size (stmt_info);
+ first_dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (first_stmt));
+ }
+ /* Not a strided access. */
+ else
+ {
+ group_size = 1;
+ first_dr = dr;
+ }
+
+ alignment_support_cheme = vect_supportable_dr_alignment (first_dr);
+
+ /* Is this an access in a group of loads providing strided access?
+ If so, add in the cost of the permutes. */
+ if (group_size > 1)
+ {
+ /* Uses an even and odd extract operations for each needed permute. */
+ inside_cost = ncopies * exact_log2(group_size) * group_size
+ * TARG_VEC_STMT_COST;
+
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "vect_model_load_cost: strided group_size = %d .",
+ group_size);
+
+ }
+
+ /* The loads themselves. */
+ switch (alignment_support_cheme)
+ {
+ case dr_aligned:
+ {
+ inside_cost += ncopies * TARG_VEC_LOAD_COST;
+
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "vect_model_load_cost: aligned.");
+
+ break;
+ }
+ case dr_unaligned_supported:
+ {
+ /* Here, we assign an additional cost for the unaligned load. */
+ inside_cost += ncopies * TARG_VEC_UNALIGNED_LOAD_COST;
+
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "vect_model_load_cost: unaligned supported by "
+ "hardware.");
+
+ break;
+ }
+ case dr_explicit_realign:
+ {
+ inside_cost += ncopies * (2*TARG_VEC_LOAD_COST + TARG_VEC_STMT_COST);
+
+ /* FIXME: If the misalignment remains fixed across the iterations of
+ the containing loop, the following cost should be added to the
+ outside costs. */
+ if (targetm.vectorize.builtin_mask_for_load)
+ inside_cost += TARG_VEC_STMT_COST;
+
+ break;
+ }
+ case dr_explicit_realign_optimized:
+ {
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "vect_model_load_cost: unaligned software "
+ "pipelined.");
+
+ /* Unaligned software pipeline has a load of an address, an initial
+ load, and possibly a mask operation to "prime" the loop. However,
+ if this is an access in a group of loads, which provide strided
+ access, then the above cost should only be considered for one
+ access in the group. Inside the loop, there is a load op
+ and a realignment op. */
+
+ if ((!DR_GROUP_FIRST_DR (stmt_info)) || group_size > 1 || slp_node)
+ {
+ outside_cost = 2*TARG_VEC_STMT_COST;
+ if (targetm.vectorize.builtin_mask_for_load)
+ outside_cost += TARG_VEC_STMT_COST;
+ }
+
+ inside_cost += ncopies * (TARG_VEC_LOAD_COST + TARG_VEC_STMT_COST);
+
+ break;
+ }
+
+ default:
+ gcc_unreachable ();
+ }
+
+ if (vect_print_dump_info (REPORT_COST))
+ fprintf (vect_dump, "vect_model_load_cost: inside_cost = %d, "
+ "outside_cost = %d .", inside_cost, outside_cost);
+
+ /* Set the costs either in STMT_INFO or SLP_NODE (if exists). */
+ stmt_vinfo_set_inside_of_loop_cost (stmt_info, slp_node, inside_cost);
+ stmt_vinfo_set_outside_of_loop_cost (stmt_info, slp_node, outside_cost);
+}
+
+
+/* Function vect_init_vector.
+
+ Insert a new stmt (INIT_STMT) that initializes a new vector variable with
+ the vector elements of VECTOR_VAR. Place the initialization at BSI if it
+ is not NULL. Otherwise, place the initialization at the loop preheader.
+ Return the DEF of INIT_STMT.
+ It will be used in the vectorization of STMT. */
+
+tree
+vect_init_vector (gimple stmt, tree vector_var, tree vector_type,
+ gimple_stmt_iterator *gsi)
+{
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
+ tree new_var;
+ gimple init_stmt;
+ tree vec_oprnd;
+ edge pe;
+ tree new_temp;
+ basic_block new_bb;
+
+ new_var = vect_get_new_vect_var (vector_type, vect_simple_var, "cst_");
+ add_referenced_var (new_var);
+ init_stmt = gimple_build_assign (new_var, vector_var);
+ new_temp = make_ssa_name (new_var, init_stmt);
+ gimple_assign_set_lhs (init_stmt, new_temp);
+
+ if (gsi)
+ vect_finish_stmt_generation (stmt, init_stmt, gsi);
+ else
+ {
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+
+ if (nested_in_vect_loop_p (loop, stmt))
+ loop = loop->inner;
+ pe = loop_preheader_edge (loop);
+ new_bb = gsi_insert_on_edge_immediate (pe, init_stmt);
+ gcc_assert (!new_bb);
+ }
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "created new init_stmt: ");
+ print_gimple_stmt (vect_dump, init_stmt, 0, TDF_SLIM);
+ }
+
+ vec_oprnd = gimple_assign_lhs (init_stmt);
+ return vec_oprnd;
+}
+
+/* Function vect_get_vec_def_for_operand.
+
+ OP is an operand in STMT. This function returns a (vector) def that will be
+ used in the vectorized stmt for STMT.
+
+ In the case that OP is an SSA_NAME which is defined in the loop, then
+ STMT_VINFO_VEC_STMT of the defining stmt holds the relevant def.
+
+ In case OP is an invariant or constant, a new stmt that creates a vector def
+ needs to be introduced. */
+
+tree
+vect_get_vec_def_for_operand (tree op, gimple stmt, tree *scalar_def)
+{
+ tree vec_oprnd;
+ gimple vec_stmt;
+ gimple def_stmt;
+ stmt_vec_info def_stmt_info = NULL;
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo);
+ unsigned int nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
+ tree vec_inv;
+ tree vec_cst;
+ tree t = NULL_TREE;
+ tree def;
+ int i;
+ enum vect_def_type dt;
+ bool is_simple_use;
+ tree vector_type;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "vect_get_vec_def_for_operand: ");
+ print_generic_expr (vect_dump, op, TDF_SLIM);
+ }
+
+ is_simple_use = vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt);
+ gcc_assert (is_simple_use);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ if (def)
+ {
+ fprintf (vect_dump, "def = ");
+ print_generic_expr (vect_dump, def, TDF_SLIM);
+ }
+ if (def_stmt)
+ {
+ fprintf (vect_dump, " def_stmt = ");
+ print_gimple_stmt (vect_dump, def_stmt, 0, TDF_SLIM);
+ }
+ }
+
+ switch (dt)
+ {
+ /* Case 1: operand is a constant. */
+ case vect_constant_def:
+ {
+ if (scalar_def)
+ *scalar_def = op;
+
+ /* Create 'vect_cst_ = {cst,cst,...,cst}' */
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Create vector_cst. nunits = %d", nunits);
+
+ for (i = nunits - 1; i >= 0; --i)
+ {
+ t = tree_cons (NULL_TREE, op, t);
+ }
+ vec_cst = build_vector (vectype, t);
+ return vect_init_vector (stmt, vec_cst, vectype, NULL);
+ }
+
+ /* Case 2: operand is defined outside the loop - loop invariant. */
+ case vect_invariant_def:
+ {
+ vector_type = get_vectype_for_scalar_type (TREE_TYPE (def));
+ gcc_assert (vector_type);
+ nunits = TYPE_VECTOR_SUBPARTS (vector_type);
+
+ if (scalar_def)
+ *scalar_def = def;
+
+ /* Create 'vec_inv = {inv,inv,..,inv}' */
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Create vector_inv.");
+
+ for (i = nunits - 1; i >= 0; --i)
+ {
+ t = tree_cons (NULL_TREE, def, t);
+ }
+
+ /* FIXME: use build_constructor directly. */
+ vec_inv = build_constructor_from_list (vector_type, t);
+ return vect_init_vector (stmt, vec_inv, vector_type, NULL);
+ }
+
+ /* Case 3: operand is defined inside the loop. */
+ case vect_loop_def:
+ {
+ if (scalar_def)
+ *scalar_def = NULL/* FIXME tuples: def_stmt*/;
+
+ /* Get the def from the vectorized stmt. */
+ def_stmt_info = vinfo_for_stmt (def_stmt);
+ vec_stmt = STMT_VINFO_VEC_STMT (def_stmt_info);
+ gcc_assert (vec_stmt);
+ if (gimple_code (vec_stmt) == GIMPLE_PHI)
+ vec_oprnd = PHI_RESULT (vec_stmt);
+ else if (is_gimple_call (vec_stmt))
+ vec_oprnd = gimple_call_lhs (vec_stmt);
+ else
+ vec_oprnd = gimple_assign_lhs (vec_stmt);
+ return vec_oprnd;
+ }
+
+ /* Case 4: operand is defined by a loop header phi - reduction */
+ case vect_reduction_def:
+ {
+ struct loop *loop;
+
+ gcc_assert (gimple_code (def_stmt) == GIMPLE_PHI);
+ loop = (gimple_bb (def_stmt))->loop_father;
+
+ /* Get the def before the loop */
+ op = PHI_ARG_DEF_FROM_EDGE (def_stmt, loop_preheader_edge (loop));
+ return get_initial_def_for_reduction (stmt, op, scalar_def);
+ }
+
+ /* Case 5: operand is defined by loop-header phi - induction. */
+ case vect_induction_def:
+ {
+ gcc_assert (gimple_code (def_stmt) == GIMPLE_PHI);
+
+ /* Get the def from the vectorized stmt. */
+ def_stmt_info = vinfo_for_stmt (def_stmt);
+ vec_stmt = STMT_VINFO_VEC_STMT (def_stmt_info);
+ gcc_assert (vec_stmt && gimple_code (vec_stmt) == GIMPLE_PHI);
+ vec_oprnd = PHI_RESULT (vec_stmt);
+ return vec_oprnd;
+ }
+
+ default:
+ gcc_unreachable ();
+ }
+}
+
+
+/* Function vect_get_vec_def_for_stmt_copy
+
+ Return a vector-def for an operand. This function is used when the
+ vectorized stmt to be created (by the caller to this function) is a "copy"
+ created in case the vectorized result cannot fit in one vector, and several
+ copies of the vector-stmt are required. In this case the vector-def is
+ retrieved from the vector stmt recorded in the STMT_VINFO_RELATED_STMT field
+ of the stmt that defines VEC_OPRND.
+ DT is the type of the vector def VEC_OPRND.
+
+ Context:
+ In case the vectorization factor (VF) is bigger than the number
+ of elements that can fit in a vectype (nunits), we have to generate
+ more than one vector stmt to vectorize the scalar stmt. This situation
+ arises when there are multiple data-types operated upon in the loop; the
+ smallest data-type determines the VF, and as a result, when vectorizing
+ stmts operating on wider types we need to create 'VF/nunits' "copies" of the
+ vector stmt (each computing a vector of 'nunits' results, and together
+ computing 'VF' results in each iteration). This function is called when
+ vectorizing such a stmt (e.g. vectorizing S2 in the illustration below, in
+ which VF=16 and nunits=4, so the number of copies required is 4):
+
+ scalar stmt: vectorized into: STMT_VINFO_RELATED_STMT
+
+ S1: x = load VS1.0: vx.0 = memref0 VS1.1
+ VS1.1: vx.1 = memref1 VS1.2
+ VS1.2: vx.2 = memref2 VS1.3
+ VS1.3: vx.3 = memref3
+
+ S2: z = x + ... VSnew.0: vz0 = vx.0 + ... VSnew.1
+ VSnew.1: vz1 = vx.1 + ... VSnew.2
+ VSnew.2: vz2 = vx.2 + ... VSnew.3
+ VSnew.3: vz3 = vx.3 + ...
+
+ The vectorization of S1 is explained in vectorizable_load.
+ The vectorization of S2:
+ To create the first vector-stmt out of the 4 copies - VSnew.0 -
+ the function 'vect_get_vec_def_for_operand' is called to
+ get the relevant vector-def for each operand of S2. For operand x it
+ returns the vector-def 'vx.0'.
+
+ To create the remaining copies of the vector-stmt (VSnew.j), this
+ function is called to get the relevant vector-def for each operand. It is
+ obtained from the respective VS1.j stmt, which is recorded in the
+ STMT_VINFO_RELATED_STMT field of the stmt that defines VEC_OPRND.
+
+ For example, to obtain the vector-def 'vx.1' in order to create the
+ vector stmt 'VSnew.1', this function is called with VEC_OPRND='vx.0'.
+ Given 'vx0' we obtain the stmt that defines it ('VS1.0'); from the
+ STMT_VINFO_RELATED_STMT field of 'VS1.0' we obtain the next copy - 'VS1.1',
+ and return its def ('vx.1').
+ Overall, to create the above sequence this function will be called 3 times:
+ vx.1 = vect_get_vec_def_for_stmt_copy (dt, vx.0);
+ vx.2 = vect_get_vec_def_for_stmt_copy (dt, vx.1);
+ vx.3 = vect_get_vec_def_for_stmt_copy (dt, vx.2); */
+
+tree
+vect_get_vec_def_for_stmt_copy (enum vect_def_type dt, tree vec_oprnd)
+{
+ gimple vec_stmt_for_operand;
+ stmt_vec_info def_stmt_info;
+
+ /* Do nothing; can reuse same def. */
+ if (dt == vect_invariant_def || dt == vect_constant_def )
+ return vec_oprnd;
+
+ vec_stmt_for_operand = SSA_NAME_DEF_STMT (vec_oprnd);
+ def_stmt_info = vinfo_for_stmt (vec_stmt_for_operand);
+ gcc_assert (def_stmt_info);
+ vec_stmt_for_operand = STMT_VINFO_RELATED_STMT (def_stmt_info);
+ gcc_assert (vec_stmt_for_operand);
+ vec_oprnd = gimple_get_lhs (vec_stmt_for_operand);
+ if (gimple_code (vec_stmt_for_operand) == GIMPLE_PHI)
+ vec_oprnd = PHI_RESULT (vec_stmt_for_operand);
+ else
+ vec_oprnd = gimple_get_lhs (vec_stmt_for_operand);
+ return vec_oprnd;
+}
+
+
+/* Get vectorized definitions for the operands to create a copy of an original
+ stmt. See vect_get_vec_def_for_stmt_copy() for details. */
+
+static void
+vect_get_vec_defs_for_stmt_copy (enum vect_def_type *dt,
+ VEC(tree,heap) **vec_oprnds0,
+ VEC(tree,heap) **vec_oprnds1)
+{
+ tree vec_oprnd = VEC_pop (tree, *vec_oprnds0);
+
+ vec_oprnd = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd);
+ VEC_quick_push (tree, *vec_oprnds0, vec_oprnd);
+
+ if (vec_oprnds1 && *vec_oprnds1)
+ {
+ vec_oprnd = VEC_pop (tree, *vec_oprnds1);
+ vec_oprnd = vect_get_vec_def_for_stmt_copy (dt[1], vec_oprnd);
+ VEC_quick_push (tree, *vec_oprnds1, vec_oprnd);
+ }
+}
+
+
+/* Get vectorized definitions for OP0 and OP1, or SLP_NODE if it is not NULL. */
+
+static void
+vect_get_vec_defs (tree op0, tree op1, gimple stmt,
+ VEC(tree,heap) **vec_oprnds0, VEC(tree,heap) **vec_oprnds1,
+ slp_tree slp_node)
+{
+ if (slp_node)
+ vect_get_slp_defs (slp_node, vec_oprnds0, vec_oprnds1);
+ else
+ {
+ tree vec_oprnd;
+
+ *vec_oprnds0 = VEC_alloc (tree, heap, 1);
+ vec_oprnd = vect_get_vec_def_for_operand (op0, stmt, NULL);
+ VEC_quick_push (tree, *vec_oprnds0, vec_oprnd);
+
+ if (op1)
+ {
+ *vec_oprnds1 = VEC_alloc (tree, heap, 1);
+ vec_oprnd = vect_get_vec_def_for_operand (op1, stmt, NULL);
+ VEC_quick_push (tree, *vec_oprnds1, vec_oprnd);
+ }
+ }
+}
+
+
+/* Function vect_finish_stmt_generation.
+
+ Insert a new stmt. */
+
+void
+vect_finish_stmt_generation (gimple stmt, gimple vec_stmt,
+ gimple_stmt_iterator *gsi)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+
+ gcc_assert (gimple_code (stmt) != GIMPLE_LABEL);
+
+ gsi_insert_before (gsi, vec_stmt, GSI_SAME_STMT);
+
+ set_vinfo_for_stmt (vec_stmt, new_stmt_vec_info (vec_stmt, loop_vinfo));
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "add new stmt: ");
+ print_gimple_stmt (vect_dump, vec_stmt, 0, TDF_SLIM);
+ }
+
+ gimple_set_location (vec_stmt, gimple_location (gsi_stmt (*gsi)));
+}
+
+/* Checks if CALL can be vectorized in type VECTYPE. Returns
+ a function declaration if the target has a vectorized version
+ of the function, or NULL_TREE if the function cannot be vectorized. */
+
+tree
+vectorizable_function (gimple call, tree vectype_out, tree vectype_in)
+{
+ tree fndecl = gimple_call_fndecl (call);
+ enum built_in_function code;
+
+ /* We only handle functions that do not read or clobber memory -- i.e.
+ const or novops ones. */
+ if (!(gimple_call_flags (call) & (ECF_CONST | ECF_NOVOPS)))
+ return NULL_TREE;
+
+ if (!fndecl
+ || TREE_CODE (fndecl) != FUNCTION_DECL
+ || !DECL_BUILT_IN (fndecl))
+ return NULL_TREE;
+
+ code = DECL_FUNCTION_CODE (fndecl);
+ return targetm.vectorize.builtin_vectorized_function (code, vectype_out,
+ vectype_in);
+}
+
+/* Function vectorizable_call.
+
+ Check if STMT performs a function call that can be vectorized.
+ If VEC_STMT is also passed, vectorize the STMT: create a vectorized
+ stmt to replace it, put it in VEC_STMT, and insert it at BSI.
+ Return FALSE if not a vectorizable STMT, TRUE otherwise. */
+
+static bool
+vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt)
+{
+ tree vec_dest;
+ tree scalar_dest;
+ tree op, type;
+ tree vec_oprnd0 = NULL_TREE, vec_oprnd1 = NULL_TREE;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt), prev_stmt_info;
+ tree vectype_out, vectype_in;
+ int nunits_in;
+ int nunits_out;
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ tree fndecl, new_temp, def, rhs_type, lhs_type;
+ gimple def_stmt;
+ enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
+ gimple new_stmt;
+ int ncopies, j;
+ VEC(tree, heap) *vargs = NULL;
+ enum { NARROW, NONE, WIDEN } modifier;
+ size_t i, nargs;
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info))
+ return false;
+
+ if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
+ return false;
+
+ /* FORNOW: SLP not supported. */
+ if (STMT_SLP_TYPE (stmt_info))
+ return false;
+
+ /* Is STMT a vectorizable call? */
+ if (!is_gimple_call (stmt))
+ return false;
+
+ if (TREE_CODE (gimple_call_lhs (stmt)) != SSA_NAME)
+ return false;
+
+ /* Process function arguments. */
+ rhs_type = NULL_TREE;
+ nargs = gimple_call_num_args (stmt);
+
+ /* Bail out if the function has more than two arguments, we
+ do not have interesting builtin functions to vectorize with
+ more than two arguments. No arguments is also not good. */
+ if (nargs == 0 || nargs > 2)
+ return false;
+
+ for (i = 0; i < nargs; i++)
+ {
+ op = gimple_call_arg (stmt, i);
+
+ /* We can only handle calls with arguments of the same type. */
+ if (rhs_type
+ && rhs_type != TREE_TYPE (op))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "argument types differ.");
+ return false;
+ }
+ rhs_type = TREE_TYPE (op);
+
+ if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt[i]))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "use not simple.");
+ return false;
+ }
+ }
+
+ vectype_in = get_vectype_for_scalar_type (rhs_type);
+ if (!vectype_in)
+ return false;
+ nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
+
+ lhs_type = TREE_TYPE (gimple_call_lhs (stmt));
+ vectype_out = get_vectype_for_scalar_type (lhs_type);
+ if (!vectype_out)
+ return false;
+ nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
+
+ /* FORNOW */
+ if (nunits_in == nunits_out / 2)
+ modifier = NARROW;
+ else if (nunits_out == nunits_in)
+ modifier = NONE;
+ else if (nunits_out == nunits_in / 2)
+ modifier = WIDEN;
+ else
+ return false;
+
+ /* For now, we only vectorize functions if a target specific builtin
+ is available. TODO -- in some cases, it might be profitable to
+ insert the calls for pieces of the vector, in order to be able
+ to vectorize other operations in the loop. */
+ fndecl = vectorizable_function (stmt, vectype_out, vectype_in);
+ if (fndecl == NULL_TREE)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "function is not vectorizable.");
+
+ return false;
+ }
+
+ gcc_assert (ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS));
+
+ if (modifier == NARROW)
+ ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_out;
+ else
+ ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_in;
+
+ /* Sanity check: make sure that at least one copy of the vectorized stmt
+ needs to be generated. */
+ gcc_assert (ncopies >= 1);
+
+ if (!vec_stmt) /* transformation not required. */
+ {
+ STMT_VINFO_TYPE (stmt_info) = call_vec_info_type;
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vectorizable_call ===");
+ vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
+ return true;
+ }
+
+ /** Transform. **/
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "transform operation.");
+
+ /* Handle def. */
+ scalar_dest = gimple_call_lhs (stmt);
+ vec_dest = vect_create_destination_var (scalar_dest, vectype_out);
+
+ prev_stmt_info = NULL;
+ switch (modifier)
+ {
+ case NONE:
+ for (j = 0; j < ncopies; ++j)
+ {
+ /* Build argument list for the vectorized call. */
+ if (j == 0)
+ vargs = VEC_alloc (tree, heap, nargs);
+ else
+ VEC_truncate (tree, vargs, 0);
+
+ for (i = 0; i < nargs; i++)
+ {
+ op = gimple_call_arg (stmt, i);
+ if (j == 0)
+ vec_oprnd0
+ = vect_get_vec_def_for_operand (op, stmt, NULL);
+ else
+ vec_oprnd0
+ = vect_get_vec_def_for_stmt_copy (dt[nargs], vec_oprnd0);
+
+ VEC_quick_push (tree, vargs, vec_oprnd0);
+ }
+
+ new_stmt = gimple_build_call_vec (fndecl, vargs);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_call_set_lhs (new_stmt, new_temp);
+
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+
+ if (j == 0)
+ STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
+ else
+ STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
+
+ prev_stmt_info = vinfo_for_stmt (new_stmt);
+ }
+
+ break;
+
+ case NARROW:
+ for (j = 0; j < ncopies; ++j)
+ {
+ /* Build argument list for the vectorized call. */
+ if (j == 0)
+ vargs = VEC_alloc (tree, heap, nargs * 2);
+ else
+ VEC_truncate (tree, vargs, 0);
+
+ for (i = 0; i < nargs; i++)
+ {
+ op = gimple_call_arg (stmt, i);
+ if (j == 0)
+ {
+ vec_oprnd0
+ = vect_get_vec_def_for_operand (op, stmt, NULL);
+ vec_oprnd1
+ = vect_get_vec_def_for_stmt_copy (dt[nargs], vec_oprnd0);
+ }
+ else
+ {
+ vec_oprnd0
+ = vect_get_vec_def_for_stmt_copy (dt[nargs], vec_oprnd1);
+ vec_oprnd1
+ = vect_get_vec_def_for_stmt_copy (dt[nargs], vec_oprnd0);
+ }
+
+ VEC_quick_push (tree, vargs, vec_oprnd0);
+ VEC_quick_push (tree, vargs, vec_oprnd1);
+ }
+
+ new_stmt = gimple_build_call_vec (fndecl, vargs);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_call_set_lhs (new_stmt, new_temp);
+
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+
+ if (j == 0)
+ STMT_VINFO_VEC_STMT (stmt_info) = new_stmt;
+ else
+ STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
+
+ prev_stmt_info = vinfo_for_stmt (new_stmt);
+ }
+
+ *vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
+
+ break;
+
+ case WIDEN:
+ /* No current target implements this case. */
+ return false;
+ }
+
+ VEC_free (tree, heap, vargs);
+
+ /* Update the exception handling table with the vector stmt if necessary. */
+ if (maybe_clean_or_replace_eh_stmt (stmt, *vec_stmt))
+ gimple_purge_dead_eh_edges (gimple_bb (stmt));
+
+ /* The call in STMT might prevent it from being removed in dce.
+ We however cannot remove it here, due to the way the ssa name
+ it defines is mapped to the new definition. So just replace
+ rhs of the statement with something harmless. */
+
+ type = TREE_TYPE (scalar_dest);
+ new_stmt = gimple_build_assign (gimple_call_lhs (stmt),
+ fold_convert (type, integer_zero_node));
+ set_vinfo_for_stmt (new_stmt, stmt_info);
+ set_vinfo_for_stmt (stmt, NULL);
+ STMT_VINFO_STMT (stmt_info) = new_stmt;
+ gsi_replace (gsi, new_stmt, false);
+ SSA_NAME_DEF_STMT (gimple_assign_lhs (new_stmt)) = new_stmt;
+
+ return true;
+}
+
+
+/* Function vect_gen_widened_results_half
+
+ Create a vector stmt whose code, type, number of arguments, and result
+ variable are CODE, OP_TYPE, and VEC_DEST, and its arguments are
+ VEC_OPRND0 and VEC_OPRND1. The new vector stmt is to be inserted at BSI.
+ In the case that CODE is a CALL_EXPR, this means that a call to DECL
+ needs to be created (DECL is a function-decl of a target-builtin).
+ STMT is the original scalar stmt that we are vectorizing. */
+
+static gimple
+vect_gen_widened_results_half (enum tree_code code,
+ tree decl,
+ tree vec_oprnd0, tree vec_oprnd1, int op_type,
+ tree vec_dest, gimple_stmt_iterator *gsi,
+ gimple stmt)
+{
+ gimple new_stmt;
+ tree new_temp;
+ tree sym;
+ ssa_op_iter iter;
+
+ /* Generate half of the widened result: */
+ if (code == CALL_EXPR)
+ {
+ /* Target specific support */
+ if (op_type == binary_op)
+ new_stmt = gimple_build_call (decl, 2, vec_oprnd0, vec_oprnd1);
+ else
+ new_stmt = gimple_build_call (decl, 1, vec_oprnd0);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_call_set_lhs (new_stmt, new_temp);
+ }
+ else
+ {
+ /* Generic support */
+ gcc_assert (op_type == TREE_CODE_LENGTH (code));
+ if (op_type != binary_op)
+ vec_oprnd1 = NULL;
+ new_stmt = gimple_build_assign_with_ops (code, vec_dest, vec_oprnd0,
+ vec_oprnd1);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_assign_set_lhs (new_stmt, new_temp);
+ }
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+
+ if (code == CALL_EXPR)
+ {
+ FOR_EACH_SSA_TREE_OPERAND (sym, new_stmt, iter, SSA_OP_ALL_VIRTUALS)
+ {
+ if (TREE_CODE (sym) == SSA_NAME)
+ sym = SSA_NAME_VAR (sym);
+ mark_sym_for_renaming (sym);
+ }
+ }
+
+ return new_stmt;
+}
+
+
+/* Check if STMT performs a conversion operation, that can be vectorized.
+ If VEC_STMT is also passed, vectorize the STMT: create a vectorized
+ stmt to replace it, put it in VEC_STMT, and insert it at BSI.
+ Return FALSE if not a vectorizable STMT, TRUE otherwise. */
+
+static bool
+vectorizable_conversion (gimple stmt, gimple_stmt_iterator *gsi,
+ gimple *vec_stmt, slp_tree slp_node)
+{
+ tree vec_dest;
+ tree scalar_dest;
+ tree op0;
+ tree vec_oprnd0 = NULL_TREE, vec_oprnd1 = NULL_TREE;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ enum tree_code code, code1 = ERROR_MARK, code2 = ERROR_MARK;
+ tree decl1 = NULL_TREE, decl2 = NULL_TREE;
+ tree new_temp;
+ tree def;
+ gimple def_stmt;
+ enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
+ gimple new_stmt = NULL;
+ stmt_vec_info prev_stmt_info;
+ int nunits_in;
+ int nunits_out;
+ tree vectype_out, vectype_in;
+ int ncopies, j;
+ tree expr;
+ tree rhs_type, lhs_type;
+ tree builtin_decl;
+ enum { NARROW, NONE, WIDEN } modifier;
+ int i;
+ VEC(tree,heap) *vec_oprnds0 = NULL;
+ tree vop0;
+ tree integral_type;
+ VEC(tree,heap) *dummy = NULL;
+ int dummy_int;
+
+ /* Is STMT a vectorizable conversion? */
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info))
+ return false;
+
+ if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
+ return false;
+
+ if (!is_gimple_assign (stmt))
+ return false;
+
+ if (TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME)
+ return false;
+
+ code = gimple_assign_rhs_code (stmt);
+ if (code != FIX_TRUNC_EXPR && code != FLOAT_EXPR)
+ return false;
+
+ /* Check types of lhs and rhs. */
+ op0 = gimple_assign_rhs1 (stmt);
+ rhs_type = TREE_TYPE (op0);
+ vectype_in = get_vectype_for_scalar_type (rhs_type);
+ if (!vectype_in)
+ return false;
+ nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
+
+ scalar_dest = gimple_assign_lhs (stmt);
+ lhs_type = TREE_TYPE (scalar_dest);
+ vectype_out = get_vectype_for_scalar_type (lhs_type);
+ if (!vectype_out)
+ return false;
+ nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
+
+ /* FORNOW */
+ if (nunits_in == nunits_out / 2)
+ modifier = NARROW;
+ else if (nunits_out == nunits_in)
+ modifier = NONE;
+ else if (nunits_out == nunits_in / 2)
+ modifier = WIDEN;
+ else
+ return false;
+
+ if (modifier == NONE)
+ gcc_assert (STMT_VINFO_VECTYPE (stmt_info) == vectype_out);
+
+ /* Bail out if the types are both integral or non-integral. */
+ if ((INTEGRAL_TYPE_P (rhs_type) && INTEGRAL_TYPE_P (lhs_type))
+ || (!INTEGRAL_TYPE_P (rhs_type) && !INTEGRAL_TYPE_P (lhs_type)))
+ return false;
+
+ integral_type = INTEGRAL_TYPE_P (rhs_type) ? vectype_in : vectype_out;
+
+ if (modifier == NARROW)
+ ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_out;
+ else
+ ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_in;
+
+ /* FORNOW: SLP with multiple types is not supported. The SLP analysis verifies
+ this, so we can safely override NCOPIES with 1 here. */
+ if (slp_node)
+ ncopies = 1;
+
+ /* Sanity check: make sure that at least one copy of the vectorized stmt
+ needs to be generated. */
+ gcc_assert (ncopies >= 1);
+
+ /* Check the operands of the operation. */
+ if (!vect_is_simple_use (op0, loop_vinfo, &def_stmt, &def, &dt[0]))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "use not simple.");
+ return false;
+ }
+
+ /* Supportable by target? */
+ if ((modifier == NONE
+ && !targetm.vectorize.builtin_conversion (code, integral_type))
+ || (modifier == WIDEN
+ && !supportable_widening_operation (code, stmt, vectype_in,
+ &decl1, &decl2,
+ &code1, &code2,
+ &dummy_int, &dummy))
+ || (modifier == NARROW
+ && !supportable_narrowing_operation (code, stmt, vectype_in,
+ &code1, &dummy_int, &dummy)))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "conversion not supported by target.");
+ return false;
+ }
+
+ if (modifier != NONE)
+ {
+ STMT_VINFO_VECTYPE (stmt_info) = vectype_in;
+ /* FORNOW: SLP not supported. */
+ if (STMT_SLP_TYPE (stmt_info))
+ return false;
+ }
+
+ if (!vec_stmt) /* transformation not required. */
+ {
+ STMT_VINFO_TYPE (stmt_info) = type_conversion_vec_info_type;
+ return true;
+ }
+
+ /** Transform. **/
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "transform conversion.");
+
+ /* Handle def. */
+ vec_dest = vect_create_destination_var (scalar_dest, vectype_out);
+
+ if (modifier == NONE && !slp_node)
+ vec_oprnds0 = VEC_alloc (tree, heap, 1);
+
+ prev_stmt_info = NULL;
+ switch (modifier)
+ {
+ case NONE:
+ for (j = 0; j < ncopies; j++)
+ {
+ tree sym;
+ ssa_op_iter iter;
+
+ if (j == 0)
+ vect_get_vec_defs (op0, NULL, stmt, &vec_oprnds0, NULL, slp_node);
+ else
+ vect_get_vec_defs_for_stmt_copy (dt, &vec_oprnds0, NULL);
+
+ builtin_decl =
+ targetm.vectorize.builtin_conversion (code, integral_type);
+ for (i = 0; VEC_iterate (tree, vec_oprnds0, i, vop0); i++)
+ {
+ /* Arguments are ready. create the new vector stmt. */
+ new_stmt = gimple_build_call (builtin_decl, 1, vop0);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_call_set_lhs (new_stmt, new_temp);
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+ FOR_EACH_SSA_TREE_OPERAND (sym, new_stmt, iter,
+ SSA_OP_ALL_VIRTUALS)
+ {
+ if (TREE_CODE (sym) == SSA_NAME)
+ sym = SSA_NAME_VAR (sym);
+ mark_sym_for_renaming (sym);
+ }
+ if (slp_node)
+ VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt);
+ }
+
+ if (j == 0)
+ STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
+ else
+ STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
+ prev_stmt_info = vinfo_for_stmt (new_stmt);
+ }
+ break;
+
+ case WIDEN:
+ /* In case the vectorization factor (VF) is bigger than the number
+ of elements that we can fit in a vectype (nunits), we have to
+ generate more than one vector stmt - i.e - we need to "unroll"
+ the vector stmt by a factor VF/nunits. */
+ for (j = 0; j < ncopies; j++)
+ {
+ if (j == 0)
+ vec_oprnd0 = vect_get_vec_def_for_operand (op0, stmt, NULL);
+ else
+ vec_oprnd0 = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd0);
+
+ STMT_VINFO_VECTYPE (stmt_info) = vectype_in;
+
+ /* Generate first half of the widened result: */
+ new_stmt
+ = vect_gen_widened_results_half (code1, decl1,
+ vec_oprnd0, vec_oprnd1,
+ unary_op, vec_dest, gsi, stmt);
+ if (j == 0)
+ STMT_VINFO_VEC_STMT (stmt_info) = new_stmt;
+ else
+ STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
+ prev_stmt_info = vinfo_for_stmt (new_stmt);
+
+ /* Generate second half of the widened result: */
+ new_stmt
+ = vect_gen_widened_results_half (code2, decl2,
+ vec_oprnd0, vec_oprnd1,
+ unary_op, vec_dest, gsi, stmt);
+ STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
+ prev_stmt_info = vinfo_for_stmt (new_stmt);
+ }
+ break;
+
+ case NARROW:
+ /* In case the vectorization factor (VF) is bigger than the number
+ of elements that we can fit in a vectype (nunits), we have to
+ generate more than one vector stmt - i.e - we need to "unroll"
+ the vector stmt by a factor VF/nunits. */
+ for (j = 0; j < ncopies; j++)
+ {
+ /* Handle uses. */
+ if (j == 0)
+ {
+ vec_oprnd0 = vect_get_vec_def_for_operand (op0, stmt, NULL);
+ vec_oprnd1 = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd0);
+ }
+ else
+ {
+ vec_oprnd0 = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd1);
+ vec_oprnd1 = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd0);
+ }
+
+ /* Arguments are ready. Create the new vector stmt. */
+ expr = build2 (code1, vectype_out, vec_oprnd0, vec_oprnd1);
+ new_stmt = gimple_build_assign_with_ops (code1, vec_dest, vec_oprnd0,
+ vec_oprnd1);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_assign_set_lhs (new_stmt, new_temp);
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+
+ if (j == 0)
+ STMT_VINFO_VEC_STMT (stmt_info) = new_stmt;
+ else
+ STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
+
+ prev_stmt_info = vinfo_for_stmt (new_stmt);
+ }
+
+ *vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
+ }
+
+ if (vec_oprnds0)
+ VEC_free (tree, heap, vec_oprnds0);
+
+ return true;
+}
+/* Function vectorizable_assignment.
+
+ Check if STMT performs an assignment (copy) that can be vectorized.
+ If VEC_STMT is also passed, vectorize the STMT: create a vectorized
+ stmt to replace it, put it in VEC_STMT, and insert it at BSI.
+ Return FALSE if not a vectorizable STMT, TRUE otherwise. */
+
+static bool
+vectorizable_assignment (gimple stmt, gimple_stmt_iterator *gsi,
+ gimple *vec_stmt, slp_tree slp_node)
+{
+ tree vec_dest;
+ tree scalar_dest;
+ tree op;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ tree new_temp;
+ tree def;
+ gimple def_stmt;
+ enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
+ int nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ int ncopies;
+ int i;
+ VEC(tree,heap) *vec_oprnds = NULL;
+ tree vop;
+
+ /* Multiple types in SLP are handled by creating the appropriate number of
+ vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
+ case of SLP. */
+ if (slp_node)
+ ncopies = 1;
+ else
+ ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
+
+ gcc_assert (ncopies >= 1);
+ if (ncopies > 1)
+ return false; /* FORNOW */
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info))
+ return false;
+
+ if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
+ return false;
+
+ /* Is vectorizable assignment? */
+ if (!is_gimple_assign (stmt))
+ return false;
+
+ scalar_dest = gimple_assign_lhs (stmt);
+ if (TREE_CODE (scalar_dest) != SSA_NAME)
+ return false;
+
+ if (gimple_assign_single_p (stmt)
+ || gimple_assign_rhs_code (stmt) == PAREN_EXPR)
+ op = gimple_assign_rhs1 (stmt);
+ else
+ return false;
+
+ if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt[0]))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "use not simple.");
+ return false;
+ }
+
+ if (!vec_stmt) /* transformation not required. */
+ {
+ STMT_VINFO_TYPE (stmt_info) = assignment_vec_info_type;
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vectorizable_assignment ===");
+ vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
+ return true;
+ }
+
+ /** Transform. **/
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "transform assignment.");
+
+ /* Handle def. */
+ vec_dest = vect_create_destination_var (scalar_dest, vectype);
+
+ /* Handle use. */
+ vect_get_vec_defs (op, NULL, stmt, &vec_oprnds, NULL, slp_node);
+
+ /* Arguments are ready. create the new vector stmt. */
+ for (i = 0; VEC_iterate (tree, vec_oprnds, i, vop); i++)
+ {
+ *vec_stmt = gimple_build_assign (vec_dest, vop);
+ new_temp = make_ssa_name (vec_dest, *vec_stmt);
+ gimple_assign_set_lhs (*vec_stmt, new_temp);
+ vect_finish_stmt_generation (stmt, *vec_stmt, gsi);
+ STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt;
+
+ if (slp_node)
+ VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), *vec_stmt);
+ }
+
+ VEC_free (tree, heap, vec_oprnds);
+ return true;
+}
+
+/* Function vectorizable_operation.
+
+ Check if STMT performs a binary or unary operation that can be vectorized.
+ If VEC_STMT is also passed, vectorize the STMT: create a vectorized
+ stmt to replace it, put it in VEC_STMT, and insert it at BSI.
+ Return FALSE if not a vectorizable STMT, TRUE otherwise. */
+
+static bool
+vectorizable_operation (gimple stmt, gimple_stmt_iterator *gsi,
+ gimple *vec_stmt, slp_tree slp_node)
+{
+ tree vec_dest;
+ tree scalar_dest;
+ tree op0, op1 = NULL;
+ tree vec_oprnd1 = NULL_TREE;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ enum tree_code code;
+ enum machine_mode vec_mode;
+ tree new_temp;
+ int op_type;
+ optab optab;
+ int icode;
+ enum machine_mode optab_op2_mode;
+ tree def;
+ gimple def_stmt;
+ enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
+ gimple new_stmt = NULL;
+ stmt_vec_info prev_stmt_info;
+ int nunits_in = TYPE_VECTOR_SUBPARTS (vectype);
+ int nunits_out;
+ tree vectype_out;
+ int ncopies;
+ int j, i;
+ VEC(tree,heap) *vec_oprnds0 = NULL, *vec_oprnds1 = NULL;
+ tree vop0, vop1;
+ unsigned int k;
+ bool shift_p = false;
+ bool scalar_shift_arg = false;
+
+ /* Multiple types in SLP are handled by creating the appropriate number of
+ vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
+ case of SLP. */
+ if (slp_node)
+ ncopies = 1;
+ else
+ ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_in;
+
+ gcc_assert (ncopies >= 1);
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info))
+ return false;
+
+ if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
+ return false;
+
+ /* Is STMT a vectorizable binary/unary operation? */
+ if (!is_gimple_assign (stmt))
+ return false;
+
+ if (TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME)
+ return false;
+
+ scalar_dest = gimple_assign_lhs (stmt);
+ vectype_out = get_vectype_for_scalar_type (TREE_TYPE (scalar_dest));
+ if (!vectype_out)
+ return false;
+ nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
+ if (nunits_out != nunits_in)
+ return false;
+
+ code = gimple_assign_rhs_code (stmt);
+
+ /* For pointer addition, we should use the normal plus for
+ the vector addition. */
+ if (code == POINTER_PLUS_EXPR)
+ code = PLUS_EXPR;
+
+ /* Support only unary or binary operations. */
+ op_type = TREE_CODE_LENGTH (code);
+ if (op_type != unary_op && op_type != binary_op)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "num. args = %d (not unary/binary op).", op_type);
+ return false;
+ }
+
+ op0 = gimple_assign_rhs1 (stmt);
+ if (!vect_is_simple_use (op0, loop_vinfo, &def_stmt, &def, &dt[0]))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "use not simple.");
+ return false;
+ }
+
+ if (op_type == binary_op)
+ {
+ op1 = gimple_assign_rhs2 (stmt);
+ if (!vect_is_simple_use (op1, loop_vinfo, &def_stmt, &def, &dt[1]))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "use not simple.");
+ return false;
+ }
+ }
+
+ /* If this is a shift/rotate, determine whether the shift amount is a vector,
+ or scalar. If the shift/rotate amount is a vector, use the vector/vector
+ shift optabs. */
+ if (code == LSHIFT_EXPR || code == RSHIFT_EXPR || code == LROTATE_EXPR
+ || code == RROTATE_EXPR)
+ {
+ shift_p = true;
+
+ /* vector shifted by vector */
+ if (dt[1] == vect_loop_def)
+ {
+ optab = optab_for_tree_code (code, vectype, optab_vector);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "vector/vector shift/rotate found.");
+ }
+
+ /* See if the machine has a vector shifted by scalar insn and if not
+ then see if it has a vector shifted by vector insn */
+ else if (dt[1] == vect_constant_def || dt[1] == vect_invariant_def)
+ {
+ optab = optab_for_tree_code (code, vectype, optab_scalar);
+ if (optab
+ && (optab_handler (optab, TYPE_MODE (vectype))->insn_code
+ != CODE_FOR_nothing))
+ {
+ scalar_shift_arg = true;
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "vector/scalar shift/rotate found.");
+ }
+ else
+ {
+ optab = optab_for_tree_code (code, vectype, optab_vector);
+ if (vect_print_dump_info (REPORT_DETAILS)
+ && optab
+ && (optab_handler (optab, TYPE_MODE (vectype))->insn_code
+ != CODE_FOR_nothing))
+ fprintf (vect_dump, "vector/vector shift/rotate found.");
+ }
+ }
+
+ else
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "operand mode requires invariant argument.");
+ return false;
+ }
+ }
+ else
+ optab = optab_for_tree_code (code, vectype, optab_default);
+
+ /* Supportable by target? */
+ if (!optab)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "no optab.");
+ return false;
+ }
+ vec_mode = TYPE_MODE (vectype);
+ icode = (int) optab_handler (optab, vec_mode)->insn_code;
+ if (icode == CODE_FOR_nothing)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "op not supported by target.");
+ /* Check only during analysis. */
+ if (GET_MODE_SIZE (vec_mode) != UNITS_PER_WORD
+ || (LOOP_VINFO_VECT_FACTOR (loop_vinfo)
+ < vect_min_worthwhile_factor (code)
+ && !vec_stmt))
+ return false;
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "proceeding using word mode.");
+ }
+
+ /* Worthwhile without SIMD support? Check only during analysis. */
+ if (!VECTOR_MODE_P (TYPE_MODE (vectype))
+ && LOOP_VINFO_VECT_FACTOR (loop_vinfo)
+ < vect_min_worthwhile_factor (code)
+ && !vec_stmt)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "not worthwhile without SIMD support.");
+ return false;
+ }
+
+ if (!vec_stmt) /* transformation not required. */
+ {
+ STMT_VINFO_TYPE (stmt_info) = op_vec_info_type;
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vectorizable_operation ===");
+ vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
+ return true;
+ }
+
+ /** Transform. **/
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "transform binary/unary operation.");
+
+ /* Handle def. */
+ vec_dest = vect_create_destination_var (scalar_dest, vectype);
+
+ /* Allocate VECs for vector operands. In case of SLP, vector operands are
+ created in the previous stages of the recursion, so no allocation is
+ needed, except for the case of shift with scalar shift argument. In that
+ case we store the scalar operand in VEC_OPRNDS1 for every vector stmt to
+ be created to vectorize the SLP group, i.e., SLP_NODE->VEC_STMTS_SIZE.
+ In case of loop-based vectorization we allocate VECs of size 1. We
+ allocate VEC_OPRNDS1 only in case of binary operation. */
+ if (!slp_node)
+ {
+ vec_oprnds0 = VEC_alloc (tree, heap, 1);
+ if (op_type == binary_op)
+ vec_oprnds1 = VEC_alloc (tree, heap, 1);
+ }
+ else if (scalar_shift_arg)
+ vec_oprnds1 = VEC_alloc (tree, heap, slp_node->vec_stmts_size);
+
+ /* In case the vectorization factor (VF) is bigger than the number
+ of elements that we can fit in a vectype (nunits), we have to generate
+ more than one vector stmt - i.e - we need to "unroll" the
+ vector stmt by a factor VF/nunits. In doing so, we record a pointer
+ from one copy of the vector stmt to the next, in the field
+ STMT_VINFO_RELATED_STMT. This is necessary in order to allow following
+ stages to find the correct vector defs to be used when vectorizing
+ stmts that use the defs of the current stmt. The example below illustrates
+ the vectorization process when VF=16 and nunits=4 (i.e - we need to create
+ 4 vectorized stmts):
+
+ before vectorization:
+ RELATED_STMT VEC_STMT
+ S1: x = memref - -
+ S2: z = x + 1 - -
+
+ step 1: vectorize stmt S1 (done in vectorizable_load. See more details
+ there):
+ RELATED_STMT VEC_STMT
+ VS1_0: vx0 = memref0 VS1_1 -
+ VS1_1: vx1 = memref1 VS1_2 -
+ VS1_2: vx2 = memref2 VS1_3 -
+ VS1_3: vx3 = memref3 - -
+ S1: x = load - VS1_0
+ S2: z = x + 1 - -
+
+ step2: vectorize stmt S2 (done here):
+ To vectorize stmt S2 we first need to find the relevant vector
+ def for the first operand 'x'. This is, as usual, obtained from
+ the vector stmt recorded in the STMT_VINFO_VEC_STMT of the stmt
+ that defines 'x' (S1). This way we find the stmt VS1_0, and the
+ relevant vector def 'vx0'. Having found 'vx0' we can generate
+ the vector stmt VS2_0, and as usual, record it in the
+ STMT_VINFO_VEC_STMT of stmt S2.
+ When creating the second copy (VS2_1), we obtain the relevant vector
+ def from the vector stmt recorded in the STMT_VINFO_RELATED_STMT of
+ stmt VS1_0. This way we find the stmt VS1_1 and the relevant
+ vector def 'vx1'. Using 'vx1' we create stmt VS2_1 and record a
+ pointer to it in the STMT_VINFO_RELATED_STMT of the vector stmt VS2_0.
+ Similarly when creating stmts VS2_2 and VS2_3. This is the resulting
+ chain of stmts and pointers:
+ RELATED_STMT VEC_STMT
+ VS1_0: vx0 = memref0 VS1_1 -
+ VS1_1: vx1 = memref1 VS1_2 -
+ VS1_2: vx2 = memref2 VS1_3 -
+ VS1_3: vx3 = memref3 - -
+ S1: x = load - VS1_0
+ VS2_0: vz0 = vx0 + v1 VS2_1 -
+ VS2_1: vz1 = vx1 + v1 VS2_2 -
+ VS2_2: vz2 = vx2 + v1 VS2_3 -
+ VS2_3: vz3 = vx3 + v1 - -
+ S2: z = x + 1 - VS2_0 */
+
+ prev_stmt_info = NULL;
+ for (j = 0; j < ncopies; j++)
+ {
+ /* Handle uses. */
+ if (j == 0)
+ {
+ if (op_type == binary_op && scalar_shift_arg)
+ {
+ /* Vector shl and shr insn patterns can be defined with scalar
+ operand 2 (shift operand). In this case, use constant or loop
+ invariant op1 directly, without extending it to vector mode
+ first. */
+ optab_op2_mode = insn_data[icode].operand[2].mode;
+ if (!VECTOR_MODE_P (optab_op2_mode))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "operand 1 using scalar mode.");
+ vec_oprnd1 = op1;
+ VEC_quick_push (tree, vec_oprnds1, vec_oprnd1);
+ if (slp_node)
+ {
+ /* Store vec_oprnd1 for every vector stmt to be created
+ for SLP_NODE. We check during the analysis that all the
+ shift arguments are the same.
+ TODO: Allow different constants for different vector
+ stmts generated for an SLP instance. */
+ for (k = 0; k < slp_node->vec_stmts_size - 1; k++)
+ VEC_quick_push (tree, vec_oprnds1, vec_oprnd1);
+ }
+ }
+ }
+
+ /* vec_oprnd1 is available if operand 1 should be of a scalar-type
+ (a special case for certain kind of vector shifts); otherwise,
+ operand 1 should be of a vector type (the usual case). */
+ if (op_type == binary_op && !vec_oprnd1)
+ vect_get_vec_defs (op0, op1, stmt, &vec_oprnds0, &vec_oprnds1,
+ slp_node);
+ else
+ vect_get_vec_defs (op0, NULL_TREE, stmt, &vec_oprnds0, NULL,
+ slp_node);
+ }
+ else
+ vect_get_vec_defs_for_stmt_copy (dt, &vec_oprnds0, &vec_oprnds1);
+
+ /* Arguments are ready. Create the new vector stmt. */
+ for (i = 0; VEC_iterate (tree, vec_oprnds0, i, vop0); i++)
+ {
+ vop1 = ((op_type == binary_op)
+ ? VEC_index (tree, vec_oprnds1, i) : NULL);
+ new_stmt = gimple_build_assign_with_ops (code, vec_dest, vop0, vop1);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_assign_set_lhs (new_stmt, new_temp);
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+ if (slp_node)
+ VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt);
+ }
+
+ if (slp_node)
+ continue;
+
+ if (j == 0)
+ STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
+ else
+ STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
+ prev_stmt_info = vinfo_for_stmt (new_stmt);
+ }
+
+ VEC_free (tree, heap, vec_oprnds0);
+ if (vec_oprnds1)
+ VEC_free (tree, heap, vec_oprnds1);
+
+ return true;
+}
+
+
+/* Get vectorized definitions for loop-based vectorization. For the first
+ operand we call vect_get_vec_def_for_operand() (with OPRND containing
+ scalar operand), and for the rest we get a copy with
+ vect_get_vec_def_for_stmt_copy() using the previous vector definition
+ (stored in OPRND). See vect_get_vec_def_for_stmt_copy() for details.
+ The vectors are collected into VEC_OPRNDS. */
+
+static void
+vect_get_loop_based_defs (tree *oprnd, gimple stmt, enum vect_def_type dt,
+ VEC (tree, heap) **vec_oprnds, int multi_step_cvt)
+{
+ tree vec_oprnd;
+
+ /* Get first vector operand. */
+ /* All the vector operands except the very first one (that is scalar oprnd)
+ are stmt copies. */
+ if (TREE_CODE (TREE_TYPE (*oprnd)) != VECTOR_TYPE)
+ vec_oprnd = vect_get_vec_def_for_operand (*oprnd, stmt, NULL);
+ else
+ vec_oprnd = vect_get_vec_def_for_stmt_copy (dt, *oprnd);
+
+ VEC_quick_push (tree, *vec_oprnds, vec_oprnd);
+
+ /* Get second vector operand. */
+ vec_oprnd = vect_get_vec_def_for_stmt_copy (dt, vec_oprnd);
+ VEC_quick_push (tree, *vec_oprnds, vec_oprnd);
+
+ *oprnd = vec_oprnd;
+
+ /* For conversion in multiple steps, continue to get operands
+ recursively. */
+ if (multi_step_cvt)
+ vect_get_loop_based_defs (oprnd, stmt, dt, vec_oprnds, multi_step_cvt - 1);
+}
+
+
+/* Create vectorized demotion statements for vector operands from VEC_OPRNDS.
+ For multi-step conversions store the resulting vectors and call the function
+ recursively. */
+
+static void
+vect_create_vectorized_demotion_stmts (VEC (tree, heap) **vec_oprnds,
+ int multi_step_cvt, gimple stmt,
+ VEC (tree, heap) *vec_dsts,
+ gimple_stmt_iterator *gsi,
+ slp_tree slp_node, enum tree_code code,
+ stmt_vec_info *prev_stmt_info)
+{
+ unsigned int i;
+ tree vop0, vop1, new_tmp, vec_dest;
+ gimple new_stmt;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+
+ vec_dest = VEC_pop (tree, vec_dsts);
+
+ for (i = 0; i < VEC_length (tree, *vec_oprnds); i += 2)
+ {
+ /* Create demotion operation. */
+ vop0 = VEC_index (tree, *vec_oprnds, i);
+ vop1 = VEC_index (tree, *vec_oprnds, i + 1);
+ new_stmt = gimple_build_assign_with_ops (code, vec_dest, vop0, vop1);
+ new_tmp = make_ssa_name (vec_dest, new_stmt);
+ gimple_assign_set_lhs (new_stmt, new_tmp);
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+
+ if (multi_step_cvt)
+ /* Store the resulting vector for next recursive call. */
+ VEC_replace (tree, *vec_oprnds, i/2, new_tmp);
+ else
+ {
+ /* This is the last step of the conversion sequence. Store the
+ vectors in SLP_NODE or in vector info of the scalar statement
+ (or in STMT_VINFO_RELATED_STMT chain). */
+ if (slp_node)
+ VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt);
+ else
+ {
+ if (!*prev_stmt_info)
+ STMT_VINFO_VEC_STMT (stmt_info) = new_stmt;
+ else
+ STMT_VINFO_RELATED_STMT (*prev_stmt_info) = new_stmt;
+
+ *prev_stmt_info = vinfo_for_stmt (new_stmt);
+ }
+ }
+ }
+
+ /* For multi-step demotion operations we first generate demotion operations
+ from the source type to the intermediate types, and then combine the
+ results (stored in VEC_OPRNDS) in demotion operation to the destination
+ type. */
+ if (multi_step_cvt)
+ {
+ /* At each level of recursion we have have of the operands we had at the
+ previous level. */
+ VEC_truncate (tree, *vec_oprnds, (i+1)/2);
+ vect_create_vectorized_demotion_stmts (vec_oprnds, multi_step_cvt - 1,
+ stmt, vec_dsts, gsi, slp_node,
+ code, prev_stmt_info);
+ }
+}
+
+
+/* Function vectorizable_type_demotion
+
+ Check if STMT performs a binary or unary operation that involves
+ type demotion, and if it can be vectorized.
+ If VEC_STMT is also passed, vectorize the STMT: create a vectorized
+ stmt to replace it, put it in VEC_STMT, and insert it at BSI.
+ Return FALSE if not a vectorizable STMT, TRUE otherwise. */
+
+static bool
+vectorizable_type_demotion (gimple stmt, gimple_stmt_iterator *gsi,
+ gimple *vec_stmt, slp_tree slp_node)
+{
+ tree vec_dest;
+ tree scalar_dest;
+ tree op0;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ enum tree_code code, code1 = ERROR_MARK;
+ tree def;
+ gimple def_stmt;
+ enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
+ stmt_vec_info prev_stmt_info;
+ int nunits_in;
+ int nunits_out;
+ tree vectype_out;
+ int ncopies;
+ int j, i;
+ tree vectype_in;
+ int multi_step_cvt = 0;
+ VEC (tree, heap) *vec_oprnds0 = NULL;
+ VEC (tree, heap) *vec_dsts = NULL, *interm_types = NULL, *tmp_vec_dsts = NULL;
+ tree last_oprnd, intermediate_type;
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info))
+ return false;
+
+ if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
+ return false;
+
+ /* Is STMT a vectorizable type-demotion operation? */
+ if (!is_gimple_assign (stmt))
+ return false;
+
+ if (TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME)
+ return false;
+
+ code = gimple_assign_rhs_code (stmt);
+ if (!CONVERT_EXPR_CODE_P (code))
+ return false;
+
+ op0 = gimple_assign_rhs1 (stmt);
+ vectype_in = get_vectype_for_scalar_type (TREE_TYPE (op0));
+ if (!vectype_in)
+ return false;
+ nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
+
+ scalar_dest = gimple_assign_lhs (stmt);
+ vectype_out = get_vectype_for_scalar_type (TREE_TYPE (scalar_dest));
+ if (!vectype_out)
+ return false;
+ nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
+ if (nunits_in >= nunits_out)
+ return false;
+
+ /* Multiple types in SLP are handled by creating the appropriate number of
+ vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
+ case of SLP. */
+ if (slp_node)
+ ncopies = 1;
+ else
+ ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_out;
+
+ gcc_assert (ncopies >= 1);
+
+ if (! ((INTEGRAL_TYPE_P (TREE_TYPE (scalar_dest))
+ && INTEGRAL_TYPE_P (TREE_TYPE (op0)))
+ || (SCALAR_FLOAT_TYPE_P (TREE_TYPE (scalar_dest))
+ && SCALAR_FLOAT_TYPE_P (TREE_TYPE (op0))
+ && CONVERT_EXPR_CODE_P (code))))
+ return false;
+
+ /* Check the operands of the operation. */
+ if (!vect_is_simple_use (op0, loop_vinfo, &def_stmt, &def, &dt[0]))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "use not simple.");
+ return false;
+ }
+
+ /* Supportable by target? */
+ if (!supportable_narrowing_operation (code, stmt, vectype_in, &code1,
+ &multi_step_cvt, &interm_types))
+ return false;
+
+ STMT_VINFO_VECTYPE (stmt_info) = vectype_in;
+
+ if (!vec_stmt) /* transformation not required. */
+ {
+ STMT_VINFO_TYPE (stmt_info) = type_demotion_vec_info_type;
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vectorizable_demotion ===");
+ vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
+ return true;
+ }
+
+ /** Transform. **/
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "transform type demotion operation. ncopies = %d.",
+ ncopies);
+
+ /* In case of multi-step demotion, we first generate demotion operations to
+ the intermediate types, and then from that types to the final one.
+ We create vector destinations for the intermediate type (TYPES) received
+ from supportable_narrowing_operation, and store them in the correct order
+ for future use in vect_create_vectorized_demotion_stmts(). */
+ if (multi_step_cvt)
+ vec_dsts = VEC_alloc (tree, heap, multi_step_cvt + 1);
+ else
+ vec_dsts = VEC_alloc (tree, heap, 1);
+
+ vec_dest = vect_create_destination_var (scalar_dest, vectype_out);
+ VEC_quick_push (tree, vec_dsts, vec_dest);
+
+ if (multi_step_cvt)
+ {
+ for (i = VEC_length (tree, interm_types) - 1;
+ VEC_iterate (tree, interm_types, i, intermediate_type); i--)
+ {
+ vec_dest = vect_create_destination_var (scalar_dest,
+ intermediate_type);
+ VEC_quick_push (tree, vec_dsts, vec_dest);
+ }
+ }
+
+ /* In case the vectorization factor (VF) is bigger than the number
+ of elements that we can fit in a vectype (nunits), we have to generate
+ more than one vector stmt - i.e - we need to "unroll" the
+ vector stmt by a factor VF/nunits. */
+ last_oprnd = op0;
+ prev_stmt_info = NULL;
+ for (j = 0; j < ncopies; j++)
+ {
+ /* Handle uses. */
+ if (slp_node)
+ vect_get_slp_defs (slp_node, &vec_oprnds0, NULL);
+ else
+ {
+ VEC_free (tree, heap, vec_oprnds0);
+ vec_oprnds0 = VEC_alloc (tree, heap,
+ (multi_step_cvt ? vect_pow2 (multi_step_cvt) * 2 : 2));
+ vect_get_loop_based_defs (&last_oprnd, stmt, dt[0], &vec_oprnds0,
+ vect_pow2 (multi_step_cvt) - 1);
+ }
+
+ /* Arguments are ready. Create the new vector stmts. */
+ tmp_vec_dsts = VEC_copy (tree, heap, vec_dsts);
+ vect_create_vectorized_demotion_stmts (&vec_oprnds0,
+ multi_step_cvt, stmt, tmp_vec_dsts,
+ gsi, slp_node, code1,
+ &prev_stmt_info);
+ }
+
+ VEC_free (tree, heap, vec_oprnds0);
+ VEC_free (tree, heap, vec_dsts);
+ VEC_free (tree, heap, tmp_vec_dsts);
+ VEC_free (tree, heap, interm_types);
+
+ *vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
+ return true;
+}
+
+
+/* Create vectorized promotion statements for vector operands from VEC_OPRNDS0
+ and VEC_OPRNDS1 (for binary operations). For multi-step conversions store
+ the resulting vectors and call the function recursively. */
+
+static void
+vect_create_vectorized_promotion_stmts (VEC (tree, heap) **vec_oprnds0,
+ VEC (tree, heap) **vec_oprnds1,
+ int multi_step_cvt, gimple stmt,
+ VEC (tree, heap) *vec_dsts,
+ gimple_stmt_iterator *gsi,
+ slp_tree slp_node, enum tree_code code1,
+ enum tree_code code2, tree decl1,
+ tree decl2, int op_type,
+ stmt_vec_info *prev_stmt_info)
+{
+ int i;
+ tree vop0, vop1, new_tmp1, new_tmp2, vec_dest;
+ gimple new_stmt1, new_stmt2;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ VEC (tree, heap) *vec_tmp;
+
+ vec_dest = VEC_pop (tree, vec_dsts);
+ vec_tmp = VEC_alloc (tree, heap, VEC_length (tree, *vec_oprnds0) * 2);
+
+ for (i = 0; VEC_iterate (tree, *vec_oprnds0, i, vop0); i++)
+ {
+ if (op_type == binary_op)
+ vop1 = VEC_index (tree, *vec_oprnds1, i);
+ else
+ vop1 = NULL_TREE;
+
+ /* Generate the two halves of promotion operation. */
+ new_stmt1 = vect_gen_widened_results_half (code1, decl1, vop0, vop1,
+ op_type, vec_dest, gsi, stmt);
+ new_stmt2 = vect_gen_widened_results_half (code2, decl2, vop0, vop1,
+ op_type, vec_dest, gsi, stmt);
+ if (is_gimple_call (new_stmt1))
+ {
+ new_tmp1 = gimple_call_lhs (new_stmt1);
+ new_tmp2 = gimple_call_lhs (new_stmt2);
+ }
+ else
+ {
+ new_tmp1 = gimple_assign_lhs (new_stmt1);
+ new_tmp2 = gimple_assign_lhs (new_stmt2);
+ }
+
+ if (multi_step_cvt)
+ {
+ /* Store the results for the recursive call. */
+ VEC_quick_push (tree, vec_tmp, new_tmp1);
+ VEC_quick_push (tree, vec_tmp, new_tmp2);
+ }
+ else
+ {
+ /* Last step of promotion sequience - store the results. */
+ if (slp_node)
+ {
+ VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt1);
+ VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt2);
+ }
+ else
+ {
+ if (!*prev_stmt_info)
+ STMT_VINFO_VEC_STMT (stmt_info) = new_stmt1;
+ else
+ STMT_VINFO_RELATED_STMT (*prev_stmt_info) = new_stmt1;
+
+ *prev_stmt_info = vinfo_for_stmt (new_stmt1);
+ STMT_VINFO_RELATED_STMT (*prev_stmt_info) = new_stmt2;
+ *prev_stmt_info = vinfo_for_stmt (new_stmt2);
+ }
+ }
+ }
+
+ if (multi_step_cvt)
+ {
+ /* For multi-step promotion operation we first generate we call the
+ function recurcively for every stage. We start from the input type,
+ create promotion operations to the intermediate types, and then
+ create promotions to the output type. */
+ *vec_oprnds0 = VEC_copy (tree, heap, vec_tmp);
+ VEC_free (tree, heap, vec_tmp);
+ vect_create_vectorized_promotion_stmts (vec_oprnds0, vec_oprnds1,
+ multi_step_cvt - 1, stmt,
+ vec_dsts, gsi, slp_node, code1,
+ code2, decl2, decl2, op_type,
+ prev_stmt_info);
+ }
+}
+
+
+/* Function vectorizable_type_promotion
+
+ Check if STMT performs a binary or unary operation that involves
+ type promotion, and if it can be vectorized.
+ If VEC_STMT is also passed, vectorize the STMT: create a vectorized
+ stmt to replace it, put it in VEC_STMT, and insert it at BSI.
+ Return FALSE if not a vectorizable STMT, TRUE otherwise. */
+
+static bool
+vectorizable_type_promotion (gimple stmt, gimple_stmt_iterator *gsi,
+ gimple *vec_stmt, slp_tree slp_node)
+{
+ tree vec_dest;
+ tree scalar_dest;
+ tree op0, op1 = NULL;
+ tree vec_oprnd0=NULL, vec_oprnd1=NULL;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ enum tree_code code, code1 = ERROR_MARK, code2 = ERROR_MARK;
+ tree decl1 = NULL_TREE, decl2 = NULL_TREE;
+ int op_type;
+ tree def;
+ gimple def_stmt;
+ enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
+ stmt_vec_info prev_stmt_info;
+ int nunits_in;
+ int nunits_out;
+ tree vectype_out;
+ int ncopies;
+ int j, i;
+ tree vectype_in;
+ tree intermediate_type = NULL_TREE;
+ int multi_step_cvt = 0;
+ VEC (tree, heap) *vec_oprnds0 = NULL, *vec_oprnds1 = NULL;
+ VEC (tree, heap) *vec_dsts = NULL, *interm_types = NULL, *tmp_vec_dsts = NULL;
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info))
+ return false;
+
+ if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
+ return false;
+
+ /* Is STMT a vectorizable type-promotion operation? */
+ if (!is_gimple_assign (stmt))
+ return false;
+
+ if (TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME)
+ return false;
+
+ code = gimple_assign_rhs_code (stmt);
+ if (!CONVERT_EXPR_CODE_P (code)
+ && code != WIDEN_MULT_EXPR)
+ return false;
+
+ op0 = gimple_assign_rhs1 (stmt);
+ vectype_in = get_vectype_for_scalar_type (TREE_TYPE (op0));
+ if (!vectype_in)
+ return false;
+ nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
+
+ scalar_dest = gimple_assign_lhs (stmt);
+ vectype_out = get_vectype_for_scalar_type (TREE_TYPE (scalar_dest));
+ if (!vectype_out)
+ return false;
+ nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
+ if (nunits_in <= nunits_out)
+ return false;
+
+ /* Multiple types in SLP are handled by creating the appropriate number of
+ vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
+ case of SLP. */
+ if (slp_node)
+ ncopies = 1;
+ else
+ ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_in;
+
+ gcc_assert (ncopies >= 1);
+
+ if (! ((INTEGRAL_TYPE_P (TREE_TYPE (scalar_dest))
+ && INTEGRAL_TYPE_P (TREE_TYPE (op0)))
+ || (SCALAR_FLOAT_TYPE_P (TREE_TYPE (scalar_dest))
+ && SCALAR_FLOAT_TYPE_P (TREE_TYPE (op0))
+ && CONVERT_EXPR_CODE_P (code))))
+ return false;
+
+ /* Check the operands of the operation. */
+ if (!vect_is_simple_use (op0, loop_vinfo, &def_stmt, &def, &dt[0]))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "use not simple.");
+ return false;
+ }
+
+ op_type = TREE_CODE_LENGTH (code);
+ if (op_type == binary_op)
+ {
+ op1 = gimple_assign_rhs2 (stmt);
+ if (!vect_is_simple_use (op1, loop_vinfo, &def_stmt, &def, &dt[1]))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "use not simple.");
+ return false;
+ }
+ }
+
+ /* Supportable by target? */
+ if (!supportable_widening_operation (code, stmt, vectype_in,
+ &decl1, &decl2, &code1, &code2,
+ &multi_step_cvt, &interm_types))
+ return false;
+
+ /* Binary widening operation can only be supported directly by the
+ architecture. */
+ gcc_assert (!(multi_step_cvt && op_type == binary_op));
+
+ STMT_VINFO_VECTYPE (stmt_info) = vectype_in;
+
+ if (!vec_stmt) /* transformation not required. */
+ {
+ STMT_VINFO_TYPE (stmt_info) = type_promotion_vec_info_type;
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vectorizable_promotion ===");
+ vect_model_simple_cost (stmt_info, 2*ncopies, dt, NULL);
+ return true;
+ }
+
+ /** Transform. **/
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "transform type promotion operation. ncopies = %d.",
+ ncopies);
+
+ /* Handle def. */
+ /* In case of multi-step promotion, we first generate promotion operations
+ to the intermediate types, and then from that types to the final one.
+ We store vector destination in VEC_DSTS in the correct order for
+ recursive creation of promotion operations in
+ vect_create_vectorized_promotion_stmts(). Vector destinations are created
+ according to TYPES recieved from supportable_widening_operation(). */
+ if (multi_step_cvt)
+ vec_dsts = VEC_alloc (tree, heap, multi_step_cvt + 1);
+ else
+ vec_dsts = VEC_alloc (tree, heap, 1);
+
+ vec_dest = vect_create_destination_var (scalar_dest, vectype_out);
+ VEC_quick_push (tree, vec_dsts, vec_dest);
+
+ if (multi_step_cvt)
+ {
+ for (i = VEC_length (tree, interm_types) - 1;
+ VEC_iterate (tree, interm_types, i, intermediate_type); i--)
+ {
+ vec_dest = vect_create_destination_var (scalar_dest,
+ intermediate_type);
+ VEC_quick_push (tree, vec_dsts, vec_dest);
+ }
+ }
+
+ if (!slp_node)
+ {
+ vec_oprnds0 = VEC_alloc (tree, heap,
+ (multi_step_cvt ? vect_pow2 (multi_step_cvt) : 1));
+ if (op_type == binary_op)
+ vec_oprnds1 = VEC_alloc (tree, heap, 1);
+ }
+
+ /* In case the vectorization factor (VF) is bigger than the number
+ of elements that we can fit in a vectype (nunits), we have to generate
+ more than one vector stmt - i.e - we need to "unroll" the
+ vector stmt by a factor VF/nunits. */
+
+ prev_stmt_info = NULL;
+ for (j = 0; j < ncopies; j++)
+ {
+ /* Handle uses. */
+ if (j == 0)
+ {
+ if (slp_node)
+ vect_get_slp_defs (slp_node, &vec_oprnds0, &vec_oprnds1);
+ else
+ {
+ vec_oprnd0 = vect_get_vec_def_for_operand (op0, stmt, NULL);
+ VEC_quick_push (tree, vec_oprnds0, vec_oprnd0);
+ if (op_type == binary_op)
+ {
+ vec_oprnd1 = vect_get_vec_def_for_operand (op1, stmt, NULL);
+ VEC_quick_push (tree, vec_oprnds1, vec_oprnd1);
+ }
+ }
+ }
+ else
+ {
+ vec_oprnd0 = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd0);
+ VEC_replace (tree, vec_oprnds0, 0, vec_oprnd0);
+ if (op_type == binary_op)
+ {
+ vec_oprnd1 = vect_get_vec_def_for_stmt_copy (dt[1], vec_oprnd1);
+ VEC_replace (tree, vec_oprnds1, 0, vec_oprnd1);
+ }
+ }
+
+ /* Arguments are ready. Create the new vector stmts. */
+ tmp_vec_dsts = VEC_copy (tree, heap, vec_dsts);
+ vect_create_vectorized_promotion_stmts (&vec_oprnds0, &vec_oprnds1,
+ multi_step_cvt, stmt,
+ tmp_vec_dsts,
+ gsi, slp_node, code1, code2,
+ decl1, decl2, op_type,
+ &prev_stmt_info);
+ }
+
+ VEC_free (tree, heap, vec_dsts);
+ VEC_free (tree, heap, tmp_vec_dsts);
+ VEC_free (tree, heap, interm_types);
+ VEC_free (tree, heap, vec_oprnds0);
+ VEC_free (tree, heap, vec_oprnds1);
+
+ *vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
+ return true;
+}
+
+
+/* Function vectorizable_store.
+
+ Check if STMT defines a non scalar data-ref (array/pointer/structure) that
+ can be vectorized.
+ If VEC_STMT is also passed, vectorize the STMT: create a vectorized
+ stmt to replace it, put it in VEC_STMT, and insert it at BSI.
+ Return FALSE if not a vectorizable STMT, TRUE otherwise. */
+
+static bool
+vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
+ slp_tree slp_node)
+{
+ tree scalar_dest;
+ tree data_ref;
+ tree op;
+ tree vec_oprnd = NULL_TREE;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info), *first_dr = NULL;
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ enum machine_mode vec_mode;
+ tree dummy;
+ enum dr_alignment_support alignment_support_scheme;
+ tree def;
+ gimple def_stmt;
+ enum vect_def_type dt;
+ stmt_vec_info prev_stmt_info = NULL;
+ tree dataref_ptr = NULL_TREE;
+ int nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ int ncopies;
+ int j;
+ gimple next_stmt, first_stmt = NULL;
+ bool strided_store = false;
+ unsigned int group_size, i;
+ VEC(tree,heap) *dr_chain = NULL, *oprnds = NULL, *result_chain = NULL;
+ bool inv_p;
+ VEC(tree,heap) *vec_oprnds = NULL;
+ bool slp = (slp_node != NULL);
+ stmt_vec_info first_stmt_vinfo;
+ unsigned int vec_num;
+
+ /* Multiple types in SLP are handled by creating the appropriate number of
+ vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
+ case of SLP. */
+ if (slp)
+ ncopies = 1;
+ else
+ ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
+
+ gcc_assert (ncopies >= 1);
+
+ /* FORNOW. This restriction should be relaxed. */
+ if (nested_in_vect_loop_p (loop, stmt) && ncopies > 1)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "multiple types in nested loop.");
+ return false;
+ }
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info))
+ return false;
+
+ if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
+ return false;
+
+ /* Is vectorizable store? */
+
+ if (!is_gimple_assign (stmt))
+ return false;
+
+ scalar_dest = gimple_assign_lhs (stmt);
+ if (TREE_CODE (scalar_dest) != ARRAY_REF
+ && TREE_CODE (scalar_dest) != INDIRECT_REF
+ && !STMT_VINFO_STRIDED_ACCESS (stmt_info))
+ return false;
+
+ gcc_assert (gimple_assign_single_p (stmt));
+ op = gimple_assign_rhs1 (stmt);
+ if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "use not simple.");
+ return false;
+ }
+
+ /* The scalar rhs type needs to be trivially convertible to the vector
+ component type. This should always be the case. */
+ if (!useless_type_conversion_p (TREE_TYPE (vectype), TREE_TYPE (op)))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "??? operands of different types");
+ return false;
+ }
+
+ vec_mode = TYPE_MODE (vectype);
+ /* FORNOW. In some cases can vectorize even if data-type not supported
+ (e.g. - array initialization with 0). */
+ if (optab_handler (mov_optab, (int)vec_mode)->insn_code == CODE_FOR_nothing)
+ return false;
+
+ if (!STMT_VINFO_DATA_REF (stmt_info))
+ return false;
+
+ if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
+ {
+ strided_store = true;
+ first_stmt = DR_GROUP_FIRST_DR (stmt_info);
+ if (!vect_strided_store_supported (vectype)
+ && !PURE_SLP_STMT (stmt_info) && !slp)
+ return false;
+
+ if (first_stmt == stmt)
+ {
+ /* STMT is the leader of the group. Check the operands of all the
+ stmts of the group. */
+ next_stmt = DR_GROUP_NEXT_DR (stmt_info);
+ while (next_stmt)
+ {
+ gcc_assert (gimple_assign_single_p (next_stmt));
+ op = gimple_assign_rhs1 (next_stmt);
+ if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "use not simple.");
+ return false;
+ }
+ next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
+ }
+ }
+ }
+
+ if (!vec_stmt) /* transformation not required. */
+ {
+ STMT_VINFO_TYPE (stmt_info) = store_vec_info_type;
+ vect_model_store_cost (stmt_info, ncopies, dt, NULL);
+ return true;
+ }
+
+ /** Transform. **/
+
+ if (strided_store)
+ {
+ first_dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (first_stmt));
+ group_size = DR_GROUP_SIZE (vinfo_for_stmt (first_stmt));
+
+ DR_GROUP_STORE_COUNT (vinfo_for_stmt (first_stmt))++;
+
+ /* FORNOW */
+ gcc_assert (!nested_in_vect_loop_p (loop, stmt));
+
+ /* We vectorize all the stmts of the interleaving group when we
+ reach the last stmt in the group. */
+ if (DR_GROUP_STORE_COUNT (vinfo_for_stmt (first_stmt))
+ < DR_GROUP_SIZE (vinfo_for_stmt (first_stmt))
+ && !slp)
+ {
+ *vec_stmt = NULL;
+ return true;
+ }
+
+ if (slp)
+ strided_store = false;
+
+ /* VEC_NUM is the number of vect stmts to be created for this group. */
+ if (slp)
+ vec_num = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
+ else
+ vec_num = group_size;
+ }
+ else
+ {
+ first_stmt = stmt;
+ first_dr = dr;
+ group_size = vec_num = 1;
+ first_stmt_vinfo = stmt_info;
+ }
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "transform store. ncopies = %d",ncopies);
+
+ dr_chain = VEC_alloc (tree, heap, group_size);
+ oprnds = VEC_alloc (tree, heap, group_size);
+
+ alignment_support_scheme = vect_supportable_dr_alignment (first_dr);
+ gcc_assert (alignment_support_scheme);
+ gcc_assert (alignment_support_scheme == dr_aligned); /* FORNOW */
+
+ /* In case the vectorization factor (VF) is bigger than the number
+ of elements that we can fit in a vectype (nunits), we have to generate
+ more than one vector stmt - i.e - we need to "unroll" the
+ vector stmt by a factor VF/nunits. For more details see documentation in
+ vect_get_vec_def_for_copy_stmt. */
+
+ /* In case of interleaving (non-unit strided access):
+
+ S1: &base + 2 = x2
+ S2: &base = x0
+ S3: &base + 1 = x1
+ S4: &base + 3 = x3
+
+ We create vectorized stores starting from base address (the access of the
+ first stmt in the chain (S2 in the above example), when the last store stmt
+ of the chain (S4) is reached:
+
+ VS1: &base = vx2
+ VS2: &base + vec_size*1 = vx0
+ VS3: &base + vec_size*2 = vx1
+ VS4: &base + vec_size*3 = vx3
+
+ Then permutation statements are generated:
+
+ VS5: vx5 = VEC_INTERLEAVE_HIGH_EXPR < vx0, vx3 >
+ VS6: vx6 = VEC_INTERLEAVE_LOW_EXPR < vx0, vx3 >
+ ...
+
+ And they are put in STMT_VINFO_VEC_STMT of the corresponding scalar stmts
+ (the order of the data-refs in the output of vect_permute_store_chain
+ corresponds to the order of scalar stmts in the interleaving chain - see
+ the documentation of vect_permute_store_chain()).
+
+ In case of both multiple types and interleaving, above vector stores and
+ permutation stmts are created for every copy. The result vector stmts are
+ put in STMT_VINFO_VEC_STMT for the first copy and in the corresponding
+ STMT_VINFO_RELATED_STMT for the next copies.
+ */
+
+ prev_stmt_info = NULL;
+ for (j = 0; j < ncopies; j++)
+ {
+ gimple new_stmt;
+ gimple ptr_incr;
+
+ if (j == 0)
+ {
+ if (slp)
+ {
+ /* Get vectorized arguments for SLP_NODE. */
+ vect_get_slp_defs (slp_node, &vec_oprnds, NULL);
+
+ vec_oprnd = VEC_index (tree, vec_oprnds, 0);
+ }
+ else
+ {
+ /* For interleaved stores we collect vectorized defs for all the
+ stores in the group in DR_CHAIN and OPRNDS. DR_CHAIN is then
+ used as an input to vect_permute_store_chain(), and OPRNDS as
+ an input to vect_get_vec_def_for_stmt_copy() for the next copy.
+
+ If the store is not strided, GROUP_SIZE is 1, and DR_CHAIN and
+ OPRNDS are of size 1. */
+ next_stmt = first_stmt;
+ for (i = 0; i < group_size; i++)
+ {
+ /* Since gaps are not supported for interleaved stores,
+ GROUP_SIZE is the exact number of stmts in the chain.
+ Therefore, NEXT_STMT can't be NULL_TREE. In case that
+ there is no interleaving, GROUP_SIZE is 1, and only one
+ iteration of the loop will be executed. */
+ gcc_assert (next_stmt
+ && gimple_assign_single_p (next_stmt));
+ op = gimple_assign_rhs1 (next_stmt);
+
+ vec_oprnd = vect_get_vec_def_for_operand (op, next_stmt,
+ NULL);
+ VEC_quick_push(tree, dr_chain, vec_oprnd);
+ VEC_quick_push(tree, oprnds, vec_oprnd);
+ next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
+ }
+ }
+
+ /* We should have catched mismatched types earlier. */
+ gcc_assert (useless_type_conversion_p (vectype,
+ TREE_TYPE (vec_oprnd)));
+ dataref_ptr = vect_create_data_ref_ptr (first_stmt, NULL, NULL_TREE,
+ &dummy, &ptr_incr, false,
+ &inv_p, NULL);
+ gcc_assert (!inv_p);
+ }
+ else
+ {
+ /* For interleaved stores we created vectorized defs for all the
+ defs stored in OPRNDS in the previous iteration (previous copy).
+ DR_CHAIN is then used as an input to vect_permute_store_chain(),
+ and OPRNDS as an input to vect_get_vec_def_for_stmt_copy() for the
+ next copy.
+ If the store is not strided, GROUP_SIZE is 1, and DR_CHAIN and
+ OPRNDS are of size 1. */
+ for (i = 0; i < group_size; i++)
+ {
+ op = VEC_index (tree, oprnds, i);
+ vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt);
+ vec_oprnd = vect_get_vec_def_for_stmt_copy (dt, op);
+ VEC_replace(tree, dr_chain, i, vec_oprnd);
+ VEC_replace(tree, oprnds, i, vec_oprnd);
+ }
+ dataref_ptr =
+ bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt, NULL_TREE);
+ }
+
+ if (strided_store)
+ {
+ result_chain = VEC_alloc (tree, heap, group_size);
+ /* Permute. */
+ if (!vect_permute_store_chain (dr_chain, group_size, stmt, gsi,
+ &result_chain))
+ return false;
+ }
+
+ next_stmt = first_stmt;
+ for (i = 0; i < vec_num; i++)
+ {
+ if (i > 0)
+ /* Bump the vector pointer. */
+ dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
+ NULL_TREE);
+
+ if (slp)
+ vec_oprnd = VEC_index (tree, vec_oprnds, i);
+ else if (strided_store)
+ /* For strided stores vectorized defs are interleaved in
+ vect_permute_store_chain(). */
+ vec_oprnd = VEC_index (tree, result_chain, i);
+
+ data_ref = build_fold_indirect_ref (dataref_ptr);
+
+ /* Arguments are ready. Create the new vector stmt. */
+ new_stmt = gimple_build_assign (data_ref, vec_oprnd);
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+ mark_symbols_for_renaming (new_stmt);
+
+ if (slp)
+ continue;
+
+ if (j == 0)
+ STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
+ else
+ STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
+
+ prev_stmt_info = vinfo_for_stmt (new_stmt);
+ next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
+ if (!next_stmt)
+ break;
+ }
+ }
+
+ VEC_free (tree, heap, dr_chain);
+ VEC_free (tree, heap, oprnds);
+ if (result_chain)
+ VEC_free (tree, heap, result_chain);
+
+ return true;
+}
+
+/* vectorizable_load.
+
+ Check if STMT reads a non scalar data-ref (array/pointer/structure) that
+ can be vectorized.
+ If VEC_STMT is also passed, vectorize the STMT: create a vectorized
+ stmt to replace it, put it in VEC_STMT, and insert it at BSI.
+ Return FALSE if not a vectorizable STMT, TRUE otherwise. */
+
+static bool
+vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
+ slp_tree slp_node, slp_instance slp_node_instance)
+{
+ tree scalar_dest;
+ tree vec_dest = NULL;
+ tree data_ref = NULL;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ stmt_vec_info prev_stmt_info;
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ struct loop *containing_loop = (gimple_bb (stmt))->loop_father;
+ bool nested_in_vect_loop = nested_in_vect_loop_p (loop, stmt);
+ struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info), *first_dr;
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ tree new_temp;
+ int mode;
+ gimple new_stmt = NULL;
+ tree dummy;
+ enum dr_alignment_support alignment_support_scheme;
+ tree dataref_ptr = NULL_TREE;
+ gimple ptr_incr;
+ int nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ int ncopies;
+ int i, j, group_size;
+ tree msq = NULL_TREE, lsq;
+ tree offset = NULL_TREE;
+ tree realignment_token = NULL_TREE;
+ gimple phi = NULL;
+ VEC(tree,heap) *dr_chain = NULL;
+ bool strided_load = false;
+ gimple first_stmt;
+ tree scalar_type;
+ bool inv_p;
+ bool compute_in_loop = false;
+ struct loop *at_loop;
+ int vec_num;
+ bool slp = (slp_node != NULL);
+ bool slp_perm = false;
+ enum tree_code code;
+
+ /* Multiple types in SLP are handled by creating the appropriate number of
+ vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
+ case of SLP. */
+ if (slp)
+ ncopies = 1;
+ else
+ ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
+
+ gcc_assert (ncopies >= 1);
+
+ /* FORNOW. This restriction should be relaxed. */
+ if (nested_in_vect_loop && ncopies > 1)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "multiple types in nested loop.");
+ return false;
+ }
+
+ if (slp && SLP_INSTANCE_LOAD_PERMUTATION (slp_node_instance))
+ slp_perm = true;
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info))
+ return false;
+
+ if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
+ return false;
+
+ /* Is vectorizable load? */
+ if (!is_gimple_assign (stmt))
+ return false;
+
+ scalar_dest = gimple_assign_lhs (stmt);
+ if (TREE_CODE (scalar_dest) != SSA_NAME)
+ return false;
+
+ code = gimple_assign_rhs_code (stmt);
+ if (code != ARRAY_REF
+ && code != INDIRECT_REF
+ && !STMT_VINFO_STRIDED_ACCESS (stmt_info))
+ return false;
+
+ if (!STMT_VINFO_DATA_REF (stmt_info))
+ return false;
+
+ scalar_type = TREE_TYPE (DR_REF (dr));
+ mode = (int) TYPE_MODE (vectype);
+
+ /* FORNOW. In some cases can vectorize even if data-type not supported
+ (e.g. - data copies). */
+ if (optab_handler (mov_optab, mode)->insn_code == CODE_FOR_nothing)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Aligned load, but unsupported type.");
+ return false;
+ }
+
+ /* The vector component type needs to be trivially convertible to the
+ scalar lhs. This should always be the case. */
+ if (!useless_type_conversion_p (TREE_TYPE (scalar_dest), TREE_TYPE (vectype)))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "??? operands of different types");
+ return false;
+ }
+
+ /* Check if the load is a part of an interleaving chain. */
+ if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
+ {
+ strided_load = true;
+ /* FORNOW */
+ gcc_assert (! nested_in_vect_loop);
+
+ /* Check if interleaving is supported. */
+ if (!vect_strided_load_supported (vectype)
+ && !PURE_SLP_STMT (stmt_info) && !slp)
+ return false;
+ }
+
+ if (!vec_stmt) /* transformation not required. */
+ {
+ STMT_VINFO_TYPE (stmt_info) = load_vec_info_type;
+ vect_model_load_cost (stmt_info, ncopies, NULL);
+ return true;
+ }
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "transform load.");
+
+ /** Transform. **/
+
+ if (strided_load)
+ {
+ first_stmt = DR_GROUP_FIRST_DR (stmt_info);
+ /* Check if the chain of loads is already vectorized. */
+ if (STMT_VINFO_VEC_STMT (vinfo_for_stmt (first_stmt)))
+ {
+ *vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
+ return true;
+ }
+ first_dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (first_stmt));
+ group_size = DR_GROUP_SIZE (vinfo_for_stmt (first_stmt));
+
+ /* VEC_NUM is the number of vect stmts to be created for this group. */
+ if (slp)
+ {
+ strided_load = false;
+ vec_num = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
+ }
+ else
+ vec_num = group_size;
+
+ dr_chain = VEC_alloc (tree, heap, vec_num);
+ }
+ else
+ {
+ first_stmt = stmt;
+ first_dr = dr;
+ group_size = vec_num = 1;
+ }
+
+ alignment_support_scheme = vect_supportable_dr_alignment (first_dr);
+ gcc_assert (alignment_support_scheme);
+
+ /* In case the vectorization factor (VF) is bigger than the number
+ of elements that we can fit in a vectype (nunits), we have to generate
+ more than one vector stmt - i.e - we need to "unroll" the
+ vector stmt by a factor VF/nunits. In doing so, we record a pointer
+ from one copy of the vector stmt to the next, in the field
+ STMT_VINFO_RELATED_STMT. This is necessary in order to allow following
+ stages to find the correct vector defs to be used when vectorizing
+ stmts that use the defs of the current stmt. The example below illustrates
+ the vectorization process when VF=16 and nunits=4 (i.e - we need to create
+ 4 vectorized stmts):
+
+ before vectorization:
+ RELATED_STMT VEC_STMT
+ S1: x = memref - -
+ S2: z = x + 1 - -
+
+ step 1: vectorize stmt S1:
+ We first create the vector stmt VS1_0, and, as usual, record a
+ pointer to it in the STMT_VINFO_VEC_STMT of the scalar stmt S1.
+ Next, we create the vector stmt VS1_1, and record a pointer to
+ it in the STMT_VINFO_RELATED_STMT of the vector stmt VS1_0.
+ Similarly, for VS1_2 and VS1_3. This is the resulting chain of
+ stmts and pointers:
+ RELATED_STMT VEC_STMT
+ VS1_0: vx0 = memref0 VS1_1 -
+ VS1_1: vx1 = memref1 VS1_2 -
+ VS1_2: vx2 = memref2 VS1_3 -
+ VS1_3: vx3 = memref3 - -
+ S1: x = load - VS1_0
+ S2: z = x + 1 - -
+
+ See in documentation in vect_get_vec_def_for_stmt_copy for how the
+ information we recorded in RELATED_STMT field is used to vectorize
+ stmt S2. */
+
+ /* In case of interleaving (non-unit strided access):
+
+ S1: x2 = &base + 2
+ S2: x0 = &base
+ S3: x1 = &base + 1
+ S4: x3 = &base + 3
+
+ Vectorized loads are created in the order of memory accesses
+ starting from the access of the first stmt of the chain:
+
+ VS1: vx0 = &base
+ VS2: vx1 = &base + vec_size*1
+ VS3: vx3 = &base + vec_size*2
+ VS4: vx4 = &base + vec_size*3
+
+ Then permutation statements are generated:
+
+ VS5: vx5 = VEC_EXTRACT_EVEN_EXPR < vx0, vx1 >
+ VS6: vx6 = VEC_EXTRACT_ODD_EXPR < vx0, vx1 >
+ ...
+
+ And they are put in STMT_VINFO_VEC_STMT of the corresponding scalar stmts
+ (the order of the data-refs in the output of vect_permute_load_chain
+ corresponds to the order of scalar stmts in the interleaving chain - see
+ the documentation of vect_permute_load_chain()).
+ The generation of permutation stmts and recording them in
+ STMT_VINFO_VEC_STMT is done in vect_transform_strided_load().
+
+ In case of both multiple types and interleaving, the vector loads and
+ permutation stmts above are created for every copy. The result vector stmts
+ are put in STMT_VINFO_VEC_STMT for the first copy and in the corresponding
+ STMT_VINFO_RELATED_STMT for the next copies. */
+
+ /* If the data reference is aligned (dr_aligned) or potentially unaligned
+ on a target that supports unaligned accesses (dr_unaligned_supported)
+ we generate the following code:
+ p = initial_addr;
+ indx = 0;
+ loop {
+ p = p + indx * vectype_size;
+ vec_dest = *(p);
+ indx = indx + 1;
+ }
+
+ Otherwise, the data reference is potentially unaligned on a target that
+ does not support unaligned accesses (dr_explicit_realign_optimized) -
+ then generate the following code, in which the data in each iteration is
+ obtained by two vector loads, one from the previous iteration, and one
+ from the current iteration:
+ p1 = initial_addr;
+ msq_init = *(floor(p1))
+ p2 = initial_addr + VS - 1;
+ realignment_token = call target_builtin;
+ indx = 0;
+ loop {
+ p2 = p2 + indx * vectype_size
+ lsq = *(floor(p2))
+ vec_dest = realign_load (msq, lsq, realignment_token)
+ indx = indx + 1;
+ msq = lsq;
+ } */
+
+ /* If the misalignment remains the same throughout the execution of the
+ loop, we can create the init_addr and permutation mask at the loop
+ preheader. Otherwise, it needs to be created inside the loop.
+ This can only occur when vectorizing memory accesses in the inner-loop
+ nested within an outer-loop that is being vectorized. */
+
+ if (nested_in_vect_loop_p (loop, stmt)
+ && (TREE_INT_CST_LOW (DR_STEP (dr))
+ % GET_MODE_SIZE (TYPE_MODE (vectype)) != 0))
+ {
+ gcc_assert (alignment_support_scheme != dr_explicit_realign_optimized);
+ compute_in_loop = true;
+ }
+
+ if ((alignment_support_scheme == dr_explicit_realign_optimized
+ || alignment_support_scheme == dr_explicit_realign)
+ && !compute_in_loop)
+ {
+ msq = vect_setup_realignment (first_stmt, gsi, &realignment_token,
+ alignment_support_scheme, NULL_TREE,
+ &at_loop);
+ if (alignment_support_scheme == dr_explicit_realign_optimized)
+ {
+ phi = SSA_NAME_DEF_STMT (msq);
+ offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
+ }
+ }
+ else
+ at_loop = loop;
+
+ prev_stmt_info = NULL;
+ for (j = 0; j < ncopies; j++)
+ {
+ /* 1. Create the vector pointer update chain. */
+ if (j == 0)
+ dataref_ptr = vect_create_data_ref_ptr (first_stmt,
+ at_loop, offset,
+ &dummy, &ptr_incr, false,
+ &inv_p, NULL_TREE);
+ else
+ dataref_ptr =
+ bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt, NULL_TREE);
+
+ for (i = 0; i < vec_num; i++)
+ {
+ if (i > 0)
+ dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
+ NULL_TREE);
+
+ /* 2. Create the vector-load in the loop. */
+ switch (alignment_support_scheme)
+ {
+ case dr_aligned:
+ gcc_assert (aligned_access_p (first_dr));
+ data_ref = build_fold_indirect_ref (dataref_ptr);
+ break;
+ case dr_unaligned_supported:
+ {
+ int mis = DR_MISALIGNMENT (first_dr);
+ tree tmis = (mis == -1 ? size_zero_node : size_int (mis));
+
+ tmis = size_binop (MULT_EXPR, tmis, size_int(BITS_PER_UNIT));
+ data_ref =
+ build2 (MISALIGNED_INDIRECT_REF, vectype, dataref_ptr, tmis);
+ break;
+ }
+ case dr_explicit_realign:
+ {
+ tree ptr, bump;
+ tree vs_minus_1 = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
+
+ if (compute_in_loop)
+ msq = vect_setup_realignment (first_stmt, gsi,
+ &realignment_token,
+ dr_explicit_realign,
+ dataref_ptr, NULL);
+
+ data_ref = build1 (ALIGN_INDIRECT_REF, vectype, dataref_ptr);
+ vec_dest = vect_create_destination_var (scalar_dest, vectype);
+ new_stmt = gimple_build_assign (vec_dest, data_ref);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_assign_set_lhs (new_stmt, new_temp);
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+ copy_virtual_operands (new_stmt, stmt);
+ mark_symbols_for_renaming (new_stmt);
+ msq = new_temp;
+
+ bump = size_binop (MULT_EXPR, vs_minus_1,
+ TYPE_SIZE_UNIT (scalar_type));
+ ptr = bump_vector_ptr (dataref_ptr, NULL, gsi, stmt, bump);
+ data_ref = build1 (ALIGN_INDIRECT_REF, vectype, ptr);
+ break;
+ }
+ case dr_explicit_realign_optimized:
+ data_ref = build1 (ALIGN_INDIRECT_REF, vectype, dataref_ptr);
+ break;
+ default:
+ gcc_unreachable ();
+ }
+ vec_dest = vect_create_destination_var (scalar_dest, vectype);
+ new_stmt = gimple_build_assign (vec_dest, data_ref);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_assign_set_lhs (new_stmt, new_temp);
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+ mark_symbols_for_renaming (new_stmt);
+
+ /* 3. Handle explicit realignment if necessary/supported. Create in
+ loop: vec_dest = realign_load (msq, lsq, realignment_token) */
+ if (alignment_support_scheme == dr_explicit_realign_optimized
+ || alignment_support_scheme == dr_explicit_realign)
+ {
+ tree tmp;
+
+ lsq = gimple_assign_lhs (new_stmt);
+ if (!realignment_token)
+ realignment_token = dataref_ptr;
+ vec_dest = vect_create_destination_var (scalar_dest, vectype);
+ tmp = build3 (REALIGN_LOAD_EXPR, vectype, msq, lsq,
+ realignment_token);
+ new_stmt = gimple_build_assign (vec_dest, tmp);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_assign_set_lhs (new_stmt, new_temp);
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+
+ if (alignment_support_scheme == dr_explicit_realign_optimized)
+ {
+ gcc_assert (phi);
+ if (i == vec_num - 1 && j == ncopies - 1)
+ add_phi_arg (phi, lsq, loop_latch_edge (containing_loop));
+ msq = lsq;
+ }
+ }
+
+ /* 4. Handle invariant-load. */
+ if (inv_p)
+ {
+ gcc_assert (!strided_load);
+ gcc_assert (nested_in_vect_loop_p (loop, stmt));
+ if (j == 0)
+ {
+ int k;
+ tree t = NULL_TREE;
+ tree vec_inv, bitpos, bitsize = TYPE_SIZE (scalar_type);
+
+ /* CHECKME: bitpos depends on endianess? */
+ bitpos = bitsize_zero_node;
+ vec_inv = build3 (BIT_FIELD_REF, scalar_type, new_temp,
+ bitsize, bitpos);
+ vec_dest =
+ vect_create_destination_var (scalar_dest, NULL_TREE);
+ new_stmt = gimple_build_assign (vec_dest, vec_inv);
+ new_temp = make_ssa_name (vec_dest, new_stmt);
+ gimple_assign_set_lhs (new_stmt, new_temp);
+ vect_finish_stmt_generation (stmt, new_stmt, gsi);
+
+ for (k = nunits - 1; k >= 0; --k)
+ t = tree_cons (NULL_TREE, new_temp, t);
+ /* FIXME: use build_constructor directly. */
+ vec_inv = build_constructor_from_list (vectype, t);
+ new_temp = vect_init_vector (stmt, vec_inv, vectype, gsi);
+ new_stmt = SSA_NAME_DEF_STMT (new_temp);
+ }
+ else
+ gcc_unreachable (); /* FORNOW. */
+ }
+
+ /* Collect vector loads and later create their permutation in
+ vect_transform_strided_load (). */
+ if (strided_load || slp_perm)
+ VEC_quick_push (tree, dr_chain, new_temp);
+
+ /* Store vector loads in the corresponding SLP_NODE. */
+ if (slp && !slp_perm)
+ VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt);
+ }
+
+ if (slp && !slp_perm)
+ continue;
+
+ if (slp_perm)
+ {
+ if (!vect_transform_slp_perm_load (stmt, dr_chain, gsi,
+ LOOP_VINFO_VECT_FACTOR (loop_vinfo),
+ slp_node_instance, false))
+ {
+ VEC_free (tree, heap, dr_chain);
+ return false;
+ }
+ }
+ else
+ {
+ if (strided_load)
+ {
+ if (!vect_transform_strided_load (stmt, dr_chain, group_size, gsi))
+ return false;
+
+ *vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
+ VEC_free (tree, heap, dr_chain);
+ dr_chain = VEC_alloc (tree, heap, group_size);
+ }
+ else
+ {
+ if (j == 0)
+ STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
+ else
+ STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
+ prev_stmt_info = vinfo_for_stmt (new_stmt);
+ }
+ }
+ }
+
+ if (dr_chain)
+ VEC_free (tree, heap, dr_chain);
+
+ return true;
+}
+
+/* Function vect_is_simple_cond.
+
+ Input:
+ LOOP - the loop that is being vectorized.
+ COND - Condition that is checked for simple use.
+
+ Returns whether a COND can be vectorized. Checks whether
+ condition operands are supportable using vec_is_simple_use. */
+
+static bool
+vect_is_simple_cond (tree cond, loop_vec_info loop_vinfo)
+{
+ tree lhs, rhs;
+ tree def;
+ enum vect_def_type dt;
+
+ if (!COMPARISON_CLASS_P (cond))
+ return false;
+
+ lhs = TREE_OPERAND (cond, 0);
+ rhs = TREE_OPERAND (cond, 1);
+
+ if (TREE_CODE (lhs) == SSA_NAME)
+ {
+ gimple lhs_def_stmt = SSA_NAME_DEF_STMT (lhs);
+ if (!vect_is_simple_use (lhs, loop_vinfo, &lhs_def_stmt, &def, &dt))
+ return false;
+ }
+ else if (TREE_CODE (lhs) != INTEGER_CST && TREE_CODE (lhs) != REAL_CST
+ && TREE_CODE (lhs) != FIXED_CST)
+ return false;
+
+ if (TREE_CODE (rhs) == SSA_NAME)
+ {
+ gimple rhs_def_stmt = SSA_NAME_DEF_STMT (rhs);
+ if (!vect_is_simple_use (rhs, loop_vinfo, &rhs_def_stmt, &def, &dt))
+ return false;
+ }
+ else if (TREE_CODE (rhs) != INTEGER_CST && TREE_CODE (rhs) != REAL_CST
+ && TREE_CODE (rhs) != FIXED_CST)
+ return false;
+
+ return true;
+}
+
+/* vectorizable_condition.
+
+ Check if STMT is conditional modify expression that can be vectorized.
+ If VEC_STMT is also passed, vectorize the STMT: create a vectorized
+ stmt using VEC_COND_EXPR to replace it, put it in VEC_STMT, and insert it
+ at BSI.
+
+ Return FALSE if not a vectorizable STMT, TRUE otherwise. */
+
+static bool
+vectorizable_condition (gimple stmt, gimple_stmt_iterator *gsi,
+ gimple *vec_stmt)
+{
+ tree scalar_dest = NULL_TREE;
+ tree vec_dest = NULL_TREE;
+ tree op = NULL_TREE;
+ tree cond_expr, then_clause, else_clause;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ tree vectype = STMT_VINFO_VECTYPE (stmt_info);
+ tree vec_cond_lhs, vec_cond_rhs, vec_then_clause, vec_else_clause;
+ tree vec_compare, vec_cond_expr;
+ tree new_temp;
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ enum machine_mode vec_mode;
+ tree def;
+ enum vect_def_type dt;
+ int nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ int ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
+ enum tree_code code;
+
+ gcc_assert (ncopies >= 1);
+ if (ncopies > 1)
+ return false; /* FORNOW */
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info))
+ return false;
+
+ if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
+ return false;
+
+ /* FORNOW: SLP not supported. */
+ if (STMT_SLP_TYPE (stmt_info))
+ return false;
+
+ /* FORNOW: not yet supported. */
+ if (STMT_VINFO_LIVE_P (stmt_info))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "value used after loop.");
+ return false;
+ }
+
+ /* Is vectorizable conditional operation? */
+ if (!is_gimple_assign (stmt))
+ return false;
+
+ code = gimple_assign_rhs_code (stmt);
+
+ if (code != COND_EXPR)
+ return false;
+
+ gcc_assert (gimple_assign_single_p (stmt));
+ op = gimple_assign_rhs1 (stmt);
+ cond_expr = TREE_OPERAND (op, 0);
+ then_clause = TREE_OPERAND (op, 1);
+ else_clause = TREE_OPERAND (op, 2);
+
+ if (!vect_is_simple_cond (cond_expr, loop_vinfo))
+ return false;
+
+ /* We do not handle two different vector types for the condition
+ and the values. */
+ if (TREE_TYPE (TREE_OPERAND (cond_expr, 0)) != TREE_TYPE (vectype))
+ return false;
+
+ if (TREE_CODE (then_clause) == SSA_NAME)
+ {
+ gimple then_def_stmt = SSA_NAME_DEF_STMT (then_clause);
+ if (!vect_is_simple_use (then_clause, loop_vinfo,
+ &then_def_stmt, &def, &dt))
+ return false;
+ }
+ else if (TREE_CODE (then_clause) != INTEGER_CST
+ && TREE_CODE (then_clause) != REAL_CST
+ && TREE_CODE (then_clause) != FIXED_CST)
+ return false;
+
+ if (TREE_CODE (else_clause) == SSA_NAME)
+ {
+ gimple else_def_stmt = SSA_NAME_DEF_STMT (else_clause);
+ if (!vect_is_simple_use (else_clause, loop_vinfo,
+ &else_def_stmt, &def, &dt))
+ return false;
+ }
+ else if (TREE_CODE (else_clause) != INTEGER_CST
+ && TREE_CODE (else_clause) != REAL_CST
+ && TREE_CODE (else_clause) != FIXED_CST)
+ return false;
+
+
+ vec_mode = TYPE_MODE (vectype);
+
+ if (!vec_stmt)
+ {
+ STMT_VINFO_TYPE (stmt_info) = condition_vec_info_type;
+ return expand_vec_cond_expr_p (op, vec_mode);
+ }
+
+ /* Transform */
+
+ /* Handle def. */
+ scalar_dest = gimple_assign_lhs (stmt);
+ vec_dest = vect_create_destination_var (scalar_dest, vectype);
+
+ /* Handle cond expr. */
+ vec_cond_lhs =
+ vect_get_vec_def_for_operand (TREE_OPERAND (cond_expr, 0), stmt, NULL);
+ vec_cond_rhs =
+ vect_get_vec_def_for_operand (TREE_OPERAND (cond_expr, 1), stmt, NULL);
+ vec_then_clause = vect_get_vec_def_for_operand (then_clause, stmt, NULL);
+ vec_else_clause = vect_get_vec_def_for_operand (else_clause, stmt, NULL);
+
+ /* Arguments are ready. Create the new vector stmt. */
+ vec_compare = build2 (TREE_CODE (cond_expr), vectype,
+ vec_cond_lhs, vec_cond_rhs);
+ vec_cond_expr = build3 (VEC_COND_EXPR, vectype,
+ vec_compare, vec_then_clause, vec_else_clause);
+
+ *vec_stmt = gimple_build_assign (vec_dest, vec_cond_expr);
+ new_temp = make_ssa_name (vec_dest, *vec_stmt);
+ gimple_assign_set_lhs (*vec_stmt, new_temp);
+ vect_finish_stmt_generation (stmt, *vec_stmt, gsi);
+
+ return true;
+}
+
+
+/* Function vect_analyze_operations.
+
+ Scan the loop stmts and make sure they are all vectorizable. */
+
+bool
+vect_analyze_operations (loop_vec_info loop_vinfo)
+{
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
+ int nbbs = loop->num_nodes;
+ gimple_stmt_iterator si;
+ unsigned int vectorization_factor = 0;
+ int i;
+ bool ok;
+ gimple phi;
+ stmt_vec_info stmt_info;
+ bool need_to_vectorize = false;
+ int min_profitable_iters;
+ int min_scalar_loop_bound;
+ unsigned int th;
+ bool only_slp_in_loop = true;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "=== vect_analyze_operations ===");
+
+ gcc_assert (LOOP_VINFO_VECT_FACTOR (loop_vinfo));
+ vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+
+ for (i = 0; i < nbbs; i++)
+ {
+ basic_block bb = bbs[i];
+
+ for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ phi = gsi_stmt (si);
+ ok = true;
+
+ stmt_info = vinfo_for_stmt (phi);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "examining phi: ");
+ print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
+ }
+
+ if (! is_loop_header_bb_p (bb))
+ {
+ /* inner-loop loop-closed exit phi in outer-loop vectorization
+ (i.e. a phi in the tail of the outer-loop).
+ FORNOW: we currently don't support the case that these phis
+ are not used in the outerloop, cause this case requires
+ to actually do something here. */
+ if (!STMT_VINFO_RELEVANT_P (stmt_info)
+ || STMT_VINFO_LIVE_P (stmt_info))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump,
+ "Unsupported loop-closed phi in outer-loop.");
+ return false;
+ }
+ continue;
+ }
+
+ gcc_assert (stmt_info);
+
+ if (STMT_VINFO_LIVE_P (stmt_info))
+ {
+ /* FORNOW: not yet supported. */
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "not vectorized: value used after loop.");
+ return false;
+ }
+
+ if (STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_loop
+ && STMT_VINFO_DEF_TYPE (stmt_info) != vect_induction_def)
+ {
+ /* A scalar-dependence cycle that we don't support. */
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "not vectorized: scalar dependence cycle.");
+ return false;
+ }
+
+ if (STMT_VINFO_RELEVANT_P (stmt_info))
+ {
+ need_to_vectorize = true;
+ if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def)
+ ok = vectorizable_induction (phi, NULL, NULL);
+ }
+
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump,
+ "not vectorized: relevant phi not supported: ");
+ print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
+ }
+ return false;
+ }
+ }
+
+ for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
+ {
+ gimple stmt = gsi_stmt (si);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ enum vect_relevant relevance = STMT_VINFO_RELEVANT (stmt_info);
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "==> examining statement: ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+
+ gcc_assert (stmt_info);
+
+ /* skip stmts which do not need to be vectorized.
+ this is expected to include:
+ - the COND_EXPR which is the loop exit condition
+ - any LABEL_EXPRs in the loop
+ - computations that are used only for array indexing or loop
+ control */
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info)
+ && !STMT_VINFO_LIVE_P (stmt_info))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "irrelevant.");
+ continue;
+ }
+
+ switch (STMT_VINFO_DEF_TYPE (stmt_info))
+ {
+ case vect_loop_def:
+ break;
+
+ case vect_reduction_def:
+ gcc_assert (relevance == vect_used_in_outer
+ || relevance == vect_used_in_outer_by_reduction
+ || relevance == vect_unused_in_loop);
+ break;
+
+ case vect_induction_def:
+ case vect_constant_def:
+ case vect_invariant_def:
+ case vect_unknown_def_type:
+ default:
+ gcc_unreachable ();
+ }
+
+ if (STMT_VINFO_RELEVANT_P (stmt_info))
+ {
+ gcc_assert (!VECTOR_MODE_P (TYPE_MODE (gimple_expr_type (stmt))));
+ gcc_assert (STMT_VINFO_VECTYPE (stmt_info));
+ need_to_vectorize = true;
+ }
+
+ ok = true;
+ if (STMT_VINFO_RELEVANT_P (stmt_info)
+ || STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def)
+ ok = (vectorizable_type_promotion (stmt, NULL, NULL, NULL)
+ || vectorizable_type_demotion (stmt, NULL, NULL, NULL)
+ || vectorizable_conversion (stmt, NULL, NULL, NULL)
+ || vectorizable_operation (stmt, NULL, NULL, NULL)
+ || vectorizable_assignment (stmt, NULL, NULL, NULL)
+ || vectorizable_load (stmt, NULL, NULL, NULL, NULL)
+ || vectorizable_call (stmt, NULL, NULL)
+ || vectorizable_store (stmt, NULL, NULL, NULL)
+ || vectorizable_condition (stmt, NULL, NULL)
+ || vectorizable_reduction (stmt, NULL, NULL));
+
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump, "not vectorized: relevant stmt not ");
+ fprintf (vect_dump, "supported: ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+ return false;
+ }
+
+ /* Stmts that are (also) "live" (i.e. - that are used out of the loop)
+ need extra handling, except for vectorizable reductions. */
+ if (STMT_VINFO_LIVE_P (stmt_info)
+ && STMT_VINFO_TYPE (stmt_info) != reduc_vec_info_type)
+ ok = vectorizable_live_operation (stmt, NULL, NULL);
+
+ if (!ok)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ {
+ fprintf (vect_dump, "not vectorized: live stmt not ");
+ fprintf (vect_dump, "supported: ");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+ return false;
+ }
+
+ if (!PURE_SLP_STMT (stmt_info))
+ {
+ /* STMT needs loop-based vectorization. */
+ only_slp_in_loop = false;
+
+ /* Groups of strided accesses whose size is not a power of 2 are
+ not vectorizable yet using loop-vectorization. Therefore, if
+ this stmt feeds non-SLP-able stmts (i.e., this stmt has to be
+ both SLPed and loop-based vectorized), the loop cannot be
+ vectorized. */
+ if (STMT_VINFO_STRIDED_ACCESS (stmt_info)
+ && exact_log2 (DR_GROUP_SIZE (vinfo_for_stmt (
+ DR_GROUP_FIRST_DR (stmt_info)))) == -1)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "not vectorized: the size of group "
+ "of strided accesses is not a power of 2");
+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+ }
+ return false;
+ }
+ }
+ } /* stmts in bb */
+ } /* bbs */
+
+ /* All operations in the loop are either irrelevant (deal with loop
+ control, or dead), or only used outside the loop and can be moved
+ out of the loop (e.g. invariants, inductions). The loop can be
+ optimized away by scalar optimizations. We're better off not
+ touching this loop. */
+ if (!need_to_vectorize)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump,
+ "All the computation can be taken out of the loop.");
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump,
+ "not vectorized: redundant loop. no profit to vectorize.");
+ return false;
+ }
+
+ /* If all the stmts in the loop can be SLPed, we perform only SLP, and
+ vectorization factor of the loop is the unrolling factor required by the
+ SLP instances. If that unrolling factor is 1, we say, that we perform
+ pure SLP on loop - cross iteration parallelism is not exploited. */
+ if (only_slp_in_loop)
+ vectorization_factor = LOOP_VINFO_SLP_UNROLLING_FACTOR (loop_vinfo);
+ else
+ vectorization_factor = least_common_multiple (vectorization_factor,
+ LOOP_VINFO_SLP_UNROLLING_FACTOR (loop_vinfo));
+
+ LOOP_VINFO_VECT_FACTOR (loop_vinfo) = vectorization_factor;
+
+ if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
+ && vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump,
+ "vectorization_factor = %d, niters = " HOST_WIDE_INT_PRINT_DEC,
+ vectorization_factor, LOOP_VINFO_INT_NITERS (loop_vinfo));
+
+ if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
+ && (LOOP_VINFO_INT_NITERS (loop_vinfo) < vectorization_factor))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "not vectorized: iteration count too small.");
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump,"not vectorized: iteration count smaller than "
+ "vectorization factor.");
+ return false;
+ }
+
+ /* Analyze cost. Decide if worth while to vectorize. */
+
+ /* Once VF is set, SLP costs should be updated since the number of created
+ vector stmts depends on VF. */
+ vect_update_slp_costs_according_to_vf (loop_vinfo);
+
+ min_profitable_iters = vect_estimate_min_profitable_iters (loop_vinfo);
+ LOOP_VINFO_COST_MODEL_MIN_ITERS (loop_vinfo) = min_profitable_iters;
+
+ if (min_profitable_iters < 0)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "not vectorized: vectorization not profitable.");
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "not vectorized: vector version will never be "
+ "profitable.");
+ return false;
+ }
+
+ min_scalar_loop_bound = ((PARAM_VALUE (PARAM_MIN_VECT_LOOP_BOUND)
+ * vectorization_factor) - 1);
+
+ /* Use the cost model only if it is more conservative than user specified
+ threshold. */
+
+ th = (unsigned) min_scalar_loop_bound;
+ if (min_profitable_iters
+ && (!min_scalar_loop_bound
+ || min_profitable_iters > min_scalar_loop_bound))
+ th = (unsigned) min_profitable_iters;
+
+ if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
+ && LOOP_VINFO_INT_NITERS (loop_vinfo) <= th)
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump, "not vectorized: vectorization not "
+ "profitable.");
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "not vectorized: iteration count smaller than "
+ "user specified loop bound parameter or minimum "
+ "profitable iterations (whichever is more conservative).");
+ return false;
+ }
+
+ if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
+ || LOOP_VINFO_INT_NITERS (loop_vinfo) % vectorization_factor != 0
+ || LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "epilog loop required.");
+ if (!vect_can_advance_ivs_p (loop_vinfo))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump,
+ "not vectorized: can't create epilog loop 1.");
+ return false;
+ }
+ if (!slpeel_can_duplicate_loop_p (loop, single_exit (loop)))
+ {
+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
+ fprintf (vect_dump,
+ "not vectorized: can't create epilog loop 2.");
+ return false;
+ }
+ }
+
+ return true;
+}
+
+
+/* Function vect_transform_stmt.
+
+ Create a vectorized stmt to replace STMT, and insert it at BSI. */
+
+bool
+vect_transform_stmt (gimple stmt, gimple_stmt_iterator *gsi,
+ bool *strided_store, slp_tree slp_node,
+ slp_instance slp_node_instance)
+{
+ bool is_store = false;
+ gimple vec_stmt = NULL;
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ gimple orig_stmt_in_pattern;
+ bool done;
+ loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+
+ switch (STMT_VINFO_TYPE (stmt_info))
+ {
+ case type_demotion_vec_info_type:
+ done = vectorizable_type_demotion (stmt, gsi, &vec_stmt, slp_node);
+ gcc_assert (done);
+ break;
+
+ case type_promotion_vec_info_type:
+ done = vectorizable_type_promotion (stmt, gsi, &vec_stmt, slp_node);
+ gcc_assert (done);
+ break;
+
+ case type_conversion_vec_info_type:
+ done = vectorizable_conversion (stmt, gsi, &vec_stmt, slp_node);
+ gcc_assert (done);
+ break;
+
+ case induc_vec_info_type:
+ gcc_assert (!slp_node);
+ done = vectorizable_induction (stmt, gsi, &vec_stmt);
+ gcc_assert (done);
+ break;
+
+ case op_vec_info_type:
+ done = vectorizable_operation (stmt, gsi, &vec_stmt, slp_node);
+ gcc_assert (done);
+ break;
+
+ case assignment_vec_info_type:
+ done = vectorizable_assignment (stmt, gsi, &vec_stmt, slp_node);
+ gcc_assert (done);
+ break;
+
+ case load_vec_info_type:
+ done = vectorizable_load (stmt, gsi, &vec_stmt, slp_node,
+ slp_node_instance);
+ gcc_assert (done);
+ break;
+
+ case store_vec_info_type:
+ done = vectorizable_store (stmt, gsi, &vec_stmt, slp_node);
+ gcc_assert (done);
+ if (STMT_VINFO_STRIDED_ACCESS (stmt_info) && !slp_node)
+ {
+ /* In case of interleaving, the whole chain is vectorized when the
+ last store in the chain is reached. Store stmts before the last
+ one are skipped, and there vec_stmt_info shouldn't be freed
+ meanwhile. */
+ *strided_store = true;
+ if (STMT_VINFO_VEC_STMT (stmt_info))
+ is_store = true;
+ }
+ else
+ is_store = true;
+ break;
+
+ case condition_vec_info_type:
+ gcc_assert (!slp_node);
+ done = vectorizable_condition (stmt, gsi, &vec_stmt);
+ gcc_assert (done);
+ break;
+
+ case call_vec_info_type:
+ gcc_assert (!slp_node);
+ done = vectorizable_call (stmt, gsi, &vec_stmt);
+ break;
+
+ case reduc_vec_info_type:
+ gcc_assert (!slp_node);
+ done = vectorizable_reduction (stmt, gsi, &vec_stmt);
+ gcc_assert (done);
+ break;
+
+ default:
+ if (!STMT_VINFO_LIVE_P (stmt_info))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "stmt not supported.");
+ gcc_unreachable ();
+ }
+ }
+
+ /* Handle inner-loop stmts whose DEF is used in the loop-nest that
+ is being vectorized, but outside the immediately enclosing loop. */
+ if (vec_stmt
+ && nested_in_vect_loop_p (loop, stmt)
+ && STMT_VINFO_TYPE (stmt_info) != reduc_vec_info_type
+ && (STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_outer
+ || STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_outer_by_reduction))
+ {
+ struct loop *innerloop = loop->inner;
+ imm_use_iterator imm_iter;
+ use_operand_p use_p;
+ tree scalar_dest;
+ gimple exit_phi;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Record the vdef for outer-loop vectorization.");
+
+ /* Find the relevant loop-exit phi-node, and reord the vec_stmt there
+ (to be used when vectorizing outer-loop stmts that use the DEF of
+ STMT). */
+ if (gimple_code (stmt) == GIMPLE_PHI)
+ scalar_dest = PHI_RESULT (stmt);
+ else
+ scalar_dest = gimple_assign_lhs (stmt);
+
+ FOR_EACH_IMM_USE_FAST (use_p, imm_iter, scalar_dest)
+ {
+ if (!flow_bb_inside_loop_p (innerloop, gimple_bb (USE_STMT (use_p))))
+ {
+ exit_phi = USE_STMT (use_p);
+ STMT_VINFO_VEC_STMT (vinfo_for_stmt (exit_phi)) = vec_stmt;
+ }
+ }
+ }
+
+ /* Handle stmts whose DEF is used outside the loop-nest that is
+ being vectorized. */
+ if (STMT_VINFO_LIVE_P (stmt_info)
+ && STMT_VINFO_TYPE (stmt_info) != reduc_vec_info_type)
+ {
+ done = vectorizable_live_operation (stmt, gsi, &vec_stmt);
+ gcc_assert (done);
+ }
+
+ if (vec_stmt)
+ {
+ STMT_VINFO_VEC_STMT (stmt_info) = vec_stmt;
+ orig_stmt_in_pattern = STMT_VINFO_RELATED_STMT (stmt_info);
+ if (orig_stmt_in_pattern)
+ {
+ stmt_vec_info stmt_vinfo = vinfo_for_stmt (orig_stmt_in_pattern);
+ /* STMT was inserted by the vectorizer to replace a computation idiom.
+ ORIG_STMT_IN_PATTERN is a stmt in the original sequence that
+ computed this idiom. We need to record a pointer to VEC_STMT in
+ the stmt_info of ORIG_STMT_IN_PATTERN. See more details in the
+ documentation of vect_pattern_recog. */
+ if (STMT_VINFO_IN_PATTERN_P (stmt_vinfo))
+ {
+ gcc_assert (STMT_VINFO_RELATED_STMT (stmt_vinfo) == stmt);
+ STMT_VINFO_VEC_STMT (stmt_vinfo) = vec_stmt;
+ }
+ }
+ }
+
+ return is_store;
+}
+
+
+/* Remove a group of stores (for SLP or interleaving), free their
+ stmt_vec_info. */
+
+void
+vect_remove_stores (gimple first_stmt)
+{
+ gimple next = first_stmt;
+ gimple tmp;
+ gimple_stmt_iterator next_si;
+
+ while (next)
+ {
+ /* Free the attached stmt_vec_info and remove the stmt. */
+ next_si = gsi_for_stmt (next);
+ gsi_remove (&next_si, true);
+ tmp = DR_GROUP_NEXT_DR (vinfo_for_stmt (next));
+ free_stmt_vec_info (next);
+ next = tmp;
+ }
+}
+
+
+/* Function new_stmt_vec_info.
+
+ Create and initialize a new stmt_vec_info struct for STMT. */
+
+stmt_vec_info
+new_stmt_vec_info (gimple stmt, loop_vec_info loop_vinfo)
+{
+ stmt_vec_info res;
+ res = (stmt_vec_info) xcalloc (1, sizeof (struct _stmt_vec_info));
+
+ STMT_VINFO_TYPE (res) = undef_vec_info_type;
+ STMT_VINFO_STMT (res) = stmt;
+ STMT_VINFO_LOOP_VINFO (res) = loop_vinfo;
+ STMT_VINFO_RELEVANT (res) = 0;
+ STMT_VINFO_LIVE_P (res) = false;
+ STMT_VINFO_VECTYPE (res) = NULL;
+ STMT_VINFO_VEC_STMT (res) = NULL;
+ STMT_VINFO_IN_PATTERN_P (res) = false;
+ STMT_VINFO_RELATED_STMT (res) = NULL;
+ STMT_VINFO_DATA_REF (res) = NULL;
+
+ STMT_VINFO_DR_BASE_ADDRESS (res) = NULL;
+ STMT_VINFO_DR_OFFSET (res) = NULL;
+ STMT_VINFO_DR_INIT (res) = NULL;
+ STMT_VINFO_DR_STEP (res) = NULL;
+ STMT_VINFO_DR_ALIGNED_TO (res) = NULL;
+
+ if (gimple_code (stmt) == GIMPLE_PHI
+ && is_loop_header_bb_p (gimple_bb (stmt)))
+ STMT_VINFO_DEF_TYPE (res) = vect_unknown_def_type;
+ else
+ STMT_VINFO_DEF_TYPE (res) = vect_loop_def;
+ STMT_VINFO_SAME_ALIGN_REFS (res) = VEC_alloc (dr_p, heap, 5);
+ STMT_VINFO_INSIDE_OF_LOOP_COST (res) = 0;
+ STMT_VINFO_OUTSIDE_OF_LOOP_COST (res) = 0;
+ STMT_SLP_TYPE (res) = 0;
+ DR_GROUP_FIRST_DR (res) = NULL;
+ DR_GROUP_NEXT_DR (res) = NULL;
+ DR_GROUP_SIZE (res) = 0;
+ DR_GROUP_STORE_COUNT (res) = 0;
+ DR_GROUP_GAP (res) = 0;
+ DR_GROUP_SAME_DR_STMT (res) = NULL;
+ DR_GROUP_READ_WRITE_DEPENDENCE (res) = false;
+
+ return res;
+}
+
+
+/* Create a hash table for stmt_vec_info. */
+
+void
+init_stmt_vec_info_vec (void)
+{
+ gcc_assert (!stmt_vec_info_vec);
+ stmt_vec_info_vec = VEC_alloc (vec_void_p, heap, 50);
+}
+
+
+/* Free hash table for stmt_vec_info. */
+
+void
+free_stmt_vec_info_vec (void)
+{
+ gcc_assert (stmt_vec_info_vec);
+ VEC_free (vec_void_p, heap, stmt_vec_info_vec);
+}
+
+
+/* Free stmt vectorization related info. */
+
+void
+free_stmt_vec_info (gimple stmt)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+
+ if (!stmt_info)
+ return;
+
+ VEC_free (dr_p, heap, STMT_VINFO_SAME_ALIGN_REFS (stmt_info));
+ set_vinfo_for_stmt (stmt, NULL);
+ free (stmt_info);
+}
+
+
+/* Function get_vectype_for_scalar_type.
+
+ Returns the vector type corresponding to SCALAR_TYPE as supported
+ by the target. */
+
+tree
+get_vectype_for_scalar_type (tree scalar_type)
+{
+ enum machine_mode inner_mode = TYPE_MODE (scalar_type);
+ int nbytes = GET_MODE_SIZE (inner_mode);
+ int nunits;
+ tree vectype;
+
+ if (nbytes == 0 || nbytes >= UNITS_PER_SIMD_WORD (inner_mode))
+ return NULL_TREE;
+
+ /* FORNOW: Only a single vector size per mode (UNITS_PER_SIMD_WORD)
+ is expected. */
+ nunits = UNITS_PER_SIMD_WORD (inner_mode) / nbytes;
+
+ vectype = build_vector_type (scalar_type, nunits);
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "get vectype with %d units of type ", nunits);
+ print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
+ }
+
+ if (!vectype)
+ return NULL_TREE;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "vectype: ");
+ print_generic_expr (vect_dump, vectype, TDF_SLIM);
+ }
+
+ if (!VECTOR_MODE_P (TYPE_MODE (vectype))
+ && !INTEGRAL_MODE_P (TYPE_MODE (vectype)))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "mode not supported by target.");
+ return NULL_TREE;
+ }
+
+ return vectype;
+}
+
+/* Function vect_is_simple_use.
+
+ Input:
+ LOOP - the loop that is being vectorized.
+ OPERAND - operand of a stmt in LOOP.
+ DEF - the defining stmt in case OPERAND is an SSA_NAME.
+
+ Returns whether a stmt with OPERAND can be vectorized.
+ Supportable operands are constants, loop invariants, and operands that are
+ defined by the current iteration of the loop. Unsupportable operands are
+ those that are defined by a previous iteration of the loop (as is the case
+ in reduction/induction computations). */
+
+bool
+vect_is_simple_use (tree operand, loop_vec_info loop_vinfo, gimple *def_stmt,
+ tree *def, enum vect_def_type *dt)
+{
+ basic_block bb;
+ stmt_vec_info stmt_vinfo;
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+
+ *def_stmt = NULL;
+ *def = NULL_TREE;
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "vect_is_simple_use: operand ");
+ print_generic_expr (vect_dump, operand, TDF_SLIM);
+ }
+
+ if (TREE_CODE (operand) == INTEGER_CST || TREE_CODE (operand) == REAL_CST)
+ {
+ *dt = vect_constant_def;
+ return true;
+ }
+ if (is_gimple_min_invariant (operand))
+ {
+ *def = operand;
+ *dt = vect_invariant_def;
+ return true;
+ }
+
+ if (TREE_CODE (operand) == PAREN_EXPR)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "non-associatable copy.");
+ operand = TREE_OPERAND (operand, 0);
+ }
+ if (TREE_CODE (operand) != SSA_NAME)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "not ssa-name.");
+ return false;
+ }
+
+ *def_stmt = SSA_NAME_DEF_STMT (operand);
+ if (*def_stmt == NULL)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "no def_stmt.");
+ return false;
+ }
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ {
+ fprintf (vect_dump, "def_stmt: ");
+ print_gimple_stmt (vect_dump, *def_stmt, 0, TDF_SLIM);
+ }
+
+ /* empty stmt is expected only in case of a function argument.
+ (Otherwise - we expect a phi_node or a GIMPLE_ASSIGN). */
+ if (gimple_nop_p (*def_stmt))
+ {
+ *def = operand;
+ *dt = vect_invariant_def;
+ return true;
+ }
+
+ bb = gimple_bb (*def_stmt);
+ if (!flow_bb_inside_loop_p (loop, bb))
+ *dt = vect_invariant_def;
+ else
+ {
+ stmt_vinfo = vinfo_for_stmt (*def_stmt);
+ *dt = STMT_VINFO_DEF_TYPE (stmt_vinfo);
+ }
+
+ if (*dt == vect_unknown_def_type)
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Unsupported pattern.");
+ return false;
+ }
+
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "type of def: %d.",*dt);
+
+ switch (gimple_code (*def_stmt))
+ {
+ case GIMPLE_PHI:
+ *def = gimple_phi_result (*def_stmt);
+ break;
+
+ case GIMPLE_ASSIGN:
+ *def = gimple_assign_lhs (*def_stmt);
+ break;
+
+ case GIMPLE_CALL:
+ *def = gimple_call_lhs (*def_stmt);
+ if (*def != NULL)
+ break;
+ /* FALLTHRU */
+ default:
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "unsupported defining stmt: ");
+ return false;
+ }
+
+ return true;
+}
+
+
+/* Function supportable_widening_operation
+
+ Check whether an operation represented by the code CODE is a
+ widening operation that is supported by the target platform in
+ vector form (i.e., when operating on arguments of type VECTYPE).
+
+ Widening operations we currently support are NOP (CONVERT), FLOAT
+ and WIDEN_MULT. This function checks if these operations are supported
+ by the target platform either directly (via vector tree-codes), or via
+ target builtins.
+
+ Output:
+ - CODE1 and CODE2 are codes of vector operations to be used when
+ vectorizing the operation, if available.
+ - DECL1 and DECL2 are decls of target builtin functions to be used
+ when vectorizing the operation, if available. In this case,
+ CODE1 and CODE2 are CALL_EXPR.
+ - MULTI_STEP_CVT determines the number of required intermediate steps in
+ case of multi-step conversion (like char->short->int - in that case
+ MULTI_STEP_CVT will be 1).
+ - INTERM_TYPES contains the intermediate type required to perform the
+ widening operation (short in the above example). */
+
+bool
+supportable_widening_operation (enum tree_code code, gimple stmt, tree vectype,
+ tree *decl1, tree *decl2,
+ enum tree_code *code1, enum tree_code *code2,
+ int *multi_step_cvt,
+ VEC (tree, heap) **interm_types)
+{
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+ loop_vec_info loop_info = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct loop *vect_loop = LOOP_VINFO_LOOP (loop_info);
+ bool ordered_p;
+ enum machine_mode vec_mode;
+ enum insn_code icode1 = 0, icode2 = 0;
+ optab optab1, optab2;
+ tree type = gimple_expr_type (stmt);
+ tree wide_vectype = get_vectype_for_scalar_type (type);
+ enum tree_code c1, c2;
+
+ /* The result of a vectorized widening operation usually requires two vectors
+ (because the widened results do not fit int one vector). The generated
+ vector results would normally be expected to be generated in the same
+ order as in the original scalar computation, i.e. if 8 results are
+ generated in each vector iteration, they are to be organized as follows:
+ vect1: [res1,res2,res3,res4], vect2: [res5,res6,res7,res8].
+
+ However, in the special case that the result of the widening operation is
+ used in a reduction computation only, the order doesn't matter (because
+ when vectorizing a reduction we change the order of the computation).
+ Some targets can take advantage of this and generate more efficient code.
+ For example, targets like Altivec, that support widen_mult using a sequence
+ of {mult_even,mult_odd} generate the following vectors:
+ vect1: [res1,res3,res5,res7], vect2: [res2,res4,res6,res8].
+
+ When vectorizing outer-loops, we execute the inner-loop sequentially
+ (each vectorized inner-loop iteration contributes to VF outer-loop
+ iterations in parallel). We therefore don't allow to change the order
+ of the computation in the inner-loop during outer-loop vectorization. */
+
+ if (STMT_VINFO_RELEVANT (stmt_info) == vect_used_by_reduction
+ && !nested_in_vect_loop_p (vect_loop, stmt))
+ ordered_p = false;
+ else
+ ordered_p = true;
+
+ if (!ordered_p
+ && code == WIDEN_MULT_EXPR
+ && targetm.vectorize.builtin_mul_widen_even
+ && targetm.vectorize.builtin_mul_widen_even (vectype)
+ && targetm.vectorize.builtin_mul_widen_odd
+ && targetm.vectorize.builtin_mul_widen_odd (vectype))
+ {
+ if (vect_print_dump_info (REPORT_DETAILS))
+ fprintf (vect_dump, "Unordered widening operation detected.");
+
+ *code1 = *code2 = CALL_EXPR;
+ *decl1 = targetm.vectorize.builtin_mul_widen_even (vectype);
+ *decl2 = targetm.vectorize.builtin_mul_widen_odd (vectype);
+ return true;
+ }
+
+ switch (code)
+ {
+ case WIDEN_MULT_EXPR:
+ if (BYTES_BIG_ENDIAN)
+ {
+ c1 = VEC_WIDEN_MULT_HI_EXPR;
+ c2 = VEC_WIDEN_MULT_LO_EXPR;
+ }
+ else
+ {
+ c2 = VEC_WIDEN_MULT_HI_EXPR;
+ c1 = VEC_WIDEN_MULT_LO_EXPR;
+ }
+ break;
+
+ CASE_CONVERT:
+ if (BYTES_BIG_ENDIAN)
+ {
+ c1 = VEC_UNPACK_HI_EXPR;
+ c2 = VEC_UNPACK_LO_EXPR;
+ }
+ else
+ {
+ c2 = VEC_UNPACK_HI_EXPR;
+ c1 = VEC_UNPACK_LO_EXPR;
+ }
+ break;
+
+ case FLOAT_EXPR:
+ if (BYTES_BIG_ENDIAN)
+ {
+ c1 = VEC_UNPACK_FLOAT_HI_EXPR;
+ c2 = VEC_UNPACK_FLOAT_LO_EXPR;
+ }
+ else
+ {
+ c2 = VEC_UNPACK_FLOAT_HI_EXPR;
+ c1 = VEC_UNPACK_FLOAT_LO_EXPR;
+ }
+ break;
+
+ case FIX_TRUNC_EXPR:
+ /* ??? Not yet implemented due to missing VEC_UNPACK_FIX_TRUNC_HI_EXPR/
+ VEC_UNPACK_FIX_TRUNC_LO_EXPR tree codes and optabs used for
+ computing the operation. */
+ return false;
+
+ default:
+ gcc_unreachable ();
+ }
+
+ if (code == FIX_TRUNC_EXPR)
+ {
+ /* The signedness is determined from output operand. */
+ optab1 = optab_for_tree_code (c1, type, optab_default);
+ optab2 = optab_for_tree_code (c2, type, optab_default);
+ }
+ else
+ {
+ optab1 = optab_for_tree_code (c1, vectype, optab_default);
+ optab2 = optab_for_tree_code (c2, vectype, optab_default);
+ }
+
+ if (!optab1 || !optab2)
+ return false;
+
+ vec_mode = TYPE_MODE (vectype);
+ if ((icode1 = optab_handler (optab1, vec_mode)->insn_code) == CODE_FOR_nothing
+ || (icode2 = optab_handler (optab2, vec_mode)->insn_code)
+ == CODE_FOR_nothing)
+ return false;
+
+ /* Check if it's a multi-step conversion that can be done using intermediate
+ types. */
+ if (insn_data[icode1].operand[0].mode != TYPE_MODE (wide_vectype)
+ || insn_data[icode2].operand[0].mode != TYPE_MODE (wide_vectype))
+ {
+ int i;
+ tree prev_type = vectype, intermediate_type;
+ enum machine_mode intermediate_mode, prev_mode = vec_mode;
+ optab optab3, optab4;
+
+ if (!CONVERT_EXPR_CODE_P (code))
+ return false;
+
+ *code1 = c1;
+ *code2 = c2;
+
+ /* We assume here that there will not be more than MAX_INTERM_CVT_STEPS
+ intermediate steps in promotion sequence. We try MAX_INTERM_CVT_STEPS
+ to get to NARROW_VECTYPE, and fail if we do not. */
+ *interm_types = VEC_alloc (tree, heap, MAX_INTERM_CVT_STEPS);
+ for (i = 0; i < 3; i++)
+ {
+ intermediate_mode = insn_data[icode1].operand[0].mode;
+ intermediate_type = lang_hooks.types.type_for_mode (intermediate_mode,
+ TYPE_UNSIGNED (prev_type));
+ optab3 = optab_for_tree_code (c1, intermediate_type, optab_default);
+ optab4 = optab_for_tree_code (c2, intermediate_type, optab_default);
+
+ if (!optab3 || !optab4
+ || (icode1 = optab1->handlers[(int) prev_mode].insn_code)
+ == CODE_FOR_nothing
+ || insn_data[icode1].operand[0].mode != intermediate_mode
+ || (icode2 = optab2->handlers[(int) prev_mode].insn_code)
+ == CODE_FOR_nothing
+ || insn_data[icode2].operand[0].mode != intermediate_mode
+ || (icode1 = optab3->handlers[(int) intermediate_mode].insn_code)
+ == CODE_FOR_nothing
+ || (icode2 = optab4->handlers[(int) intermediate_mode].insn_code)
+ == CODE_FOR_nothing)
+ return false;
+
+ VEC_quick_push (tree, *interm_types, intermediate_type);
+ (*multi_step_cvt)++;
+
+ if (insn_data[icode1].operand[0].mode == TYPE_MODE (wide_vectype)
+ && insn_data[icode2].operand[0].mode == TYPE_MODE (wide_vectype))
+ return true;
+
+ prev_type = intermediate_type;
+ prev_mode = intermediate_mode;
+ }
+
+ return false;
+ }
+
+ *code1 = c1;
+ *code2 = c2;
+ return true;
+}
+
+
+/* Function supportable_narrowing_operation
+
+ Check whether an operation represented by the code CODE is a
+ narrowing operation that is supported by the target platform in
+ vector form (i.e., when operating on arguments of type VECTYPE).
+
+ Narrowing operations we currently support are NOP (CONVERT) and
+ FIX_TRUNC. This function checks if these operations are supported by
+ the target platform directly via vector tree-codes.
+
+ Output:
+ - CODE1 is the code of a vector operation to be used when
+ vectorizing the operation, if available.
+ - MULTI_STEP_CVT determines the number of required intermediate steps in
+ case of multi-step conversion (like int->short->char - in that case
+ MULTI_STEP_CVT will be 1).
+ - INTERM_TYPES contains the intermediate type required to perform the
+ narrowing operation (short in the above example). */
+
+bool
+supportable_narrowing_operation (enum tree_code code,
+ const_gimple stmt, tree vectype,
+ enum tree_code *code1, int *multi_step_cvt,
+ VEC (tree, heap) **interm_types)
+{
+ enum machine_mode vec_mode;
+ enum insn_code icode1;
+ optab optab1, interm_optab;
+ tree type = gimple_expr_type (stmt);
+ tree narrow_vectype = get_vectype_for_scalar_type (type);
+ enum tree_code c1;
+ tree intermediate_type, prev_type;
+ int i;
+
+ switch (code)
+ {
+ CASE_CONVERT:
+ c1 = VEC_PACK_TRUNC_EXPR;
+ break;
+
+ case FIX_TRUNC_EXPR:
+ c1 = VEC_PACK_FIX_TRUNC_EXPR;
+ break;
+
+ case FLOAT_EXPR:
+ /* ??? Not yet implemented due to missing VEC_PACK_FLOAT_EXPR
+ tree code and optabs used for computing the operation. */
+ return false;
+
+ default:
+ gcc_unreachable ();
+ }
+
+ if (code == FIX_TRUNC_EXPR)
+ /* The signedness is determined from output operand. */
+ optab1 = optab_for_tree_code (c1, type, optab_default);
+ else
+ optab1 = optab_for_tree_code (c1, vectype, optab_default);
+
+ if (!optab1)
+ return false;
+
+ vec_mode = TYPE_MODE (vectype);
+ if ((icode1 = optab_handler (optab1, vec_mode)->insn_code)
+ == CODE_FOR_nothing)
+ return false;
+
+ /* Check if it's a multi-step conversion that can be done using intermediate
+ types. */
+ if (insn_data[icode1].operand[0].mode != TYPE_MODE (narrow_vectype))
+ {
+ enum machine_mode intermediate_mode, prev_mode = vec_mode;
+
+ *code1 = c1;
+ prev_type = vectype;
+ /* We assume here that there will not be more than MAX_INTERM_CVT_STEPS
+ intermediate steps in promotion sequence. We try MAX_INTERM_CVT_STEPS
+ to get to NARROW_VECTYPE, and fail if we do not. */
+ *interm_types = VEC_alloc (tree, heap, MAX_INTERM_CVT_STEPS);
+ for (i = 0; i < 3; i++)
+ {
+ intermediate_mode = insn_data[icode1].operand[0].mode;
+ intermediate_type = lang_hooks.types.type_for_mode (intermediate_mode,
+ TYPE_UNSIGNED (prev_type));
+ interm_optab = optab_for_tree_code (c1, intermediate_type,
+ optab_default);
+ if (!interm_optab
+ || (icode1 = optab1->handlers[(int) prev_mode].insn_code)
+ == CODE_FOR_nothing
+ || insn_data[icode1].operand[0].mode != intermediate_mode
+ || (icode1
+ = interm_optab->handlers[(int) intermediate_mode].insn_code)
+ == CODE_FOR_nothing)
+ return false;
+
+ VEC_quick_push (tree, *interm_types, intermediate_type);
+ (*multi_step_cvt)++;
+
+ if (insn_data[icode1].operand[0].mode == TYPE_MODE (narrow_vectype))
+ return true;
+
+ prev_type = intermediate_type;
+ prev_mode = intermediate_mode;
+ }
+
+ return false;
+ }
+
+ *code1 = c1;
+ return true;
+}
+
+
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
deleted file mode 100644
index abb33e251ac..00000000000
--- a/gcc/tree-vect-transform.c
+++ /dev/null
@@ -1,8517 +0,0 @@
-/* Transformation Utilities for Loop Vectorization.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
- Free Software Foundation, Inc.
- Contributed by Dorit Naishlos <dorit@il.ibm.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 "ggc.h"
-#include "tree.h"
-#include "target.h"
-#include "rtl.h"
-#include "basic-block.h"
-#include "diagnostic.h"
-#include "tree-flow.h"
-#include "tree-dump.h"
-#include "timevar.h"
-#include "cfgloop.h"
-#include "expr.h"
-#include "optabs.h"
-#include "params.h"
-#include "recog.h"
-#include "tree-data-ref.h"
-#include "tree-chrec.h"
-#include "tree-scalar-evolution.h"
-#include "tree-vectorizer.h"
-#include "langhooks.h"
-#include "tree-pass.h"
-#include "toplev.h"
-#include "real.h"
-
-/* Utility functions for the code transformation. */
-static bool vect_transform_stmt (gimple, gimple_stmt_iterator *, bool *,
- slp_tree, slp_instance);
-static tree vect_create_destination_var (tree, tree);
-static tree vect_create_data_ref_ptr
- (gimple, struct loop*, tree, tree *, gimple *, bool, bool *, tree);
-static tree vect_create_addr_base_for_vector_ref
- (gimple, gimple_seq *, tree, struct loop *);
-static tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
-static tree vect_get_vec_def_for_operand (tree, gimple, tree *);
-static tree vect_init_vector (gimple, tree, tree, gimple_stmt_iterator *);
-static void vect_finish_stmt_generation
- (gimple stmt, gimple vec_stmt, gimple_stmt_iterator *);
-static bool vect_is_simple_cond (tree, loop_vec_info);
-static void vect_create_epilog_for_reduction
- (tree, gimple, int, enum tree_code, gimple);
-static tree get_initial_def_for_reduction (gimple, tree, tree *);
-
-/* Utility function dealing with loop peeling (not peeling itself). */
-static void vect_generate_tmps_on_preheader
- (loop_vec_info, tree *, tree *, tree *);
-static tree vect_build_loop_niters (loop_vec_info);
-static void vect_update_ivs_after_vectorizer (loop_vec_info, tree, edge);
-static tree vect_gen_niters_for_prolog_loop (loop_vec_info, tree);
-static void vect_update_init_of_dr (struct data_reference *, tree niters);
-static void vect_update_inits_of_drs (loop_vec_info, tree);
-static int vect_min_worthwhile_factor (enum tree_code);
-
-
-static int
-cost_for_stmt (gimple stmt)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
-
- switch (STMT_VINFO_TYPE (stmt_info))
- {
- case load_vec_info_type:
- return TARG_SCALAR_LOAD_COST;
- case store_vec_info_type:
- return TARG_SCALAR_STORE_COST;
- case op_vec_info_type:
- case condition_vec_info_type:
- case assignment_vec_info_type:
- case reduc_vec_info_type:
- case induc_vec_info_type:
- case type_promotion_vec_info_type:
- case type_demotion_vec_info_type:
- case type_conversion_vec_info_type:
- case call_vec_info_type:
- return TARG_SCALAR_STMT_COST;
- case undef_vec_info_type:
- default:
- gcc_unreachable ();
- }
-}
-
-
-/* Function vect_estimate_min_profitable_iters
-
- Return the number of iterations required for the vector version of the
- loop to be profitable relative to the cost of the scalar version of the
- loop.
-
- TODO: Take profile info into account before making vectorization
- decisions, if available. */
-
-int
-vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo)
-{
- int i;
- int min_profitable_iters;
- int peel_iters_prologue;
- int peel_iters_epilogue;
- int vec_inside_cost = 0;
- int vec_outside_cost = 0;
- int scalar_single_iter_cost = 0;
- int scalar_outside_cost = 0;
- int vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
- int nbbs = loop->num_nodes;
- int byte_misalign = LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo);
- int peel_guard_costs = 0;
- int innerloop_iters = 0, factor;
- VEC (slp_instance, heap) *slp_instances;
- slp_instance instance;
-
- /* Cost model disabled. */
- if (!flag_vect_cost_model)
- {
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "cost model disabled.");
- return 0;
- }
-
- /* Requires loop versioning tests to handle misalignment. */
- if (VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo)))
- {
- /* FIXME: Make cost depend on complexity of individual check. */
- vec_outside_cost +=
- VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo));
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "cost model: Adding cost of checks for loop "
- "versioning to treat misalignment.\n");
- }
-
- if (VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
- {
- /* FIXME: Make cost depend on complexity of individual check. */
- vec_outside_cost +=
- VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo));
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "cost model: Adding cost of checks for loop "
- "versioning aliasing.\n");
- }
-
- if (VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
- || VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
- {
- vec_outside_cost += TARG_COND_TAKEN_BRANCH_COST;
- }
-
- /* Count statements in scalar loop. Using this as scalar cost for a single
- iteration for now.
-
- TODO: Add outer loop support.
-
- TODO: Consider assigning different costs to different scalar
- statements. */
-
- /* FORNOW. */
- if (loop->inner)
- innerloop_iters = 50; /* FIXME */
-
- for (i = 0; i < nbbs; i++)
- {
- gimple_stmt_iterator si;
- basic_block bb = bbs[i];
-
- if (bb->loop_father == loop->inner)
- factor = innerloop_iters;
- else
- factor = 1;
-
- for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
- {
- gimple stmt = gsi_stmt (si);
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- /* Skip stmts that are not vectorized inside the loop. */
- if (!STMT_VINFO_RELEVANT_P (stmt_info)
- && (!STMT_VINFO_LIVE_P (stmt_info)
- || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
- continue;
- scalar_single_iter_cost += cost_for_stmt (stmt) * factor;
- vec_inside_cost += STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) * factor;
- /* FIXME: for stmts in the inner-loop in outer-loop vectorization,
- some of the "outside" costs are generated inside the outer-loop. */
- vec_outside_cost += STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info);
- }
- }
-
- /* Add additional cost for the peeled instructions in prologue and epilogue
- loop.
-
- FORNOW: If we don't know the value of peel_iters for prologue or epilogue
- at compile-time - we assume it's vf/2 (the worst would be vf-1).
-
- TODO: Build an expression that represents peel_iters for prologue and
- epilogue to be used in a run-time test. */
-
- if (byte_misalign < 0)
- {
- peel_iters_prologue = vf/2;
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "cost model: "
- "prologue peel iters set to vf/2.");
-
- /* If peeling for alignment is unknown, loop bound of main loop becomes
- unknown. */
- peel_iters_epilogue = vf/2;
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "cost model: "
- "epilogue peel iters set to vf/2 because "
- "peeling for alignment is unknown .");
-
- /* If peeled iterations are unknown, count a taken branch and a not taken
- branch per peeled loop. Even if scalar loop iterations are known,
- vector iterations are not known since peeled prologue iterations are
- not known. Hence guards remain the same. */
- peel_guard_costs += 2 * (TARG_COND_TAKEN_BRANCH_COST
- + TARG_COND_NOT_TAKEN_BRANCH_COST);
- }
- else
- {
- if (byte_misalign)
- {
- struct data_reference *dr = LOOP_VINFO_UNALIGNED_DR (loop_vinfo);
- int element_size = GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (dr))));
- tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (DR_STMT (dr)));
- int nelements = TYPE_VECTOR_SUBPARTS (vectype);
-
- peel_iters_prologue = nelements - (byte_misalign / element_size);
- }
- else
- peel_iters_prologue = 0;
-
- if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo))
- {
- peel_iters_epilogue = vf/2;
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "cost model: "
- "epilogue peel iters set to vf/2 because "
- "loop iterations are unknown .");
-
- /* If peeled iterations are known but number of scalar loop
- iterations are unknown, count a taken branch per peeled loop. */
- peel_guard_costs += 2 * TARG_COND_TAKEN_BRANCH_COST;
-
- }
- else
- {
- int niters = LOOP_VINFO_INT_NITERS (loop_vinfo);
- peel_iters_prologue = niters < peel_iters_prologue ?
- niters : peel_iters_prologue;
- peel_iters_epilogue = (niters - peel_iters_prologue) % vf;
- }
- }
-
- vec_outside_cost += (peel_iters_prologue * scalar_single_iter_cost)
- + (peel_iters_epilogue * scalar_single_iter_cost)
- + peel_guard_costs;
-
- /* FORNOW: The scalar outside cost is incremented in one of the
- following ways:
-
- 1. The vectorizer checks for alignment and aliasing and generates
- a condition that allows dynamic vectorization. A cost model
- check is ANDED with the versioning condition. Hence scalar code
- path now has the added cost of the versioning check.
-
- if (cost > th & versioning_check)
- jmp to vector code
-
- Hence run-time scalar is incremented by not-taken branch cost.
-
- 2. The vectorizer then checks if a prologue is required. If the
- cost model check was not done before during versioning, it has to
- be done before the prologue check.
-
- if (cost <= th)
- prologue = scalar_iters
- if (prologue == 0)
- jmp to vector code
- else
- execute prologue
- if (prologue == num_iters)
- go to exit
-
- Hence the run-time scalar cost is incremented by a taken branch,
- plus a not-taken branch, plus a taken branch cost.
-
- 3. The vectorizer then checks if an epilogue is required. If the
- cost model check was not done before during prologue check, it
- has to be done with the epilogue check.
-
- if (prologue == 0)
- jmp to vector code
- else
- execute prologue
- if (prologue == num_iters)
- go to exit
- vector code:
- if ((cost <= th) | (scalar_iters-prologue-epilogue == 0))
- jmp to epilogue
-
- Hence the run-time scalar cost should be incremented by 2 taken
- branches.
-
- TODO: The back end may reorder the BBS's differently and reverse
- conditions/branch directions. Change the estimates below to
- something more reasonable. */
-
- /* If the number of iterations is known and we do not do versioning, we can
- decide whether to vectorize at compile time. Hence the scalar version
- do not carry cost model guard costs. */
- if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
- || VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
- || VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
- {
- /* Cost model check occurs at versioning. */
- if (VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
- || VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
- scalar_outside_cost += TARG_COND_NOT_TAKEN_BRANCH_COST;
- else
- {
- /* Cost model check occurs at prologue generation. */
- if (LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo) < 0)
- scalar_outside_cost += 2 * TARG_COND_TAKEN_BRANCH_COST
- + TARG_COND_NOT_TAKEN_BRANCH_COST;
- /* Cost model check occurs at epilogue generation. */
- else
- scalar_outside_cost += 2 * TARG_COND_TAKEN_BRANCH_COST;
- }
- }
-
- /* Add SLP costs. */
- slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
- for (i = 0; VEC_iterate (slp_instance, slp_instances, i, instance); i++)
- {
- vec_outside_cost += SLP_INSTANCE_OUTSIDE_OF_LOOP_COST (instance);
- vec_inside_cost += SLP_INSTANCE_INSIDE_OF_LOOP_COST (instance);
- }
-
- /* Calculate number of iterations required to make the vector version
- profitable, relative to the loop bodies only. The following condition
- must hold true:
- SIC * niters + SOC > VIC * ((niters-PL_ITERS-EP_ITERS)/VF) + VOC
- where
- SIC = scalar iteration cost, VIC = vector iteration cost,
- VOC = vector outside cost, VF = vectorization factor,
- PL_ITERS = prologue iterations, EP_ITERS= epilogue iterations
- SOC = scalar outside cost for run time cost model check. */
-
- if ((scalar_single_iter_cost * vf) > vec_inside_cost)
- {
- if (vec_outside_cost <= 0)
- min_profitable_iters = 1;
- else
- {
- min_profitable_iters = ((vec_outside_cost - scalar_outside_cost) * vf
- - vec_inside_cost * peel_iters_prologue
- - vec_inside_cost * peel_iters_epilogue)
- / ((scalar_single_iter_cost * vf)
- - vec_inside_cost);
-
- if ((scalar_single_iter_cost * vf * min_profitable_iters)
- <= ((vec_inside_cost * min_profitable_iters)
- + ((vec_outside_cost - scalar_outside_cost) * vf)))
- min_profitable_iters++;
- }
- }
- /* vector version will never be profitable. */
- else
- {
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "cost model: vector iteration cost = %d "
- "is divisible by scalar iteration cost = %d by a factor "
- "greater than or equal to the vectorization factor = %d .",
- vec_inside_cost, scalar_single_iter_cost, vf);
- return -1;
- }
-
- if (vect_print_dump_info (REPORT_COST))
- {
- fprintf (vect_dump, "Cost model analysis: \n");
- fprintf (vect_dump, " Vector inside of loop cost: %d\n",
- vec_inside_cost);
- fprintf (vect_dump, " Vector outside of loop cost: %d\n",
- vec_outside_cost);
- fprintf (vect_dump, " Scalar iteration cost: %d\n",
- scalar_single_iter_cost);
- fprintf (vect_dump, " Scalar outside cost: %d\n", scalar_outside_cost);
- fprintf (vect_dump, " prologue iterations: %d\n",
- peel_iters_prologue);
- fprintf (vect_dump, " epilogue iterations: %d\n",
- peel_iters_epilogue);
- fprintf (vect_dump, " Calculated minimum iters for profitability: %d\n",
- min_profitable_iters);
- }
-
- min_profitable_iters =
- min_profitable_iters < vf ? vf : min_profitable_iters;
-
- /* Because the condition we create is:
- if (niters <= min_profitable_iters)
- then skip the vectorized loop. */
- min_profitable_iters--;
-
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, " Profitability threshold = %d\n",
- min_profitable_iters);
-
- return min_profitable_iters;
-}
-
-
-/* TODO: Close dependency between vect_model_*_cost and vectorizable_*
- functions. Design better to avoid maintenance issues. */
-
-/* Function vect_model_reduction_cost.
-
- Models cost for a reduction operation, including the vector ops
- generated within the strip-mine loop, the initial definition before
- the loop, and the epilogue code that must be generated. */
-
-static bool
-vect_model_reduction_cost (stmt_vec_info stmt_info, enum tree_code reduc_code,
- int ncopies)
-{
- int outer_cost = 0;
- enum tree_code code;
- optab optab;
- tree vectype;
- gimple stmt, orig_stmt;
- tree reduction_op;
- enum machine_mode mode;
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-
-
- /* Cost of reduction op inside loop. */
- STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) += ncopies * TARG_VEC_STMT_COST;
-
- stmt = STMT_VINFO_STMT (stmt_info);
-
- switch (get_gimple_rhs_class (gimple_assign_rhs_code (stmt)))
- {
- case GIMPLE_SINGLE_RHS:
- gcc_assert (TREE_OPERAND_LENGTH (gimple_assign_rhs1 (stmt)) == ternary_op);
- reduction_op = TREE_OPERAND (gimple_assign_rhs1 (stmt), 2);
- break;
- case GIMPLE_UNARY_RHS:
- reduction_op = gimple_assign_rhs1 (stmt);
- break;
- case GIMPLE_BINARY_RHS:
- reduction_op = gimple_assign_rhs2 (stmt);
- break;
- default:
- gcc_unreachable ();
- }
-
- vectype = get_vectype_for_scalar_type (TREE_TYPE (reduction_op));
- if (!vectype)
- {
- if (vect_print_dump_info (REPORT_COST))
- {
- fprintf (vect_dump, "unsupported data-type ");
- print_generic_expr (vect_dump, TREE_TYPE (reduction_op), TDF_SLIM);
- }
- return false;
- }
-
- mode = TYPE_MODE (vectype);
- orig_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
-
- if (!orig_stmt)
- orig_stmt = STMT_VINFO_STMT (stmt_info);
-
- code = gimple_assign_rhs_code (orig_stmt);
-
- /* Add in cost for initial definition. */
- outer_cost += TARG_SCALAR_TO_VEC_COST;
-
- /* Determine cost of epilogue code.
-
- We have a reduction operator that will reduce the vector in one statement.
- Also requires scalar extract. */
-
- if (!nested_in_vect_loop_p (loop, orig_stmt))
- {
- if (reduc_code < NUM_TREE_CODES)
- outer_cost += TARG_VEC_STMT_COST + TARG_VEC_TO_SCALAR_COST;
- else
- {
- int vec_size_in_bits = tree_low_cst (TYPE_SIZE (vectype), 1);
- tree bitsize =
- TYPE_SIZE (TREE_TYPE (gimple_assign_lhs (orig_stmt)));
- int element_bitsize = tree_low_cst (bitsize, 1);
- int nelements = vec_size_in_bits / element_bitsize;
-
- optab = optab_for_tree_code (code, vectype, optab_default);
-
- /* We have a whole vector shift available. */
- if (VECTOR_MODE_P (mode)
- && optab_handler (optab, mode)->insn_code != CODE_FOR_nothing
- && optab_handler (vec_shr_optab, mode)->insn_code != CODE_FOR_nothing)
- /* Final reduction via vector shifts and the reduction operator. Also
- requires scalar extract. */
- outer_cost += ((exact_log2(nelements) * 2) * TARG_VEC_STMT_COST
- + TARG_VEC_TO_SCALAR_COST);
- else
- /* Use extracts and reduction op for final reduction. For N elements,
- we have N extracts and N-1 reduction ops. */
- outer_cost += ((nelements + nelements - 1) * TARG_VEC_STMT_COST);
- }
- }
-
- STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info) = outer_cost;
-
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "vect_model_reduction_cost: inside_cost = %d, "
- "outside_cost = %d .", STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info),
- STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info));
-
- return true;
-}
-
-
-/* Function vect_model_induction_cost.
-
- Models cost for induction operations. */
-
-static void
-vect_model_induction_cost (stmt_vec_info stmt_info, int ncopies)
-{
- /* loop cost for vec_loop. */
- STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) = ncopies * TARG_VEC_STMT_COST;
- /* prologue cost for vec_init and vec_step. */
- STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info) = 2 * TARG_SCALAR_TO_VEC_COST;
-
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "vect_model_induction_cost: inside_cost = %d, "
- "outside_cost = %d .", STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info),
- STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info));
-}
-
-
-/* Function vect_model_simple_cost.
-
- Models cost for simple operations, i.e. those that only emit ncopies of a
- single op. Right now, this does not account for multiple insns that could
- be generated for the single vector op. We will handle that shortly. */
-
-void
-vect_model_simple_cost (stmt_vec_info stmt_info, int ncopies,
- enum vect_def_type *dt, slp_tree slp_node)
-{
- int i;
- int inside_cost = 0, outside_cost = 0;
-
- /* The SLP costs were already calculated during SLP tree build. */
- if (PURE_SLP_STMT (stmt_info))
- return;
-
- inside_cost = ncopies * TARG_VEC_STMT_COST;
-
- /* FORNOW: Assuming maximum 2 args per stmts. */
- for (i = 0; i < 2; i++)
- {
- if (dt[i] == vect_constant_def || dt[i] == vect_invariant_def)
- outside_cost += TARG_SCALAR_TO_VEC_COST;
- }
-
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "vect_model_simple_cost: inside_cost = %d, "
- "outside_cost = %d .", inside_cost, outside_cost);
-
- /* Set the costs either in STMT_INFO or SLP_NODE (if exists). */
- stmt_vinfo_set_inside_of_loop_cost (stmt_info, slp_node, inside_cost);
- stmt_vinfo_set_outside_of_loop_cost (stmt_info, slp_node, outside_cost);
-}
-
-
-/* Function vect_cost_strided_group_size
-
- For strided load or store, return the group_size only if it is the first
- load or store of a group, else return 1. This ensures that group size is
- only returned once per group. */
-
-static int
-vect_cost_strided_group_size (stmt_vec_info stmt_info)
-{
- gimple first_stmt = DR_GROUP_FIRST_DR (stmt_info);
-
- if (first_stmt == STMT_VINFO_STMT (stmt_info))
- return DR_GROUP_SIZE (stmt_info);
-
- return 1;
-}
-
-
-/* Function vect_model_store_cost
-
- Models cost for stores. In the case of strided accesses, one access
- has the overhead of the strided access attributed to it. */
-
-void
-vect_model_store_cost (stmt_vec_info stmt_info, int ncopies,
- enum vect_def_type dt, slp_tree slp_node)
-{
- int group_size;
- int inside_cost = 0, outside_cost = 0;
-
- /* The SLP costs were already calculated during SLP tree build. */
- if (PURE_SLP_STMT (stmt_info))
- return;
-
- if (dt == vect_constant_def || dt == vect_invariant_def)
- outside_cost = TARG_SCALAR_TO_VEC_COST;
-
- /* Strided access? */
- if (DR_GROUP_FIRST_DR (stmt_info) && !slp_node)
- group_size = vect_cost_strided_group_size (stmt_info);
- /* Not a strided access. */
- else
- group_size = 1;
-
- /* Is this an access in a group of stores, which provide strided access?
- If so, add in the cost of the permutes. */
- if (group_size > 1)
- {
- /* Uses a high and low interleave operation for each needed permute. */
- inside_cost = ncopies * exact_log2(group_size) * group_size
- * TARG_VEC_STMT_COST;
-
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "vect_model_store_cost: strided group_size = %d .",
- group_size);
-
- }
-
- /* Costs of the stores. */
- inside_cost += ncopies * TARG_VEC_STORE_COST;
-
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "vect_model_store_cost: inside_cost = %d, "
- "outside_cost = %d .", inside_cost, outside_cost);
-
- /* Set the costs either in STMT_INFO or SLP_NODE (if exists). */
- stmt_vinfo_set_inside_of_loop_cost (stmt_info, slp_node, inside_cost);
- stmt_vinfo_set_outside_of_loop_cost (stmt_info, slp_node, outside_cost);
-}
-
-
-/* Function vect_model_load_cost
-
- Models cost for loads. In the case of strided accesses, the last access
- has the overhead of the strided access attributed to it. Since unaligned
- accesses are supported for loads, we also account for the costs of the
- access scheme chosen. */
-
-void
-vect_model_load_cost (stmt_vec_info stmt_info, int ncopies, slp_tree slp_node)
-
-{
- int group_size;
- int alignment_support_cheme;
- gimple first_stmt;
- struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info), *first_dr;
- int inside_cost = 0, outside_cost = 0;
-
- /* The SLP costs were already calculated during SLP tree build. */
- if (PURE_SLP_STMT (stmt_info))
- return;
-
- /* Strided accesses? */
- first_stmt = DR_GROUP_FIRST_DR (stmt_info);
- if (first_stmt && !slp_node)
- {
- group_size = vect_cost_strided_group_size (stmt_info);
- first_dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (first_stmt));
- }
- /* Not a strided access. */
- else
- {
- group_size = 1;
- first_dr = dr;
- }
-
- alignment_support_cheme = vect_supportable_dr_alignment (first_dr);
-
- /* Is this an access in a group of loads providing strided access?
- If so, add in the cost of the permutes. */
- if (group_size > 1)
- {
- /* Uses an even and odd extract operations for each needed permute. */
- inside_cost = ncopies * exact_log2(group_size) * group_size
- * TARG_VEC_STMT_COST;
-
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "vect_model_load_cost: strided group_size = %d .",
- group_size);
-
- }
-
- /* The loads themselves. */
- switch (alignment_support_cheme)
- {
- case dr_aligned:
- {
- inside_cost += ncopies * TARG_VEC_LOAD_COST;
-
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "vect_model_load_cost: aligned.");
-
- break;
- }
- case dr_unaligned_supported:
- {
- /* Here, we assign an additional cost for the unaligned load. */
- inside_cost += ncopies * TARG_VEC_UNALIGNED_LOAD_COST;
-
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "vect_model_load_cost: unaligned supported by "
- "hardware.");
-
- break;
- }
- case dr_explicit_realign:
- {
- inside_cost += ncopies * (2*TARG_VEC_LOAD_COST + TARG_VEC_STMT_COST);
-
- /* FIXME: If the misalignment remains fixed across the iterations of
- the containing loop, the following cost should be added to the
- outside costs. */
- if (targetm.vectorize.builtin_mask_for_load)
- inside_cost += TARG_VEC_STMT_COST;
-
- break;
- }
- case dr_explicit_realign_optimized:
- {
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "vect_model_load_cost: unaligned software "
- "pipelined.");
-
- /* Unaligned software pipeline has a load of an address, an initial
- load, and possibly a mask operation to "prime" the loop. However,
- if this is an access in a group of loads, which provide strided
- access, then the above cost should only be considered for one
- access in the group. Inside the loop, there is a load op
- and a realignment op. */
-
- if ((!DR_GROUP_FIRST_DR (stmt_info)) || group_size > 1 || slp_node)
- {
- outside_cost = 2*TARG_VEC_STMT_COST;
- if (targetm.vectorize.builtin_mask_for_load)
- outside_cost += TARG_VEC_STMT_COST;
- }
-
- inside_cost += ncopies * (TARG_VEC_LOAD_COST + TARG_VEC_STMT_COST);
-
- break;
- }
-
- default:
- gcc_unreachable ();
- }
-
- if (vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "vect_model_load_cost: inside_cost = %d, "
- "outside_cost = %d .", inside_cost, outside_cost);
-
- /* Set the costs either in STMT_INFO or SLP_NODE (if exists). */
- stmt_vinfo_set_inside_of_loop_cost (stmt_info, slp_node, inside_cost);
- stmt_vinfo_set_outside_of_loop_cost (stmt_info, slp_node, outside_cost);
-}
-
-
-/* Function vect_get_new_vect_var.
-
- Returns a name for a new variable. The current naming scheme appends the
- prefix "vect_" or "vect_p" (depending on the value of VAR_KIND) to
- the name of vectorizer generated variables, and appends that to NAME if
- provided. */
-
-static tree
-vect_get_new_vect_var (tree type, enum vect_var_kind var_kind, const char *name)
-{
- const char *prefix;
- tree new_vect_var;
-
- switch (var_kind)
- {
- case vect_simple_var:
- prefix = "vect_";
- break;
- case vect_scalar_var:
- prefix = "stmp_";
- break;
- case vect_pointer_var:
- prefix = "vect_p";
- break;
- default:
- gcc_unreachable ();
- }
-
- if (name)
- {
- char* tmp = concat (prefix, name, NULL);
- new_vect_var = create_tmp_var (type, tmp);
- free (tmp);
- }
- else
- new_vect_var = create_tmp_var (type, prefix);
-
- /* Mark vector typed variable as a gimple register variable. */
- if (TREE_CODE (type) == VECTOR_TYPE)
- DECL_GIMPLE_REG_P (new_vect_var) = true;
-
- return new_vect_var;
-}
-
-
-/* Function vect_create_addr_base_for_vector_ref.
-
- Create an expression that computes the address of the first memory location
- that will be accessed for a data reference.
-
- Input:
- STMT: The statement containing the data reference.
- NEW_STMT_LIST: Must be initialized to NULL_TREE or a statement list.
- OFFSET: Optional. If supplied, it is be added to the initial address.
- LOOP: Specify relative to which loop-nest should the address be computed.
- For example, when the dataref is in an inner-loop nested in an
- outer-loop that is now being vectorized, LOOP can be either the
- outer-loop, or the inner-loop. The first memory location accessed
- by the following dataref ('in' points to short):
-
- for (i=0; i<N; i++)
- for (j=0; j<M; j++)
- s += in[i+j]
-
- is as follows:
- if LOOP=i_loop: &in (relative to i_loop)
- if LOOP=j_loop: &in+i*2B (relative to j_loop)
-
- Output:
- 1. Return an SSA_NAME whose value is the address of the memory location of
- the first vector of the data reference.
- 2. If new_stmt_list is not NULL_TREE after return then the caller must insert
- these statement(s) which define the returned SSA_NAME.
-
- FORNOW: We are only handling array accesses with step 1. */
-
-static tree
-vect_create_addr_base_for_vector_ref (gimple stmt,
- gimple_seq *new_stmt_list,
- tree offset,
- struct loop *loop)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
- struct loop *containing_loop = (gimple_bb (stmt))->loop_father;
- tree data_ref_base = unshare_expr (DR_BASE_ADDRESS (dr));
- tree base_name;
- tree data_ref_base_var;
- tree vec_stmt;
- tree addr_base, addr_expr;
- tree dest;
- gimple_seq seq = NULL;
- tree base_offset = unshare_expr (DR_OFFSET (dr));
- tree init = unshare_expr (DR_INIT (dr));
- tree vect_ptr_type, addr_expr2;
- tree step = TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (dr)));
-
- gcc_assert (loop);
- if (loop != containing_loop)
- {
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-
- gcc_assert (nested_in_vect_loop_p (loop, stmt));
-
- data_ref_base = unshare_expr (STMT_VINFO_DR_BASE_ADDRESS (stmt_info));
- base_offset = unshare_expr (STMT_VINFO_DR_OFFSET (stmt_info));
- init = unshare_expr (STMT_VINFO_DR_INIT (stmt_info));
- }
-
- /* Create data_ref_base */
- base_name = build_fold_indirect_ref (data_ref_base);
- data_ref_base_var = create_tmp_var (TREE_TYPE (data_ref_base), "batmp");
- add_referenced_var (data_ref_base_var);
- data_ref_base = force_gimple_operand (data_ref_base, &seq, true,
- data_ref_base_var);
- gimple_seq_add_seq (new_stmt_list, seq);
-
- /* Create base_offset */
- base_offset = size_binop (PLUS_EXPR,
- fold_convert (sizetype, base_offset),
- fold_convert (sizetype, init));
- dest = create_tmp_var (sizetype, "base_off");
- add_referenced_var (dest);
- base_offset = force_gimple_operand (base_offset, &seq, true, dest);
- gimple_seq_add_seq (new_stmt_list, seq);
-
- if (offset)
- {
- tree tmp = create_tmp_var (sizetype, "offset");
-
- add_referenced_var (tmp);
- offset = fold_build2 (MULT_EXPR, sizetype,
- fold_convert (sizetype, offset), step);
- base_offset = fold_build2 (PLUS_EXPR, sizetype,
- base_offset, offset);
- base_offset = force_gimple_operand (base_offset, &seq, false, tmp);
- gimple_seq_add_seq (new_stmt_list, seq);
- }
-
- /* base + base_offset */
- addr_base = fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (data_ref_base),
- data_ref_base, base_offset);
-
- vect_ptr_type = build_pointer_type (STMT_VINFO_VECTYPE (stmt_info));
-
- /* addr_expr = addr_base */
- addr_expr = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
- get_name (base_name));
- add_referenced_var (addr_expr);
- vec_stmt = fold_convert (vect_ptr_type, addr_base);
- addr_expr2 = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
- get_name (base_name));
- add_referenced_var (addr_expr2);
- vec_stmt = force_gimple_operand (vec_stmt, &seq, false, addr_expr2);
- gimple_seq_add_seq (new_stmt_list, seq);
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "created ");
- print_generic_expr (vect_dump, vec_stmt, TDF_SLIM);
- }
- return vec_stmt;
-}
-
-
-/* Function vect_create_data_ref_ptr.
-
- Create a new pointer to vector type (vp), that points to the first location
- accessed in the loop by STMT, along with the def-use update chain to
- appropriately advance the pointer through the loop iterations. Also set
- aliasing information for the pointer. This vector pointer is used by the
- callers to this function to create a memory reference expression for vector
- load/store access.
-
- Input:
- 1. STMT: a stmt that references memory. Expected to be of the form
- GIMPLE_ASSIGN <name, data-ref> or
- GIMPLE_ASSIGN <data-ref, name>.
- 2. AT_LOOP: the loop where the vector memref is to be created.
- 3. OFFSET (optional): an offset to be added to the initial address accessed
- by the data-ref in STMT.
- 4. ONLY_INIT: indicate if vp is to be updated in the loop, or remain
- pointing to the initial address.
- 5. TYPE: if not NULL indicates the required type of the data-ref.
-
- Output:
- 1. Declare a new ptr to vector_type, and have it point to the base of the
- data reference (initial addressed accessed by the data reference).
- For example, for vector of type V8HI, the following code is generated:
-
- v8hi *vp;
- vp = (v8hi *)initial_address;
-
- if OFFSET is not supplied:
- initial_address = &a[init];
- if OFFSET is supplied:
- initial_address = &a[init + OFFSET];
-
- Return the initial_address in INITIAL_ADDRESS.
-
- 2. If ONLY_INIT is true, just return the initial pointer. Otherwise, also
- update the pointer in each iteration of the loop.
-
- Return the increment stmt that updates the pointer in PTR_INCR.
-
- 3. Set INV_P to true if the access pattern of the data reference in the
- vectorized loop is invariant. Set it to false otherwise.
-
- 4. Return the pointer. */
-
-static tree
-vect_create_data_ref_ptr (gimple stmt, struct loop *at_loop,
- tree offset, tree *initial_address, gimple *ptr_incr,
- bool only_init, bool *inv_p, tree type)
-{
- tree base_name;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- bool nested_in_vect_loop = nested_in_vect_loop_p (loop, stmt);
- struct loop *containing_loop = (gimple_bb (stmt))->loop_father;
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- tree vect_ptr_type;
- tree vect_ptr;
- tree tag;
- tree new_temp;
- gimple vec_stmt;
- gimple_seq new_stmt_list = NULL;
- edge pe;
- basic_block new_bb;
- tree vect_ptr_init;
- struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
- tree vptr;
- gimple_stmt_iterator incr_gsi;
- bool insert_after;
- tree indx_before_incr, indx_after_incr;
- gimple incr;
- tree step;
-
- /* Check the step (evolution) of the load in LOOP, and record
- whether it's invariant. */
- if (nested_in_vect_loop)
- step = STMT_VINFO_DR_STEP (stmt_info);
- else
- step = DR_STEP (STMT_VINFO_DATA_REF (stmt_info));
-
- if (tree_int_cst_compare (step, size_zero_node) == 0)
- *inv_p = true;
- else
- *inv_p = false;
-
- /* Create an expression for the first address accessed by this load
- in LOOP. */
- base_name = build_fold_indirect_ref (unshare_expr (DR_BASE_ADDRESS (dr)));
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- tree data_ref_base = base_name;
- fprintf (vect_dump, "create vector-pointer variable to type: ");
- print_generic_expr (vect_dump, vectype, TDF_SLIM);
- if (TREE_CODE (data_ref_base) == VAR_DECL)
- fprintf (vect_dump, " vectorizing a one dimensional array ref: ");
- else if (TREE_CODE (data_ref_base) == ARRAY_REF)
- fprintf (vect_dump, " vectorizing a multidimensional array ref: ");
- else if (TREE_CODE (data_ref_base) == COMPONENT_REF)
- fprintf (vect_dump, " vectorizing a record based array ref: ");
- else if (TREE_CODE (data_ref_base) == SSA_NAME)
- fprintf (vect_dump, " vectorizing a pointer ref: ");
- print_generic_expr (vect_dump, base_name, TDF_SLIM);
- }
-
- /** (1) Create the new vector-pointer variable: **/
- if (type)
- vect_ptr_type = build_pointer_type (type);
- else
- vect_ptr_type = build_pointer_type (vectype);
-
- if (TREE_CODE (DR_BASE_ADDRESS (dr)) == SSA_NAME
- && TYPE_RESTRICT (TREE_TYPE (DR_BASE_ADDRESS (dr))))
- vect_ptr_type = build_qualified_type (vect_ptr_type, TYPE_QUAL_RESTRICT);
- vect_ptr = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
- get_name (base_name));
- if (TREE_CODE (DR_BASE_ADDRESS (dr)) == SSA_NAME
- && TYPE_RESTRICT (TREE_TYPE (DR_BASE_ADDRESS (dr))))
- {
- get_alias_set (base_name);
- DECL_POINTER_ALIAS_SET (vect_ptr)
- = DECL_POINTER_ALIAS_SET (SSA_NAME_VAR (DR_BASE_ADDRESS (dr)));
- }
-
- add_referenced_var (vect_ptr);
-
- /** (2) Add aliasing information to the new vector-pointer:
- (The points-to info (DR_PTR_INFO) may be defined later.) **/
-
- tag = DR_SYMBOL_TAG (dr);
- gcc_assert (tag);
-
- /* If tag is a variable (and NOT_A_TAG) than a new symbol memory
- tag must be created with tag added to its may alias list. */
- if (!MTAG_P (tag))
- new_type_alias (vect_ptr, tag, DR_REF (dr));
- else
- set_symbol_mem_tag (vect_ptr, tag);
-
- /** Note: If the dataref is in an inner-loop nested in LOOP, and we are
- vectorizing LOOP (i.e. outer-loop vectorization), we need to create two
- def-use update cycles for the pointer: One relative to the outer-loop
- (LOOP), which is what steps (3) and (4) below do. The other is relative
- to the inner-loop (which is the inner-most loop containing the dataref),
- and this is done be step (5) below.
-
- When vectorizing inner-most loops, the vectorized loop (LOOP) is also the
- inner-most loop, and so steps (3),(4) work the same, and step (5) is
- redundant. Steps (3),(4) create the following:
-
- vp0 = &base_addr;
- LOOP: vp1 = phi(vp0,vp2)
- ...
- ...
- vp2 = vp1 + step
- goto LOOP
-
- If there is an inner-loop nested in loop, then step (5) will also be
- applied, and an additional update in the inner-loop will be created:
-
- vp0 = &base_addr;
- LOOP: vp1 = phi(vp0,vp2)
- ...
- inner: vp3 = phi(vp1,vp4)
- vp4 = vp3 + inner_step
- if () goto inner
- ...
- vp2 = vp1 + step
- if () goto LOOP */
-
- /** (3) Calculate the initial address the vector-pointer, and set
- the vector-pointer to point to it before the loop: **/
-
- /* Create: (&(base[init_val+offset]) in the loop preheader. */
-
- new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
- offset, loop);
- pe = loop_preheader_edge (loop);
- if (new_stmt_list)
- {
- new_bb = gsi_insert_seq_on_edge_immediate (pe, new_stmt_list);
- gcc_assert (!new_bb);
- }
-
- *initial_address = new_temp;
-
- /* Create: p = (vectype *) initial_base */
- vec_stmt = gimple_build_assign (vect_ptr,
- fold_convert (vect_ptr_type, new_temp));
- vect_ptr_init = make_ssa_name (vect_ptr, vec_stmt);
- gimple_assign_set_lhs (vec_stmt, vect_ptr_init);
- new_bb = gsi_insert_on_edge_immediate (pe, vec_stmt);
- gcc_assert (!new_bb);
-
-
- /** (4) Handle the updating of the vector-pointer inside the loop.
- This is needed when ONLY_INIT is false, and also when AT_LOOP
- is the inner-loop nested in LOOP (during outer-loop vectorization).
- **/
-
- if (only_init && at_loop == loop) /* No update in loop is required. */
- {
- /* Copy the points-to information if it exists. */
- if (DR_PTR_INFO (dr))
- duplicate_ssa_name_ptr_info (vect_ptr_init, DR_PTR_INFO (dr));
- vptr = vect_ptr_init;
- }
- else
- {
- /* The step of the vector pointer is the Vector Size. */
- tree step = TYPE_SIZE_UNIT (vectype);
- /* One exception to the above is when the scalar step of the load in
- LOOP is zero. In this case the step here is also zero. */
- if (*inv_p)
- step = size_zero_node;
-
- standard_iv_increment_position (loop, &incr_gsi, &insert_after);
-
- create_iv (vect_ptr_init,
- fold_convert (vect_ptr_type, step),
- vect_ptr, loop, &incr_gsi, insert_after,
- &indx_before_incr, &indx_after_incr);
- incr = gsi_stmt (incr_gsi);
- set_vinfo_for_stmt (incr, new_stmt_vec_info (incr, loop_vinfo));
-
- /* Copy the points-to information if it exists. */
- if (DR_PTR_INFO (dr))
- {
- duplicate_ssa_name_ptr_info (indx_before_incr, DR_PTR_INFO (dr));
- duplicate_ssa_name_ptr_info (indx_after_incr, DR_PTR_INFO (dr));
- }
- merge_alias_info (vect_ptr_init, indx_before_incr);
- merge_alias_info (vect_ptr_init, indx_after_incr);
- if (ptr_incr)
- *ptr_incr = incr;
-
- vptr = indx_before_incr;
- }
-
- if (!nested_in_vect_loop || only_init)
- return vptr;
-
-
- /** (5) Handle the updating of the vector-pointer inside the inner-loop
- nested in LOOP, if exists: **/
-
- gcc_assert (nested_in_vect_loop);
- if (!only_init)
- {
- standard_iv_increment_position (containing_loop, &incr_gsi,
- &insert_after);
- create_iv (vptr, fold_convert (vect_ptr_type, DR_STEP (dr)), vect_ptr,
- containing_loop, &incr_gsi, insert_after, &indx_before_incr,
- &indx_after_incr);
- incr = gsi_stmt (incr_gsi);
- set_vinfo_for_stmt (incr, new_stmt_vec_info (incr, loop_vinfo));
-
- /* Copy the points-to information if it exists. */
- if (DR_PTR_INFO (dr))
- {
- duplicate_ssa_name_ptr_info (indx_before_incr, DR_PTR_INFO (dr));
- duplicate_ssa_name_ptr_info (indx_after_incr, DR_PTR_INFO (dr));
- }
- merge_alias_info (vect_ptr_init, indx_before_incr);
- merge_alias_info (vect_ptr_init, indx_after_incr);
- if (ptr_incr)
- *ptr_incr = incr;
-
- return indx_before_incr;
- }
- else
- gcc_unreachable ();
-}
-
-
-/* Function bump_vector_ptr
-
- Increment a pointer (to a vector type) by vector-size. If requested,
- i.e. if PTR-INCR is given, then also connect the new increment stmt
- to the existing def-use update-chain of the pointer, by modifying
- the PTR_INCR as illustrated below:
-
- The pointer def-use update-chain before this function:
- DATAREF_PTR = phi (p_0, p_2)
- ....
- PTR_INCR: p_2 = DATAREF_PTR + step
-
- The pointer def-use update-chain after this function:
- DATAREF_PTR = phi (p_0, p_2)
- ....
- NEW_DATAREF_PTR = DATAREF_PTR + BUMP
- ....
- PTR_INCR: p_2 = NEW_DATAREF_PTR + step
-
- Input:
- DATAREF_PTR - ssa_name of a pointer (to vector type) that is being updated
- in the loop.
- PTR_INCR - optional. The stmt that updates the pointer in each iteration of
- the loop. The increment amount across iterations is expected
- to be vector_size.
- BSI - location where the new update stmt is to be placed.
- STMT - the original scalar memory-access stmt that is being vectorized.
- BUMP - optional. The offset by which to bump the pointer. If not given,
- the offset is assumed to be vector_size.
-
- Output: Return NEW_DATAREF_PTR as illustrated above.
-
-*/
-
-static tree
-bump_vector_ptr (tree dataref_ptr, gimple ptr_incr, gimple_stmt_iterator *gsi,
- gimple stmt, tree bump)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- tree ptr_var = SSA_NAME_VAR (dataref_ptr);
- tree update = TYPE_SIZE_UNIT (vectype);
- gimple incr_stmt;
- ssa_op_iter iter;
- use_operand_p use_p;
- tree new_dataref_ptr;
-
- if (bump)
- update = bump;
-
- incr_stmt = gimple_build_assign_with_ops (POINTER_PLUS_EXPR, ptr_var,
- dataref_ptr, update);
- new_dataref_ptr = make_ssa_name (ptr_var, incr_stmt);
- gimple_assign_set_lhs (incr_stmt, new_dataref_ptr);
- vect_finish_stmt_generation (stmt, incr_stmt, gsi);
-
- /* Copy the points-to information if it exists. */
- if (DR_PTR_INFO (dr))
- duplicate_ssa_name_ptr_info (new_dataref_ptr, DR_PTR_INFO (dr));
- merge_alias_info (new_dataref_ptr, dataref_ptr);
-
- if (!ptr_incr)
- return new_dataref_ptr;
-
- /* Update the vector-pointer's cross-iteration increment. */
- FOR_EACH_SSA_USE_OPERAND (use_p, ptr_incr, iter, SSA_OP_USE)
- {
- tree use = USE_FROM_PTR (use_p);
-
- if (use == dataref_ptr)
- SET_USE (use_p, new_dataref_ptr);
- else
- gcc_assert (tree_int_cst_compare (use, update) == 0);
- }
-
- return new_dataref_ptr;
-}
-
-
-/* Function vect_create_destination_var.
-
- Create a new temporary of type VECTYPE. */
-
-static tree
-vect_create_destination_var (tree scalar_dest, tree vectype)
-{
- tree vec_dest;
- const char *new_name;
- tree type;
- enum vect_var_kind kind;
-
- kind = vectype ? vect_simple_var : vect_scalar_var;
- type = vectype ? vectype : TREE_TYPE (scalar_dest);
-
- gcc_assert (TREE_CODE (scalar_dest) == SSA_NAME);
-
- new_name = get_name (scalar_dest);
- if (!new_name)
- new_name = "var_";
- vec_dest = vect_get_new_vect_var (type, kind, new_name);
- add_referenced_var (vec_dest);
-
- return vec_dest;
-}
-
-
-/* Function vect_init_vector.
-
- Insert a new stmt (INIT_STMT) that initializes a new vector variable with
- the vector elements of VECTOR_VAR. Place the initialization at BSI if it
- is not NULL. Otherwise, place the initialization at the loop preheader.
- Return the DEF of INIT_STMT.
- It will be used in the vectorization of STMT. */
-
-static tree
-vect_init_vector (gimple stmt, tree vector_var, tree vector_type,
- gimple_stmt_iterator *gsi)
-{
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
- tree new_var;
- gimple init_stmt;
- tree vec_oprnd;
- edge pe;
- tree new_temp;
- basic_block new_bb;
-
- new_var = vect_get_new_vect_var (vector_type, vect_simple_var, "cst_");
- add_referenced_var (new_var);
- init_stmt = gimple_build_assign (new_var, vector_var);
- new_temp = make_ssa_name (new_var, init_stmt);
- gimple_assign_set_lhs (init_stmt, new_temp);
-
- if (gsi)
- vect_finish_stmt_generation (stmt, init_stmt, gsi);
- else
- {
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-
- if (nested_in_vect_loop_p (loop, stmt))
- loop = loop->inner;
- pe = loop_preheader_edge (loop);
- new_bb = gsi_insert_on_edge_immediate (pe, init_stmt);
- gcc_assert (!new_bb);
- }
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "created new init_stmt: ");
- print_gimple_stmt (vect_dump, init_stmt, 0, TDF_SLIM);
- }
-
- vec_oprnd = gimple_assign_lhs (init_stmt);
- return vec_oprnd;
-}
-
-
-/* For constant and loop invariant defs of SLP_NODE this function returns
- (vector) defs (VEC_OPRNDS) that will be used in the vectorized stmts.
- OP_NUM determines if we gather defs for operand 0 or operand 1 of the scalar
- stmts. NUMBER_OF_VECTORS is the number of vector defs to create. */
-
-static void
-vect_get_constant_vectors (slp_tree slp_node, VEC(tree,heap) **vec_oprnds,
- unsigned int op_num, unsigned int number_of_vectors)
-{
- VEC (gimple, heap) *stmts = SLP_TREE_SCALAR_STMTS (slp_node);
- gimple stmt = VEC_index (gimple, stmts, 0);
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
- tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo);
- int nunits;
- tree vec_cst;
- tree t = NULL_TREE;
- int j, number_of_places_left_in_vector;
- tree vector_type;
- tree op, vop;
- int group_size = VEC_length (gimple, stmts);
- unsigned int vec_num, i;
- int number_of_copies = 1;
- VEC (tree, heap) *voprnds = VEC_alloc (tree, heap, number_of_vectors);
- bool constant_p, is_store;
-
- if (STMT_VINFO_DATA_REF (stmt_vinfo))
- {
- is_store = true;
- op = gimple_assign_rhs1 (stmt);
- }
- else
- {
- is_store = false;
- op = gimple_op (stmt, op_num + 1);
- }
-
- if (CONSTANT_CLASS_P (op))
- {
- vector_type = vectype;
- constant_p = true;
- }
- else
- {
- vector_type = get_vectype_for_scalar_type (TREE_TYPE (op));
- gcc_assert (vector_type);
- constant_p = false;
- }
-
- nunits = TYPE_VECTOR_SUBPARTS (vector_type);
-
- /* NUMBER_OF_COPIES is the number of times we need to use the same values in
- created vectors. It is greater than 1 if unrolling is performed.
-
- For example, we have two scalar operands, s1 and s2 (e.g., group of
- strided accesses of size two), while NUNITS is four (i.e., four scalars
- of this type can be packed in a vector). The output vector will contain
- two copies of each scalar operand: {s1, s2, s1, s2}. (NUMBER_OF_COPIES
- will be 2).
-
- If GROUP_SIZE > NUNITS, the scalars will be split into several vectors
- containing the operands.
-
- For example, NUNITS is four as before, and the group size is 8
- (s1, s2, ..., s8). We will create two vectors {s1, s2, s3, s4} and
- {s5, s6, s7, s8}. */
-
- number_of_copies = least_common_multiple (nunits, group_size) / group_size;
-
- number_of_places_left_in_vector = nunits;
- for (j = 0; j < number_of_copies; j++)
- {
- for (i = group_size - 1; VEC_iterate (gimple, stmts, i, stmt); i--)
- {
- if (is_store)
- op = gimple_assign_rhs1 (stmt);
- else
- op = gimple_op (stmt, op_num + 1);
-
- /* Create 'vect_ = {op0,op1,...,opn}'. */
- t = tree_cons (NULL_TREE, op, t);
-
- number_of_places_left_in_vector--;
-
- if (number_of_places_left_in_vector == 0)
- {
- number_of_places_left_in_vector = nunits;
-
- if (constant_p)
- vec_cst = build_vector (vector_type, t);
- else
- vec_cst = build_constructor_from_list (vector_type, t);
- VEC_quick_push (tree, voprnds,
- vect_init_vector (stmt, vec_cst, vector_type, NULL));
- t = NULL_TREE;
- }
- }
- }
-
- /* Since the vectors are created in the reverse order, we should invert
- them. */
- vec_num = VEC_length (tree, voprnds);
- for (j = vec_num - 1; j >= 0; j--)
- {
- vop = VEC_index (tree, voprnds, j);
- VEC_quick_push (tree, *vec_oprnds, vop);
- }
-
- VEC_free (tree, heap, voprnds);
-
- /* In case that VF is greater than the unrolling factor needed for the SLP
- group of stmts, NUMBER_OF_VECTORS to be created is greater than
- NUMBER_OF_SCALARS/NUNITS or NUNITS/NUMBER_OF_SCALARS, and hence we have
- to replicate the vectors. */
- while (number_of_vectors > VEC_length (tree, *vec_oprnds))
- {
- for (i = 0; VEC_iterate (tree, *vec_oprnds, i, vop) && i < vec_num; i++)
- VEC_quick_push (tree, *vec_oprnds, vop);
- }
-}
-
-
-/* Get vectorized definitions from SLP_NODE that contains corresponding
- vectorized def-stmts. */
-
-static void
-vect_get_slp_vect_defs (slp_tree slp_node, VEC (tree,heap) **vec_oprnds)
-{
- tree vec_oprnd;
- gimple vec_def_stmt;
- unsigned int i;
-
- gcc_assert (SLP_TREE_VEC_STMTS (slp_node));
-
- for (i = 0;
- VEC_iterate (gimple, SLP_TREE_VEC_STMTS (slp_node), i, vec_def_stmt);
- i++)
- {
- gcc_assert (vec_def_stmt);
- vec_oprnd = gimple_get_lhs (vec_def_stmt);
- VEC_quick_push (tree, *vec_oprnds, vec_oprnd);
- }
-}
-
-
-/* Get vectorized definitions for SLP_NODE.
- If the scalar definitions are loop invariants or constants, collect them and
- call vect_get_constant_vectors() to create vector stmts.
- Otherwise, the def-stmts must be already vectorized and the vectorized stmts
- must be stored in the LEFT/RIGHT node of SLP_NODE, and we call
- vect_get_slp_vect_defs() to retrieve them.
- If VEC_OPRNDS1 is NULL, don't get vector defs for the second operand (from
- the right node. This is used when the second operand must remain scalar. */
-
-static void
-vect_get_slp_defs (slp_tree slp_node, VEC (tree,heap) **vec_oprnds0,
- VEC (tree,heap) **vec_oprnds1)
-{
- gimple first_stmt;
- enum tree_code code;
- int number_of_vects;
- HOST_WIDE_INT lhs_size_unit, rhs_size_unit;
-
- first_stmt = VEC_index (gimple, SLP_TREE_SCALAR_STMTS (slp_node), 0);
- /* The number of vector defs is determined by the number of vector statements
- in the node from which we get those statements. */
- if (SLP_TREE_LEFT (slp_node))
- number_of_vects = SLP_TREE_NUMBER_OF_VEC_STMTS (SLP_TREE_LEFT (slp_node));
- else
- {
- number_of_vects = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
- /* Number of vector stmts was calculated according to LHS in
- vect_schedule_slp_instance(), fix it by replacing LHS with RHS, if
- necessary. See vect_get_smallest_scalar_type() for details. */
- vect_get_smallest_scalar_type (first_stmt, &lhs_size_unit,
- &rhs_size_unit);
- if (rhs_size_unit != lhs_size_unit)
- {
- number_of_vects *= rhs_size_unit;
- number_of_vects /= lhs_size_unit;
- }
- }
-
- /* Allocate memory for vectorized defs. */
- *vec_oprnds0 = VEC_alloc (tree, heap, number_of_vects);
-
- /* SLP_NODE corresponds either to a group of stores or to a group of
- unary/binary operations. We don't call this function for loads. */
- if (SLP_TREE_LEFT (slp_node))
- /* The defs are already vectorized. */
- vect_get_slp_vect_defs (SLP_TREE_LEFT (slp_node), vec_oprnds0);
- else
- /* Build vectors from scalar defs. */
- vect_get_constant_vectors (slp_node, vec_oprnds0, 0, number_of_vects);
-
- if (STMT_VINFO_DATA_REF (vinfo_for_stmt (first_stmt)))
- /* Since we don't call this function with loads, this is a group of
- stores. */
- return;
-
- code = gimple_assign_rhs_code (first_stmt);
- if (get_gimple_rhs_class (code) != GIMPLE_BINARY_RHS || !vec_oprnds1)
- return;
-
- /* The number of vector defs is determined by the number of vector statements
- in the node from which we get those statements. */
- if (SLP_TREE_RIGHT (slp_node))
- number_of_vects = SLP_TREE_NUMBER_OF_VEC_STMTS (SLP_TREE_RIGHT (slp_node));
- else
- number_of_vects = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
-
- *vec_oprnds1 = VEC_alloc (tree, heap, number_of_vects);
-
- if (SLP_TREE_RIGHT (slp_node))
- /* The defs are already vectorized. */
- vect_get_slp_vect_defs (SLP_TREE_RIGHT (slp_node), vec_oprnds1);
- else
- /* Build vectors from scalar defs. */
- vect_get_constant_vectors (slp_node, vec_oprnds1, 1, number_of_vects);
-}
-
-
-/* Function get_initial_def_for_induction
-
- Input:
- STMT - a stmt that performs an induction operation in the loop.
- IV_PHI - the initial value of the induction variable
-
- Output:
- Return a vector variable, initialized with the first VF values of
- the induction variable. E.g., for an iv with IV_PHI='X' and
- evolution S, for a vector of 4 units, we want to return:
- [X, X + S, X + 2*S, X + 3*S]. */
-
-static tree
-get_initial_def_for_induction (gimple iv_phi)
-{
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (iv_phi);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- tree scalar_type = TREE_TYPE (gimple_phi_result (iv_phi));
- tree vectype;
- int nunits;
- edge pe = loop_preheader_edge (loop);
- struct loop *iv_loop;
- basic_block new_bb;
- tree vec, vec_init, vec_step, t;
- tree access_fn;
- tree new_var;
- tree new_name;
- gimple init_stmt, induction_phi, new_stmt;
- tree induc_def, vec_def, vec_dest;
- tree init_expr, step_expr;
- int vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
- int i;
- bool ok;
- int ncopies;
- tree expr;
- stmt_vec_info phi_info = vinfo_for_stmt (iv_phi);
- bool nested_in_vect_loop = false;
- gimple_seq stmts = NULL;
- imm_use_iterator imm_iter;
- use_operand_p use_p;
- gimple exit_phi;
- edge latch_e;
- tree loop_arg;
- gimple_stmt_iterator si;
- basic_block bb = gimple_bb (iv_phi);
-
- vectype = get_vectype_for_scalar_type (scalar_type);
- gcc_assert (vectype);
- nunits = TYPE_VECTOR_SUBPARTS (vectype);
- ncopies = vf / nunits;
-
- gcc_assert (phi_info);
- gcc_assert (ncopies >= 1);
-
- /* Find the first insertion point in the BB. */
- si = gsi_after_labels (bb);
-
- if (INTEGRAL_TYPE_P (scalar_type) || POINTER_TYPE_P (scalar_type))
- step_expr = build_int_cst (scalar_type, 0);
- else
- step_expr = build_real (scalar_type, dconst0);
-
- /* Is phi in an inner-loop, while vectorizing an enclosing outer-loop? */
- if (nested_in_vect_loop_p (loop, iv_phi))
- {
- nested_in_vect_loop = true;
- iv_loop = loop->inner;
- }
- else
- iv_loop = loop;
- gcc_assert (iv_loop == (gimple_bb (iv_phi))->loop_father);
-
- latch_e = loop_latch_edge (iv_loop);
- loop_arg = PHI_ARG_DEF_FROM_EDGE (iv_phi, latch_e);
-
- access_fn = analyze_scalar_evolution (iv_loop, PHI_RESULT (iv_phi));
- gcc_assert (access_fn);
- ok = vect_is_simple_iv_evolution (iv_loop->num, access_fn,
- &init_expr, &step_expr);
- gcc_assert (ok);
- pe = loop_preheader_edge (iv_loop);
-
- /* Create the vector that holds the initial_value of the induction. */
- if (nested_in_vect_loop)
- {
- /* iv_loop is nested in the loop to be vectorized. init_expr had already
- been created during vectorization of previous stmts; We obtain it from
- the STMT_VINFO_VEC_STMT of the defining stmt. */
- tree iv_def = PHI_ARG_DEF_FROM_EDGE (iv_phi, loop_preheader_edge (iv_loop));
- vec_init = vect_get_vec_def_for_operand (iv_def, iv_phi, NULL);
- }
- else
- {
- /* iv_loop is the loop to be vectorized. Create:
- vec_init = [X, X+S, X+2*S, X+3*S] (S = step_expr, X = init_expr) */
- new_var = vect_get_new_vect_var (scalar_type, vect_scalar_var, "var_");
- add_referenced_var (new_var);
-
- new_name = force_gimple_operand (init_expr, &stmts, false, new_var);
- if (stmts)
- {
- new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
- gcc_assert (!new_bb);
- }
-
- t = NULL_TREE;
- t = tree_cons (NULL_TREE, init_expr, t);
- for (i = 1; i < nunits; i++)
- {
- /* Create: new_name_i = new_name + step_expr */
- enum tree_code code = POINTER_TYPE_P (scalar_type)
- ? POINTER_PLUS_EXPR : PLUS_EXPR;
- init_stmt = gimple_build_assign_with_ops (code, new_var,
- new_name, step_expr);
- new_name = make_ssa_name (new_var, init_stmt);
- gimple_assign_set_lhs (init_stmt, new_name);
-
- new_bb = gsi_insert_on_edge_immediate (pe, init_stmt);
- gcc_assert (!new_bb);
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "created new init_stmt: ");
- print_gimple_stmt (vect_dump, init_stmt, 0, TDF_SLIM);
- }
- t = tree_cons (NULL_TREE, new_name, t);
- }
- /* Create a vector from [new_name_0, new_name_1, ..., new_name_nunits-1] */
- vec = build_constructor_from_list (vectype, nreverse (t));
- vec_init = vect_init_vector (iv_phi, vec, vectype, NULL);
- }
-
-
- /* Create the vector that holds the step of the induction. */
- if (nested_in_vect_loop)
- /* iv_loop is nested in the loop to be vectorized. Generate:
- vec_step = [S, S, S, S] */
- new_name = step_expr;
- else
- {
- /* iv_loop is the loop to be vectorized. Generate:
- vec_step = [VF*S, VF*S, VF*S, VF*S] */
- expr = build_int_cst (scalar_type, vf);
- new_name = fold_build2 (MULT_EXPR, scalar_type, expr, step_expr);
- }
-
- t = NULL_TREE;
- for (i = 0; i < nunits; i++)
- t = tree_cons (NULL_TREE, unshare_expr (new_name), t);
- gcc_assert (CONSTANT_CLASS_P (new_name));
- vec = build_vector (vectype, t);
- vec_step = vect_init_vector (iv_phi, vec, vectype, NULL);
-
-
- /* Create the following def-use cycle:
- loop prolog:
- vec_init = ...
- vec_step = ...
- loop:
- vec_iv = PHI <vec_init, vec_loop>
- ...
- STMT
- ...
- vec_loop = vec_iv + vec_step; */
-
- /* Create the induction-phi that defines the induction-operand. */
- vec_dest = vect_get_new_vect_var (vectype, vect_simple_var, "vec_iv_");
- add_referenced_var (vec_dest);
- induction_phi = create_phi_node (vec_dest, iv_loop->header);
- set_vinfo_for_stmt (induction_phi,
- new_stmt_vec_info (induction_phi, loop_vinfo));
- induc_def = PHI_RESULT (induction_phi);
-
- /* Create the iv update inside the loop */
- new_stmt = gimple_build_assign_with_ops (PLUS_EXPR, vec_dest,
- induc_def, vec_step);
- vec_def = make_ssa_name (vec_dest, new_stmt);
- gimple_assign_set_lhs (new_stmt, vec_def);
- gsi_insert_before (&si, new_stmt, GSI_SAME_STMT);
- set_vinfo_for_stmt (new_stmt, new_stmt_vec_info (new_stmt, loop_vinfo));
-
- /* Set the arguments of the phi node: */
- add_phi_arg (induction_phi, vec_init, pe);
- add_phi_arg (induction_phi, vec_def, loop_latch_edge (iv_loop));
-
-
- /* In case that vectorization factor (VF) is bigger than the number
- of elements that we can fit in a vectype (nunits), we have to generate
- more than one vector stmt - i.e - we need to "unroll" the
- vector stmt by a factor VF/nunits. For more details see documentation
- in vectorizable_operation. */
-
- if (ncopies > 1)
- {
- stmt_vec_info prev_stmt_vinfo;
- /* FORNOW. This restriction should be relaxed. */
- gcc_assert (!nested_in_vect_loop);
-
- /* Create the vector that holds the step of the induction. */
- expr = build_int_cst (scalar_type, nunits);
- new_name = fold_build2 (MULT_EXPR, scalar_type, expr, step_expr);
- t = NULL_TREE;
- for (i = 0; i < nunits; i++)
- t = tree_cons (NULL_TREE, unshare_expr (new_name), t);
- gcc_assert (CONSTANT_CLASS_P (new_name));
- vec = build_vector (vectype, t);
- vec_step = vect_init_vector (iv_phi, vec, vectype, NULL);
-
- vec_def = induc_def;
- prev_stmt_vinfo = vinfo_for_stmt (induction_phi);
- for (i = 1; i < ncopies; i++)
- {
- /* vec_i = vec_prev + vec_step */
- new_stmt = gimple_build_assign_with_ops (PLUS_EXPR, vec_dest,
- vec_def, vec_step);
- vec_def = make_ssa_name (vec_dest, new_stmt);
- gimple_assign_set_lhs (new_stmt, vec_def);
-
- gsi_insert_before (&si, new_stmt, GSI_SAME_STMT);
- set_vinfo_for_stmt (new_stmt,
- new_stmt_vec_info (new_stmt, loop_vinfo));
- STMT_VINFO_RELATED_STMT (prev_stmt_vinfo) = new_stmt;
- prev_stmt_vinfo = vinfo_for_stmt (new_stmt);
- }
- }
-
- if (nested_in_vect_loop)
- {
- /* Find the loop-closed exit-phi of the induction, and record
- the final vector of induction results: */
- exit_phi = NULL;
- FOR_EACH_IMM_USE_FAST (use_p, imm_iter, loop_arg)
- {
- if (!flow_bb_inside_loop_p (iv_loop, gimple_bb (USE_STMT (use_p))))
- {
- exit_phi = USE_STMT (use_p);
- break;
- }
- }
- if (exit_phi)
- {
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (exit_phi);
- /* FORNOW. Currently not supporting the case that an inner-loop induction
- is not used in the outer-loop (i.e. only outside the outer-loop). */
- gcc_assert (STMT_VINFO_RELEVANT_P (stmt_vinfo)
- && !STMT_VINFO_LIVE_P (stmt_vinfo));
-
- STMT_VINFO_VEC_STMT (stmt_vinfo) = new_stmt;
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "vector of inductions after inner-loop:");
- print_gimple_stmt (vect_dump, new_stmt, 0, TDF_SLIM);
- }
- }
- }
-
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "transform induction: created def-use cycle: ");
- print_gimple_stmt (vect_dump, induction_phi, 0, TDF_SLIM);
- fprintf (vect_dump, "\n");
- print_gimple_stmt (vect_dump, SSA_NAME_DEF_STMT (vec_def), 0, TDF_SLIM);
- }
-
- STMT_VINFO_VEC_STMT (phi_info) = induction_phi;
- return induc_def;
-}
-
-
-/* Function vect_get_vec_def_for_operand.
-
- OP is an operand in STMT. This function returns a (vector) def that will be
- used in the vectorized stmt for STMT.
-
- In the case that OP is an SSA_NAME which is defined in the loop, then
- STMT_VINFO_VEC_STMT of the defining stmt holds the relevant def.
-
- In case OP is an invariant or constant, a new stmt that creates a vector def
- needs to be introduced. */
-
-static tree
-vect_get_vec_def_for_operand (tree op, gimple stmt, tree *scalar_def)
-{
- tree vec_oprnd;
- gimple vec_stmt;
- gimple def_stmt;
- stmt_vec_info def_stmt_info = NULL;
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
- tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo);
- unsigned int nunits = TYPE_VECTOR_SUBPARTS (vectype);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
- tree vec_inv;
- tree vec_cst;
- tree t = NULL_TREE;
- tree def;
- int i;
- enum vect_def_type dt;
- bool is_simple_use;
- tree vector_type;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "vect_get_vec_def_for_operand: ");
- print_generic_expr (vect_dump, op, TDF_SLIM);
- }
-
- is_simple_use = vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt);
- gcc_assert (is_simple_use);
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- if (def)
- {
- fprintf (vect_dump, "def = ");
- print_generic_expr (vect_dump, def, TDF_SLIM);
- }
- if (def_stmt)
- {
- fprintf (vect_dump, " def_stmt = ");
- print_gimple_stmt (vect_dump, def_stmt, 0, TDF_SLIM);
- }
- }
-
- switch (dt)
- {
- /* Case 1: operand is a constant. */
- case vect_constant_def:
- {
- if (scalar_def)
- *scalar_def = op;
-
- /* Create 'vect_cst_ = {cst,cst,...,cst}' */
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Create vector_cst. nunits = %d", nunits);
-
- for (i = nunits - 1; i >= 0; --i)
- {
- t = tree_cons (NULL_TREE, op, t);
- }
- vec_cst = build_vector (vectype, t);
- return vect_init_vector (stmt, vec_cst, vectype, NULL);
- }
-
- /* Case 2: operand is defined outside the loop - loop invariant. */
- case vect_invariant_def:
- {
- vector_type = get_vectype_for_scalar_type (TREE_TYPE (def));
- gcc_assert (vector_type);
- nunits = TYPE_VECTOR_SUBPARTS (vector_type);
-
- if (scalar_def)
- *scalar_def = def;
-
- /* Create 'vec_inv = {inv,inv,..,inv}' */
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Create vector_inv.");
-
- for (i = nunits - 1; i >= 0; --i)
- {
- t = tree_cons (NULL_TREE, def, t);
- }
-
- /* FIXME: use build_constructor directly. */
- vec_inv = build_constructor_from_list (vector_type, t);
- return vect_init_vector (stmt, vec_inv, vector_type, NULL);
- }
-
- /* Case 3: operand is defined inside the loop. */
- case vect_loop_def:
- {
- if (scalar_def)
- *scalar_def = NULL/* FIXME tuples: def_stmt*/;
-
- /* Get the def from the vectorized stmt. */
- def_stmt_info = vinfo_for_stmt (def_stmt);
- vec_stmt = STMT_VINFO_VEC_STMT (def_stmt_info);
- gcc_assert (vec_stmt);
- if (gimple_code (vec_stmt) == GIMPLE_PHI)
- vec_oprnd = PHI_RESULT (vec_stmt);
- else if (is_gimple_call (vec_stmt))
- vec_oprnd = gimple_call_lhs (vec_stmt);
- else
- vec_oprnd = gimple_assign_lhs (vec_stmt);
- return vec_oprnd;
- }
-
- /* Case 4: operand is defined by a loop header phi - reduction */
- case vect_reduction_def:
- {
- struct loop *loop;
-
- gcc_assert (gimple_code (def_stmt) == GIMPLE_PHI);
- loop = (gimple_bb (def_stmt))->loop_father;
-
- /* Get the def before the loop */
- op = PHI_ARG_DEF_FROM_EDGE (def_stmt, loop_preheader_edge (loop));
- return get_initial_def_for_reduction (stmt, op, scalar_def);
- }
-
- /* Case 5: operand is defined by loop-header phi - induction. */
- case vect_induction_def:
- {
- gcc_assert (gimple_code (def_stmt) == GIMPLE_PHI);
-
- /* Get the def from the vectorized stmt. */
- def_stmt_info = vinfo_for_stmt (def_stmt);
- vec_stmt = STMT_VINFO_VEC_STMT (def_stmt_info);
- gcc_assert (vec_stmt && gimple_code (vec_stmt) == GIMPLE_PHI);
- vec_oprnd = PHI_RESULT (vec_stmt);
- return vec_oprnd;
- }
-
- default:
- gcc_unreachable ();
- }
-}
-
-
-/* Function vect_get_vec_def_for_stmt_copy
-
- Return a vector-def for an operand. This function is used when the
- vectorized stmt to be created (by the caller to this function) is a "copy"
- created in case the vectorized result cannot fit in one vector, and several
- copies of the vector-stmt are required. In this case the vector-def is
- retrieved from the vector stmt recorded in the STMT_VINFO_RELATED_STMT field
- of the stmt that defines VEC_OPRND.
- DT is the type of the vector def VEC_OPRND.
-
- Context:
- In case the vectorization factor (VF) is bigger than the number
- of elements that can fit in a vectype (nunits), we have to generate
- more than one vector stmt to vectorize the scalar stmt. This situation
- arises when there are multiple data-types operated upon in the loop; the
- smallest data-type determines the VF, and as a result, when vectorizing
- stmts operating on wider types we need to create 'VF/nunits' "copies" of the
- vector stmt (each computing a vector of 'nunits' results, and together
- computing 'VF' results in each iteration). This function is called when
- vectorizing such a stmt (e.g. vectorizing S2 in the illustration below, in
- which VF=16 and nunits=4, so the number of copies required is 4):
-
- scalar stmt: vectorized into: STMT_VINFO_RELATED_STMT
-
- S1: x = load VS1.0: vx.0 = memref0 VS1.1
- VS1.1: vx.1 = memref1 VS1.2
- VS1.2: vx.2 = memref2 VS1.3
- VS1.3: vx.3 = memref3
-
- S2: z = x + ... VSnew.0: vz0 = vx.0 + ... VSnew.1
- VSnew.1: vz1 = vx.1 + ... VSnew.2
- VSnew.2: vz2 = vx.2 + ... VSnew.3
- VSnew.3: vz3 = vx.3 + ...
-
- The vectorization of S1 is explained in vectorizable_load.
- The vectorization of S2:
- To create the first vector-stmt out of the 4 copies - VSnew.0 -
- the function 'vect_get_vec_def_for_operand' is called to
- get the relevant vector-def for each operand of S2. For operand x it
- returns the vector-def 'vx.0'.
-
- To create the remaining copies of the vector-stmt (VSnew.j), this
- function is called to get the relevant vector-def for each operand. It is
- obtained from the respective VS1.j stmt, which is recorded in the
- STMT_VINFO_RELATED_STMT field of the stmt that defines VEC_OPRND.
-
- For example, to obtain the vector-def 'vx.1' in order to create the
- vector stmt 'VSnew.1', this function is called with VEC_OPRND='vx.0'.
- Given 'vx0' we obtain the stmt that defines it ('VS1.0'); from the
- STMT_VINFO_RELATED_STMT field of 'VS1.0' we obtain the next copy - 'VS1.1',
- and return its def ('vx.1').
- Overall, to create the above sequence this function will be called 3 times:
- vx.1 = vect_get_vec_def_for_stmt_copy (dt, vx.0);
- vx.2 = vect_get_vec_def_for_stmt_copy (dt, vx.1);
- vx.3 = vect_get_vec_def_for_stmt_copy (dt, vx.2); */
-
-static tree
-vect_get_vec_def_for_stmt_copy (enum vect_def_type dt, tree vec_oprnd)
-{
- gimple vec_stmt_for_operand;
- stmt_vec_info def_stmt_info;
-
- /* Do nothing; can reuse same def. */
- if (dt == vect_invariant_def || dt == vect_constant_def )
- return vec_oprnd;
-
- vec_stmt_for_operand = SSA_NAME_DEF_STMT (vec_oprnd);
- def_stmt_info = vinfo_for_stmt (vec_stmt_for_operand);
- gcc_assert (def_stmt_info);
- vec_stmt_for_operand = STMT_VINFO_RELATED_STMT (def_stmt_info);
- gcc_assert (vec_stmt_for_operand);
- vec_oprnd = gimple_get_lhs (vec_stmt_for_operand);
- if (gimple_code (vec_stmt_for_operand) == GIMPLE_PHI)
- vec_oprnd = PHI_RESULT (vec_stmt_for_operand);
- else
- vec_oprnd = gimple_get_lhs (vec_stmt_for_operand);
- return vec_oprnd;
-}
-
-
-/* Get vectorized definitions for the operands to create a copy of an original
- stmt. See vect_get_vec_def_for_stmt_copy() for details. */
-
-static void
-vect_get_vec_defs_for_stmt_copy (enum vect_def_type *dt,
- VEC(tree,heap) **vec_oprnds0,
- VEC(tree,heap) **vec_oprnds1)
-{
- tree vec_oprnd = VEC_pop (tree, *vec_oprnds0);
-
- vec_oprnd = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd);
- VEC_quick_push (tree, *vec_oprnds0, vec_oprnd);
-
- if (vec_oprnds1 && *vec_oprnds1)
- {
- vec_oprnd = VEC_pop (tree, *vec_oprnds1);
- vec_oprnd = vect_get_vec_def_for_stmt_copy (dt[1], vec_oprnd);
- VEC_quick_push (tree, *vec_oprnds1, vec_oprnd);
- }
-}
-
-
-/* Get vectorized definitions for OP0 and OP1, or SLP_NODE if it is not NULL. */
-
-static void
-vect_get_vec_defs (tree op0, tree op1, gimple stmt,
- VEC(tree,heap) **vec_oprnds0, VEC(tree,heap) **vec_oprnds1,
- slp_tree slp_node)
-{
- if (slp_node)
- vect_get_slp_defs (slp_node, vec_oprnds0, vec_oprnds1);
- else
- {
- tree vec_oprnd;
-
- *vec_oprnds0 = VEC_alloc (tree, heap, 1);
- vec_oprnd = vect_get_vec_def_for_operand (op0, stmt, NULL);
- VEC_quick_push (tree, *vec_oprnds0, vec_oprnd);
-
- if (op1)
- {
- *vec_oprnds1 = VEC_alloc (tree, heap, 1);
- vec_oprnd = vect_get_vec_def_for_operand (op1, stmt, NULL);
- VEC_quick_push (tree, *vec_oprnds1, vec_oprnd);
- }
- }
-}
-
-
-/* Function vect_finish_stmt_generation.
-
- Insert a new stmt. */
-
-static void
-vect_finish_stmt_generation (gimple stmt, gimple vec_stmt,
- gimple_stmt_iterator *gsi)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
-
- gcc_assert (gimple_code (stmt) != GIMPLE_LABEL);
-
- gsi_insert_before (gsi, vec_stmt, GSI_SAME_STMT);
-
- set_vinfo_for_stmt (vec_stmt, new_stmt_vec_info (vec_stmt, loop_vinfo));
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "add new stmt: ");
- print_gimple_stmt (vect_dump, vec_stmt, 0, TDF_SLIM);
- }
-
- gimple_set_location (vec_stmt, gimple_location (gsi_stmt (*gsi)));
-}
-
-
-/* Function get_initial_def_for_reduction
-
- Input:
- STMT - a stmt that performs a reduction operation in the loop.
- INIT_VAL - the initial value of the reduction variable
-
- Output:
- ADJUSTMENT_DEF - a tree that holds a value to be added to the final result
- of the reduction (used for adjusting the epilog - see below).
- Return a vector variable, initialized according to the operation that STMT
- performs. This vector will be used as the initial value of the
- vector of partial results.
-
- Option1 (adjust in epilog): Initialize the vector as follows:
- add: [0,0,...,0,0]
- mult: [1,1,...,1,1]
- min/max: [init_val,init_val,..,init_val,init_val]
- bit and/or: [init_val,init_val,..,init_val,init_val]
- and when necessary (e.g. add/mult case) let the caller know
- that it needs to adjust the result by init_val.
-
- Option2: Initialize the vector as follows:
- add: [0,0,...,0,init_val]
- mult: [1,1,...,1,init_val]
- min/max: [init_val,init_val,...,init_val]
- bit and/or: [init_val,init_val,...,init_val]
- and no adjustments are needed.
-
- For example, for the following code:
-
- s = init_val;
- for (i=0;i<n;i++)
- s = s + a[i];
-
- STMT is 's = s + a[i]', and the reduction variable is 's'.
- For a vector of 4 units, we want to return either [0,0,0,init_val],
- or [0,0,0,0] and let the caller know that it needs to adjust
- the result at the end by 'init_val'.
-
- FORNOW, we are using the 'adjust in epilog' scheme, because this way the
- initialization vector is simpler (same element in all entries).
- A cost model should help decide between these two schemes. */
-
-static tree
-get_initial_def_for_reduction (gimple stmt, tree init_val, tree *adjustment_def)
-{
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo);
- int nunits = TYPE_VECTOR_SUBPARTS (vectype);
- tree scalar_type = TREE_TYPE (vectype);
- enum tree_code code = gimple_assign_rhs_code (stmt);
- tree type = TREE_TYPE (init_val);
- tree vecdef;
- tree def_for_init;
- tree init_def;
- tree t = NULL_TREE;
- int i;
- bool nested_in_vect_loop = false;
-
- gcc_assert (POINTER_TYPE_P (type) || INTEGRAL_TYPE_P (type) || SCALAR_FLOAT_TYPE_P (type));
- if (nested_in_vect_loop_p (loop, stmt))
- nested_in_vect_loop = true;
- else
- gcc_assert (loop == (gimple_bb (stmt))->loop_father);
-
- vecdef = vect_get_vec_def_for_operand (init_val, stmt, NULL);
-
- switch (code)
- {
- case WIDEN_SUM_EXPR:
- case DOT_PROD_EXPR:
- case PLUS_EXPR:
- if (nested_in_vect_loop)
- *adjustment_def = vecdef;
- else
- *adjustment_def = init_val;
- /* Create a vector of zeros for init_def. */
- if (SCALAR_FLOAT_TYPE_P (scalar_type))
- def_for_init = build_real (scalar_type, dconst0);
- else
- def_for_init = build_int_cst (scalar_type, 0);
-
- for (i = nunits - 1; i >= 0; --i)
- t = tree_cons (NULL_TREE, def_for_init, t);
- init_def = build_vector (vectype, t);
- break;
-
- case MIN_EXPR:
- case MAX_EXPR:
- *adjustment_def = NULL_TREE;
- init_def = vecdef;
- break;
-
- default:
- gcc_unreachable ();
- }
-
- return init_def;
-}
-
-
-/* Function vect_create_epilog_for_reduction
-
- Create code at the loop-epilog to finalize the result of a reduction
- computation.
-
- VECT_DEF is a vector of partial results.
- REDUC_CODE is the tree-code for the epilog reduction.
- NCOPIES is > 1 in case the vectorization factor (VF) is bigger than the
- number of elements that we can fit in a vectype (nunits). In this case
- we have to generate more than one vector stmt - i.e - we need to "unroll"
- the vector stmt by a factor VF/nunits. For more details see documentation
- in vectorizable_operation.
- STMT is the scalar reduction stmt that is being vectorized.
- REDUCTION_PHI is the phi-node that carries the reduction computation.
-
- This function:
- 1. Creates the reduction def-use cycle: sets the arguments for
- REDUCTION_PHI:
- The loop-entry argument is the vectorized initial-value of the reduction.
- The loop-latch argument is VECT_DEF - the vector of partial sums.
- 2. "Reduces" the vector of partial results VECT_DEF into a single result,
- by applying the operation specified by REDUC_CODE if available, or by
- other means (whole-vector shifts or a scalar loop).
- The function also creates a new phi node at the loop exit to preserve
- loop-closed form, as illustrated below.
-
- The flow at the entry to this function:
-
- loop:
- vec_def = phi <null, null> # REDUCTION_PHI
- VECT_DEF = vector_stmt # vectorized form of STMT
- s_loop = scalar_stmt # (scalar) STMT
- loop_exit:
- s_out0 = phi <s_loop> # (scalar) EXIT_PHI
- use <s_out0>
- use <s_out0>
-
- The above is transformed by this function into:
-
- loop:
- vec_def = phi <vec_init, VECT_DEF> # REDUCTION_PHI
- VECT_DEF = vector_stmt # vectorized form of STMT
- s_loop = scalar_stmt # (scalar) STMT
- loop_exit:
- s_out0 = phi <s_loop> # (scalar) EXIT_PHI
- v_out1 = phi <VECT_DEF> # NEW_EXIT_PHI
- v_out2 = reduce <v_out1>
- s_out3 = extract_field <v_out2, 0>
- s_out4 = adjust_result <s_out3>
- use <s_out4>
- use <s_out4>
-*/
-
-static void
-vect_create_epilog_for_reduction (tree vect_def, gimple stmt,
- int ncopies,
- enum tree_code reduc_code,
- gimple reduction_phi)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- stmt_vec_info prev_phi_info;
- tree vectype;
- enum machine_mode mode;
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- basic_block exit_bb;
- tree scalar_dest;
- tree scalar_type;
- gimple new_phi = NULL, phi;
- gimple_stmt_iterator exit_gsi;
- tree vec_dest;
- tree new_temp = NULL_TREE;
- tree new_name;
- gimple epilog_stmt = NULL;
- tree new_scalar_dest, new_dest;
- gimple exit_phi;
- tree bitsize, bitpos, bytesize;
- enum tree_code code = gimple_assign_rhs_code (stmt);
- tree adjustment_def;
- tree vec_initial_def, def;
- tree orig_name;
- imm_use_iterator imm_iter;
- use_operand_p use_p;
- bool extract_scalar_result = false;
- tree reduction_op, expr;
- gimple orig_stmt;
- gimple use_stmt;
- bool nested_in_vect_loop = false;
- VEC(gimple,heap) *phis = NULL;
- enum vect_def_type dt = vect_unknown_def_type;
- int j, i;
-
- if (nested_in_vect_loop_p (loop, stmt))
- {
- loop = loop->inner;
- nested_in_vect_loop = true;
- }
-
- switch (get_gimple_rhs_class (gimple_assign_rhs_code (stmt)))
- {
- case GIMPLE_SINGLE_RHS:
- gcc_assert (TREE_OPERAND_LENGTH (gimple_assign_rhs1 (stmt)) == ternary_op);
- reduction_op = TREE_OPERAND (gimple_assign_rhs1 (stmt), 2);
- break;
- case GIMPLE_UNARY_RHS:
- reduction_op = gimple_assign_rhs1 (stmt);
- break;
- case GIMPLE_BINARY_RHS:
- reduction_op = gimple_assign_rhs2 (stmt);
- break;
- default:
- gcc_unreachable ();
- }
-
- vectype = get_vectype_for_scalar_type (TREE_TYPE (reduction_op));
- gcc_assert (vectype);
- mode = TYPE_MODE (vectype);
-
- /*** 1. Create the reduction def-use cycle ***/
-
- /* For the case of reduction, vect_get_vec_def_for_operand returns
- the scalar def before the loop, that defines the initial value
- of the reduction variable. */
- vec_initial_def = vect_get_vec_def_for_operand (reduction_op, stmt,
- &adjustment_def);
-
- phi = reduction_phi;
- def = vect_def;
- for (j = 0; j < ncopies; j++)
- {
- /* 1.1 set the loop-entry arg of the reduction-phi: */
- add_phi_arg (phi, vec_initial_def, loop_preheader_edge (loop));
-
- /* 1.2 set the loop-latch arg for the reduction-phi: */
- if (j > 0)
- def = vect_get_vec_def_for_stmt_copy (dt, def);
- add_phi_arg (phi, def, loop_latch_edge (loop));
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "transform reduction: created def-use cycle: ");
- print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
- fprintf (vect_dump, "\n");
- print_gimple_stmt (vect_dump, SSA_NAME_DEF_STMT (def), 0, TDF_SLIM);
- }
-
- phi = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (phi));
- }
-
- /*** 2. Create epilog code
- The reduction epilog code operates across the elements of the vector
- of partial results computed by the vectorized loop.
- The reduction epilog code consists of:
- step 1: compute the scalar result in a vector (v_out2)
- step 2: extract the scalar result (s_out3) from the vector (v_out2)
- step 3: adjust the scalar result (s_out3) if needed.
-
- Step 1 can be accomplished using one the following three schemes:
- (scheme 1) using reduc_code, if available.
- (scheme 2) using whole-vector shifts, if available.
- (scheme 3) using a scalar loop. In this case steps 1+2 above are
- combined.
-
- The overall epilog code looks like this:
-
- s_out0 = phi <s_loop> # original EXIT_PHI
- v_out1 = phi <VECT_DEF> # NEW_EXIT_PHI
- v_out2 = reduce <v_out1> # step 1
- s_out3 = extract_field <v_out2, 0> # step 2
- s_out4 = adjust_result <s_out3> # step 3
-
- (step 3 is optional, and steps 1 and 2 may be combined).
- Lastly, the uses of s_out0 are replaced by s_out4.
-
- ***/
-
- /* 2.1 Create new loop-exit-phi to preserve loop-closed form:
- v_out1 = phi <v_loop> */
-
- exit_bb = single_exit (loop)->dest;
- def = vect_def;
- prev_phi_info = NULL;
- for (j = 0; j < ncopies; j++)
- {
- phi = create_phi_node (SSA_NAME_VAR (vect_def), exit_bb);
- set_vinfo_for_stmt (phi, new_stmt_vec_info (phi, loop_vinfo));
- if (j == 0)
- new_phi = phi;
- else
- {
- def = vect_get_vec_def_for_stmt_copy (dt, def);
- STMT_VINFO_RELATED_STMT (prev_phi_info) = phi;
- }
- SET_PHI_ARG_DEF (phi, single_exit (loop)->dest_idx, def);
- prev_phi_info = vinfo_for_stmt (phi);
- }
- exit_gsi = gsi_after_labels (exit_bb);
-
- /* 2.2 Get the relevant tree-code to use in the epilog for schemes 2,3
- (i.e. when reduc_code is not available) and in the final adjustment
- code (if needed). Also get the original scalar reduction variable as
- defined in the loop. In case STMT is a "pattern-stmt" (i.e. - it
- represents a reduction pattern), the tree-code and scalar-def are
- taken from the original stmt that the pattern-stmt (STMT) replaces.
- Otherwise (it is a regular reduction) - the tree-code and scalar-def
- are taken from STMT. */
-
- orig_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
- if (!orig_stmt)
- {
- /* Regular reduction */
- orig_stmt = stmt;
- }
- else
- {
- /* Reduction pattern */
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (orig_stmt);
- gcc_assert (STMT_VINFO_IN_PATTERN_P (stmt_vinfo));
- gcc_assert (STMT_VINFO_RELATED_STMT (stmt_vinfo) == stmt);
- }
- code = gimple_assign_rhs_code (orig_stmt);
- scalar_dest = gimple_assign_lhs (orig_stmt);
- scalar_type = TREE_TYPE (scalar_dest);
- new_scalar_dest = vect_create_destination_var (scalar_dest, NULL);
- bitsize = TYPE_SIZE (scalar_type);
- bytesize = TYPE_SIZE_UNIT (scalar_type);
-
-
- /* In case this is a reduction in an inner-loop while vectorizing an outer
- loop - we don't need to extract a single scalar result at the end of the
- inner-loop. The final vector of partial results will be used in the
- vectorized outer-loop, or reduced to a scalar result at the end of the
- outer-loop. */
- if (nested_in_vect_loop)
- goto vect_finalize_reduction;
-
- /* FORNOW */
- gcc_assert (ncopies == 1);
-
- /* 2.3 Create the reduction code, using one of the three schemes described
- above. */
-
- if (reduc_code < NUM_TREE_CODES)
- {
- tree tmp;
-
- /*** Case 1: Create:
- v_out2 = reduc_expr <v_out1> */
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Reduce using direct vector reduction.");
-
- vec_dest = vect_create_destination_var (scalar_dest, vectype);
- tmp = build1 (reduc_code, vectype, PHI_RESULT (new_phi));
- epilog_stmt = gimple_build_assign (vec_dest, tmp);
- new_temp = make_ssa_name (vec_dest, epilog_stmt);
- gimple_assign_set_lhs (epilog_stmt, new_temp);
- gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
-
- extract_scalar_result = true;
- }
- else
- {
- enum tree_code shift_code = 0;
- bool have_whole_vector_shift = true;
- int bit_offset;
- int element_bitsize = tree_low_cst (bitsize, 1);
- int vec_size_in_bits = tree_low_cst (TYPE_SIZE (vectype), 1);
- tree vec_temp;
-
- if (optab_handler (vec_shr_optab, mode)->insn_code != CODE_FOR_nothing)
- shift_code = VEC_RSHIFT_EXPR;
- else
- have_whole_vector_shift = false;
-
- /* Regardless of whether we have a whole vector shift, if we're
- emulating the operation via tree-vect-generic, we don't want
- to use it. Only the first round of the reduction is likely
- to still be profitable via emulation. */
- /* ??? It might be better to emit a reduction tree code here, so that
- tree-vect-generic can expand the first round via bit tricks. */
- if (!VECTOR_MODE_P (mode))
- have_whole_vector_shift = false;
- else
- {
- optab optab = optab_for_tree_code (code, vectype, optab_default);
- if (optab_handler (optab, mode)->insn_code == CODE_FOR_nothing)
- have_whole_vector_shift = false;
- }
-
- if (have_whole_vector_shift)
- {
- /*** Case 2: Create:
- for (offset = VS/2; offset >= element_size; offset/=2)
- {
- Create: va' = vec_shift <va, offset>
- Create: va = vop <va, va'>
- } */
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Reduce using vector shifts");
-
- vec_dest = vect_create_destination_var (scalar_dest, vectype);
- new_temp = PHI_RESULT (new_phi);
-
- for (bit_offset = vec_size_in_bits/2;
- bit_offset >= element_bitsize;
- bit_offset /= 2)
- {
- tree bitpos = size_int (bit_offset);
- epilog_stmt = gimple_build_assign_with_ops (shift_code, vec_dest,
- new_temp, bitpos);
- new_name = make_ssa_name (vec_dest, epilog_stmt);
- gimple_assign_set_lhs (epilog_stmt, new_name);
- gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
-
- epilog_stmt = gimple_build_assign_with_ops (code, vec_dest,
- new_name, new_temp);
- new_temp = make_ssa_name (vec_dest, epilog_stmt);
- gimple_assign_set_lhs (epilog_stmt, new_temp);
- gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
- }
-
- extract_scalar_result = true;
- }
- else
- {
- tree rhs;
-
- /*** Case 3: Create:
- s = extract_field <v_out2, 0>
- for (offset = element_size;
- offset < vector_size;
- offset += element_size;)
- {
- Create: s' = extract_field <v_out2, offset>
- Create: s = op <s, s'>
- } */
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Reduce using scalar code. ");
-
- vec_temp = PHI_RESULT (new_phi);
- vec_size_in_bits = tree_low_cst (TYPE_SIZE (vectype), 1);
- rhs = build3 (BIT_FIELD_REF, scalar_type, vec_temp, bitsize,
- bitsize_zero_node);
- epilog_stmt = gimple_build_assign (new_scalar_dest, rhs);
- new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
- gimple_assign_set_lhs (epilog_stmt, new_temp);
- gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
-
- for (bit_offset = element_bitsize;
- bit_offset < vec_size_in_bits;
- bit_offset += element_bitsize)
- {
- tree bitpos = bitsize_int (bit_offset);
- tree rhs = build3 (BIT_FIELD_REF, scalar_type, vec_temp, bitsize,
- bitpos);
-
- epilog_stmt = gimple_build_assign (new_scalar_dest, rhs);
- new_name = make_ssa_name (new_scalar_dest, epilog_stmt);
- gimple_assign_set_lhs (epilog_stmt, new_name);
- gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
-
- epilog_stmt = gimple_build_assign_with_ops (code,
- new_scalar_dest,
- new_name, new_temp);
- new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
- gimple_assign_set_lhs (epilog_stmt, new_temp);
- gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
- }
-
- extract_scalar_result = false;
- }
- }
-
- /* 2.4 Extract the final scalar result. Create:
- s_out3 = extract_field <v_out2, bitpos> */
-
- if (extract_scalar_result)
- {
- tree rhs;
-
- gcc_assert (!nested_in_vect_loop);
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "extract scalar result");
-
- if (BYTES_BIG_ENDIAN)
- bitpos = size_binop (MULT_EXPR,
- bitsize_int (TYPE_VECTOR_SUBPARTS (vectype) - 1),
- TYPE_SIZE (scalar_type));
- else
- bitpos = bitsize_zero_node;
-
- rhs = build3 (BIT_FIELD_REF, scalar_type, new_temp, bitsize, bitpos);
- epilog_stmt = gimple_build_assign (new_scalar_dest, rhs);
- new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
- gimple_assign_set_lhs (epilog_stmt, new_temp);
- gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
- }
-
-vect_finalize_reduction:
-
- /* 2.5 Adjust the final result by the initial value of the reduction
- variable. (When such adjustment is not needed, then
- 'adjustment_def' is zero). For example, if code is PLUS we create:
- new_temp = loop_exit_def + adjustment_def */
-
- if (adjustment_def)
- {
- if (nested_in_vect_loop)
- {
- gcc_assert (TREE_CODE (TREE_TYPE (adjustment_def)) == VECTOR_TYPE);
- expr = build2 (code, vectype, PHI_RESULT (new_phi), adjustment_def);
- new_dest = vect_create_destination_var (scalar_dest, vectype);
- }
- else
- {
- gcc_assert (TREE_CODE (TREE_TYPE (adjustment_def)) != VECTOR_TYPE);
- expr = build2 (code, scalar_type, new_temp, adjustment_def);
- new_dest = vect_create_destination_var (scalar_dest, scalar_type);
- }
- epilog_stmt = gimple_build_assign (new_dest, expr);
- new_temp = make_ssa_name (new_dest, epilog_stmt);
- gimple_assign_set_lhs (epilog_stmt, new_temp);
- SSA_NAME_DEF_STMT (new_temp) = epilog_stmt;
- gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
- }
-
-
- /* 2.6 Handle the loop-exit phi */
-
- /* Replace uses of s_out0 with uses of s_out3:
- Find the loop-closed-use at the loop exit of the original scalar result.
- (The reduction result is expected to have two immediate uses - one at the
- latch block, and one at the loop exit). */
- phis = VEC_alloc (gimple, heap, 10);
- FOR_EACH_IMM_USE_FAST (use_p, imm_iter, scalar_dest)
- {
- if (!flow_bb_inside_loop_p (loop, gimple_bb (USE_STMT (use_p))))
- {
- exit_phi = USE_STMT (use_p);
- VEC_quick_push (gimple, phis, exit_phi);
- }
- }
- /* We expect to have found an exit_phi because of loop-closed-ssa form. */
- gcc_assert (!VEC_empty (gimple, phis));
-
- for (i = 0; VEC_iterate (gimple, phis, i, exit_phi); i++)
- {
- if (nested_in_vect_loop)
- {
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (exit_phi);
-
- /* FORNOW. Currently not supporting the case that an inner-loop
- reduction is not used in the outer-loop (but only outside the
- outer-loop). */
- gcc_assert (STMT_VINFO_RELEVANT_P (stmt_vinfo)
- && !STMT_VINFO_LIVE_P (stmt_vinfo));
-
- epilog_stmt = adjustment_def ? epilog_stmt : new_phi;
- STMT_VINFO_VEC_STMT (stmt_vinfo) = epilog_stmt;
- set_vinfo_for_stmt (epilog_stmt,
- new_stmt_vec_info (epilog_stmt, loop_vinfo));
- if (adjustment_def)
- STMT_VINFO_RELATED_STMT (vinfo_for_stmt (epilog_stmt)) =
- STMT_VINFO_RELATED_STMT (vinfo_for_stmt (new_phi));
- continue;
- }
-
- /* Replace the uses: */
- orig_name = PHI_RESULT (exit_phi);
- FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, orig_name)
- FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter)
- SET_USE (use_p, new_temp);
- }
- VEC_free (gimple, heap, phis);
-}
-
-
-/* Function vectorizable_reduction.
-
- Check if STMT performs a reduction operation that can be vectorized.
- If VEC_STMT is also passed, vectorize the STMT: create a vectorized
- stmt to replace it, put it in VEC_STMT, and insert it at BSI.
- Return FALSE if not a vectorizable STMT, TRUE otherwise.
-
- This function also handles reduction idioms (patterns) that have been
- recognized in advance during vect_pattern_recog. In this case, STMT may be
- of this form:
- X = pattern_expr (arg0, arg1, ..., X)
- and it's STMT_VINFO_RELATED_STMT points to the last stmt in the original
- sequence that had been detected and replaced by the pattern-stmt (STMT).
-
- In some cases of reduction patterns, the type of the reduction variable X is
- different than the type of the other arguments of STMT.
- In such cases, the vectype that is used when transforming STMT into a vector
- stmt is different than the vectype that is used to determine the
- vectorization factor, because it consists of a different number of elements
- than the actual number of elements that are being operated upon in parallel.
-
- For example, consider an accumulation of shorts into an int accumulator.
- On some targets it's possible to vectorize this pattern operating on 8
- shorts at a time (hence, the vectype for purposes of determining the
- vectorization factor should be V8HI); on the other hand, the vectype that
- is used to create the vector form is actually V4SI (the type of the result).
-
- Upon entry to this function, STMT_VINFO_VECTYPE records the vectype that
- indicates what is the actual level of parallelism (V8HI in the example), so
- that the right vectorization factor would be derived. This vectype
- corresponds to the type of arguments to the reduction stmt, and should *NOT*
- be used to create the vectorized stmt. The right vectype for the vectorized
- stmt is obtained from the type of the result X:
- get_vectype_for_scalar_type (TREE_TYPE (X))
-
- This means that, contrary to "regular" reductions (or "regular" stmts in
- general), the following equation:
- STMT_VINFO_VECTYPE == get_vectype_for_scalar_type (TREE_TYPE (X))
- does *NOT* necessarily hold for reduction patterns. */
-
-bool
-vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
- gimple *vec_stmt)
-{
- tree vec_dest;
- tree scalar_dest;
- tree loop_vec_def0 = NULL_TREE, loop_vec_def1 = NULL_TREE;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- enum tree_code code, orig_code, epilog_reduc_code = 0;
- enum machine_mode vec_mode;
- int op_type;
- optab optab, reduc_optab;
- tree new_temp = NULL_TREE;
- tree def;
- gimple def_stmt;
- enum vect_def_type dt;
- gimple new_phi = NULL;
- tree scalar_type;
- bool is_simple_use;
- gimple orig_stmt;
- stmt_vec_info orig_stmt_info;
- tree expr = NULL_TREE;
- int i;
- int nunits = TYPE_VECTOR_SUBPARTS (vectype);
- int ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
- int epilog_copies;
- stmt_vec_info prev_stmt_info, prev_phi_info;
- gimple first_phi = NULL;
- bool single_defuse_cycle = false;
- tree reduc_def;
- gimple new_stmt = NULL;
- int j;
- tree ops[3];
-
- if (nested_in_vect_loop_p (loop, stmt))
- loop = loop->inner;
-
- gcc_assert (ncopies >= 1);
-
- /* FORNOW: SLP not supported. */
- if (STMT_SLP_TYPE (stmt_info))
- return false;
-
- /* 1. Is vectorizable reduction? */
-
- /* Not supportable if the reduction variable is used in the loop. */
- if (STMT_VINFO_RELEVANT (stmt_info) > vect_used_in_outer)
- return false;
-
- /* Reductions that are not used even in an enclosing outer-loop,
- are expected to be "live" (used out of the loop). */
- if (STMT_VINFO_RELEVANT (stmt_info) == vect_unused_in_loop
- && !STMT_VINFO_LIVE_P (stmt_info))
- return false;
-
- /* Make sure it was already recognized as a reduction computation. */
- if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def)
- return false;
-
- /* 2. Has this been recognized as a reduction pattern?
-
- Check if STMT represents a pattern that has been recognized
- in earlier analysis stages. For stmts that represent a pattern,
- the STMT_VINFO_RELATED_STMT field records the last stmt in
- the original sequence that constitutes the pattern. */
-
- orig_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
- if (orig_stmt)
- {
- orig_stmt_info = vinfo_for_stmt (orig_stmt);
- gcc_assert (STMT_VINFO_RELATED_STMT (orig_stmt_info) == stmt);
- gcc_assert (STMT_VINFO_IN_PATTERN_P (orig_stmt_info));
- gcc_assert (!STMT_VINFO_IN_PATTERN_P (stmt_info));
- }
-
- /* 3. Check the operands of the operation. The first operands are defined
- inside the loop body. The last operand is the reduction variable,
- which is defined by the loop-header-phi. */
-
- gcc_assert (is_gimple_assign (stmt));
-
- /* Flatten RHS */
- switch (get_gimple_rhs_class (gimple_assign_rhs_code (stmt)))
- {
- case GIMPLE_SINGLE_RHS:
- op_type = TREE_OPERAND_LENGTH (gimple_assign_rhs1 (stmt));
- if (op_type == ternary_op)
- {
- tree rhs = gimple_assign_rhs1 (stmt);
- ops[0] = TREE_OPERAND (rhs, 0);
- ops[1] = TREE_OPERAND (rhs, 1);
- ops[2] = TREE_OPERAND (rhs, 2);
- code = TREE_CODE (rhs);
- }
- else
- return false;
- break;
-
- case GIMPLE_BINARY_RHS:
- code = gimple_assign_rhs_code (stmt);
- op_type = TREE_CODE_LENGTH (code);
- gcc_assert (op_type == binary_op);
- ops[0] = gimple_assign_rhs1 (stmt);
- ops[1] = gimple_assign_rhs2 (stmt);
- break;
-
- case GIMPLE_UNARY_RHS:
- return false;
-
- default:
- gcc_unreachable ();
- }
-
- scalar_dest = gimple_assign_lhs (stmt);
- scalar_type = TREE_TYPE (scalar_dest);
- if (!POINTER_TYPE_P (scalar_type) && !INTEGRAL_TYPE_P (scalar_type)
- && !SCALAR_FLOAT_TYPE_P (scalar_type))
- return false;
-
- /* All uses but the last are expected to be defined in the loop.
- The last use is the reduction variable. */
- for (i = 0; i < op_type-1; i++)
- {
- is_simple_use = vect_is_simple_use (ops[i], loop_vinfo, &def_stmt,
- &def, &dt);
- gcc_assert (is_simple_use);
- if (dt != vect_loop_def
- && dt != vect_invariant_def
- && dt != vect_constant_def
- && dt != vect_induction_def)
- return false;
- }
-
- is_simple_use = vect_is_simple_use (ops[i], loop_vinfo, &def_stmt, &def, &dt);
- gcc_assert (is_simple_use);
- gcc_assert (dt == vect_reduction_def);
- gcc_assert (gimple_code (def_stmt) == GIMPLE_PHI);
- if (orig_stmt)
- gcc_assert (orig_stmt == vect_is_simple_reduction (loop_vinfo, def_stmt));
- else
- gcc_assert (stmt == vect_is_simple_reduction (loop_vinfo, def_stmt));
-
- if (STMT_VINFO_LIVE_P (vinfo_for_stmt (def_stmt)))
- return false;
-
- /* 4. Supportable by target? */
-
- /* 4.1. check support for the operation in the loop */
- optab = optab_for_tree_code (code, vectype, optab_default);
- if (!optab)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "no optab.");
- return false;
- }
- vec_mode = TYPE_MODE (vectype);
- if (optab_handler (optab, vec_mode)->insn_code == CODE_FOR_nothing)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "op not supported by target.");
- if (GET_MODE_SIZE (vec_mode) != UNITS_PER_WORD
- || LOOP_VINFO_VECT_FACTOR (loop_vinfo)
- < vect_min_worthwhile_factor (code))
- return false;
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "proceeding using word mode.");
- }
-
- /* Worthwhile without SIMD support? */
- if (!VECTOR_MODE_P (TYPE_MODE (vectype))
- && LOOP_VINFO_VECT_FACTOR (loop_vinfo)
- < vect_min_worthwhile_factor (code))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "not worthwhile without SIMD support.");
- return false;
- }
-
- /* 4.2. Check support for the epilog operation.
-
- If STMT represents a reduction pattern, then the type of the
- reduction variable may be different than the type of the rest
- of the arguments. For example, consider the case of accumulation
- of shorts into an int accumulator; The original code:
- S1: int_a = (int) short_a;
- orig_stmt-> S2: int_acc = plus <int_a ,int_acc>;
-
- was replaced with:
- STMT: int_acc = widen_sum <short_a, int_acc>
-
- This means that:
- 1. The tree-code that is used to create the vector operation in the
- epilog code (that reduces the partial results) is not the
- tree-code of STMT, but is rather the tree-code of the original
- stmt from the pattern that STMT is replacing. I.e, in the example
- above we want to use 'widen_sum' in the loop, but 'plus' in the
- epilog.
- 2. The type (mode) we use to check available target support
- for the vector operation to be created in the *epilog*, is
- determined by the type of the reduction variable (in the example
- above we'd check this: plus_optab[vect_int_mode]).
- However the type (mode) we use to check available target support
- for the vector operation to be created *inside the loop*, is
- determined by the type of the other arguments to STMT (in the
- example we'd check this: widen_sum_optab[vect_short_mode]).
-
- This is contrary to "regular" reductions, in which the types of all
- the arguments are the same as the type of the reduction variable.
- For "regular" reductions we can therefore use the same vector type
- (and also the same tree-code) when generating the epilog code and
- when generating the code inside the loop. */
-
- if (orig_stmt)
- {
- /* This is a reduction pattern: get the vectype from the type of the
- reduction variable, and get the tree-code from orig_stmt. */
- orig_code = gimple_assign_rhs_code (orig_stmt);
- vectype = get_vectype_for_scalar_type (TREE_TYPE (def));
- if (!vectype)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "unsupported data-type ");
- print_generic_expr (vect_dump, TREE_TYPE (def), TDF_SLIM);
- }
- return false;
- }
-
- vec_mode = TYPE_MODE (vectype);
- }
- else
- {
- /* Regular reduction: use the same vectype and tree-code as used for
- the vector code inside the loop can be used for the epilog code. */
- orig_code = code;
- }
-
- if (!reduction_code_for_scalar_code (orig_code, &epilog_reduc_code))
- return false;
- reduc_optab = optab_for_tree_code (epilog_reduc_code, vectype, optab_default);
- if (!reduc_optab)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "no optab for reduction.");
- epilog_reduc_code = NUM_TREE_CODES;
- }
- if (optab_handler (reduc_optab, vec_mode)->insn_code == CODE_FOR_nothing)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "reduc op not supported by target.");
- epilog_reduc_code = NUM_TREE_CODES;
- }
-
- if (!vec_stmt) /* transformation not required. */
- {
- STMT_VINFO_TYPE (stmt_info) = reduc_vec_info_type;
- if (!vect_model_reduction_cost (stmt_info, epilog_reduc_code, ncopies))
- return false;
- return true;
- }
-
- /** Transform. **/
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "transform reduction.");
-
- /* Create the destination vector */
- vec_dest = vect_create_destination_var (scalar_dest, vectype);
-
- /* In case the vectorization factor (VF) is bigger than the number
- of elements that we can fit in a vectype (nunits), we have to generate
- more than one vector stmt - i.e - we need to "unroll" the
- vector stmt by a factor VF/nunits. For more details see documentation
- in vectorizable_operation. */
-
- /* If the reduction is used in an outer loop we need to generate
- VF intermediate results, like so (e.g. for ncopies=2):
- r0 = phi (init, r0)
- r1 = phi (init, r1)
- r0 = x0 + r0;
- r1 = x1 + r1;
- (i.e. we generate VF results in 2 registers).
- In this case we have a separate def-use cycle for each copy, and therefore
- for each copy we get the vector def for the reduction variable from the
- respective phi node created for this copy.
-
- Otherwise (the reduction is unused in the loop nest), we can combine
- together intermediate results, like so (e.g. for ncopies=2):
- r = phi (init, r)
- r = x0 + r;
- r = x1 + r;
- (i.e. we generate VF/2 results in a single register).
- In this case for each copy we get the vector def for the reduction variable
- from the vectorized reduction operation generated in the previous iteration.
- */
-
- if (STMT_VINFO_RELEVANT (stmt_info) == vect_unused_in_loop)
- {
- single_defuse_cycle = true;
- epilog_copies = 1;
- }
- else
- epilog_copies = ncopies;
-
- prev_stmt_info = NULL;
- prev_phi_info = NULL;
- for (j = 0; j < ncopies; j++)
- {
- if (j == 0 || !single_defuse_cycle)
- {
- /* Create the reduction-phi that defines the reduction-operand. */
- new_phi = create_phi_node (vec_dest, loop->header);
- set_vinfo_for_stmt (new_phi, new_stmt_vec_info (new_phi, loop_vinfo));
- }
-
- /* Handle uses. */
- if (j == 0)
- {
- loop_vec_def0 = vect_get_vec_def_for_operand (ops[0], stmt, NULL);
- if (op_type == ternary_op)
- {
- loop_vec_def1 = vect_get_vec_def_for_operand (ops[1], stmt, NULL);
- }
-
- /* Get the vector def for the reduction variable from the phi node */
- reduc_def = PHI_RESULT (new_phi);
- first_phi = new_phi;
- }
- else
- {
- enum vect_def_type dt = vect_unknown_def_type; /* Dummy */
- loop_vec_def0 = vect_get_vec_def_for_stmt_copy (dt, loop_vec_def0);
- if (op_type == ternary_op)
- loop_vec_def1 = vect_get_vec_def_for_stmt_copy (dt, loop_vec_def1);
-
- if (single_defuse_cycle)
- reduc_def = gimple_assign_lhs (new_stmt);
- else
- reduc_def = PHI_RESULT (new_phi);
-
- STMT_VINFO_RELATED_STMT (prev_phi_info) = new_phi;
- }
-
- /* Arguments are ready. create the new vector stmt. */
- if (op_type == binary_op)
- expr = build2 (code, vectype, loop_vec_def0, reduc_def);
- else
- expr = build3 (code, vectype, loop_vec_def0, loop_vec_def1,
- reduc_def);
- new_stmt = gimple_build_assign (vec_dest, expr);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_assign_set_lhs (new_stmt, new_temp);
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
-
- if (j == 0)
- STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
- else
- STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
- prev_stmt_info = vinfo_for_stmt (new_stmt);
- prev_phi_info = vinfo_for_stmt (new_phi);
- }
-
- /* Finalize the reduction-phi (set its arguments) and create the
- epilog reduction code. */
- if (!single_defuse_cycle)
- new_temp = gimple_assign_lhs (*vec_stmt);
- vect_create_epilog_for_reduction (new_temp, stmt, epilog_copies,
- epilog_reduc_code, first_phi);
- return true;
-}
-
-/* Checks if CALL can be vectorized in type VECTYPE. Returns
- a function declaration if the target has a vectorized version
- of the function, or NULL_TREE if the function cannot be vectorized. */
-
-tree
-vectorizable_function (gimple call, tree vectype_out, tree vectype_in)
-{
- tree fndecl = gimple_call_fndecl (call);
- enum built_in_function code;
-
- /* We only handle functions that do not read or clobber memory -- i.e.
- const or novops ones. */
- if (!(gimple_call_flags (call) & (ECF_CONST | ECF_NOVOPS)))
- return NULL_TREE;
-
- if (!fndecl
- || TREE_CODE (fndecl) != FUNCTION_DECL
- || !DECL_BUILT_IN (fndecl))
- return NULL_TREE;
-
- code = DECL_FUNCTION_CODE (fndecl);
- return targetm.vectorize.builtin_vectorized_function (code, vectype_out,
- vectype_in);
-}
-
-/* Function vectorizable_call.
-
- Check if STMT performs a function call that can be vectorized.
- If VEC_STMT is also passed, vectorize the STMT: create a vectorized
- stmt to replace it, put it in VEC_STMT, and insert it at BSI.
- Return FALSE if not a vectorizable STMT, TRUE otherwise. */
-
-bool
-vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt)
-{
- tree vec_dest;
- tree scalar_dest;
- tree op, type;
- tree vec_oprnd0 = NULL_TREE, vec_oprnd1 = NULL_TREE;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt), prev_stmt_info;
- tree vectype_out, vectype_in;
- int nunits_in;
- int nunits_out;
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- tree fndecl, new_temp, def, rhs_type, lhs_type;
- gimple def_stmt;
- enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
- gimple new_stmt;
- int ncopies, j;
- VEC(tree, heap) *vargs = NULL;
- enum { NARROW, NONE, WIDEN } modifier;
- size_t i, nargs;
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info))
- return false;
-
- if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
- return false;
-
- /* FORNOW: SLP not supported. */
- if (STMT_SLP_TYPE (stmt_info))
- return false;
-
- /* Is STMT a vectorizable call? */
- if (!is_gimple_call (stmt))
- return false;
-
- if (TREE_CODE (gimple_call_lhs (stmt)) != SSA_NAME)
- return false;
-
- /* Process function arguments. */
- rhs_type = NULL_TREE;
- nargs = gimple_call_num_args (stmt);
-
- /* Bail out if the function has more than two arguments, we
- do not have interesting builtin functions to vectorize with
- more than two arguments. No arguments is also not good. */
- if (nargs == 0 || nargs > 2)
- return false;
-
- for (i = 0; i < nargs; i++)
- {
- op = gimple_call_arg (stmt, i);
-
- /* We can only handle calls with arguments of the same type. */
- if (rhs_type
- && rhs_type != TREE_TYPE (op))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "argument types differ.");
- return false;
- }
- rhs_type = TREE_TYPE (op);
-
- if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt[i]))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "use not simple.");
- return false;
- }
- }
-
- vectype_in = get_vectype_for_scalar_type (rhs_type);
- if (!vectype_in)
- return false;
- nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
-
- lhs_type = TREE_TYPE (gimple_call_lhs (stmt));
- vectype_out = get_vectype_for_scalar_type (lhs_type);
- if (!vectype_out)
- return false;
- nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
-
- /* FORNOW */
- if (nunits_in == nunits_out / 2)
- modifier = NARROW;
- else if (nunits_out == nunits_in)
- modifier = NONE;
- else if (nunits_out == nunits_in / 2)
- modifier = WIDEN;
- else
- return false;
-
- /* For now, we only vectorize functions if a target specific builtin
- is available. TODO -- in some cases, it might be profitable to
- insert the calls for pieces of the vector, in order to be able
- to vectorize other operations in the loop. */
- fndecl = vectorizable_function (stmt, vectype_out, vectype_in);
- if (fndecl == NULL_TREE)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "function is not vectorizable.");
-
- return false;
- }
-
- gcc_assert (ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS));
-
- if (modifier == NARROW)
- ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_out;
- else
- ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_in;
-
- /* Sanity check: make sure that at least one copy of the vectorized stmt
- needs to be generated. */
- gcc_assert (ncopies >= 1);
-
- if (!vec_stmt) /* transformation not required. */
- {
- STMT_VINFO_TYPE (stmt_info) = call_vec_info_type;
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vectorizable_call ===");
- vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
- return true;
- }
-
- /** Transform. **/
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "transform operation.");
-
- /* Handle def. */
- scalar_dest = gimple_call_lhs (stmt);
- vec_dest = vect_create_destination_var (scalar_dest, vectype_out);
-
- prev_stmt_info = NULL;
- switch (modifier)
- {
- case NONE:
- for (j = 0; j < ncopies; ++j)
- {
- /* Build argument list for the vectorized call. */
- if (j == 0)
- vargs = VEC_alloc (tree, heap, nargs);
- else
- VEC_truncate (tree, vargs, 0);
-
- for (i = 0; i < nargs; i++)
- {
- op = gimple_call_arg (stmt, i);
- if (j == 0)
- vec_oprnd0
- = vect_get_vec_def_for_operand (op, stmt, NULL);
- else
- vec_oprnd0
- = vect_get_vec_def_for_stmt_copy (dt[nargs], vec_oprnd0);
-
- VEC_quick_push (tree, vargs, vec_oprnd0);
- }
-
- new_stmt = gimple_build_call_vec (fndecl, vargs);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_call_set_lhs (new_stmt, new_temp);
-
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
-
- if (j == 0)
- STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
- else
- STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
-
- prev_stmt_info = vinfo_for_stmt (new_stmt);
- }
-
- break;
-
- case NARROW:
- for (j = 0; j < ncopies; ++j)
- {
- /* Build argument list for the vectorized call. */
- if (j == 0)
- vargs = VEC_alloc (tree, heap, nargs * 2);
- else
- VEC_truncate (tree, vargs, 0);
-
- for (i = 0; i < nargs; i++)
- {
- op = gimple_call_arg (stmt, i);
- if (j == 0)
- {
- vec_oprnd0
- = vect_get_vec_def_for_operand (op, stmt, NULL);
- vec_oprnd1
- = vect_get_vec_def_for_stmt_copy (dt[nargs], vec_oprnd0);
- }
- else
- {
- vec_oprnd0
- = vect_get_vec_def_for_stmt_copy (dt[nargs], vec_oprnd1);
- vec_oprnd1
- = vect_get_vec_def_for_stmt_copy (dt[nargs], vec_oprnd0);
- }
-
- VEC_quick_push (tree, vargs, vec_oprnd0);
- VEC_quick_push (tree, vargs, vec_oprnd1);
- }
-
- new_stmt = gimple_build_call_vec (fndecl, vargs);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_call_set_lhs (new_stmt, new_temp);
-
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
-
- if (j == 0)
- STMT_VINFO_VEC_STMT (stmt_info) = new_stmt;
- else
- STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
-
- prev_stmt_info = vinfo_for_stmt (new_stmt);
- }
-
- *vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
-
- break;
-
- case WIDEN:
- /* No current target implements this case. */
- return false;
- }
-
- VEC_free (tree, heap, vargs);
-
- /* The call in STMT might prevent it from being removed in dce.
- We however cannot remove it here, due to the way the ssa name
- it defines is mapped to the new definition. So just replace
- rhs of the statement with something harmless. */
-
- type = TREE_TYPE (scalar_dest);
- new_stmt = gimple_build_assign (gimple_call_lhs (stmt),
- fold_convert (type, integer_zero_node));
- set_vinfo_for_stmt (new_stmt, stmt_info);
- set_vinfo_for_stmt (stmt, NULL);
- STMT_VINFO_STMT (stmt_info) = new_stmt;
- gsi_replace (gsi, new_stmt, false);
- SSA_NAME_DEF_STMT (gimple_assign_lhs (new_stmt)) = new_stmt;
-
- return true;
-}
-
-
-/* Function vect_gen_widened_results_half
-
- Create a vector stmt whose code, type, number of arguments, and result
- variable are CODE, OP_TYPE, and VEC_DEST, and its arguments are
- VEC_OPRND0 and VEC_OPRND1. The new vector stmt is to be inserted at BSI.
- In the case that CODE is a CALL_EXPR, this means that a call to DECL
- needs to be created (DECL is a function-decl of a target-builtin).
- STMT is the original scalar stmt that we are vectorizing. */
-
-static gimple
-vect_gen_widened_results_half (enum tree_code code,
- tree decl,
- tree vec_oprnd0, tree vec_oprnd1, int op_type,
- tree vec_dest, gimple_stmt_iterator *gsi,
- gimple stmt)
-{
- gimple new_stmt;
- tree new_temp;
- tree sym;
- ssa_op_iter iter;
-
- /* Generate half of the widened result: */
- if (code == CALL_EXPR)
- {
- /* Target specific support */
- if (op_type == binary_op)
- new_stmt = gimple_build_call (decl, 2, vec_oprnd0, vec_oprnd1);
- else
- new_stmt = gimple_build_call (decl, 1, vec_oprnd0);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_call_set_lhs (new_stmt, new_temp);
- }
- else
- {
- /* Generic support */
- gcc_assert (op_type == TREE_CODE_LENGTH (code));
- if (op_type != binary_op)
- vec_oprnd1 = NULL;
- new_stmt = gimple_build_assign_with_ops (code, vec_dest, vec_oprnd0,
- vec_oprnd1);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_assign_set_lhs (new_stmt, new_temp);
- }
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
-
- if (code == CALL_EXPR)
- {
- FOR_EACH_SSA_TREE_OPERAND (sym, new_stmt, iter, SSA_OP_ALL_VIRTUALS)
- {
- if (TREE_CODE (sym) == SSA_NAME)
- sym = SSA_NAME_VAR (sym);
- mark_sym_for_renaming (sym);
- }
- }
-
- return new_stmt;
-}
-
-
-/* Check if STMT performs a conversion operation, that can be vectorized.
- If VEC_STMT is also passed, vectorize the STMT: create a vectorized
- stmt to replace it, put it in VEC_STMT, and insert it at BSI.
- Return FALSE if not a vectorizable STMT, TRUE otherwise. */
-
-bool
-vectorizable_conversion (gimple stmt, gimple_stmt_iterator *gsi,
- gimple *vec_stmt, slp_tree slp_node)
-{
- tree vec_dest;
- tree scalar_dest;
- tree op0;
- tree vec_oprnd0 = NULL_TREE, vec_oprnd1 = NULL_TREE;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- enum tree_code code, code1 = ERROR_MARK, code2 = ERROR_MARK;
- tree decl1 = NULL_TREE, decl2 = NULL_TREE;
- tree new_temp;
- tree def;
- gimple def_stmt;
- enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
- gimple new_stmt = NULL;
- stmt_vec_info prev_stmt_info;
- int nunits_in;
- int nunits_out;
- tree vectype_out, vectype_in;
- int ncopies, j;
- tree expr;
- tree rhs_type, lhs_type;
- tree builtin_decl;
- enum { NARROW, NONE, WIDEN } modifier;
- int i;
- VEC(tree,heap) *vec_oprnds0 = NULL;
- tree vop0;
- tree integral_type;
- VEC(tree,heap) *dummy = NULL;
- int dummy_int;
-
- /* Is STMT a vectorizable conversion? */
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info))
- return false;
-
- if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
- return false;
-
- if (!is_gimple_assign (stmt))
- return false;
-
- if (TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME)
- return false;
-
- code = gimple_assign_rhs_code (stmt);
- if (code != FIX_TRUNC_EXPR && code != FLOAT_EXPR)
- return false;
-
- /* Check types of lhs and rhs. */
- op0 = gimple_assign_rhs1 (stmt);
- rhs_type = TREE_TYPE (op0);
- vectype_in = get_vectype_for_scalar_type (rhs_type);
- if (!vectype_in)
- return false;
- nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
-
- scalar_dest = gimple_assign_lhs (stmt);
- lhs_type = TREE_TYPE (scalar_dest);
- vectype_out = get_vectype_for_scalar_type (lhs_type);
- if (!vectype_out)
- return false;
- nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
-
- /* FORNOW */
- if (nunits_in == nunits_out / 2)
- modifier = NARROW;
- else if (nunits_out == nunits_in)
- modifier = NONE;
- else if (nunits_out == nunits_in / 2)
- modifier = WIDEN;
- else
- return false;
-
- if (modifier == NONE)
- gcc_assert (STMT_VINFO_VECTYPE (stmt_info) == vectype_out);
-
- /* Bail out if the types are both integral or non-integral. */
- if ((INTEGRAL_TYPE_P (rhs_type) && INTEGRAL_TYPE_P (lhs_type))
- || (!INTEGRAL_TYPE_P (rhs_type) && !INTEGRAL_TYPE_P (lhs_type)))
- return false;
-
- integral_type = INTEGRAL_TYPE_P (rhs_type) ? vectype_in : vectype_out;
-
- if (modifier == NARROW)
- ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_out;
- else
- ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_in;
-
- /* FORNOW: SLP with multiple types is not supported. The SLP analysis verifies
- this, so we can safely override NCOPIES with 1 here. */
- if (slp_node)
- ncopies = 1;
-
- /* Sanity check: make sure that at least one copy of the vectorized stmt
- needs to be generated. */
- gcc_assert (ncopies >= 1);
-
- /* Check the operands of the operation. */
- if (!vect_is_simple_use (op0, loop_vinfo, &def_stmt, &def, &dt[0]))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "use not simple.");
- return false;
- }
-
- /* Supportable by target? */
- if ((modifier == NONE
- && !targetm.vectorize.builtin_conversion (code, integral_type))
- || (modifier == WIDEN
- && !supportable_widening_operation (code, stmt, vectype_in,
- &decl1, &decl2,
- &code1, &code2,
- &dummy_int, &dummy))
- || (modifier == NARROW
- && !supportable_narrowing_operation (code, stmt, vectype_in,
- &code1, &dummy_int, &dummy)))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "conversion not supported by target.");
- return false;
- }
-
- if (modifier != NONE)
- {
- STMT_VINFO_VECTYPE (stmt_info) = vectype_in;
- /* FORNOW: SLP not supported. */
- if (STMT_SLP_TYPE (stmt_info))
- return false;
- }
-
- if (!vec_stmt) /* transformation not required. */
- {
- STMT_VINFO_TYPE (stmt_info) = type_conversion_vec_info_type;
- return true;
- }
-
- /** Transform. **/
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "transform conversion.");
-
- /* Handle def. */
- vec_dest = vect_create_destination_var (scalar_dest, vectype_out);
-
- if (modifier == NONE && !slp_node)
- vec_oprnds0 = VEC_alloc (tree, heap, 1);
-
- prev_stmt_info = NULL;
- switch (modifier)
- {
- case NONE:
- for (j = 0; j < ncopies; j++)
- {
- tree sym;
- ssa_op_iter iter;
-
- if (j == 0)
- vect_get_vec_defs (op0, NULL, stmt, &vec_oprnds0, NULL, slp_node);
- else
- vect_get_vec_defs_for_stmt_copy (dt, &vec_oprnds0, NULL);
-
- builtin_decl =
- targetm.vectorize.builtin_conversion (code, integral_type);
- for (i = 0; VEC_iterate (tree, vec_oprnds0, i, vop0); i++)
- {
- /* Arguments are ready. create the new vector stmt. */
- new_stmt = gimple_build_call (builtin_decl, 1, vop0);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_call_set_lhs (new_stmt, new_temp);
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
- FOR_EACH_SSA_TREE_OPERAND (sym, new_stmt, iter,
- SSA_OP_ALL_VIRTUALS)
- {
- if (TREE_CODE (sym) == SSA_NAME)
- sym = SSA_NAME_VAR (sym);
- mark_sym_for_renaming (sym);
- }
- if (slp_node)
- VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt);
- }
-
- if (j == 0)
- STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
- else
- STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
- prev_stmt_info = vinfo_for_stmt (new_stmt);
- }
- break;
-
- case WIDEN:
- /* In case the vectorization factor (VF) is bigger than the number
- of elements that we can fit in a vectype (nunits), we have to
- generate more than one vector stmt - i.e - we need to "unroll"
- the vector stmt by a factor VF/nunits. */
- for (j = 0; j < ncopies; j++)
- {
- if (j == 0)
- vec_oprnd0 = vect_get_vec_def_for_operand (op0, stmt, NULL);
- else
- vec_oprnd0 = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd0);
-
- STMT_VINFO_VECTYPE (stmt_info) = vectype_in;
-
- /* Generate first half of the widened result: */
- new_stmt
- = vect_gen_widened_results_half (code1, decl1,
- vec_oprnd0, vec_oprnd1,
- unary_op, vec_dest, gsi, stmt);
- if (j == 0)
- STMT_VINFO_VEC_STMT (stmt_info) = new_stmt;
- else
- STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
- prev_stmt_info = vinfo_for_stmt (new_stmt);
-
- /* Generate second half of the widened result: */
- new_stmt
- = vect_gen_widened_results_half (code2, decl2,
- vec_oprnd0, vec_oprnd1,
- unary_op, vec_dest, gsi, stmt);
- STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
- prev_stmt_info = vinfo_for_stmt (new_stmt);
- }
- break;
-
- case NARROW:
- /* In case the vectorization factor (VF) is bigger than the number
- of elements that we can fit in a vectype (nunits), we have to
- generate more than one vector stmt - i.e - we need to "unroll"
- the vector stmt by a factor VF/nunits. */
- for (j = 0; j < ncopies; j++)
- {
- /* Handle uses. */
- if (j == 0)
- {
- vec_oprnd0 = vect_get_vec_def_for_operand (op0, stmt, NULL);
- vec_oprnd1 = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd0);
- }
- else
- {
- vec_oprnd0 = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd1);
- vec_oprnd1 = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd0);
- }
-
- /* Arguments are ready. Create the new vector stmt. */
- expr = build2 (code1, vectype_out, vec_oprnd0, vec_oprnd1);
- new_stmt = gimple_build_assign_with_ops (code1, vec_dest, vec_oprnd0,
- vec_oprnd1);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_assign_set_lhs (new_stmt, new_temp);
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
-
- if (j == 0)
- STMT_VINFO_VEC_STMT (stmt_info) = new_stmt;
- else
- STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
-
- prev_stmt_info = vinfo_for_stmt (new_stmt);
- }
-
- *vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
- }
-
- if (vec_oprnds0)
- VEC_free (tree, heap, vec_oprnds0);
-
- return true;
-}
-
-
-/* Function vectorizable_assignment.
-
- Check if STMT performs an assignment (copy) that can be vectorized.
- If VEC_STMT is also passed, vectorize the STMT: create a vectorized
- stmt to replace it, put it in VEC_STMT, and insert it at BSI.
- Return FALSE if not a vectorizable STMT, TRUE otherwise. */
-
-bool
-vectorizable_assignment (gimple stmt, gimple_stmt_iterator *gsi,
- gimple *vec_stmt, slp_tree slp_node)
-{
- tree vec_dest;
- tree scalar_dest;
- tree op;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- tree new_temp;
- tree def;
- gimple def_stmt;
- enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
- int nunits = TYPE_VECTOR_SUBPARTS (vectype);
- int ncopies;
- int i;
- VEC(tree,heap) *vec_oprnds = NULL;
- tree vop;
-
- /* Multiple types in SLP are handled by creating the appropriate number of
- vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
- case of SLP. */
- if (slp_node)
- ncopies = 1;
- else
- ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
-
- gcc_assert (ncopies >= 1);
- if (ncopies > 1)
- return false; /* FORNOW */
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info))
- return false;
-
- if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
- return false;
-
- /* Is vectorizable assignment? */
- if (!is_gimple_assign (stmt))
- return false;
-
- scalar_dest = gimple_assign_lhs (stmt);
- if (TREE_CODE (scalar_dest) != SSA_NAME)
- return false;
-
- if (gimple_assign_single_p (stmt)
- || gimple_assign_rhs_code (stmt) == PAREN_EXPR)
- op = gimple_assign_rhs1 (stmt);
- else
- return false;
-
- if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt[0]))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "use not simple.");
- return false;
- }
-
- if (!vec_stmt) /* transformation not required. */
- {
- STMT_VINFO_TYPE (stmt_info) = assignment_vec_info_type;
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vectorizable_assignment ===");
- vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
- return true;
- }
-
- /** Transform. **/
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "transform assignment.");
-
- /* Handle def. */
- vec_dest = vect_create_destination_var (scalar_dest, vectype);
-
- /* Handle use. */
- vect_get_vec_defs (op, NULL, stmt, &vec_oprnds, NULL, slp_node);
-
- /* Arguments are ready. create the new vector stmt. */
- for (i = 0; VEC_iterate (tree, vec_oprnds, i, vop); i++)
- {
- *vec_stmt = gimple_build_assign (vec_dest, vop);
- new_temp = make_ssa_name (vec_dest, *vec_stmt);
- gimple_assign_set_lhs (*vec_stmt, new_temp);
- vect_finish_stmt_generation (stmt, *vec_stmt, gsi);
- STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt;
-
- if (slp_node)
- VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), *vec_stmt);
- }
-
- VEC_free (tree, heap, vec_oprnds);
- return true;
-}
-
-
-/* Function vect_min_worthwhile_factor.
-
- For a loop where we could vectorize the operation indicated by CODE,
- return the minimum vectorization factor that makes it worthwhile
- to use generic vectors. */
-static int
-vect_min_worthwhile_factor (enum tree_code code)
-{
- switch (code)
- {
- case PLUS_EXPR:
- case MINUS_EXPR:
- case NEGATE_EXPR:
- return 4;
-
- case BIT_AND_EXPR:
- case BIT_IOR_EXPR:
- case BIT_XOR_EXPR:
- case BIT_NOT_EXPR:
- return 2;
-
- default:
- return INT_MAX;
- }
-}
-
-
-/* Function vectorizable_induction
-
- Check if PHI performs an induction computation that can be vectorized.
- If VEC_STMT is also passed, vectorize the induction PHI: create a vectorized
- phi to replace it, put it in VEC_STMT, and add it to the same basic block.
- Return FALSE if not a vectorizable STMT, TRUE otherwise. */
-
-bool
-vectorizable_induction (gimple phi, gimple_stmt_iterator *gsi ATTRIBUTE_UNUSED,
- gimple *vec_stmt)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (phi);
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- int nunits = TYPE_VECTOR_SUBPARTS (vectype);
- int ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
- tree vec_def;
-
- gcc_assert (ncopies >= 1);
- /* FORNOW. This restriction should be relaxed. */
- if (nested_in_vect_loop_p (loop, phi) && ncopies > 1)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "multiple types in nested loop.");
- return false;
- }
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info))
- return false;
-
- /* FORNOW: SLP not supported. */
- if (STMT_SLP_TYPE (stmt_info))
- return false;
-
- gcc_assert (STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def);
-
- if (gimple_code (phi) != GIMPLE_PHI)
- return false;
-
- if (!vec_stmt) /* transformation not required. */
- {
- STMT_VINFO_TYPE (stmt_info) = induc_vec_info_type;
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vectorizable_induction ===");
- vect_model_induction_cost (stmt_info, ncopies);
- return true;
- }
-
- /** Transform. **/
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "transform induction phi.");
-
- vec_def = get_initial_def_for_induction (phi);
- *vec_stmt = SSA_NAME_DEF_STMT (vec_def);
- return true;
-}
-
-
-/* Function vectorizable_operation.
-
- Check if STMT performs a binary or unary operation that can be vectorized.
- If VEC_STMT is also passed, vectorize the STMT: create a vectorized
- stmt to replace it, put it in VEC_STMT, and insert it at BSI.
- Return FALSE if not a vectorizable STMT, TRUE otherwise. */
-
-bool
-vectorizable_operation (gimple stmt, gimple_stmt_iterator *gsi,
- gimple *vec_stmt, slp_tree slp_node)
-{
- tree vec_dest;
- tree scalar_dest;
- tree op0, op1 = NULL;
- tree vec_oprnd1 = NULL_TREE;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- enum tree_code code;
- enum machine_mode vec_mode;
- tree new_temp;
- int op_type;
- optab optab;
- int icode;
- enum machine_mode optab_op2_mode;
- tree def;
- gimple def_stmt;
- enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
- gimple new_stmt = NULL;
- stmt_vec_info prev_stmt_info;
- int nunits_in = TYPE_VECTOR_SUBPARTS (vectype);
- int nunits_out;
- tree vectype_out;
- int ncopies;
- int j, i;
- VEC(tree,heap) *vec_oprnds0 = NULL, *vec_oprnds1 = NULL;
- tree vop0, vop1;
- unsigned int k;
- bool shift_p = false;
- bool scalar_shift_arg = false;
-
- /* Multiple types in SLP are handled by creating the appropriate number of
- vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
- case of SLP. */
- if (slp_node)
- ncopies = 1;
- else
- ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_in;
-
- gcc_assert (ncopies >= 1);
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info))
- return false;
-
- if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
- return false;
-
- /* Is STMT a vectorizable binary/unary operation? */
- if (!is_gimple_assign (stmt))
- return false;
-
- if (TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME)
- return false;
-
- scalar_dest = gimple_assign_lhs (stmt);
- vectype_out = get_vectype_for_scalar_type (TREE_TYPE (scalar_dest));
- if (!vectype_out)
- return false;
- nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
- if (nunits_out != nunits_in)
- return false;
-
- code = gimple_assign_rhs_code (stmt);
-
- /* For pointer addition, we should use the normal plus for
- the vector addition. */
- if (code == POINTER_PLUS_EXPR)
- code = PLUS_EXPR;
-
- /* Support only unary or binary operations. */
- op_type = TREE_CODE_LENGTH (code);
- if (op_type != unary_op && op_type != binary_op)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "num. args = %d (not unary/binary op).", op_type);
- return false;
- }
-
- op0 = gimple_assign_rhs1 (stmt);
- if (!vect_is_simple_use (op0, loop_vinfo, &def_stmt, &def, &dt[0]))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "use not simple.");
- return false;
- }
-
- if (op_type == binary_op)
- {
- op1 = gimple_assign_rhs2 (stmt);
- if (!vect_is_simple_use (op1, loop_vinfo, &def_stmt, &def, &dt[1]))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "use not simple.");
- return false;
- }
- }
-
- /* If this is a shift/rotate, determine whether the shift amount is a vector,
- or scalar. If the shift/rotate amount is a vector, use the vector/vector
- shift optabs. */
- if (code == LSHIFT_EXPR || code == RSHIFT_EXPR || code == LROTATE_EXPR
- || code == RROTATE_EXPR)
- {
- shift_p = true;
-
- /* vector shifted by vector */
- if (dt[1] == vect_loop_def)
- {
- optab = optab_for_tree_code (code, vectype, optab_vector);
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "vector/vector shift/rotate found.");
- }
-
- /* See if the machine has a vector shifted by scalar insn and if not
- then see if it has a vector shifted by vector insn */
- else if (dt[1] == vect_constant_def || dt[1] == vect_invariant_def)
- {
- optab = optab_for_tree_code (code, vectype, optab_scalar);
- if (optab
- && (optab_handler (optab, TYPE_MODE (vectype))->insn_code
- != CODE_FOR_nothing))
- {
- scalar_shift_arg = true;
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "vector/scalar shift/rotate found.");
- }
- else
- {
- optab = optab_for_tree_code (code, vectype, optab_vector);
- if (vect_print_dump_info (REPORT_DETAILS)
- && optab
- && (optab_handler (optab, TYPE_MODE (vectype))->insn_code
- != CODE_FOR_nothing))
- fprintf (vect_dump, "vector/vector shift/rotate found.");
- }
- }
-
- else
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "operand mode requires invariant argument.");
- return false;
- }
- }
- else
- optab = optab_for_tree_code (code, vectype, optab_default);
-
- /* Supportable by target? */
- if (!optab)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "no optab.");
- return false;
- }
- vec_mode = TYPE_MODE (vectype);
- icode = (int) optab_handler (optab, vec_mode)->insn_code;
- if (icode == CODE_FOR_nothing)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "op not supported by target.");
- /* Check only during analysis. */
- if (GET_MODE_SIZE (vec_mode) != UNITS_PER_WORD
- || (LOOP_VINFO_VECT_FACTOR (loop_vinfo)
- < vect_min_worthwhile_factor (code)
- && !vec_stmt))
- return false;
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "proceeding using word mode.");
- }
-
- /* Worthwhile without SIMD support? Check only during analysis. */
- if (!VECTOR_MODE_P (TYPE_MODE (vectype))
- && LOOP_VINFO_VECT_FACTOR (loop_vinfo)
- < vect_min_worthwhile_factor (code)
- && !vec_stmt)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "not worthwhile without SIMD support.");
- return false;
- }
-
- if (!vec_stmt) /* transformation not required. */
- {
- STMT_VINFO_TYPE (stmt_info) = op_vec_info_type;
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vectorizable_operation ===");
- vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
- return true;
- }
-
- /** Transform. **/
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "transform binary/unary operation.");
-
- /* Handle def. */
- vec_dest = vect_create_destination_var (scalar_dest, vectype);
-
- /* Allocate VECs for vector operands. In case of SLP, vector operands are
- created in the previous stages of the recursion, so no allocation is
- needed, except for the case of shift with scalar shift argument. In that
- case we store the scalar operand in VEC_OPRNDS1 for every vector stmt to
- be created to vectorize the SLP group, i.e., SLP_NODE->VEC_STMTS_SIZE.
- In case of loop-based vectorization we allocate VECs of size 1. We
- allocate VEC_OPRNDS1 only in case of binary operation. */
- if (!slp_node)
- {
- vec_oprnds0 = VEC_alloc (tree, heap, 1);
- if (op_type == binary_op)
- vec_oprnds1 = VEC_alloc (tree, heap, 1);
- }
- else if (scalar_shift_arg)
- vec_oprnds1 = VEC_alloc (tree, heap, slp_node->vec_stmts_size);
-
- /* In case the vectorization factor (VF) is bigger than the number
- of elements that we can fit in a vectype (nunits), we have to generate
- more than one vector stmt - i.e - we need to "unroll" the
- vector stmt by a factor VF/nunits. In doing so, we record a pointer
- from one copy of the vector stmt to the next, in the field
- STMT_VINFO_RELATED_STMT. This is necessary in order to allow following
- stages to find the correct vector defs to be used when vectorizing
- stmts that use the defs of the current stmt. The example below illustrates
- the vectorization process when VF=16 and nunits=4 (i.e - we need to create
- 4 vectorized stmts):
-
- before vectorization:
- RELATED_STMT VEC_STMT
- S1: x = memref - -
- S2: z = x + 1 - -
-
- step 1: vectorize stmt S1 (done in vectorizable_load. See more details
- there):
- RELATED_STMT VEC_STMT
- VS1_0: vx0 = memref0 VS1_1 -
- VS1_1: vx1 = memref1 VS1_2 -
- VS1_2: vx2 = memref2 VS1_3 -
- VS1_3: vx3 = memref3 - -
- S1: x = load - VS1_0
- S2: z = x + 1 - -
-
- step2: vectorize stmt S2 (done here):
- To vectorize stmt S2 we first need to find the relevant vector
- def for the first operand 'x'. This is, as usual, obtained from
- the vector stmt recorded in the STMT_VINFO_VEC_STMT of the stmt
- that defines 'x' (S1). This way we find the stmt VS1_0, and the
- relevant vector def 'vx0'. Having found 'vx0' we can generate
- the vector stmt VS2_0, and as usual, record it in the
- STMT_VINFO_VEC_STMT of stmt S2.
- When creating the second copy (VS2_1), we obtain the relevant vector
- def from the vector stmt recorded in the STMT_VINFO_RELATED_STMT of
- stmt VS1_0. This way we find the stmt VS1_1 and the relevant
- vector def 'vx1'. Using 'vx1' we create stmt VS2_1 and record a
- pointer to it in the STMT_VINFO_RELATED_STMT of the vector stmt VS2_0.
- Similarly when creating stmts VS2_2 and VS2_3. This is the resulting
- chain of stmts and pointers:
- RELATED_STMT VEC_STMT
- VS1_0: vx0 = memref0 VS1_1 -
- VS1_1: vx1 = memref1 VS1_2 -
- VS1_2: vx2 = memref2 VS1_3 -
- VS1_3: vx3 = memref3 - -
- S1: x = load - VS1_0
- VS2_0: vz0 = vx0 + v1 VS2_1 -
- VS2_1: vz1 = vx1 + v1 VS2_2 -
- VS2_2: vz2 = vx2 + v1 VS2_3 -
- VS2_3: vz3 = vx3 + v1 - -
- S2: z = x + 1 - VS2_0 */
-
- prev_stmt_info = NULL;
- for (j = 0; j < ncopies; j++)
- {
- /* Handle uses. */
- if (j == 0)
- {
- if (op_type == binary_op && scalar_shift_arg)
- {
- /* Vector shl and shr insn patterns can be defined with scalar
- operand 2 (shift operand). In this case, use constant or loop
- invariant op1 directly, without extending it to vector mode
- first. */
- optab_op2_mode = insn_data[icode].operand[2].mode;
- if (!VECTOR_MODE_P (optab_op2_mode))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "operand 1 using scalar mode.");
- vec_oprnd1 = op1;
- VEC_quick_push (tree, vec_oprnds1, vec_oprnd1);
- if (slp_node)
- {
- /* Store vec_oprnd1 for every vector stmt to be created
- for SLP_NODE. We check during the analysis that all the
- shift arguments are the same.
- TODO: Allow different constants for different vector
- stmts generated for an SLP instance. */
- for (k = 0; k < slp_node->vec_stmts_size - 1; k++)
- VEC_quick_push (tree, vec_oprnds1, vec_oprnd1);
- }
- }
- }
-
- /* vec_oprnd1 is available if operand 1 should be of a scalar-type
- (a special case for certain kind of vector shifts); otherwise,
- operand 1 should be of a vector type (the usual case). */
- if (op_type == binary_op && !vec_oprnd1)
- vect_get_vec_defs (op0, op1, stmt, &vec_oprnds0, &vec_oprnds1,
- slp_node);
- else
- vect_get_vec_defs (op0, NULL_TREE, stmt, &vec_oprnds0, NULL,
- slp_node);
- }
- else
- vect_get_vec_defs_for_stmt_copy (dt, &vec_oprnds0, &vec_oprnds1);
-
- /* Arguments are ready. Create the new vector stmt. */
- for (i = 0; VEC_iterate (tree, vec_oprnds0, i, vop0); i++)
- {
- vop1 = ((op_type == binary_op)
- ? VEC_index (tree, vec_oprnds1, i) : NULL);
- new_stmt = gimple_build_assign_with_ops (code, vec_dest, vop0, vop1);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_assign_set_lhs (new_stmt, new_temp);
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
- if (slp_node)
- VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt);
- }
-
- if (slp_node)
- continue;
-
- if (j == 0)
- STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
- else
- STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
- prev_stmt_info = vinfo_for_stmt (new_stmt);
- }
-
- VEC_free (tree, heap, vec_oprnds0);
- if (vec_oprnds1)
- VEC_free (tree, heap, vec_oprnds1);
-
- return true;
-}
-
-
-/* Get vectorized definitions for loop-based vectorization. For the first
- operand we call vect_get_vec_def_for_operand() (with OPRND containing
- scalar operand), and for the rest we get a copy with
- vect_get_vec_def_for_stmt_copy() using the previous vector definition
- (stored in OPRND). See vect_get_vec_def_for_stmt_copy() for details.
- The vectors are collected into VEC_OPRNDS. */
-
-static void
-vect_get_loop_based_defs (tree *oprnd, gimple stmt, enum vect_def_type dt,
- VEC (tree, heap) **vec_oprnds, int multi_step_cvt)
-{
- tree vec_oprnd;
-
- /* Get first vector operand. */
- /* All the vector operands except the very first one (that is scalar oprnd)
- are stmt copies. */
- if (TREE_CODE (TREE_TYPE (*oprnd)) != VECTOR_TYPE)
- vec_oprnd = vect_get_vec_def_for_operand (*oprnd, stmt, NULL);
- else
- vec_oprnd = vect_get_vec_def_for_stmt_copy (dt, *oprnd);
-
- VEC_quick_push (tree, *vec_oprnds, vec_oprnd);
-
- /* Get second vector operand. */
- vec_oprnd = vect_get_vec_def_for_stmt_copy (dt, vec_oprnd);
- VEC_quick_push (tree, *vec_oprnds, vec_oprnd);
-
- *oprnd = vec_oprnd;
-
- /* For conversion in multiple steps, continue to get operands
- recursively. */
- if (multi_step_cvt)
- vect_get_loop_based_defs (oprnd, stmt, dt, vec_oprnds, multi_step_cvt - 1);
-}
-
-
-/* Create vectorized demotion statements for vector operands from VEC_OPRNDS.
- For multi-step conversions store the resulting vectors and call the function
- recursively. */
-
-static void
-vect_create_vectorized_demotion_stmts (VEC (tree, heap) **vec_oprnds,
- int multi_step_cvt, gimple stmt,
- VEC (tree, heap) *vec_dsts,
- gimple_stmt_iterator *gsi,
- slp_tree slp_node, enum tree_code code,
- stmt_vec_info *prev_stmt_info)
-{
- unsigned int i;
- tree vop0, vop1, new_tmp, vec_dest;
- gimple new_stmt;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
-
- vec_dest = VEC_pop (tree, vec_dsts);
-
- for (i = 0; i < VEC_length (tree, *vec_oprnds); i += 2)
- {
- /* Create demotion operation. */
- vop0 = VEC_index (tree, *vec_oprnds, i);
- vop1 = VEC_index (tree, *vec_oprnds, i + 1);
- new_stmt = gimple_build_assign_with_ops (code, vec_dest, vop0, vop1);
- new_tmp = make_ssa_name (vec_dest, new_stmt);
- gimple_assign_set_lhs (new_stmt, new_tmp);
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
-
- if (multi_step_cvt)
- /* Store the resulting vector for next recursive call. */
- VEC_replace (tree, *vec_oprnds, i/2, new_tmp);
- else
- {
- /* This is the last step of the conversion sequence. Store the
- vectors in SLP_NODE or in vector info of the scalar statement
- (or in STMT_VINFO_RELATED_STMT chain). */
- if (slp_node)
- VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt);
- else
- {
- if (!*prev_stmt_info)
- STMT_VINFO_VEC_STMT (stmt_info) = new_stmt;
- else
- STMT_VINFO_RELATED_STMT (*prev_stmt_info) = new_stmt;
-
- *prev_stmt_info = vinfo_for_stmt (new_stmt);
- }
- }
- }
-
- /* For multi-step demotion operations we first generate demotion operations
- from the source type to the intermediate types, and then combine the
- results (stored in VEC_OPRNDS) in demotion operation to the destination
- type. */
- if (multi_step_cvt)
- {
- /* At each level of recursion we have have of the operands we had at the
- previous level. */
- VEC_truncate (tree, *vec_oprnds, (i+1)/2);
- vect_create_vectorized_demotion_stmts (vec_oprnds, multi_step_cvt - 1,
- stmt, vec_dsts, gsi, slp_node,
- code, prev_stmt_info);
- }
-}
-
-
-/* Function vectorizable_type_demotion
-
- Check if STMT performs a binary or unary operation that involves
- type demotion, and if it can be vectorized.
- If VEC_STMT is also passed, vectorize the STMT: create a vectorized
- stmt to replace it, put it in VEC_STMT, and insert it at BSI.
- Return FALSE if not a vectorizable STMT, TRUE otherwise. */
-
-bool
-vectorizable_type_demotion (gimple stmt, gimple_stmt_iterator *gsi,
- gimple *vec_stmt, slp_tree slp_node)
-{
- tree vec_dest;
- tree scalar_dest;
- tree op0;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- enum tree_code code, code1 = ERROR_MARK;
- tree def;
- gimple def_stmt;
- enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
- stmt_vec_info prev_stmt_info;
- int nunits_in;
- int nunits_out;
- tree vectype_out;
- int ncopies;
- int j, i;
- tree vectype_in;
- int multi_step_cvt = 0;
- VEC (tree, heap) *vec_oprnds0 = NULL;
- VEC (tree, heap) *vec_dsts = NULL, *interm_types = NULL, *tmp_vec_dsts = NULL;
- tree last_oprnd, intermediate_type;
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info))
- return false;
-
- if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
- return false;
-
- /* Is STMT a vectorizable type-demotion operation? */
- if (!is_gimple_assign (stmt))
- return false;
-
- if (TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME)
- return false;
-
- code = gimple_assign_rhs_code (stmt);
- if (!CONVERT_EXPR_CODE_P (code))
- return false;
-
- op0 = gimple_assign_rhs1 (stmt);
- vectype_in = get_vectype_for_scalar_type (TREE_TYPE (op0));
- if (!vectype_in)
- return false;
- nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
-
- scalar_dest = gimple_assign_lhs (stmt);
- vectype_out = get_vectype_for_scalar_type (TREE_TYPE (scalar_dest));
- if (!vectype_out)
- return false;
- nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
- if (nunits_in >= nunits_out)
- return false;
-
- /* Multiple types in SLP are handled by creating the appropriate number of
- vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
- case of SLP. */
- if (slp_node)
- ncopies = 1;
- else
- ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_out;
-
- gcc_assert (ncopies >= 1);
-
- if (! ((INTEGRAL_TYPE_P (TREE_TYPE (scalar_dest))
- && INTEGRAL_TYPE_P (TREE_TYPE (op0)))
- || (SCALAR_FLOAT_TYPE_P (TREE_TYPE (scalar_dest))
- && SCALAR_FLOAT_TYPE_P (TREE_TYPE (op0))
- && CONVERT_EXPR_CODE_P (code))))
- return false;
-
- /* Check the operands of the operation. */
- if (!vect_is_simple_use (op0, loop_vinfo, &def_stmt, &def, &dt[0]))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "use not simple.");
- return false;
- }
-
- /* Supportable by target? */
- if (!supportable_narrowing_operation (code, stmt, vectype_in, &code1,
- &multi_step_cvt, &interm_types))
- return false;
-
- STMT_VINFO_VECTYPE (stmt_info) = vectype_in;
-
- if (!vec_stmt) /* transformation not required. */
- {
- STMT_VINFO_TYPE (stmt_info) = type_demotion_vec_info_type;
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vectorizable_demotion ===");
- vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
- return true;
- }
-
- /** Transform. **/
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "transform type demotion operation. ncopies = %d.",
- ncopies);
-
- /* In case of multi-step demotion, we first generate demotion operations to
- the intermediate types, and then from that types to the final one.
- We create vector destinations for the intermediate type (TYPES) received
- from supportable_narrowing_operation, and store them in the correct order
- for future use in vect_create_vectorized_demotion_stmts(). */
- if (multi_step_cvt)
- vec_dsts = VEC_alloc (tree, heap, multi_step_cvt + 1);
- else
- vec_dsts = VEC_alloc (tree, heap, 1);
-
- vec_dest = vect_create_destination_var (scalar_dest, vectype_out);
- VEC_quick_push (tree, vec_dsts, vec_dest);
-
- if (multi_step_cvt)
- {
- for (i = VEC_length (tree, interm_types) - 1;
- VEC_iterate (tree, interm_types, i, intermediate_type); i--)
- {
- vec_dest = vect_create_destination_var (scalar_dest,
- intermediate_type);
- VEC_quick_push (tree, vec_dsts, vec_dest);
- }
- }
-
- /* In case the vectorization factor (VF) is bigger than the number
- of elements that we can fit in a vectype (nunits), we have to generate
- more than one vector stmt - i.e - we need to "unroll" the
- vector stmt by a factor VF/nunits. */
- last_oprnd = op0;
- prev_stmt_info = NULL;
- for (j = 0; j < ncopies; j++)
- {
- /* Handle uses. */
- if (slp_node)
- vect_get_slp_defs (slp_node, &vec_oprnds0, NULL);
- else
- {
- VEC_free (tree, heap, vec_oprnds0);
- vec_oprnds0 = VEC_alloc (tree, heap,
- (multi_step_cvt ? vect_pow2 (multi_step_cvt) * 2 : 2));
- vect_get_loop_based_defs (&last_oprnd, stmt, dt[0], &vec_oprnds0,
- vect_pow2 (multi_step_cvt) - 1);
- }
-
- /* Arguments are ready. Create the new vector stmts. */
- tmp_vec_dsts = VEC_copy (tree, heap, vec_dsts);
- vect_create_vectorized_demotion_stmts (&vec_oprnds0,
- multi_step_cvt, stmt, tmp_vec_dsts,
- gsi, slp_node, code1,
- &prev_stmt_info);
- }
-
- VEC_free (tree, heap, vec_oprnds0);
- VEC_free (tree, heap, vec_dsts);
- VEC_free (tree, heap, tmp_vec_dsts);
- VEC_free (tree, heap, interm_types);
-
- *vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
- return true;
-}
-
-
-/* Create vectorized promotion statements for vector operands from VEC_OPRNDS0
- and VEC_OPRNDS1 (for binary operations). For multi-step conversions store
- the resulting vectors and call the function recursively. */
-
-static void
-vect_create_vectorized_promotion_stmts (VEC (tree, heap) **vec_oprnds0,
- VEC (tree, heap) **vec_oprnds1,
- int multi_step_cvt, gimple stmt,
- VEC (tree, heap) *vec_dsts,
- gimple_stmt_iterator *gsi,
- slp_tree slp_node, enum tree_code code1,
- enum tree_code code2, tree decl1,
- tree decl2, int op_type,
- stmt_vec_info *prev_stmt_info)
-{
- int i;
- tree vop0, vop1, new_tmp1, new_tmp2, vec_dest;
- gimple new_stmt1, new_stmt2;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- VEC (tree, heap) *vec_tmp;
-
- vec_dest = VEC_pop (tree, vec_dsts);
- vec_tmp = VEC_alloc (tree, heap, VEC_length (tree, *vec_oprnds0) * 2);
-
- for (i = 0; VEC_iterate (tree, *vec_oprnds0, i, vop0); i++)
- {
- if (op_type == binary_op)
- vop1 = VEC_index (tree, *vec_oprnds1, i);
- else
- vop1 = NULL_TREE;
-
- /* Generate the two halves of promotion operation. */
- new_stmt1 = vect_gen_widened_results_half (code1, decl1, vop0, vop1,
- op_type, vec_dest, gsi, stmt);
- new_stmt2 = vect_gen_widened_results_half (code2, decl2, vop0, vop1,
- op_type, vec_dest, gsi, stmt);
- if (is_gimple_call (new_stmt1))
- {
- new_tmp1 = gimple_call_lhs (new_stmt1);
- new_tmp2 = gimple_call_lhs (new_stmt2);
- }
- else
- {
- new_tmp1 = gimple_assign_lhs (new_stmt1);
- new_tmp2 = gimple_assign_lhs (new_stmt2);
- }
-
- if (multi_step_cvt)
- {
- /* Store the results for the recursive call. */
- VEC_quick_push (tree, vec_tmp, new_tmp1);
- VEC_quick_push (tree, vec_tmp, new_tmp2);
- }
- else
- {
- /* Last step of promotion sequience - store the results. */
- if (slp_node)
- {
- VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt1);
- VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt2);
- }
- else
- {
- if (!*prev_stmt_info)
- STMT_VINFO_VEC_STMT (stmt_info) = new_stmt1;
- else
- STMT_VINFO_RELATED_STMT (*prev_stmt_info) = new_stmt1;
-
- *prev_stmt_info = vinfo_for_stmt (new_stmt1);
- STMT_VINFO_RELATED_STMT (*prev_stmt_info) = new_stmt2;
- *prev_stmt_info = vinfo_for_stmt (new_stmt2);
- }
- }
- }
-
- if (multi_step_cvt)
- {
- /* For multi-step promotion operation we first generate we call the
- function recurcively for every stage. We start from the input type,
- create promotion operations to the intermediate types, and then
- create promotions to the output type. */
- *vec_oprnds0 = VEC_copy (tree, heap, vec_tmp);
- VEC_free (tree, heap, vec_tmp);
- vect_create_vectorized_promotion_stmts (vec_oprnds0, vec_oprnds1,
- multi_step_cvt - 1, stmt,
- vec_dsts, gsi, slp_node, code1,
- code2, decl2, decl2, op_type,
- prev_stmt_info);
- }
-}
-
-
-/* Function vectorizable_type_promotion
-
- Check if STMT performs a binary or unary operation that involves
- type promotion, and if it can be vectorized.
- If VEC_STMT is also passed, vectorize the STMT: create a vectorized
- stmt to replace it, put it in VEC_STMT, and insert it at BSI.
- Return FALSE if not a vectorizable STMT, TRUE otherwise. */
-
-bool
-vectorizable_type_promotion (gimple stmt, gimple_stmt_iterator *gsi,
- gimple *vec_stmt, slp_tree slp_node)
-{
- tree vec_dest;
- tree scalar_dest;
- tree op0, op1 = NULL;
- tree vec_oprnd0=NULL, vec_oprnd1=NULL;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- enum tree_code code, code1 = ERROR_MARK, code2 = ERROR_MARK;
- tree decl1 = NULL_TREE, decl2 = NULL_TREE;
- int op_type;
- tree def;
- gimple def_stmt;
- enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
- stmt_vec_info prev_stmt_info;
- int nunits_in;
- int nunits_out;
- tree vectype_out;
- int ncopies;
- int j, i;
- tree vectype_in;
- tree intermediate_type = NULL_TREE;
- int multi_step_cvt = 0;
- VEC (tree, heap) *vec_oprnds0 = NULL, *vec_oprnds1 = NULL;
- VEC (tree, heap) *vec_dsts = NULL, *interm_types = NULL, *tmp_vec_dsts = NULL;
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info))
- return false;
-
- if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
- return false;
-
- /* Is STMT a vectorizable type-promotion operation? */
- if (!is_gimple_assign (stmt))
- return false;
-
- if (TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME)
- return false;
-
- code = gimple_assign_rhs_code (stmt);
- if (!CONVERT_EXPR_CODE_P (code)
- && code != WIDEN_MULT_EXPR)
- return false;
-
- op0 = gimple_assign_rhs1 (stmt);
- vectype_in = get_vectype_for_scalar_type (TREE_TYPE (op0));
- if (!vectype_in)
- return false;
- nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
-
- scalar_dest = gimple_assign_lhs (stmt);
- vectype_out = get_vectype_for_scalar_type (TREE_TYPE (scalar_dest));
- if (!vectype_out)
- return false;
- nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
- if (nunits_in <= nunits_out)
- return false;
-
- /* Multiple types in SLP are handled by creating the appropriate number of
- vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
- case of SLP. */
- if (slp_node)
- ncopies = 1;
- else
- ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_in;
-
- gcc_assert (ncopies >= 1);
-
- if (! ((INTEGRAL_TYPE_P (TREE_TYPE (scalar_dest))
- && INTEGRAL_TYPE_P (TREE_TYPE (op0)))
- || (SCALAR_FLOAT_TYPE_P (TREE_TYPE (scalar_dest))
- && SCALAR_FLOAT_TYPE_P (TREE_TYPE (op0))
- && CONVERT_EXPR_CODE_P (code))))
- return false;
-
- /* Check the operands of the operation. */
- if (!vect_is_simple_use (op0, loop_vinfo, &def_stmt, &def, &dt[0]))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "use not simple.");
- return false;
- }
-
- op_type = TREE_CODE_LENGTH (code);
- if (op_type == binary_op)
- {
- op1 = gimple_assign_rhs2 (stmt);
- if (!vect_is_simple_use (op1, loop_vinfo, &def_stmt, &def, &dt[1]))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "use not simple.");
- return false;
- }
- }
-
- /* Supportable by target? */
- if (!supportable_widening_operation (code, stmt, vectype_in,
- &decl1, &decl2, &code1, &code2,
- &multi_step_cvt, &interm_types))
- return false;
-
- /* Binary widening operation can only be supported directly by the
- architecture. */
- gcc_assert (!(multi_step_cvt && op_type == binary_op));
-
- STMT_VINFO_VECTYPE (stmt_info) = vectype_in;
-
- if (!vec_stmt) /* transformation not required. */
- {
- STMT_VINFO_TYPE (stmt_info) = type_promotion_vec_info_type;
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vectorizable_promotion ===");
- vect_model_simple_cost (stmt_info, 2*ncopies, dt, NULL);
- return true;
- }
-
- /** Transform. **/
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "transform type promotion operation. ncopies = %d.",
- ncopies);
-
- /* Handle def. */
- /* In case of multi-step promotion, we first generate promotion operations
- to the intermediate types, and then from that types to the final one.
- We store vector destination in VEC_DSTS in the correct order for
- recursive creation of promotion operations in
- vect_create_vectorized_promotion_stmts(). Vector destinations are created
- according to TYPES recieved from supportable_widening_operation(). */
- if (multi_step_cvt)
- vec_dsts = VEC_alloc (tree, heap, multi_step_cvt + 1);
- else
- vec_dsts = VEC_alloc (tree, heap, 1);
-
- vec_dest = vect_create_destination_var (scalar_dest, vectype_out);
- VEC_quick_push (tree, vec_dsts, vec_dest);
-
- if (multi_step_cvt)
- {
- for (i = VEC_length (tree, interm_types) - 1;
- VEC_iterate (tree, interm_types, i, intermediate_type); i--)
- {
- vec_dest = vect_create_destination_var (scalar_dest,
- intermediate_type);
- VEC_quick_push (tree, vec_dsts, vec_dest);
- }
- }
-
- if (!slp_node)
- {
- vec_oprnds0 = VEC_alloc (tree, heap,
- (multi_step_cvt ? vect_pow2 (multi_step_cvt) : 1));
- if (op_type == binary_op)
- vec_oprnds1 = VEC_alloc (tree, heap, 1);
- }
-
- /* In case the vectorization factor (VF) is bigger than the number
- of elements that we can fit in a vectype (nunits), we have to generate
- more than one vector stmt - i.e - we need to "unroll" the
- vector stmt by a factor VF/nunits. */
-
- prev_stmt_info = NULL;
- for (j = 0; j < ncopies; j++)
- {
- /* Handle uses. */
- if (j == 0)
- {
- if (slp_node)
- vect_get_slp_defs (slp_node, &vec_oprnds0, &vec_oprnds1);
- else
- {
- vec_oprnd0 = vect_get_vec_def_for_operand (op0, stmt, NULL);
- VEC_quick_push (tree, vec_oprnds0, vec_oprnd0);
- if (op_type == binary_op)
- {
- vec_oprnd1 = vect_get_vec_def_for_operand (op1, stmt, NULL);
- VEC_quick_push (tree, vec_oprnds1, vec_oprnd1);
- }
- }
- }
- else
- {
- vec_oprnd0 = vect_get_vec_def_for_stmt_copy (dt[0], vec_oprnd0);
- VEC_replace (tree, vec_oprnds0, 0, vec_oprnd0);
- if (op_type == binary_op)
- {
- vec_oprnd1 = vect_get_vec_def_for_stmt_copy (dt[1], vec_oprnd1);
- VEC_replace (tree, vec_oprnds1, 0, vec_oprnd1);
- }
- }
-
- /* Arguments are ready. Create the new vector stmts. */
- tmp_vec_dsts = VEC_copy (tree, heap, vec_dsts);
- vect_create_vectorized_promotion_stmts (&vec_oprnds0, &vec_oprnds1,
- multi_step_cvt, stmt,
- tmp_vec_dsts,
- gsi, slp_node, code1, code2,
- decl1, decl2, op_type,
- &prev_stmt_info);
- }
-
- VEC_free (tree, heap, vec_dsts);
- VEC_free (tree, heap, tmp_vec_dsts);
- VEC_free (tree, heap, interm_types);
- VEC_free (tree, heap, vec_oprnds0);
- VEC_free (tree, heap, vec_oprnds1);
-
- *vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
- return true;
-}
-
-
-/* Function vect_strided_store_supported.
-
- Returns TRUE is INTERLEAVE_HIGH and INTERLEAVE_LOW operations are supported,
- and FALSE otherwise. */
-
-static bool
-vect_strided_store_supported (tree vectype)
-{
- optab interleave_high_optab, interleave_low_optab;
- int mode;
-
- mode = (int) TYPE_MODE (vectype);
-
- /* Check that the operation is supported. */
- interleave_high_optab = optab_for_tree_code (VEC_INTERLEAVE_HIGH_EXPR,
- vectype, optab_default);
- interleave_low_optab = optab_for_tree_code (VEC_INTERLEAVE_LOW_EXPR,
- vectype, optab_default);
- if (!interleave_high_optab || !interleave_low_optab)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "no optab for interleave.");
- return false;
- }
-
- if (optab_handler (interleave_high_optab, mode)->insn_code
- == CODE_FOR_nothing
- || optab_handler (interleave_low_optab, mode)->insn_code
- == CODE_FOR_nothing)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "interleave op not supported by target.");
- return false;
- }
-
- return true;
-}
-
-
-/* Function vect_permute_store_chain.
-
- Given a chain of interleaved stores in DR_CHAIN of LENGTH that must be
- a power of 2, generate interleave_high/low stmts to reorder the data
- correctly for the stores. Return the final references for stores in
- RESULT_CHAIN.
-
- E.g., LENGTH is 4 and the scalar type is short, i.e., VF is 8.
- The input is 4 vectors each containing 8 elements. We assign a number to each
- element, the input sequence is:
-
- 1st vec: 0 1 2 3 4 5 6 7
- 2nd vec: 8 9 10 11 12 13 14 15
- 3rd vec: 16 17 18 19 20 21 22 23
- 4th vec: 24 25 26 27 28 29 30 31
-
- The output sequence should be:
-
- 1st vec: 0 8 16 24 1 9 17 25
- 2nd vec: 2 10 18 26 3 11 19 27
- 3rd vec: 4 12 20 28 5 13 21 30
- 4th vec: 6 14 22 30 7 15 23 31
-
- i.e., we interleave the contents of the four vectors in their order.
-
- We use interleave_high/low instructions to create such output. The input of
- each interleave_high/low operation is two vectors:
- 1st vec 2nd vec
- 0 1 2 3 4 5 6 7
- the even elements of the result vector are obtained left-to-right from the
- high/low elements of the first vector. The odd elements of the result are
- obtained left-to-right from the high/low elements of the second vector.
- The output of interleave_high will be: 0 4 1 5
- and of interleave_low: 2 6 3 7
-
-
- The permutation is done in log LENGTH stages. In each stage interleave_high
- and interleave_low stmts are created for each pair of vectors in DR_CHAIN,
- where the first argument is taken from the first half of DR_CHAIN and the
- second argument from it's second half.
- In our example,
-
- I1: interleave_high (1st vec, 3rd vec)
- I2: interleave_low (1st vec, 3rd vec)
- I3: interleave_high (2nd vec, 4th vec)
- I4: interleave_low (2nd vec, 4th vec)
-
- The output for the first stage is:
-
- I1: 0 16 1 17 2 18 3 19
- I2: 4 20 5 21 6 22 7 23
- I3: 8 24 9 25 10 26 11 27
- I4: 12 28 13 29 14 30 15 31
-
- The output of the second stage, i.e. the final result is:
-
- I1: 0 8 16 24 1 9 17 25
- I2: 2 10 18 26 3 11 19 27
- I3: 4 12 20 28 5 13 21 30
- I4: 6 14 22 30 7 15 23 31. */
-
-static bool
-vect_permute_store_chain (VEC(tree,heap) *dr_chain,
- unsigned int length,
- gimple stmt,
- gimple_stmt_iterator *gsi,
- VEC(tree,heap) **result_chain)
-{
- tree perm_dest, vect1, vect2, high, low;
- gimple perm_stmt;
- tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (stmt));
- tree scalar_dest;
- int i;
- unsigned int j;
- enum tree_code high_code, low_code;
-
- scalar_dest = gimple_assign_lhs (stmt);
-
- /* Check that the operation is supported. */
- if (!vect_strided_store_supported (vectype))
- return false;
-
- *result_chain = VEC_copy (tree, heap, dr_chain);
-
- for (i = 0; i < exact_log2 (length); i++)
- {
- for (j = 0; j < length/2; j++)
- {
- vect1 = VEC_index (tree, dr_chain, j);
- vect2 = VEC_index (tree, dr_chain, j+length/2);
-
- /* Create interleaving stmt:
- in the case of big endian:
- high = interleave_high (vect1, vect2)
- and in the case of little endian:
- high = interleave_low (vect1, vect2). */
- perm_dest = create_tmp_var (vectype, "vect_inter_high");
- DECL_GIMPLE_REG_P (perm_dest) = 1;
- add_referenced_var (perm_dest);
- if (BYTES_BIG_ENDIAN)
- {
- high_code = VEC_INTERLEAVE_HIGH_EXPR;
- low_code = VEC_INTERLEAVE_LOW_EXPR;
- }
- else
- {
- low_code = VEC_INTERLEAVE_HIGH_EXPR;
- high_code = VEC_INTERLEAVE_LOW_EXPR;
- }
- perm_stmt = gimple_build_assign_with_ops (high_code, perm_dest,
- vect1, vect2);
- high = make_ssa_name (perm_dest, perm_stmt);
- gimple_assign_set_lhs (perm_stmt, high);
- vect_finish_stmt_generation (stmt, perm_stmt, gsi);
- VEC_replace (tree, *result_chain, 2*j, high);
-
- /* Create interleaving stmt:
- in the case of big endian:
- low = interleave_low (vect1, vect2)
- and in the case of little endian:
- low = interleave_high (vect1, vect2). */
- perm_dest = create_tmp_var (vectype, "vect_inter_low");
- DECL_GIMPLE_REG_P (perm_dest) = 1;
- add_referenced_var (perm_dest);
- perm_stmt = gimple_build_assign_with_ops (low_code, perm_dest,
- vect1, vect2);
- low = make_ssa_name (perm_dest, perm_stmt);
- gimple_assign_set_lhs (perm_stmt, low);
- vect_finish_stmt_generation (stmt, perm_stmt, gsi);
- VEC_replace (tree, *result_chain, 2*j+1, low);
- }
- dr_chain = VEC_copy (tree, heap, *result_chain);
- }
- return true;
-}
-
-
-/* Function vectorizable_store.
-
- Check if STMT defines a non scalar data-ref (array/pointer/structure) that
- can be vectorized.
- If VEC_STMT is also passed, vectorize the STMT: create a vectorized
- stmt to replace it, put it in VEC_STMT, and insert it at BSI.
- Return FALSE if not a vectorizable STMT, TRUE otherwise. */
-
-bool
-vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
- slp_tree slp_node)
-{
- tree scalar_dest;
- tree data_ref;
- tree op;
- tree vec_oprnd = NULL_TREE;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info), *first_dr = NULL;
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- enum machine_mode vec_mode;
- tree dummy;
- enum dr_alignment_support alignment_support_scheme;
- tree def;
- gimple def_stmt;
- enum vect_def_type dt;
- stmt_vec_info prev_stmt_info = NULL;
- tree dataref_ptr = NULL_TREE;
- int nunits = TYPE_VECTOR_SUBPARTS (vectype);
- int ncopies;
- int j;
- gimple next_stmt, first_stmt = NULL;
- bool strided_store = false;
- unsigned int group_size, i;
- VEC(tree,heap) *dr_chain = NULL, *oprnds = NULL, *result_chain = NULL;
- bool inv_p;
- VEC(tree,heap) *vec_oprnds = NULL;
- bool slp = (slp_node != NULL);
- stmt_vec_info first_stmt_vinfo;
- unsigned int vec_num;
-
- /* Multiple types in SLP are handled by creating the appropriate number of
- vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
- case of SLP. */
- if (slp)
- ncopies = 1;
- else
- ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
-
- gcc_assert (ncopies >= 1);
-
- /* FORNOW. This restriction should be relaxed. */
- if (nested_in_vect_loop_p (loop, stmt) && ncopies > 1)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "multiple types in nested loop.");
- return false;
- }
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info))
- return false;
-
- if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
- return false;
-
- /* Is vectorizable store? */
-
- if (!is_gimple_assign (stmt))
- return false;
-
- scalar_dest = gimple_assign_lhs (stmt);
- if (TREE_CODE (scalar_dest) != ARRAY_REF
- && TREE_CODE (scalar_dest) != INDIRECT_REF
- && !STMT_VINFO_STRIDED_ACCESS (stmt_info))
- return false;
-
- gcc_assert (gimple_assign_single_p (stmt));
- op = gimple_assign_rhs1 (stmt);
- if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "use not simple.");
- return false;
- }
-
- /* The scalar rhs type needs to be trivially convertible to the vector
- component type. This should always be the case. */
- if (!useless_type_conversion_p (TREE_TYPE (vectype), TREE_TYPE (op)))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "??? operands of different types");
- return false;
- }
-
- vec_mode = TYPE_MODE (vectype);
- /* FORNOW. In some cases can vectorize even if data-type not supported
- (e.g. - array initialization with 0). */
- if (optab_handler (mov_optab, (int)vec_mode)->insn_code == CODE_FOR_nothing)
- return false;
-
- if (!STMT_VINFO_DATA_REF (stmt_info))
- return false;
-
- if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
- {
- strided_store = true;
- first_stmt = DR_GROUP_FIRST_DR (stmt_info);
- if (!vect_strided_store_supported (vectype)
- && !PURE_SLP_STMT (stmt_info) && !slp)
- return false;
-
- if (first_stmt == stmt)
- {
- /* STMT is the leader of the group. Check the operands of all the
- stmts of the group. */
- next_stmt = DR_GROUP_NEXT_DR (stmt_info);
- while (next_stmt)
- {
- gcc_assert (gimple_assign_single_p (next_stmt));
- op = gimple_assign_rhs1 (next_stmt);
- if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "use not simple.");
- return false;
- }
- next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
- }
- }
- }
-
- if (!vec_stmt) /* transformation not required. */
- {
- STMT_VINFO_TYPE (stmt_info) = store_vec_info_type;
- vect_model_store_cost (stmt_info, ncopies, dt, NULL);
- return true;
- }
-
- /** Transform. **/
-
- if (strided_store)
- {
- first_dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (first_stmt));
- group_size = DR_GROUP_SIZE (vinfo_for_stmt (first_stmt));
-
- DR_GROUP_STORE_COUNT (vinfo_for_stmt (first_stmt))++;
-
- /* FORNOW */
- gcc_assert (!nested_in_vect_loop_p (loop, stmt));
-
- /* We vectorize all the stmts of the interleaving group when we
- reach the last stmt in the group. */
- if (DR_GROUP_STORE_COUNT (vinfo_for_stmt (first_stmt))
- < DR_GROUP_SIZE (vinfo_for_stmt (first_stmt))
- && !slp)
- {
- *vec_stmt = NULL;
- return true;
- }
-
- if (slp)
- strided_store = false;
-
- /* VEC_NUM is the number of vect stmts to be created for this group. */
- if (slp)
- vec_num = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
- else
- vec_num = group_size;
- }
- else
- {
- first_stmt = stmt;
- first_dr = dr;
- group_size = vec_num = 1;
- first_stmt_vinfo = stmt_info;
- }
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "transform store. ncopies = %d",ncopies);
-
- dr_chain = VEC_alloc (tree, heap, group_size);
- oprnds = VEC_alloc (tree, heap, group_size);
-
- alignment_support_scheme = vect_supportable_dr_alignment (first_dr);
- gcc_assert (alignment_support_scheme);
- gcc_assert (alignment_support_scheme == dr_aligned); /* FORNOW */
-
- /* In case the vectorization factor (VF) is bigger than the number
- of elements that we can fit in a vectype (nunits), we have to generate
- more than one vector stmt - i.e - we need to "unroll" the
- vector stmt by a factor VF/nunits. For more details see documentation in
- vect_get_vec_def_for_copy_stmt. */
-
- /* In case of interleaving (non-unit strided access):
-
- S1: &base + 2 = x2
- S2: &base = x0
- S3: &base + 1 = x1
- S4: &base + 3 = x3
-
- We create vectorized stores starting from base address (the access of the
- first stmt in the chain (S2 in the above example), when the last store stmt
- of the chain (S4) is reached:
-
- VS1: &base = vx2
- VS2: &base + vec_size*1 = vx0
- VS3: &base + vec_size*2 = vx1
- VS4: &base + vec_size*3 = vx3
-
- Then permutation statements are generated:
-
- VS5: vx5 = VEC_INTERLEAVE_HIGH_EXPR < vx0, vx3 >
- VS6: vx6 = VEC_INTERLEAVE_LOW_EXPR < vx0, vx3 >
- ...
-
- And they are put in STMT_VINFO_VEC_STMT of the corresponding scalar stmts
- (the order of the data-refs in the output of vect_permute_store_chain
- corresponds to the order of scalar stmts in the interleaving chain - see
- the documentation of vect_permute_store_chain()).
-
- In case of both multiple types and interleaving, above vector stores and
- permutation stmts are created for every copy. The result vector stmts are
- put in STMT_VINFO_VEC_STMT for the first copy and in the corresponding
- STMT_VINFO_RELATED_STMT for the next copies.
- */
-
- prev_stmt_info = NULL;
- for (j = 0; j < ncopies; j++)
- {
- gimple new_stmt;
- gimple ptr_incr;
-
- if (j == 0)
- {
- if (slp)
- {
- /* Get vectorized arguments for SLP_NODE. */
- vect_get_slp_defs (slp_node, &vec_oprnds, NULL);
-
- vec_oprnd = VEC_index (tree, vec_oprnds, 0);
- }
- else
- {
- /* For interleaved stores we collect vectorized defs for all the
- stores in the group in DR_CHAIN and OPRNDS. DR_CHAIN is then
- used as an input to vect_permute_store_chain(), and OPRNDS as
- an input to vect_get_vec_def_for_stmt_copy() for the next copy.
-
- If the store is not strided, GROUP_SIZE is 1, and DR_CHAIN and
- OPRNDS are of size 1. */
- next_stmt = first_stmt;
- for (i = 0; i < group_size; i++)
- {
- /* Since gaps are not supported for interleaved stores,
- GROUP_SIZE is the exact number of stmts in the chain.
- Therefore, NEXT_STMT can't be NULL_TREE. In case that
- there is no interleaving, GROUP_SIZE is 1, and only one
- iteration of the loop will be executed. */
- gcc_assert (next_stmt
- && gimple_assign_single_p (next_stmt));
- op = gimple_assign_rhs1 (next_stmt);
-
- vec_oprnd = vect_get_vec_def_for_operand (op, next_stmt,
- NULL);
- VEC_quick_push(tree, dr_chain, vec_oprnd);
- VEC_quick_push(tree, oprnds, vec_oprnd);
- next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
- }
- }
-
- /* We should have catched mismatched types earlier. */
- gcc_assert (useless_type_conversion_p (vectype,
- TREE_TYPE (vec_oprnd)));
- dataref_ptr = vect_create_data_ref_ptr (first_stmt, NULL, NULL_TREE,
- &dummy, &ptr_incr, false,
- &inv_p, NULL);
- gcc_assert (!inv_p);
- }
- else
- {
- /* For interleaved stores we created vectorized defs for all the
- defs stored in OPRNDS in the previous iteration (previous copy).
- DR_CHAIN is then used as an input to vect_permute_store_chain(),
- and OPRNDS as an input to vect_get_vec_def_for_stmt_copy() for the
- next copy.
- If the store is not strided, GROUP_SIZE is 1, and DR_CHAIN and
- OPRNDS are of size 1. */
- for (i = 0; i < group_size; i++)
- {
- op = VEC_index (tree, oprnds, i);
- vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt);
- vec_oprnd = vect_get_vec_def_for_stmt_copy (dt, op);
- VEC_replace(tree, dr_chain, i, vec_oprnd);
- VEC_replace(tree, oprnds, i, vec_oprnd);
- }
- dataref_ptr =
- bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt, NULL_TREE);
- }
-
- if (strided_store)
- {
- result_chain = VEC_alloc (tree, heap, group_size);
- /* Permute. */
- if (!vect_permute_store_chain (dr_chain, group_size, stmt, gsi,
- &result_chain))
- return false;
- }
-
- next_stmt = first_stmt;
- for (i = 0; i < vec_num; i++)
- {
- if (i > 0)
- /* Bump the vector pointer. */
- dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
- NULL_TREE);
-
- if (slp)
- vec_oprnd = VEC_index (tree, vec_oprnds, i);
- else if (strided_store)
- /* For strided stores vectorized defs are interleaved in
- vect_permute_store_chain(). */
- vec_oprnd = VEC_index (tree, result_chain, i);
-
- data_ref = build_fold_indirect_ref (dataref_ptr);
-
- /* Arguments are ready. Create the new vector stmt. */
- new_stmt = gimple_build_assign (data_ref, vec_oprnd);
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
- mark_symbols_for_renaming (new_stmt);
-
- if (slp)
- continue;
-
- if (j == 0)
- STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
- else
- STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
-
- prev_stmt_info = vinfo_for_stmt (new_stmt);
- next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
- if (!next_stmt)
- break;
- }
- }
-
- VEC_free (tree, heap, dr_chain);
- VEC_free (tree, heap, oprnds);
- if (result_chain)
- VEC_free (tree, heap, result_chain);
-
- return true;
-}
-
-
-/* Function vect_setup_realignment
-
- This function is called when vectorizing an unaligned load using
- the dr_explicit_realign[_optimized] scheme.
- This function generates the following code at the loop prolog:
-
- p = initial_addr;
- x msq_init = *(floor(p)); # prolog load
- realignment_token = call target_builtin;
- loop:
- x msq = phi (msq_init, ---)
-
- The stmts marked with x are generated only for the case of
- dr_explicit_realign_optimized.
-
- The code above sets up a new (vector) pointer, pointing to the first
- location accessed by STMT, and a "floor-aligned" load using that pointer.
- It also generates code to compute the "realignment-token" (if the relevant
- target hook was defined), and creates a phi-node at the loop-header bb
- whose arguments are the result of the prolog-load (created by this
- function) and the result of a load that takes place in the loop (to be
- created by the caller to this function).
-
- For the case of dr_explicit_realign_optimized:
- The caller to this function uses the phi-result (msq) to create the
- realignment code inside the loop, and sets up the missing phi argument,
- as follows:
- loop:
- msq = phi (msq_init, lsq)
- lsq = *(floor(p')); # load in loop
- result = realign_load (msq, lsq, realignment_token);
-
- For the case of dr_explicit_realign:
- loop:
- msq = *(floor(p)); # load in loop
- p' = p + (VS-1);
- lsq = *(floor(p')); # load in loop
- result = realign_load (msq, lsq, realignment_token);
-
- Input:
- STMT - (scalar) load stmt to be vectorized. This load accesses
- a memory location that may be unaligned.
- BSI - place where new code is to be inserted.
- ALIGNMENT_SUPPORT_SCHEME - which of the two misalignment handling schemes
- is used.
-
- Output:
- REALIGNMENT_TOKEN - the result of a call to the builtin_mask_for_load
- target hook, if defined.
- Return value - the result of the loop-header phi node. */
-
-static tree
-vect_setup_realignment (gimple stmt, gimple_stmt_iterator *gsi,
- tree *realignment_token,
- enum dr_alignment_support alignment_support_scheme,
- tree init_addr,
- struct loop **at_loop)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- edge pe;
- tree scalar_dest = gimple_assign_lhs (stmt);
- tree vec_dest;
- gimple inc;
- tree ptr;
- tree data_ref;
- gimple new_stmt;
- basic_block new_bb;
- tree msq_init = NULL_TREE;
- tree new_temp;
- gimple phi_stmt;
- tree msq = NULL_TREE;
- gimple_seq stmts = NULL;
- bool inv_p;
- bool compute_in_loop = false;
- bool nested_in_vect_loop = nested_in_vect_loop_p (loop, stmt);
- struct loop *containing_loop = (gimple_bb (stmt))->loop_father;
- struct loop *loop_for_initial_load;
-
- gcc_assert (alignment_support_scheme == dr_explicit_realign
- || alignment_support_scheme == dr_explicit_realign_optimized);
-
- /* We need to generate three things:
- 1. the misalignment computation
- 2. the extra vector load (for the optimized realignment scheme).
- 3. the phi node for the two vectors from which the realignment is
- done (for the optimized realignment scheme).
- */
-
- /* 1. Determine where to generate the misalignment computation.
-
- If INIT_ADDR is NULL_TREE, this indicates that the misalignment
- calculation will be generated by this function, outside the loop (in the
- preheader). Otherwise, INIT_ADDR had already been computed for us by the
- caller, inside the loop.
-
- Background: If the misalignment remains fixed throughout the iterations of
- the loop, then both realignment schemes are applicable, and also the
- misalignment computation can be done outside LOOP. This is because we are
- vectorizing LOOP, and so the memory accesses in LOOP advance in steps that
- are a multiple of VS (the Vector Size), and therefore the misalignment in
- different vectorized LOOP iterations is always the same.
- The problem arises only if the memory access is in an inner-loop nested
- inside LOOP, which is now being vectorized using outer-loop vectorization.
- This is the only case when the misalignment of the memory access may not
- remain fixed throughout the iterations of the inner-loop (as explained in
- detail in vect_supportable_dr_alignment). In this case, not only is the
- optimized realignment scheme not applicable, but also the misalignment
- computation (and generation of the realignment token that is passed to
- REALIGN_LOAD) have to be done inside the loop.
-
- In short, INIT_ADDR indicates whether we are in a COMPUTE_IN_LOOP mode
- or not, which in turn determines if the misalignment is computed inside
- the inner-loop, or outside LOOP. */
-
- if (init_addr != NULL_TREE)
- {
- compute_in_loop = true;
- gcc_assert (alignment_support_scheme == dr_explicit_realign);
- }
-
-
- /* 2. Determine where to generate the extra vector load.
-
- For the optimized realignment scheme, instead of generating two vector
- loads in each iteration, we generate a single extra vector load in the
- preheader of the loop, and in each iteration reuse the result of the
- vector load from the previous iteration. In case the memory access is in
- an inner-loop nested inside LOOP, which is now being vectorized using
- outer-loop vectorization, we need to determine whether this initial vector
- load should be generated at the preheader of the inner-loop, or can be
- generated at the preheader of LOOP. If the memory access has no evolution
- in LOOP, it can be generated in the preheader of LOOP. Otherwise, it has
- to be generated inside LOOP (in the preheader of the inner-loop). */
-
- if (nested_in_vect_loop)
- {
- tree outerloop_step = STMT_VINFO_DR_STEP (stmt_info);
- bool invariant_in_outerloop =
- (tree_int_cst_compare (outerloop_step, size_zero_node) == 0);
- loop_for_initial_load = (invariant_in_outerloop ? loop : loop->inner);
- }
- else
- loop_for_initial_load = loop;
- if (at_loop)
- *at_loop = loop_for_initial_load;
-
- /* 3. For the case of the optimized realignment, create the first vector
- load at the loop preheader. */
-
- if (alignment_support_scheme == dr_explicit_realign_optimized)
- {
- /* Create msq_init = *(floor(p1)) in the loop preheader */
-
- gcc_assert (!compute_in_loop);
- pe = loop_preheader_edge (loop_for_initial_load);
- vec_dest = vect_create_destination_var (scalar_dest, vectype);
- ptr = vect_create_data_ref_ptr (stmt, loop_for_initial_load, NULL_TREE,
- &init_addr, &inc, true, &inv_p, NULL_TREE);
- data_ref = build1 (ALIGN_INDIRECT_REF, vectype, ptr);
- new_stmt = gimple_build_assign (vec_dest, data_ref);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_assign_set_lhs (new_stmt, new_temp);
- mark_symbols_for_renaming (new_stmt);
- new_bb = gsi_insert_on_edge_immediate (pe, new_stmt);
- gcc_assert (!new_bb);
- msq_init = gimple_assign_lhs (new_stmt);
- }
-
- /* 4. Create realignment token using a target builtin, if available.
- It is done either inside the containing loop, or before LOOP (as
- determined above). */
-
- if (targetm.vectorize.builtin_mask_for_load)
- {
- tree builtin_decl;
-
- /* Compute INIT_ADDR - the initial addressed accessed by this memref. */
- if (compute_in_loop)
- gcc_assert (init_addr); /* already computed by the caller. */
- else
- {
- /* Generate the INIT_ADDR computation outside LOOP. */
- init_addr = vect_create_addr_base_for_vector_ref (stmt, &stmts,
- NULL_TREE, loop);
- pe = loop_preheader_edge (loop);
- new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
- gcc_assert (!new_bb);
- }
-
- builtin_decl = targetm.vectorize.builtin_mask_for_load ();
- new_stmt = gimple_build_call (builtin_decl, 1, init_addr);
- vec_dest =
- vect_create_destination_var (scalar_dest,
- gimple_call_return_type (new_stmt));
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_call_set_lhs (new_stmt, new_temp);
-
- if (compute_in_loop)
- gsi_insert_before (gsi, new_stmt, GSI_SAME_STMT);
- else
- {
- /* Generate the misalignment computation outside LOOP. */
- pe = loop_preheader_edge (loop);
- new_bb = gsi_insert_on_edge_immediate (pe, new_stmt);
- gcc_assert (!new_bb);
- }
-
- *realignment_token = gimple_call_lhs (new_stmt);
-
- /* The result of the CALL_EXPR to this builtin is determined from
- the value of the parameter and no global variables are touched
- which makes the builtin a "const" function. Requiring the
- builtin to have the "const" attribute makes it unnecessary
- to call mark_call_clobbered. */
- gcc_assert (TREE_READONLY (builtin_decl));
- }
-
- if (alignment_support_scheme == dr_explicit_realign)
- return msq;
-
- gcc_assert (!compute_in_loop);
- gcc_assert (alignment_support_scheme == dr_explicit_realign_optimized);
-
-
- /* 5. Create msq = phi <msq_init, lsq> in loop */
-
- pe = loop_preheader_edge (containing_loop);
- vec_dest = vect_create_destination_var (scalar_dest, vectype);
- msq = make_ssa_name (vec_dest, NULL);
- phi_stmt = create_phi_node (msq, containing_loop->header);
- SSA_NAME_DEF_STMT (msq) = phi_stmt;
- add_phi_arg (phi_stmt, msq_init, pe);
-
- return msq;
-}
-
-
-/* Function vect_strided_load_supported.
-
- Returns TRUE is EXTRACT_EVEN and EXTRACT_ODD operations are supported,
- and FALSE otherwise. */
-
-static bool
-vect_strided_load_supported (tree vectype)
-{
- optab perm_even_optab, perm_odd_optab;
- int mode;
-
- mode = (int) TYPE_MODE (vectype);
-
- perm_even_optab = optab_for_tree_code (VEC_EXTRACT_EVEN_EXPR, vectype,
- optab_default);
- if (!perm_even_optab)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "no optab for perm_even.");
- return false;
- }
-
- if (optab_handler (perm_even_optab, mode)->insn_code == CODE_FOR_nothing)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "perm_even op not supported by target.");
- return false;
- }
-
- perm_odd_optab = optab_for_tree_code (VEC_EXTRACT_ODD_EXPR, vectype,
- optab_default);
- if (!perm_odd_optab)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "no optab for perm_odd.");
- return false;
- }
-
- if (optab_handler (perm_odd_optab, mode)->insn_code == CODE_FOR_nothing)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "perm_odd op not supported by target.");
- return false;
- }
- return true;
-}
-
-
-/* Function vect_permute_load_chain.
-
- Given a chain of interleaved loads in DR_CHAIN of LENGTH that must be
- a power of 2, generate extract_even/odd stmts to reorder the input data
- correctly. Return the final references for loads in RESULT_CHAIN.
-
- E.g., LENGTH is 4 and the scalar type is short, i.e., VF is 8.
- The input is 4 vectors each containing 8 elements. We assign a number to each
- element, the input sequence is:
-
- 1st vec: 0 1 2 3 4 5 6 7
- 2nd vec: 8 9 10 11 12 13 14 15
- 3rd vec: 16 17 18 19 20 21 22 23
- 4th vec: 24 25 26 27 28 29 30 31
-
- The output sequence should be:
-
- 1st vec: 0 4 8 12 16 20 24 28
- 2nd vec: 1 5 9 13 17 21 25 29
- 3rd vec: 2 6 10 14 18 22 26 30
- 4th vec: 3 7 11 15 19 23 27 31
-
- i.e., the first output vector should contain the first elements of each
- interleaving group, etc.
-
- We use extract_even/odd instructions to create such output. The input of each
- extract_even/odd operation is two vectors
- 1st vec 2nd vec
- 0 1 2 3 4 5 6 7
-
- and the output is the vector of extracted even/odd elements. The output of
- extract_even will be: 0 2 4 6
- and of extract_odd: 1 3 5 7
-
-
- The permutation is done in log LENGTH stages. In each stage extract_even and
- extract_odd stmts are created for each pair of vectors in DR_CHAIN in their
- order. In our example,
-
- E1: extract_even (1st vec, 2nd vec)
- E2: extract_odd (1st vec, 2nd vec)
- E3: extract_even (3rd vec, 4th vec)
- E4: extract_odd (3rd vec, 4th vec)
-
- The output for the first stage will be:
-
- E1: 0 2 4 6 8 10 12 14
- E2: 1 3 5 7 9 11 13 15
- E3: 16 18 20 22 24 26 28 30
- E4: 17 19 21 23 25 27 29 31
-
- In order to proceed and create the correct sequence for the next stage (or
- for the correct output, if the second stage is the last one, as in our
- example), we first put the output of extract_even operation and then the
- output of extract_odd in RESULT_CHAIN (which is then copied to DR_CHAIN).
- The input for the second stage is:
-
- 1st vec (E1): 0 2 4 6 8 10 12 14
- 2nd vec (E3): 16 18 20 22 24 26 28 30
- 3rd vec (E2): 1 3 5 7 9 11 13 15
- 4th vec (E4): 17 19 21 23 25 27 29 31
-
- The output of the second stage:
-
- E1: 0 4 8 12 16 20 24 28
- E2: 2 6 10 14 18 22 26 30
- E3: 1 5 9 13 17 21 25 29
- E4: 3 7 11 15 19 23 27 31
-
- And RESULT_CHAIN after reordering:
-
- 1st vec (E1): 0 4 8 12 16 20 24 28
- 2nd vec (E3): 1 5 9 13 17 21 25 29
- 3rd vec (E2): 2 6 10 14 18 22 26 30
- 4th vec (E4): 3 7 11 15 19 23 27 31. */
-
-static bool
-vect_permute_load_chain (VEC(tree,heap) *dr_chain,
- unsigned int length,
- gimple stmt,
- gimple_stmt_iterator *gsi,
- VEC(tree,heap) **result_chain)
-{
- tree perm_dest, data_ref, first_vect, second_vect;
- gimple perm_stmt;
- tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (stmt));
- int i;
- unsigned int j;
-
- /* Check that the operation is supported. */
- if (!vect_strided_load_supported (vectype))
- return false;
-
- *result_chain = VEC_copy (tree, heap, dr_chain);
- for (i = 0; i < exact_log2 (length); i++)
- {
- for (j = 0; j < length; j +=2)
- {
- first_vect = VEC_index (tree, dr_chain, j);
- second_vect = VEC_index (tree, dr_chain, j+1);
-
- /* data_ref = permute_even (first_data_ref, second_data_ref); */
- perm_dest = create_tmp_var (vectype, "vect_perm_even");
- DECL_GIMPLE_REG_P (perm_dest) = 1;
- add_referenced_var (perm_dest);
-
- perm_stmt = gimple_build_assign_with_ops (VEC_EXTRACT_EVEN_EXPR,
- perm_dest, first_vect,
- second_vect);
-
- data_ref = make_ssa_name (perm_dest, perm_stmt);
- gimple_assign_set_lhs (perm_stmt, data_ref);
- vect_finish_stmt_generation (stmt, perm_stmt, gsi);
- mark_symbols_for_renaming (perm_stmt);
-
- VEC_replace (tree, *result_chain, j/2, data_ref);
-
- /* data_ref = permute_odd (first_data_ref, second_data_ref); */
- perm_dest = create_tmp_var (vectype, "vect_perm_odd");
- DECL_GIMPLE_REG_P (perm_dest) = 1;
- add_referenced_var (perm_dest);
-
- perm_stmt = gimple_build_assign_with_ops (VEC_EXTRACT_ODD_EXPR,
- perm_dest, first_vect,
- second_vect);
- data_ref = make_ssa_name (perm_dest, perm_stmt);
- gimple_assign_set_lhs (perm_stmt, data_ref);
- vect_finish_stmt_generation (stmt, perm_stmt, gsi);
- mark_symbols_for_renaming (perm_stmt);
-
- VEC_replace (tree, *result_chain, j/2+length/2, data_ref);
- }
- dr_chain = VEC_copy (tree, heap, *result_chain);
- }
- return true;
-}
-
-
-/* Function vect_transform_strided_load.
-
- Given a chain of input interleaved data-refs (in DR_CHAIN), build statements
- to perform their permutation and ascribe the result vectorized statements to
- the scalar statements.
-*/
-
-static bool
-vect_transform_strided_load (gimple stmt, VEC(tree,heap) *dr_chain, int size,
- gimple_stmt_iterator *gsi)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- gimple first_stmt = DR_GROUP_FIRST_DR (stmt_info);
- gimple next_stmt, new_stmt;
- VEC(tree,heap) *result_chain = NULL;
- unsigned int i, gap_count;
- tree tmp_data_ref;
-
- /* DR_CHAIN contains input data-refs that are a part of the interleaving.
- RESULT_CHAIN is the output of vect_permute_load_chain, it contains permuted
- vectors, that are ready for vector computation. */
- result_chain = VEC_alloc (tree, heap, size);
- /* Permute. */
- if (!vect_permute_load_chain (dr_chain, size, stmt, gsi, &result_chain))
- return false;
-
- /* Put a permuted data-ref in the VECTORIZED_STMT field.
- Since we scan the chain starting from it's first node, their order
- corresponds the order of data-refs in RESULT_CHAIN. */
- next_stmt = first_stmt;
- gap_count = 1;
- for (i = 0; VEC_iterate (tree, result_chain, i, tmp_data_ref); i++)
- {
- if (!next_stmt)
- break;
-
- /* Skip the gaps. Loads created for the gaps will be removed by dead
- code elimination pass later. No need to check for the first stmt in
- the group, since it always exists.
- DR_GROUP_GAP is the number of steps in elements from the previous
- access (if there is no gap DR_GROUP_GAP is 1). We skip loads that
- correspond to the gaps.
- */
- if (next_stmt != first_stmt
- && gap_count < DR_GROUP_GAP (vinfo_for_stmt (next_stmt)))
- {
- gap_count++;
- continue;
- }
-
- while (next_stmt)
- {
- new_stmt = SSA_NAME_DEF_STMT (tmp_data_ref);
- /* We assume that if VEC_STMT is not NULL, this is a case of multiple
- copies, and we put the new vector statement in the first available
- RELATED_STMT. */
- if (!STMT_VINFO_VEC_STMT (vinfo_for_stmt (next_stmt)))
- STMT_VINFO_VEC_STMT (vinfo_for_stmt (next_stmt)) = new_stmt;
- else
- {
- if (!DR_GROUP_SAME_DR_STMT (vinfo_for_stmt (next_stmt)))
- {
- gimple prev_stmt =
- STMT_VINFO_VEC_STMT (vinfo_for_stmt (next_stmt));
- gimple rel_stmt =
- STMT_VINFO_RELATED_STMT (vinfo_for_stmt (prev_stmt));
- while (rel_stmt)
- {
- prev_stmt = rel_stmt;
- rel_stmt =
- STMT_VINFO_RELATED_STMT (vinfo_for_stmt (rel_stmt));
- }
-
- STMT_VINFO_RELATED_STMT (vinfo_for_stmt (prev_stmt)) =
- new_stmt;
- }
- }
-
- next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
- gap_count = 1;
- /* If NEXT_STMT accesses the same DR as the previous statement,
- put the same TMP_DATA_REF as its vectorized statement; otherwise
- get the next data-ref from RESULT_CHAIN. */
- if (!next_stmt || !DR_GROUP_SAME_DR_STMT (vinfo_for_stmt (next_stmt)))
- break;
- }
- }
-
- VEC_free (tree, heap, result_chain);
- return true;
-}
-
-
-/* Create NCOPIES permutation statements using the mask MASK_BYTES (by
- building a vector of type MASK_TYPE from it) and two input vectors placed in
- DR_CHAIN at FIRST_VEC_INDX and SECOND_VEC_INDX for the first copy and
- shifting by STRIDE elements of DR_CHAIN for every copy.
- (STRIDE is the number of vectorized stmts for NODE divided by the number of
- copies).
- VECT_STMTS_COUNTER specifies the index in the vectorized stmts of NODE, where
- the created stmts must be inserted. */
-
-static inline void
-vect_create_mask_and_perm (gimple stmt, gimple next_scalar_stmt,
- int *mask_array, int mask_nunits,
- tree mask_element_type, tree mask_type,
- int first_vec_indx, int second_vec_indx,
- gimple_stmt_iterator *gsi, slp_tree node,
- tree builtin_decl, tree vectype,
- VEC(tree,heap) *dr_chain,
- int ncopies, int vect_stmts_counter)
-{
- tree t = NULL_TREE, mask_vec, mask, perm_dest;
- gimple perm_stmt = NULL;
- stmt_vec_info next_stmt_info;
- int i, group_size, stride, dr_chain_size;
- tree first_vec, second_vec, data_ref;
- tree sym;
- ssa_op_iter iter;
- VEC (tree, heap) *params = NULL;
-
- /* Create a vector mask. */
- for (i = mask_nunits - 1; i >= 0; --i)
- t = tree_cons (NULL_TREE, build_int_cst (mask_element_type, mask_array[i]),
- t);
- mask_vec = build_vector (mask_type, t);
- mask = vect_init_vector (stmt, mask_vec, mask_type, NULL);
-
- group_size = VEC_length (gimple, SLP_TREE_SCALAR_STMTS (node));
- stride = SLP_TREE_NUMBER_OF_VEC_STMTS (node) / ncopies;
- dr_chain_size = VEC_length (tree, dr_chain);
-
- /* Initialize the vect stmts of NODE to properly insert the generated
- stmts later. */
- for (i = VEC_length (gimple, SLP_TREE_VEC_STMTS (node));
- i < (int) SLP_TREE_NUMBER_OF_VEC_STMTS (node); i++)
- VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (node), NULL);
-
- perm_dest = vect_create_destination_var (gimple_assign_lhs (stmt), vectype);
- for (i = 0; i < ncopies; i++)
- {
- first_vec = VEC_index (tree, dr_chain, first_vec_indx);
- second_vec = VEC_index (tree, dr_chain, second_vec_indx);
-
- /* Build argument list for the vectorized call. */
- VEC_free (tree, heap, params);
- params = VEC_alloc (tree, heap, 3);
- VEC_quick_push (tree, params, first_vec);
- VEC_quick_push (tree, params, second_vec);
- VEC_quick_push (tree, params, mask);
-
- /* Generate the permute statement. */
- perm_stmt = gimple_build_call_vec (builtin_decl, params);
- data_ref = make_ssa_name (perm_dest, perm_stmt);
- gimple_call_set_lhs (perm_stmt, data_ref);
- vect_finish_stmt_generation (stmt, perm_stmt, gsi);
- FOR_EACH_SSA_TREE_OPERAND (sym, perm_stmt, iter, SSA_OP_ALL_VIRTUALS)
- {
- if (TREE_CODE (sym) == SSA_NAME)
- sym = SSA_NAME_VAR (sym);
- mark_sym_for_renaming (sym);
- }
-
- /* Store the vector statement in NODE. */
- VEC_replace (gimple, SLP_TREE_VEC_STMTS (node),
- stride * i + vect_stmts_counter, perm_stmt);
-
- first_vec_indx += stride;
- second_vec_indx += stride;
- }
-
- /* Mark the scalar stmt as vectorized. */
- next_stmt_info = vinfo_for_stmt (next_scalar_stmt);
- STMT_VINFO_VEC_STMT (next_stmt_info) = perm_stmt;
-}
-
-
-/* Given FIRST_MASK_ELEMENT - the mask element in element representation,
- return in CURRENT_MASK_ELEMENT its equivalent in target specific
- representation. Check that the mask is valid and return FALSE if not.
- Return TRUE in NEED_NEXT_VECTOR if the permutation requires to move to
- the next vector, i.e., the current first vector is not needed. */
-
-static bool
-vect_get_mask_element (gimple stmt, int first_mask_element, int m,
- int mask_nunits, bool only_one_vec, int index,
- int *mask, int *current_mask_element,
- bool *need_next_vector)
-{
- int i;
- static int number_of_mask_fixes = 1;
- static bool mask_fixed = false;
- static bool needs_first_vector = false;
-
- /* Convert to target specific representation. */
- *current_mask_element = first_mask_element + m;
- /* Adjust the value in case it's a mask for second and third vectors. */
- *current_mask_element -= mask_nunits * (number_of_mask_fixes - 1);
-
- if (*current_mask_element < mask_nunits)
- needs_first_vector = true;
-
- /* We have only one input vector to permute but the mask accesses values in
- the next vector as well. */
- if (only_one_vec && *current_mask_element >= mask_nunits)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "permutation requires at least two vectors ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- return false;
- }
-
- /* The mask requires the next vector. */
- if (*current_mask_element >= mask_nunits * 2)
- {
- if (needs_first_vector || mask_fixed)
- {
- /* We either need the first vector too or have already moved to the
- next vector. In both cases, this permutation needs three
- vectors. */
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "permutation requires at "
- "least three vectors ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- return false;
- }
-
- /* We move to the next vector, dropping the first one and working with
- the second and the third - we need to adjust the values of the mask
- accordingly. */
- *current_mask_element -= mask_nunits * number_of_mask_fixes;
-
- for (i = 0; i < index; i++)
- mask[i] -= mask_nunits * number_of_mask_fixes;
-
- (number_of_mask_fixes)++;
- mask_fixed = true;
- }
-
- *need_next_vector = mask_fixed;
-
- /* This was the last element of this mask. Start a new one. */
- if (index == mask_nunits - 1)
- {
- number_of_mask_fixes = 1;
- mask_fixed = false;
- needs_first_vector = false;
- }
-
- return true;
-}
-
-
-/* Generate vector permute statements from a list of loads in DR_CHAIN.
- If ANALYZE_ONLY is TRUE, only check that it is possible to create valid
- permute statements for SLP_NODE_INSTANCE. */
-bool
-vect_transform_slp_perm_load (gimple stmt, VEC (tree, heap) *dr_chain,
- gimple_stmt_iterator *gsi, int vf,
- slp_instance slp_node_instance, bool analyze_only)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- tree mask_element_type = NULL_TREE, mask_type;
- int i, j, k, m, scale, mask_nunits, nunits, vec_index = 0, scalar_index;
- slp_tree node;
- tree vectype = STMT_VINFO_VECTYPE (stmt_info), builtin_decl;
- gimple next_scalar_stmt;
- int group_size = SLP_INSTANCE_GROUP_SIZE (slp_node_instance);
- int first_mask_element;
- int index, unroll_factor, *mask, current_mask_element, ncopies;
- bool only_one_vec = false, need_next_vector = false;
- int first_vec_index, second_vec_index, orig_vec_stmts_num, vect_stmts_counter;
-
- if (!targetm.vectorize.builtin_vec_perm)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "no builtin for vect permute for ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- return false;
- }
-
- builtin_decl = targetm.vectorize.builtin_vec_perm (vectype,
- &mask_element_type);
- if (!builtin_decl || !mask_element_type)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "no builtin for vect permute for ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- return false;
- }
-
- mask_type = get_vectype_for_scalar_type (mask_element_type);
- mask_nunits = TYPE_VECTOR_SUBPARTS (mask_type);
- mask = (int *) xmalloc (sizeof (int) * mask_nunits);
- nunits = TYPE_VECTOR_SUBPARTS (vectype);
- scale = mask_nunits / nunits;
- unroll_factor = SLP_INSTANCE_UNROLLING_FACTOR (slp_node_instance);
-
- /* The number of vector stmts to generate based only on SLP_NODE_INSTANCE
- unrolling factor. */
- orig_vec_stmts_num = group_size *
- SLP_INSTANCE_UNROLLING_FACTOR (slp_node_instance) / nunits;
- if (orig_vec_stmts_num == 1)
- only_one_vec = true;
-
- /* Number of copies is determined by the final vectorization factor
- relatively to SLP_NODE_INSTANCE unrolling factor. */
- ncopies = vf / SLP_INSTANCE_UNROLLING_FACTOR (slp_node_instance);
-
- /* Generate permutation masks for every NODE. Number of masks for each NODE
- is equal to GROUP_SIZE.
- E.g., we have a group of three nodes with three loads from the same
- location in each node, and the vector size is 4. I.e., we have a
- a0b0c0a1b1c1... sequence and we need to create the following vectors:
- for a's: a0a0a0a1 a1a1a2a2 a2a3a3a3
- for b's: b0b0b0b1 b1b1b2b2 b2b3b3b3
- ...
-
- The masks for a's should be: {0,0,0,3} {3,3,6,6} {6,9,9,9} (in target
- scpecific type, e.g., in bytes for Altivec.
- The last mask is illegal since we assume two operands for permute
- operation, and the mask element values can't be outside that range. Hence,
- the last mask must be converted into {2,5,5,5}.
- For the first two permutations we need the first and the second input
- vectors: {a0,b0,c0,a1} and {b1,c1,a2,b2}, and for the last permutation
- we need the second and the third vectors: {b1,c1,a2,b2} and
- {c2,a3,b3,c3}. */
-
- for (i = 0;
- VEC_iterate (slp_tree, SLP_INSTANCE_LOADS (slp_node_instance),
- i, node);
- i++)
- {
- scalar_index = 0;
- index = 0;
- vect_stmts_counter = 0;
- vec_index = 0;
- first_vec_index = vec_index++;
- if (only_one_vec)
- second_vec_index = first_vec_index;
- else
- second_vec_index = vec_index++;
-
- for (j = 0; j < unroll_factor; j++)
- {
- for (k = 0; k < group_size; k++)
- {
- first_mask_element = (i + j * group_size) * scale;
- for (m = 0; m < scale; m++)
- {
- if (!vect_get_mask_element (stmt, first_mask_element, m,
- mask_nunits, only_one_vec, index, mask,
- &current_mask_element, &need_next_vector))
- return false;
-
- mask[index++] = current_mask_element;
- }
-
- if (index == mask_nunits)
- {
- index = 0;
- if (!analyze_only)
- {
- if (need_next_vector)
- {
- first_vec_index = second_vec_index;
- second_vec_index = vec_index;
- }
-
- next_scalar_stmt = VEC_index (gimple,
- SLP_TREE_SCALAR_STMTS (node), scalar_index++);
-
- vect_create_mask_and_perm (stmt, next_scalar_stmt,
- mask, mask_nunits, mask_element_type, mask_type,
- first_vec_index, second_vec_index, gsi, node,
- builtin_decl, vectype, dr_chain, ncopies,
- vect_stmts_counter++);
- }
- }
- }
- }
- }
-
- free (mask);
- return true;
-}
-
-/* vectorizable_load.
-
- Check if STMT reads a non scalar data-ref (array/pointer/structure) that
- can be vectorized.
- If VEC_STMT is also passed, vectorize the STMT: create a vectorized
- stmt to replace it, put it in VEC_STMT, and insert it at BSI.
- Return FALSE if not a vectorizable STMT, TRUE otherwise. */
-
-bool
-vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
- slp_tree slp_node, slp_instance slp_node_instance)
-{
- tree scalar_dest;
- tree vec_dest = NULL;
- tree data_ref = NULL;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- stmt_vec_info prev_stmt_info;
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- struct loop *containing_loop = (gimple_bb (stmt))->loop_father;
- bool nested_in_vect_loop = nested_in_vect_loop_p (loop, stmt);
- struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info), *first_dr;
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- tree new_temp;
- int mode;
- gimple new_stmt = NULL;
- tree dummy;
- enum dr_alignment_support alignment_support_scheme;
- tree dataref_ptr = NULL_TREE;
- gimple ptr_incr;
- int nunits = TYPE_VECTOR_SUBPARTS (vectype);
- int ncopies;
- int i, j, group_size;
- tree msq = NULL_TREE, lsq;
- tree offset = NULL_TREE;
- tree realignment_token = NULL_TREE;
- gimple phi = NULL;
- VEC(tree,heap) *dr_chain = NULL;
- bool strided_load = false;
- gimple first_stmt;
- tree scalar_type;
- bool inv_p;
- bool compute_in_loop = false;
- struct loop *at_loop;
- int vec_num;
- bool slp = (slp_node != NULL);
- bool slp_perm = false;
- enum tree_code code;
-
- /* Multiple types in SLP are handled by creating the appropriate number of
- vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in
- case of SLP. */
- if (slp)
- ncopies = 1;
- else
- ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
-
- gcc_assert (ncopies >= 1);
-
- /* FORNOW. This restriction should be relaxed. */
- if (nested_in_vect_loop && ncopies > 1)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "multiple types in nested loop.");
- return false;
- }
-
- if (slp && SLP_INSTANCE_LOAD_PERMUTATION (slp_node_instance))
- slp_perm = true;
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info))
- return false;
-
- if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
- return false;
-
- /* Is vectorizable load? */
- if (!is_gimple_assign (stmt))
- return false;
-
- scalar_dest = gimple_assign_lhs (stmt);
- if (TREE_CODE (scalar_dest) != SSA_NAME)
- return false;
-
- code = gimple_assign_rhs_code (stmt);
- if (code != ARRAY_REF
- && code != INDIRECT_REF
- && !STMT_VINFO_STRIDED_ACCESS (stmt_info))
- return false;
-
- if (!STMT_VINFO_DATA_REF (stmt_info))
- return false;
-
- scalar_type = TREE_TYPE (DR_REF (dr));
- mode = (int) TYPE_MODE (vectype);
-
- /* FORNOW. In some cases can vectorize even if data-type not supported
- (e.g. - data copies). */
- if (optab_handler (mov_optab, mode)->insn_code == CODE_FOR_nothing)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Aligned load, but unsupported type.");
- return false;
- }
-
- /* The vector component type needs to be trivially convertible to the
- scalar lhs. This should always be the case. */
- if (!useless_type_conversion_p (TREE_TYPE (scalar_dest), TREE_TYPE (vectype)))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "??? operands of different types");
- return false;
- }
-
- /* Check if the load is a part of an interleaving chain. */
- if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
- {
- strided_load = true;
- /* FORNOW */
- gcc_assert (! nested_in_vect_loop);
-
- /* Check if interleaving is supported. */
- if (!vect_strided_load_supported (vectype)
- && !PURE_SLP_STMT (stmt_info) && !slp)
- return false;
- }
-
- if (!vec_stmt) /* transformation not required. */
- {
- STMT_VINFO_TYPE (stmt_info) = load_vec_info_type;
- vect_model_load_cost (stmt_info, ncopies, NULL);
- return true;
- }
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "transform load.");
-
- /** Transform. **/
-
- if (strided_load)
- {
- first_stmt = DR_GROUP_FIRST_DR (stmt_info);
- /* Check if the chain of loads is already vectorized. */
- if (STMT_VINFO_VEC_STMT (vinfo_for_stmt (first_stmt)))
- {
- *vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
- return true;
- }
- first_dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (first_stmt));
- group_size = DR_GROUP_SIZE (vinfo_for_stmt (first_stmt));
-
- /* VEC_NUM is the number of vect stmts to be created for this group. */
- if (slp)
- {
- strided_load = false;
- vec_num = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
- }
- else
- vec_num = group_size;
-
- dr_chain = VEC_alloc (tree, heap, vec_num);
- }
- else
- {
- first_stmt = stmt;
- first_dr = dr;
- group_size = vec_num = 1;
- }
-
- alignment_support_scheme = vect_supportable_dr_alignment (first_dr);
- gcc_assert (alignment_support_scheme);
-
- /* In case the vectorization factor (VF) is bigger than the number
- of elements that we can fit in a vectype (nunits), we have to generate
- more than one vector stmt - i.e - we need to "unroll" the
- vector stmt by a factor VF/nunits. In doing so, we record a pointer
- from one copy of the vector stmt to the next, in the field
- STMT_VINFO_RELATED_STMT. This is necessary in order to allow following
- stages to find the correct vector defs to be used when vectorizing
- stmts that use the defs of the current stmt. The example below illustrates
- the vectorization process when VF=16 and nunits=4 (i.e - we need to create
- 4 vectorized stmts):
-
- before vectorization:
- RELATED_STMT VEC_STMT
- S1: x = memref - -
- S2: z = x + 1 - -
-
- step 1: vectorize stmt S1:
- We first create the vector stmt VS1_0, and, as usual, record a
- pointer to it in the STMT_VINFO_VEC_STMT of the scalar stmt S1.
- Next, we create the vector stmt VS1_1, and record a pointer to
- it in the STMT_VINFO_RELATED_STMT of the vector stmt VS1_0.
- Similarly, for VS1_2 and VS1_3. This is the resulting chain of
- stmts and pointers:
- RELATED_STMT VEC_STMT
- VS1_0: vx0 = memref0 VS1_1 -
- VS1_1: vx1 = memref1 VS1_2 -
- VS1_2: vx2 = memref2 VS1_3 -
- VS1_3: vx3 = memref3 - -
- S1: x = load - VS1_0
- S2: z = x + 1 - -
-
- See in documentation in vect_get_vec_def_for_stmt_copy for how the
- information we recorded in RELATED_STMT field is used to vectorize
- stmt S2. */
-
- /* In case of interleaving (non-unit strided access):
-
- S1: x2 = &base + 2
- S2: x0 = &base
- S3: x1 = &base + 1
- S4: x3 = &base + 3
-
- Vectorized loads are created in the order of memory accesses
- starting from the access of the first stmt of the chain:
-
- VS1: vx0 = &base
- VS2: vx1 = &base + vec_size*1
- VS3: vx3 = &base + vec_size*2
- VS4: vx4 = &base + vec_size*3
-
- Then permutation statements are generated:
-
- VS5: vx5 = VEC_EXTRACT_EVEN_EXPR < vx0, vx1 >
- VS6: vx6 = VEC_EXTRACT_ODD_EXPR < vx0, vx1 >
- ...
-
- And they are put in STMT_VINFO_VEC_STMT of the corresponding scalar stmts
- (the order of the data-refs in the output of vect_permute_load_chain
- corresponds to the order of scalar stmts in the interleaving chain - see
- the documentation of vect_permute_load_chain()).
- The generation of permutation stmts and recording them in
- STMT_VINFO_VEC_STMT is done in vect_transform_strided_load().
-
- In case of both multiple types and interleaving, the vector loads and
- permutation stmts above are created for every copy. The result vector stmts
- are put in STMT_VINFO_VEC_STMT for the first copy and in the corresponding
- STMT_VINFO_RELATED_STMT for the next copies. */
-
- /* If the data reference is aligned (dr_aligned) or potentially unaligned
- on a target that supports unaligned accesses (dr_unaligned_supported)
- we generate the following code:
- p = initial_addr;
- indx = 0;
- loop {
- p = p + indx * vectype_size;
- vec_dest = *(p);
- indx = indx + 1;
- }
-
- Otherwise, the data reference is potentially unaligned on a target that
- does not support unaligned accesses (dr_explicit_realign_optimized) -
- then generate the following code, in which the data in each iteration is
- obtained by two vector loads, one from the previous iteration, and one
- from the current iteration:
- p1 = initial_addr;
- msq_init = *(floor(p1))
- p2 = initial_addr + VS - 1;
- realignment_token = call target_builtin;
- indx = 0;
- loop {
- p2 = p2 + indx * vectype_size
- lsq = *(floor(p2))
- vec_dest = realign_load (msq, lsq, realignment_token)
- indx = indx + 1;
- msq = lsq;
- } */
-
- /* If the misalignment remains the same throughout the execution of the
- loop, we can create the init_addr and permutation mask at the loop
- preheader. Otherwise, it needs to be created inside the loop.
- This can only occur when vectorizing memory accesses in the inner-loop
- nested within an outer-loop that is being vectorized. */
-
- if (nested_in_vect_loop_p (loop, stmt)
- && (TREE_INT_CST_LOW (DR_STEP (dr))
- % GET_MODE_SIZE (TYPE_MODE (vectype)) != 0))
- {
- gcc_assert (alignment_support_scheme != dr_explicit_realign_optimized);
- compute_in_loop = true;
- }
-
- if ((alignment_support_scheme == dr_explicit_realign_optimized
- || alignment_support_scheme == dr_explicit_realign)
- && !compute_in_loop)
- {
- msq = vect_setup_realignment (first_stmt, gsi, &realignment_token,
- alignment_support_scheme, NULL_TREE,
- &at_loop);
- if (alignment_support_scheme == dr_explicit_realign_optimized)
- {
- phi = SSA_NAME_DEF_STMT (msq);
- offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
- }
- }
- else
- at_loop = loop;
-
- prev_stmt_info = NULL;
- for (j = 0; j < ncopies; j++)
- {
- /* 1. Create the vector pointer update chain. */
- if (j == 0)
- dataref_ptr = vect_create_data_ref_ptr (first_stmt,
- at_loop, offset,
- &dummy, &ptr_incr, false,
- &inv_p, NULL_TREE);
- else
- dataref_ptr =
- bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt, NULL_TREE);
-
- for (i = 0; i < vec_num; i++)
- {
- if (i > 0)
- dataref_ptr = bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt,
- NULL_TREE);
-
- /* 2. Create the vector-load in the loop. */
- switch (alignment_support_scheme)
- {
- case dr_aligned:
- gcc_assert (aligned_access_p (first_dr));
- data_ref = build_fold_indirect_ref (dataref_ptr);
- break;
- case dr_unaligned_supported:
- {
- int mis = DR_MISALIGNMENT (first_dr);
- tree tmis = (mis == -1 ? size_zero_node : size_int (mis));
-
- tmis = size_binop (MULT_EXPR, tmis, size_int(BITS_PER_UNIT));
- data_ref =
- build2 (MISALIGNED_INDIRECT_REF, vectype, dataref_ptr, tmis);
- break;
- }
- case dr_explicit_realign:
- {
- tree ptr, bump;
- tree vs_minus_1 = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
-
- if (compute_in_loop)
- msq = vect_setup_realignment (first_stmt, gsi,
- &realignment_token,
- dr_explicit_realign,
- dataref_ptr, NULL);
-
- data_ref = build1 (ALIGN_INDIRECT_REF, vectype, dataref_ptr);
- vec_dest = vect_create_destination_var (scalar_dest, vectype);
- new_stmt = gimple_build_assign (vec_dest, data_ref);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_assign_set_lhs (new_stmt, new_temp);
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
- copy_virtual_operands (new_stmt, stmt);
- mark_symbols_for_renaming (new_stmt);
- msq = new_temp;
-
- bump = size_binop (MULT_EXPR, vs_minus_1,
- TYPE_SIZE_UNIT (scalar_type));
- ptr = bump_vector_ptr (dataref_ptr, NULL, gsi, stmt, bump);
- data_ref = build1 (ALIGN_INDIRECT_REF, vectype, ptr);
- break;
- }
- case dr_explicit_realign_optimized:
- data_ref = build1 (ALIGN_INDIRECT_REF, vectype, dataref_ptr);
- break;
- default:
- gcc_unreachable ();
- }
- vec_dest = vect_create_destination_var (scalar_dest, vectype);
- new_stmt = gimple_build_assign (vec_dest, data_ref);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_assign_set_lhs (new_stmt, new_temp);
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
- mark_symbols_for_renaming (new_stmt);
-
- /* 3. Handle explicit realignment if necessary/supported. Create in
- loop: vec_dest = realign_load (msq, lsq, realignment_token) */
- if (alignment_support_scheme == dr_explicit_realign_optimized
- || alignment_support_scheme == dr_explicit_realign)
- {
- tree tmp;
-
- lsq = gimple_assign_lhs (new_stmt);
- if (!realignment_token)
- realignment_token = dataref_ptr;
- vec_dest = vect_create_destination_var (scalar_dest, vectype);
- tmp = build3 (REALIGN_LOAD_EXPR, vectype, msq, lsq,
- realignment_token);
- new_stmt = gimple_build_assign (vec_dest, tmp);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_assign_set_lhs (new_stmt, new_temp);
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
-
- if (alignment_support_scheme == dr_explicit_realign_optimized)
- {
- gcc_assert (phi);
- if (i == vec_num - 1 && j == ncopies - 1)
- add_phi_arg (phi, lsq, loop_latch_edge (containing_loop));
- msq = lsq;
- }
- }
-
- /* 4. Handle invariant-load. */
- if (inv_p)
- {
- gcc_assert (!strided_load);
- gcc_assert (nested_in_vect_loop_p (loop, stmt));
- if (j == 0)
- {
- int k;
- tree t = NULL_TREE;
- tree vec_inv, bitpos, bitsize = TYPE_SIZE (scalar_type);
-
- /* CHECKME: bitpos depends on endianess? */
- bitpos = bitsize_zero_node;
- vec_inv = build3 (BIT_FIELD_REF, scalar_type, new_temp,
- bitsize, bitpos);
- vec_dest =
- vect_create_destination_var (scalar_dest, NULL_TREE);
- new_stmt = gimple_build_assign (vec_dest, vec_inv);
- new_temp = make_ssa_name (vec_dest, new_stmt);
- gimple_assign_set_lhs (new_stmt, new_temp);
- vect_finish_stmt_generation (stmt, new_stmt, gsi);
-
- for (k = nunits - 1; k >= 0; --k)
- t = tree_cons (NULL_TREE, new_temp, t);
- /* FIXME: use build_constructor directly. */
- vec_inv = build_constructor_from_list (vectype, t);
- new_temp = vect_init_vector (stmt, vec_inv, vectype, gsi);
- new_stmt = SSA_NAME_DEF_STMT (new_temp);
- }
- else
- gcc_unreachable (); /* FORNOW. */
- }
-
- /* Collect vector loads and later create their permutation in
- vect_transform_strided_load (). */
- if (strided_load || slp_perm)
- VEC_quick_push (tree, dr_chain, new_temp);
-
- /* Store vector loads in the corresponding SLP_NODE. */
- if (slp && !slp_perm)
- VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt);
- }
-
- if (slp && !slp_perm)
- continue;
-
- if (slp_perm)
- {
- if (!vect_transform_slp_perm_load (stmt, dr_chain, gsi,
- LOOP_VINFO_VECT_FACTOR (loop_vinfo),
- slp_node_instance, false))
- {
- VEC_free (tree, heap, dr_chain);
- return false;
- }
- }
- else
- {
- if (strided_load)
- {
- if (!vect_transform_strided_load (stmt, dr_chain, group_size, gsi))
- return false;
-
- *vec_stmt = STMT_VINFO_VEC_STMT (stmt_info);
- VEC_free (tree, heap, dr_chain);
- dr_chain = VEC_alloc (tree, heap, group_size);
- }
- else
- {
- if (j == 0)
- STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
- else
- STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt;
- prev_stmt_info = vinfo_for_stmt (new_stmt);
- }
- }
- }
-
- if (dr_chain)
- VEC_free (tree, heap, dr_chain);
-
- return true;
-}
-
-
-/* Function vectorizable_live_operation.
-
- STMT computes a value that is used outside the loop. Check if
- it can be supported. */
-
-bool
-vectorizable_live_operation (gimple stmt,
- gimple_stmt_iterator *gsi ATTRIBUTE_UNUSED,
- gimple *vec_stmt ATTRIBUTE_UNUSED)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- int i;
- int op_type;
- tree op;
- tree def;
- gimple def_stmt;
- enum vect_def_type dt;
- enum tree_code code;
- enum gimple_rhs_class rhs_class;
-
- gcc_assert (STMT_VINFO_LIVE_P (stmt_info));
-
- if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def)
- return false;
-
- if (!is_gimple_assign (stmt))
- return false;
-
- if (TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME)
- return false;
-
- /* FORNOW. CHECKME. */
- if (nested_in_vect_loop_p (loop, stmt))
- return false;
-
- code = gimple_assign_rhs_code (stmt);
- op_type = TREE_CODE_LENGTH (code);
- rhs_class = get_gimple_rhs_class (code);
- gcc_assert (rhs_class != GIMPLE_UNARY_RHS || op_type == unary_op);
- gcc_assert (rhs_class != GIMPLE_BINARY_RHS || op_type == binary_op);
-
- /* FORNOW: support only if all uses are invariant. This means
- that the scalar operations can remain in place, unvectorized.
- The original last scalar value that they compute will be used. */
-
- for (i = 0; i < op_type; i++)
- {
- if (rhs_class == GIMPLE_SINGLE_RHS)
- op = TREE_OPERAND (gimple_op (stmt, 1), i);
- else
- op = gimple_op (stmt, i + 1);
- if (op && !vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "use not simple.");
- return false;
- }
-
- if (dt != vect_invariant_def && dt != vect_constant_def)
- return false;
- }
-
- /* No transformation is required for the cases we currently support. */
- return true;
-}
-
-
-/* Function vect_is_simple_cond.
-
- Input:
- LOOP - the loop that is being vectorized.
- COND - Condition that is checked for simple use.
-
- Returns whether a COND can be vectorized. Checks whether
- condition operands are supportable using vec_is_simple_use. */
-
-static bool
-vect_is_simple_cond (tree cond, loop_vec_info loop_vinfo)
-{
- tree lhs, rhs;
- tree def;
- enum vect_def_type dt;
-
- if (!COMPARISON_CLASS_P (cond))
- return false;
-
- lhs = TREE_OPERAND (cond, 0);
- rhs = TREE_OPERAND (cond, 1);
-
- if (TREE_CODE (lhs) == SSA_NAME)
- {
- gimple lhs_def_stmt = SSA_NAME_DEF_STMT (lhs);
- if (!vect_is_simple_use (lhs, loop_vinfo, &lhs_def_stmt, &def, &dt))
- return false;
- }
- else if (TREE_CODE (lhs) != INTEGER_CST && TREE_CODE (lhs) != REAL_CST
- && TREE_CODE (lhs) != FIXED_CST)
- return false;
-
- if (TREE_CODE (rhs) == SSA_NAME)
- {
- gimple rhs_def_stmt = SSA_NAME_DEF_STMT (rhs);
- if (!vect_is_simple_use (rhs, loop_vinfo, &rhs_def_stmt, &def, &dt))
- return false;
- }
- else if (TREE_CODE (rhs) != INTEGER_CST && TREE_CODE (rhs) != REAL_CST
- && TREE_CODE (rhs) != FIXED_CST)
- return false;
-
- return true;
-}
-
-/* vectorizable_condition.
-
- Check if STMT is conditional modify expression that can be vectorized.
- If VEC_STMT is also passed, vectorize the STMT: create a vectorized
- stmt using VEC_COND_EXPR to replace it, put it in VEC_STMT, and insert it
- at BSI.
-
- Return FALSE if not a vectorizable STMT, TRUE otherwise. */
-
-bool
-vectorizable_condition (gimple stmt, gimple_stmt_iterator *gsi,
- gimple *vec_stmt)
-{
- tree scalar_dest = NULL_TREE;
- tree vec_dest = NULL_TREE;
- tree op = NULL_TREE;
- tree cond_expr, then_clause, else_clause;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- tree vec_cond_lhs, vec_cond_rhs, vec_then_clause, vec_else_clause;
- tree vec_compare, vec_cond_expr;
- tree new_temp;
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- enum machine_mode vec_mode;
- tree def;
- enum vect_def_type dt;
- int nunits = TYPE_VECTOR_SUBPARTS (vectype);
- int ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
- enum tree_code code;
-
- gcc_assert (ncopies >= 1);
- if (ncopies > 1)
- return false; /* FORNOW */
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info))
- return false;
-
- if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
- return false;
-
- /* FORNOW: SLP not supported. */
- if (STMT_SLP_TYPE (stmt_info))
- return false;
-
- /* FORNOW: not yet supported. */
- if (STMT_VINFO_LIVE_P (stmt_info))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "value used after loop.");
- return false;
- }
-
- /* Is vectorizable conditional operation? */
- if (!is_gimple_assign (stmt))
- return false;
-
- code = gimple_assign_rhs_code (stmt);
-
- if (code != COND_EXPR)
- return false;
-
- gcc_assert (gimple_assign_single_p (stmt));
- op = gimple_assign_rhs1 (stmt);
- cond_expr = TREE_OPERAND (op, 0);
- then_clause = TREE_OPERAND (op, 1);
- else_clause = TREE_OPERAND (op, 2);
-
- if (!vect_is_simple_cond (cond_expr, loop_vinfo))
- return false;
-
- /* We do not handle two different vector types for the condition
- and the values. */
- if (TREE_TYPE (TREE_OPERAND (cond_expr, 0)) != TREE_TYPE (vectype))
- return false;
-
- if (TREE_CODE (then_clause) == SSA_NAME)
- {
- gimple then_def_stmt = SSA_NAME_DEF_STMT (then_clause);
- if (!vect_is_simple_use (then_clause, loop_vinfo,
- &then_def_stmt, &def, &dt))
- return false;
- }
- else if (TREE_CODE (then_clause) != INTEGER_CST
- && TREE_CODE (then_clause) != REAL_CST
- && TREE_CODE (then_clause) != FIXED_CST)
- return false;
-
- if (TREE_CODE (else_clause) == SSA_NAME)
- {
- gimple else_def_stmt = SSA_NAME_DEF_STMT (else_clause);
- if (!vect_is_simple_use (else_clause, loop_vinfo,
- &else_def_stmt, &def, &dt))
- return false;
- }
- else if (TREE_CODE (else_clause) != INTEGER_CST
- && TREE_CODE (else_clause) != REAL_CST
- && TREE_CODE (else_clause) != FIXED_CST)
- return false;
-
-
- vec_mode = TYPE_MODE (vectype);
-
- if (!vec_stmt)
- {
- STMT_VINFO_TYPE (stmt_info) = condition_vec_info_type;
- return expand_vec_cond_expr_p (op, vec_mode);
- }
-
- /* Transform */
-
- /* Handle def. */
- scalar_dest = gimple_assign_lhs (stmt);
- vec_dest = vect_create_destination_var (scalar_dest, vectype);
-
- /* Handle cond expr. */
- vec_cond_lhs =
- vect_get_vec_def_for_operand (TREE_OPERAND (cond_expr, 0), stmt, NULL);
- vec_cond_rhs =
- vect_get_vec_def_for_operand (TREE_OPERAND (cond_expr, 1), stmt, NULL);
- vec_then_clause = vect_get_vec_def_for_operand (then_clause, stmt, NULL);
- vec_else_clause = vect_get_vec_def_for_operand (else_clause, stmt, NULL);
-
- /* Arguments are ready. Create the new vector stmt. */
- vec_compare = build2 (TREE_CODE (cond_expr), vectype,
- vec_cond_lhs, vec_cond_rhs);
- vec_cond_expr = build3 (VEC_COND_EXPR, vectype,
- vec_compare, vec_then_clause, vec_else_clause);
-
- *vec_stmt = gimple_build_assign (vec_dest, vec_cond_expr);
- new_temp = make_ssa_name (vec_dest, *vec_stmt);
- gimple_assign_set_lhs (*vec_stmt, new_temp);
- vect_finish_stmt_generation (stmt, *vec_stmt, gsi);
-
- return true;
-}
-
-
-/* Function vect_transform_stmt.
-
- Create a vectorized stmt to replace STMT, and insert it at BSI. */
-
-static bool
-vect_transform_stmt (gimple stmt, gimple_stmt_iterator *gsi,
- bool *strided_store, slp_tree slp_node,
- slp_instance slp_node_instance)
-{
- bool is_store = false;
- gimple vec_stmt = NULL;
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- gimple orig_stmt_in_pattern;
- bool done;
- loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-
- switch (STMT_VINFO_TYPE (stmt_info))
- {
- case type_demotion_vec_info_type:
- done = vectorizable_type_demotion (stmt, gsi, &vec_stmt, slp_node);
- gcc_assert (done);
- break;
-
- case type_promotion_vec_info_type:
- done = vectorizable_type_promotion (stmt, gsi, &vec_stmt, slp_node);
- gcc_assert (done);
- break;
-
- case type_conversion_vec_info_type:
- done = vectorizable_conversion (stmt, gsi, &vec_stmt, slp_node);
- gcc_assert (done);
- break;
-
- case induc_vec_info_type:
- gcc_assert (!slp_node);
- done = vectorizable_induction (stmt, gsi, &vec_stmt);
- gcc_assert (done);
- break;
-
- case op_vec_info_type:
- done = vectorizable_operation (stmt, gsi, &vec_stmt, slp_node);
- gcc_assert (done);
- break;
-
- case assignment_vec_info_type:
- done = vectorizable_assignment (stmt, gsi, &vec_stmt, slp_node);
- gcc_assert (done);
- break;
-
- case load_vec_info_type:
- done = vectorizable_load (stmt, gsi, &vec_stmt, slp_node,
- slp_node_instance);
- gcc_assert (done);
- break;
-
- case store_vec_info_type:
- done = vectorizable_store (stmt, gsi, &vec_stmt, slp_node);
- gcc_assert (done);
- if (STMT_VINFO_STRIDED_ACCESS (stmt_info) && !slp_node)
- {
- /* In case of interleaving, the whole chain is vectorized when the
- last store in the chain is reached. Store stmts before the last
- one are skipped, and there vec_stmt_info shouldn't be freed
- meanwhile. */
- *strided_store = true;
- if (STMT_VINFO_VEC_STMT (stmt_info))
- is_store = true;
- }
- else
- is_store = true;
- break;
-
- case condition_vec_info_type:
- gcc_assert (!slp_node);
- done = vectorizable_condition (stmt, gsi, &vec_stmt);
- gcc_assert (done);
- break;
-
- case call_vec_info_type:
- gcc_assert (!slp_node);
- done = vectorizable_call (stmt, gsi, &vec_stmt);
- break;
-
- case reduc_vec_info_type:
- gcc_assert (!slp_node);
- done = vectorizable_reduction (stmt, gsi, &vec_stmt);
- gcc_assert (done);
- break;
-
- default:
- if (!STMT_VINFO_LIVE_P (stmt_info))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "stmt not supported.");
- gcc_unreachable ();
- }
- }
-
- /* Handle inner-loop stmts whose DEF is used in the loop-nest that
- is being vectorized, but outside the immediately enclosing loop. */
- if (vec_stmt
- && nested_in_vect_loop_p (loop, stmt)
- && STMT_VINFO_TYPE (stmt_info) != reduc_vec_info_type
- && (STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_outer
- || STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_outer_by_reduction))
- {
- struct loop *innerloop = loop->inner;
- imm_use_iterator imm_iter;
- use_operand_p use_p;
- tree scalar_dest;
- gimple exit_phi;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Record the vdef for outer-loop vectorization.");
-
- /* Find the relevant loop-exit phi-node, and reord the vec_stmt there
- (to be used when vectorizing outer-loop stmts that use the DEF of
- STMT). */
- if (gimple_code (stmt) == GIMPLE_PHI)
- scalar_dest = PHI_RESULT (stmt);
- else
- scalar_dest = gimple_assign_lhs (stmt);
-
- FOR_EACH_IMM_USE_FAST (use_p, imm_iter, scalar_dest)
- {
- if (!flow_bb_inside_loop_p (innerloop, gimple_bb (USE_STMT (use_p))))
- {
- exit_phi = USE_STMT (use_p);
- STMT_VINFO_VEC_STMT (vinfo_for_stmt (exit_phi)) = vec_stmt;
- }
- }
- }
-
- /* Handle stmts whose DEF is used outside the loop-nest that is
- being vectorized. */
- if (STMT_VINFO_LIVE_P (stmt_info)
- && STMT_VINFO_TYPE (stmt_info) != reduc_vec_info_type)
- {
- done = vectorizable_live_operation (stmt, gsi, &vec_stmt);
- gcc_assert (done);
- }
-
- if (vec_stmt)
- {
- STMT_VINFO_VEC_STMT (stmt_info) = vec_stmt;
- orig_stmt_in_pattern = STMT_VINFO_RELATED_STMT (stmt_info);
- if (orig_stmt_in_pattern)
- {
- stmt_vec_info stmt_vinfo = vinfo_for_stmt (orig_stmt_in_pattern);
- /* STMT was inserted by the vectorizer to replace a computation idiom.
- ORIG_STMT_IN_PATTERN is a stmt in the original sequence that
- computed this idiom. We need to record a pointer to VEC_STMT in
- the stmt_info of ORIG_STMT_IN_PATTERN. See more details in the
- documentation of vect_pattern_recog. */
- if (STMT_VINFO_IN_PATTERN_P (stmt_vinfo))
- {
- gcc_assert (STMT_VINFO_RELATED_STMT (stmt_vinfo) == stmt);
- STMT_VINFO_VEC_STMT (stmt_vinfo) = vec_stmt;
- }
- }
- }
-
- return is_store;
-}
-
-
-/* This function builds ni_name = number of iterations loop executes
- on the loop preheader. */
-
-static tree
-vect_build_loop_niters (loop_vec_info loop_vinfo)
-{
- tree ni_name, var;
- gimple_seq stmts = NULL;
- edge pe;
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- tree ni = unshare_expr (LOOP_VINFO_NITERS (loop_vinfo));
-
- var = create_tmp_var (TREE_TYPE (ni), "niters");
- add_referenced_var (var);
- ni_name = force_gimple_operand (ni, &stmts, false, var);
-
- pe = loop_preheader_edge (loop);
- if (stmts)
- {
- basic_block new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
- gcc_assert (!new_bb);
- }
-
- return ni_name;
-}
-
-
-/* This function generates the following statements:
-
- ni_name = number of iterations loop executes
- ratio = ni_name / vf
- ratio_mult_vf_name = ratio * vf
-
- and places them at the loop preheader edge. */
-
-static void
-vect_generate_tmps_on_preheader (loop_vec_info loop_vinfo,
- tree *ni_name_ptr,
- tree *ratio_mult_vf_name_ptr,
- tree *ratio_name_ptr)
-{
-
- edge pe;
- basic_block new_bb;
- gimple_seq stmts;
- tree ni_name;
- tree var;
- tree ratio_name;
- tree ratio_mult_vf_name;
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- tree ni = LOOP_VINFO_NITERS (loop_vinfo);
- int vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
- tree log_vf;
-
- pe = loop_preheader_edge (loop);
-
- /* Generate temporary variable that contains
- number of iterations loop executes. */
-
- ni_name = vect_build_loop_niters (loop_vinfo);
- log_vf = build_int_cst (TREE_TYPE (ni), exact_log2 (vf));
-
- /* Create: ratio = ni >> log2(vf) */
-
- ratio_name = fold_build2 (RSHIFT_EXPR, TREE_TYPE (ni_name), ni_name, log_vf);
- if (!is_gimple_val (ratio_name))
- {
- var = create_tmp_var (TREE_TYPE (ni), "bnd");
- add_referenced_var (var);
-
- stmts = NULL;
- ratio_name = force_gimple_operand (ratio_name, &stmts, true, var);
- pe = loop_preheader_edge (loop);
- new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
- gcc_assert (!new_bb);
- }
-
- /* Create: ratio_mult_vf = ratio << log2 (vf). */
-
- ratio_mult_vf_name = fold_build2 (LSHIFT_EXPR, TREE_TYPE (ratio_name),
- ratio_name, log_vf);
- if (!is_gimple_val (ratio_mult_vf_name))
- {
- var = create_tmp_var (TREE_TYPE (ni), "ratio_mult_vf");
- add_referenced_var (var);
-
- stmts = NULL;
- ratio_mult_vf_name = force_gimple_operand (ratio_mult_vf_name, &stmts,
- true, var);
- pe = loop_preheader_edge (loop);
- new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
- gcc_assert (!new_bb);
- }
-
- *ni_name_ptr = ni_name;
- *ratio_mult_vf_name_ptr = ratio_mult_vf_name;
- *ratio_name_ptr = ratio_name;
-
- return;
-}
-
-
-/* Function vect_update_ivs_after_vectorizer.
-
- "Advance" the induction variables of LOOP to the value they should take
- after the execution of LOOP. This is currently necessary because the
- vectorizer does not handle induction variables that are used after the
- loop. Such a situation occurs when the last iterations of LOOP are
- peeled, because:
- 1. We introduced new uses after LOOP for IVs that were not originally used
- after LOOP: the IVs of LOOP are now used by an epilog loop.
- 2. LOOP is going to be vectorized; this means that it will iterate N/VF
- times, whereas the loop IVs should be bumped N times.
-
- Input:
- - LOOP - a loop that is going to be vectorized. The last few iterations
- of LOOP were peeled.
- - NITERS - the number of iterations that LOOP executes (before it is
- vectorized). i.e, the number of times the ivs should be bumped.
- - UPDATE_E - a successor edge of LOOP->exit that is on the (only) path
- coming out from LOOP on which there are uses of the LOOP ivs
- (this is the path from LOOP->exit to epilog_loop->preheader).
-
- The new definitions of the ivs are placed in LOOP->exit.
- The phi args associated with the edge UPDATE_E in the bb
- UPDATE_E->dest are updated accordingly.
-
- Assumption 1: Like the rest of the vectorizer, this function assumes
- a single loop exit that has a single predecessor.
-
- Assumption 2: The phi nodes in the LOOP header and in update_bb are
- organized in the same order.
-
- Assumption 3: The access function of the ivs is simple enough (see
- vect_can_advance_ivs_p). This assumption will be relaxed in the future.
-
- Assumption 4: Exactly one of the successors of LOOP exit-bb is on a path
- coming out of LOOP on which the ivs of LOOP are used (this is the path
- that leads to the epilog loop; other paths skip the epilog loop). This
- path starts with the edge UPDATE_E, and its destination (denoted update_bb)
- needs to have its phis updated.
- */
-
-static void
-vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters,
- edge update_e)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- basic_block exit_bb = single_exit (loop)->dest;
- gimple phi, phi1;
- gimple_stmt_iterator gsi, gsi1;
- basic_block update_bb = update_e->dest;
-
- /* gcc_assert (vect_can_advance_ivs_p (loop_vinfo)); */
-
- /* Make sure there exists a single-predecessor exit bb: */
- gcc_assert (single_pred_p (exit_bb));
-
- for (gsi = gsi_start_phis (loop->header), gsi1 = gsi_start_phis (update_bb);
- !gsi_end_p (gsi) && !gsi_end_p (gsi1);
- gsi_next (&gsi), gsi_next (&gsi1))
- {
- tree access_fn = NULL;
- tree evolution_part;
- tree init_expr;
- tree step_expr;
- tree var, ni, ni_name;
- gimple_stmt_iterator last_gsi;
-
- phi = gsi_stmt (gsi);
- phi1 = gsi_stmt (gsi1);
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "vect_update_ivs_after_vectorizer: phi: ");
- print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
- }
-
- /* Skip virtual phi's. */
- if (!is_gimple_reg (SSA_NAME_VAR (PHI_RESULT (phi))))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "virtual phi. skip.");
- continue;
- }
-
- /* Skip reduction phis. */
- if (STMT_VINFO_DEF_TYPE (vinfo_for_stmt (phi)) == vect_reduction_def)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "reduc phi. skip.");
- continue;
- }
-
- access_fn = analyze_scalar_evolution (loop, PHI_RESULT (phi));
- gcc_assert (access_fn);
- STRIP_NOPS (access_fn);
- evolution_part =
- unshare_expr (evolution_part_in_loop_num (access_fn, loop->num));
- gcc_assert (evolution_part != NULL_TREE);
-
- /* FORNOW: We do not support IVs whose evolution function is a polynomial
- of degree >= 2 or exponential. */
- gcc_assert (!tree_is_chrec (evolution_part));
-
- step_expr = evolution_part;
- init_expr = unshare_expr (initial_condition_in_loop_num (access_fn,
- loop->num));
-
- if (POINTER_TYPE_P (TREE_TYPE (init_expr)))
- ni = fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (init_expr),
- init_expr,
- fold_convert (sizetype,
- fold_build2 (MULT_EXPR, TREE_TYPE (niters),
- niters, step_expr)));
- else
- ni = fold_build2 (PLUS_EXPR, TREE_TYPE (init_expr),
- fold_build2 (MULT_EXPR, TREE_TYPE (init_expr),
- fold_convert (TREE_TYPE (init_expr),
- niters),
- step_expr),
- init_expr);
-
-
-
- var = create_tmp_var (TREE_TYPE (init_expr), "tmp");
- add_referenced_var (var);
-
- last_gsi = gsi_last_bb (exit_bb);
- ni_name = force_gimple_operand_gsi (&last_gsi, ni, false, var,
- true, GSI_SAME_STMT);
-
- /* Fix phi expressions in the successor bb. */
- SET_PHI_ARG_DEF (phi1, update_e->dest_idx, ni_name);
- }
-}
-
-/* Return the more conservative threshold between the
- min_profitable_iters returned by the cost model and the user
- specified threshold, if provided. */
-
-static unsigned int
-conservative_cost_threshold (loop_vec_info loop_vinfo,
- int min_profitable_iters)
-{
- unsigned int th;
- int min_scalar_loop_bound;
-
- min_scalar_loop_bound = ((PARAM_VALUE (PARAM_MIN_VECT_LOOP_BOUND)
- * LOOP_VINFO_VECT_FACTOR (loop_vinfo)) - 1);
-
- /* Use the cost model only if it is more conservative than user specified
- threshold. */
- th = (unsigned) min_scalar_loop_bound;
- if (min_profitable_iters
- && (!min_scalar_loop_bound
- || min_profitable_iters > min_scalar_loop_bound))
- th = (unsigned) min_profitable_iters;
-
- if (th && vect_print_dump_info (REPORT_COST))
- fprintf (vect_dump, "Vectorization may not be profitable.");
-
- return th;
-}
-
-/* Function vect_do_peeling_for_loop_bound
-
- Peel the last iterations of the loop represented by LOOP_VINFO.
- The peeled iterations form a new epilog loop. Given that the loop now
- iterates NITERS times, the new epilog loop iterates
- NITERS % VECTORIZATION_FACTOR times.
-
- The original loop will later be made to iterate
- NITERS / VECTORIZATION_FACTOR times (this value is placed into RATIO). */
-
-static void
-vect_do_peeling_for_loop_bound (loop_vec_info loop_vinfo, tree *ratio)
-{
- tree ni_name, ratio_mult_vf_name;
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- struct loop *new_loop;
- edge update_e;
- basic_block preheader;
- int loop_num;
- bool check_profitability = false;
- unsigned int th = 0;
- int min_profitable_iters;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_do_peeling_for_loop_bound ===");
-
- initialize_original_copy_tables ();
-
- /* Generate the following variables on the preheader of original loop:
-
- ni_name = number of iteration the original loop executes
- ratio = ni_name / vf
- ratio_mult_vf_name = ratio * vf */
- vect_generate_tmps_on_preheader (loop_vinfo, &ni_name,
- &ratio_mult_vf_name, ratio);
-
- loop_num = loop->num;
-
- /* If cost model check not done during versioning and
- peeling for alignment. */
- if (!VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
- && !VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo))
- && !LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo))
- {
- check_profitability = true;
-
- /* Get profitability threshold for vectorized loop. */
- min_profitable_iters = LOOP_VINFO_COST_MODEL_MIN_ITERS (loop_vinfo);
-
- th = conservative_cost_threshold (loop_vinfo,
- min_profitable_iters);
- }
-
- new_loop = slpeel_tree_peel_loop_to_edge (loop, single_exit (loop),
- ratio_mult_vf_name, ni_name, false,
- th, check_profitability);
- gcc_assert (new_loop);
- gcc_assert (loop_num == loop->num);
-#ifdef ENABLE_CHECKING
- slpeel_verify_cfg_after_peeling (loop, new_loop);
-#endif
-
- /* A guard that controls whether the new_loop is to be executed or skipped
- is placed in LOOP->exit. LOOP->exit therefore has two successors - one
- is the preheader of NEW_LOOP, where the IVs from LOOP are used. The other
- is a bb after NEW_LOOP, where these IVs are not used. Find the edge that
- is on the path where the LOOP IVs are used and need to be updated. */
-
- preheader = loop_preheader_edge (new_loop)->src;
- if (EDGE_PRED (preheader, 0)->src == single_exit (loop)->dest)
- update_e = EDGE_PRED (preheader, 0);
- else
- update_e = EDGE_PRED (preheader, 1);
-
- /* Update IVs of original loop as if they were advanced
- by ratio_mult_vf_name steps. */
- vect_update_ivs_after_vectorizer (loop_vinfo, ratio_mult_vf_name, update_e);
-
- /* After peeling we have to reset scalar evolution analyzer. */
- scev_reset ();
-
- free_original_copy_tables ();
-}
-
-
-/* Function vect_gen_niters_for_prolog_loop
-
- Set the number of iterations for the loop represented by LOOP_VINFO
- to the minimum between LOOP_NITERS (the original iteration count of the loop)
- and the misalignment of DR - the data reference recorded in
- LOOP_VINFO_UNALIGNED_DR (LOOP_VINFO). As a result, after the execution of
- this loop, the data reference DR will refer to an aligned location.
-
- The following computation is generated:
-
- If the misalignment of DR is known at compile time:
- addr_mis = int mis = DR_MISALIGNMENT (dr);
- Else, compute address misalignment in bytes:
- addr_mis = addr & (vectype_size - 1)
-
- prolog_niters = min (LOOP_NITERS, ((VF - addr_mis/elem_size)&(VF-1))/step)
-
- (elem_size = element type size; an element is the scalar element whose type
- is the inner type of the vectype)
-
- When the step of the data-ref in the loop is not 1 (as in interleaved data
- and SLP), the number of iterations of the prolog must be divided by the step
- (which is equal to the size of interleaved group).
-
- The above formulas assume that VF == number of elements in the vector. This
- may not hold when there are multiple-types in the loop.
- In this case, for some data-references in the loop the VF does not represent
- the number of elements that fit in the vector. Therefore, instead of VF we
- use TYPE_VECTOR_SUBPARTS. */
-
-static tree
-vect_gen_niters_for_prolog_loop (loop_vec_info loop_vinfo, tree loop_niters)
-{
- struct data_reference *dr = LOOP_VINFO_UNALIGNED_DR (loop_vinfo);
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- tree var;
- gimple_seq stmts;
- tree iters, iters_name;
- edge pe;
- basic_block new_bb;
- gimple dr_stmt = DR_STMT (dr);
- stmt_vec_info stmt_info = vinfo_for_stmt (dr_stmt);
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- int vectype_align = TYPE_ALIGN (vectype) / BITS_PER_UNIT;
- tree niters_type = TREE_TYPE (loop_niters);
- int step = 1;
- int element_size = GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (DR_REF (dr))));
- int nelements = TYPE_VECTOR_SUBPARTS (vectype);
-
- if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
- step = DR_GROUP_SIZE (vinfo_for_stmt (DR_GROUP_FIRST_DR (stmt_info)));
-
- pe = loop_preheader_edge (loop);
-
- if (LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo) > 0)
- {
- int byte_misalign = LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo);
- int elem_misalign = byte_misalign / element_size;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "known alignment = %d.", byte_misalign);
-
- iters = build_int_cst (niters_type,
- (((nelements - elem_misalign) & (nelements - 1)) / step));
- }
- else
- {
- gimple_seq new_stmts = NULL;
- tree start_addr = vect_create_addr_base_for_vector_ref (dr_stmt,
- &new_stmts, NULL_TREE, loop);
- tree ptr_type = TREE_TYPE (start_addr);
- tree size = TYPE_SIZE (ptr_type);
- tree type = lang_hooks.types.type_for_size (tree_low_cst (size, 1), 1);
- tree vectype_size_minus_1 = build_int_cst (type, vectype_align - 1);
- tree elem_size_log =
- build_int_cst (type, exact_log2 (vectype_align/nelements));
- tree nelements_minus_1 = build_int_cst (type, nelements - 1);
- tree nelements_tree = build_int_cst (type, nelements);
- tree byte_misalign;
- tree elem_misalign;
-
- new_bb = gsi_insert_seq_on_edge_immediate (pe, new_stmts);
- gcc_assert (!new_bb);
-
- /* Create: byte_misalign = addr & (vectype_size - 1) */
- byte_misalign =
- fold_build2 (BIT_AND_EXPR, type, fold_convert (type, start_addr), vectype_size_minus_1);
-
- /* Create: elem_misalign = byte_misalign / element_size */
- elem_misalign =
- fold_build2 (RSHIFT_EXPR, type, byte_misalign, elem_size_log);
-
- /* Create: (niters_type) (nelements - elem_misalign)&(nelements - 1) */
- iters = fold_build2 (MINUS_EXPR, type, nelements_tree, elem_misalign);
- iters = fold_build2 (BIT_AND_EXPR, type, iters, nelements_minus_1);
- iters = fold_convert (niters_type, iters);
- }
-
- /* Create: prolog_loop_niters = min (iters, loop_niters) */
- /* If the loop bound is known at compile time we already verified that it is
- greater than vf; since the misalignment ('iters') is at most vf, there's
- no need to generate the MIN_EXPR in this case. */
- if (TREE_CODE (loop_niters) != INTEGER_CST)
- iters = fold_build2 (MIN_EXPR, niters_type, iters, loop_niters);
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "niters for prolog loop: ");
- print_generic_expr (vect_dump, iters, TDF_SLIM);
- }
-
- var = create_tmp_var (niters_type, "prolog_loop_niters");
- add_referenced_var (var);
- stmts = NULL;
- iters_name = force_gimple_operand (iters, &stmts, false, var);
-
- /* Insert stmt on loop preheader edge. */
- if (stmts)
- {
- basic_block new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
- gcc_assert (!new_bb);
- }
-
- return iters_name;
-}
-
-
-/* Function vect_update_init_of_dr
-
- NITERS iterations were peeled from LOOP. DR represents a data reference
- in LOOP. This function updates the information recorded in DR to
- account for the fact that the first NITERS iterations had already been
- executed. Specifically, it updates the OFFSET field of DR. */
-
-static void
-vect_update_init_of_dr (struct data_reference *dr, tree niters)
-{
- tree offset = DR_OFFSET (dr);
-
- niters = fold_build2 (MULT_EXPR, sizetype,
- fold_convert (sizetype, niters),
- fold_convert (sizetype, DR_STEP (dr)));
- offset = fold_build2 (PLUS_EXPR, sizetype, offset, niters);
- DR_OFFSET (dr) = offset;
-}
-
-
-/* Function vect_update_inits_of_drs
-
- NITERS iterations were peeled from the loop represented by LOOP_VINFO.
- This function updates the information recorded for the data references in
- the loop to account for the fact that the first NITERS iterations had
- already been executed. Specifically, it updates the initial_condition of
- the access_function of all the data_references in the loop. */
-
-static void
-vect_update_inits_of_drs (loop_vec_info loop_vinfo, tree niters)
-{
- unsigned int i;
- VEC (data_reference_p, heap) *datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
- struct data_reference *dr;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_update_inits_of_dr ===");
-
- for (i = 0; VEC_iterate (data_reference_p, datarefs, i, dr); i++)
- vect_update_init_of_dr (dr, niters);
-}
-
-
-/* Function vect_do_peeling_for_alignment
-
- Peel the first 'niters' iterations of the loop represented by LOOP_VINFO.
- 'niters' is set to the misalignment of one of the data references in the
- loop, thereby forcing it to refer to an aligned location at the beginning
- of the execution of this loop. The data reference for which we are
- peeling is recorded in LOOP_VINFO_UNALIGNED_DR. */
-
-static void
-vect_do_peeling_for_alignment (loop_vec_info loop_vinfo)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- tree niters_of_prolog_loop, ni_name;
- tree n_iters;
- struct loop *new_loop;
- bool check_profitability = false;
- unsigned int th = 0;
- int min_profitable_iters;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vect_do_peeling_for_alignment ===");
-
- initialize_original_copy_tables ();
-
- ni_name = vect_build_loop_niters (loop_vinfo);
- niters_of_prolog_loop = vect_gen_niters_for_prolog_loop (loop_vinfo, ni_name);
-
-
- /* If cost model check not done during versioning. */
- if (!VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
- && !VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
- {
- check_profitability = true;
-
- /* Get profitability threshold for vectorized loop. */
- min_profitable_iters = LOOP_VINFO_COST_MODEL_MIN_ITERS (loop_vinfo);
-
- th = conservative_cost_threshold (loop_vinfo,
- min_profitable_iters);
- }
-
- /* Peel the prolog loop and iterate it niters_of_prolog_loop. */
- new_loop =
- slpeel_tree_peel_loop_to_edge (loop, loop_preheader_edge (loop),
- niters_of_prolog_loop, ni_name, true,
- th, check_profitability);
-
- gcc_assert (new_loop);
-#ifdef ENABLE_CHECKING
- slpeel_verify_cfg_after_peeling (new_loop, loop);
-#endif
-
- /* Update number of times loop executes. */
- n_iters = LOOP_VINFO_NITERS (loop_vinfo);
- LOOP_VINFO_NITERS (loop_vinfo) = fold_build2 (MINUS_EXPR,
- TREE_TYPE (n_iters), n_iters, niters_of_prolog_loop);
-
- /* Update the init conditions of the access functions of all data refs. */
- vect_update_inits_of_drs (loop_vinfo, niters_of_prolog_loop);
-
- /* After peeling we have to reset scalar evolution analyzer. */
- scev_reset ();
-
- free_original_copy_tables ();
-}
-
-
-/* Function vect_create_cond_for_align_checks.
-
- Create a conditional expression that represents the alignment checks for
- all of data references (array element references) whose alignment must be
- checked at runtime.
-
- Input:
- COND_EXPR - input conditional expression. New conditions will be chained
- with logical AND operation.
- LOOP_VINFO - two fields of the loop information are used.
- LOOP_VINFO_PTR_MASK is the mask used to check the alignment.
- LOOP_VINFO_MAY_MISALIGN_STMTS contains the refs to be checked.
-
- Output:
- COND_EXPR_STMT_LIST - statements needed to construct the conditional
- expression.
- The returned value is the conditional expression to be used in the if
- statement that controls which version of the loop gets executed at runtime.
-
- The algorithm makes two assumptions:
- 1) The number of bytes "n" in a vector is a power of 2.
- 2) An address "a" is aligned if a%n is zero and that this
- test can be done as a&(n-1) == 0. For example, for 16
- byte vectors the test is a&0xf == 0. */
-
-static void
-vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
- tree *cond_expr,
- gimple_seq *cond_expr_stmt_list)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- VEC(gimple,heap) *may_misalign_stmts
- = LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo);
- gimple ref_stmt;
- int mask = LOOP_VINFO_PTR_MASK (loop_vinfo);
- tree mask_cst;
- unsigned int i;
- tree psize;
- tree int_ptrsize_type;
- char tmp_name[20];
- tree or_tmp_name = NULL_TREE;
- tree and_tmp, and_tmp_name;
- gimple and_stmt;
- tree ptrsize_zero;
- tree part_cond_expr;
-
- /* Check that mask is one less than a power of 2, i.e., mask is
- all zeros followed by all ones. */
- gcc_assert ((mask != 0) && ((mask & (mask+1)) == 0));
-
- /* CHECKME: what is the best integer or unsigned type to use to hold a
- cast from a pointer value? */
- psize = TYPE_SIZE (ptr_type_node);
- int_ptrsize_type
- = lang_hooks.types.type_for_size (tree_low_cst (psize, 1), 0);
-
- /* Create expression (mask & (dr_1 || ... || dr_n)) where dr_i is the address
- of the first vector of the i'th data reference. */
-
- for (i = 0; VEC_iterate (gimple, may_misalign_stmts, i, ref_stmt); i++)
- {
- gimple_seq new_stmt_list = NULL;
- tree addr_base;
- tree addr_tmp, addr_tmp_name;
- tree or_tmp, new_or_tmp_name;
- gimple addr_stmt, or_stmt;
-
- /* create: addr_tmp = (int)(address_of_first_vector) */
- addr_base =
- vect_create_addr_base_for_vector_ref (ref_stmt, &new_stmt_list,
- NULL_TREE, loop);
- if (new_stmt_list != NULL)
- gimple_seq_add_seq (cond_expr_stmt_list, new_stmt_list);
-
- sprintf (tmp_name, "%s%d", "addr2int", i);
- addr_tmp = create_tmp_var (int_ptrsize_type, tmp_name);
- add_referenced_var (addr_tmp);
- addr_tmp_name = make_ssa_name (addr_tmp, NULL);
- addr_stmt = gimple_build_assign_with_ops (NOP_EXPR, addr_tmp_name,
- addr_base, NULL_TREE);
- SSA_NAME_DEF_STMT (addr_tmp_name) = addr_stmt;
- gimple_seq_add_stmt (cond_expr_stmt_list, addr_stmt);
-
- /* The addresses are OR together. */
-
- if (or_tmp_name != NULL_TREE)
- {
- /* create: or_tmp = or_tmp | addr_tmp */
- sprintf (tmp_name, "%s%d", "orptrs", i);
- or_tmp = create_tmp_var (int_ptrsize_type, tmp_name);
- add_referenced_var (or_tmp);
- new_or_tmp_name = make_ssa_name (or_tmp, NULL);
- or_stmt = gimple_build_assign_with_ops (BIT_IOR_EXPR,
- new_or_tmp_name,
- or_tmp_name, addr_tmp_name);
- SSA_NAME_DEF_STMT (new_or_tmp_name) = or_stmt;
- gimple_seq_add_stmt (cond_expr_stmt_list, or_stmt);
- or_tmp_name = new_or_tmp_name;
- }
- else
- or_tmp_name = addr_tmp_name;
-
- } /* end for i */
-
- mask_cst = build_int_cst (int_ptrsize_type, mask);
-
- /* create: and_tmp = or_tmp & mask */
- and_tmp = create_tmp_var (int_ptrsize_type, "andmask" );
- add_referenced_var (and_tmp);
- and_tmp_name = make_ssa_name (and_tmp, NULL);
-
- and_stmt = gimple_build_assign_with_ops (BIT_AND_EXPR, and_tmp_name,
- or_tmp_name, mask_cst);
- SSA_NAME_DEF_STMT (and_tmp_name) = and_stmt;
- gimple_seq_add_stmt (cond_expr_stmt_list, and_stmt);
-
- /* Make and_tmp the left operand of the conditional test against zero.
- if and_tmp has a nonzero bit then some address is unaligned. */
- ptrsize_zero = build_int_cst (int_ptrsize_type, 0);
- part_cond_expr = fold_build2 (EQ_EXPR, boolean_type_node,
- and_tmp_name, ptrsize_zero);
- if (*cond_expr)
- *cond_expr = fold_build2 (TRUTH_AND_EXPR, boolean_type_node,
- *cond_expr, part_cond_expr);
- else
- *cond_expr = part_cond_expr;
-}
-
-/* Function vect_vfa_segment_size.
-
- Create an expression that computes the size of segment
- that will be accessed for a data reference. The functions takes into
- account that realignment loads may access one more vector.
-
- Input:
- DR: The data reference.
- VECT_FACTOR: vectorization factor.
-
- Return an expression whose value is the size of segment which will be
- accessed by DR. */
-
-static tree
-vect_vfa_segment_size (struct data_reference *dr, tree vect_factor)
-{
- tree segment_length = fold_build2 (MULT_EXPR, integer_type_node,
- DR_STEP (dr), vect_factor);
-
- if (vect_supportable_dr_alignment (dr) == dr_explicit_realign_optimized)
- {
- tree vector_size = TYPE_SIZE_UNIT
- (STMT_VINFO_VECTYPE (vinfo_for_stmt (DR_STMT (dr))));
-
- segment_length = fold_build2 (PLUS_EXPR, integer_type_node,
- segment_length, vector_size);
- }
- return fold_convert (sizetype, segment_length);
-}
-
-/* Function vect_create_cond_for_alias_checks.
-
- Create a conditional expression that represents the run-time checks for
- overlapping of address ranges represented by a list of data references
- relations passed as input.
-
- Input:
- COND_EXPR - input conditional expression. New conditions will be chained
- with logical AND operation.
- LOOP_VINFO - field LOOP_VINFO_MAY_ALIAS_STMTS contains the list of ddrs
- to be checked.
-
- Output:
- COND_EXPR - conditional expression.
- COND_EXPR_STMT_LIST - statements needed to construct the conditional
- expression.
-
-
- The returned value is the conditional expression to be used in the if
- statement that controls which version of the loop gets executed at runtime.
-*/
-
-static void
-vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo,
- tree * cond_expr,
- gimple_seq * cond_expr_stmt_list)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- VEC (ddr_p, heap) * may_alias_ddrs =
- LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo);
- tree vect_factor =
- build_int_cst (integer_type_node, LOOP_VINFO_VECT_FACTOR (loop_vinfo));
-
- ddr_p ddr;
- unsigned int i;
- tree part_cond_expr;
-
- /* Create expression
- ((store_ptr_0 + store_segment_length_0) < load_ptr_0)
- || (load_ptr_0 + load_segment_length_0) < store_ptr_0))
- &&
- ...
- &&
- ((store_ptr_n + store_segment_length_n) < load_ptr_n)
- || (load_ptr_n + load_segment_length_n) < store_ptr_n)) */
-
- if (VEC_empty (ddr_p, may_alias_ddrs))
- return;
-
- for (i = 0; VEC_iterate (ddr_p, may_alias_ddrs, i, ddr); i++)
- {
- struct data_reference *dr_a, *dr_b;
- gimple dr_group_first_a, dr_group_first_b;
- tree addr_base_a, addr_base_b;
- tree segment_length_a, segment_length_b;
- gimple stmt_a, stmt_b;
-
- dr_a = DDR_A (ddr);
- stmt_a = DR_STMT (DDR_A (ddr));
- dr_group_first_a = DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt_a));
- if (dr_group_first_a)
- {
- stmt_a = dr_group_first_a;
- dr_a = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt_a));
- }
-
- dr_b = DDR_B (ddr);
- stmt_b = DR_STMT (DDR_B (ddr));
- dr_group_first_b = DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt_b));
- if (dr_group_first_b)
- {
- stmt_b = dr_group_first_b;
- dr_b = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt_b));
- }
-
- addr_base_a =
- vect_create_addr_base_for_vector_ref (stmt_a, cond_expr_stmt_list,
- NULL_TREE, loop);
- addr_base_b =
- vect_create_addr_base_for_vector_ref (stmt_b, cond_expr_stmt_list,
- NULL_TREE, loop);
-
- segment_length_a = vect_vfa_segment_size (dr_a, vect_factor);
- segment_length_b = vect_vfa_segment_size (dr_b, vect_factor);
-
- if (vect_print_dump_info (REPORT_DR_DETAILS))
- {
- fprintf (vect_dump,
- "create runtime check for data references ");
- print_generic_expr (vect_dump, DR_REF (dr_a), TDF_SLIM);
- fprintf (vect_dump, " and ");
- print_generic_expr (vect_dump, DR_REF (dr_b), TDF_SLIM);
- }
-
-
- part_cond_expr =
- fold_build2 (TRUTH_OR_EXPR, boolean_type_node,
- fold_build2 (LT_EXPR, boolean_type_node,
- fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (addr_base_a),
- addr_base_a,
- segment_length_a),
- addr_base_b),
- fold_build2 (LT_EXPR, boolean_type_node,
- fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (addr_base_b),
- addr_base_b,
- segment_length_b),
- addr_base_a));
-
- if (*cond_expr)
- *cond_expr = fold_build2 (TRUTH_AND_EXPR, boolean_type_node,
- *cond_expr, part_cond_expr);
- else
- *cond_expr = part_cond_expr;
- }
- if (vect_print_dump_info (REPORT_VECTORIZED_LOOPS))
- fprintf (vect_dump, "created %u versioning for alias checks.\n",
- VEC_length (ddr_p, may_alias_ddrs));
-
-}
-
-/* Function vect_loop_versioning.
-
- If the loop has data references that may or may not be aligned or/and
- has data reference relations whose independence was not proven then
- two versions of the loop need to be generated, one which is vectorized
- and one which isn't. A test is then generated to control which of the
- loops is executed. The test checks for the alignment of all of the
- data references that may or may not be aligned. An additional
- sequence of runtime tests is generated for each pairs of DDRs whose
- independence was not proven. The vectorized version of loop is
- executed only if both alias and alignment tests are passed.
-
- The test generated to check which version of loop is executed
- is modified to also check for profitability as indicated by the
- cost model initially. */
-
-static void
-vect_loop_versioning (loop_vec_info loop_vinfo)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- struct loop *nloop;
- tree cond_expr = NULL_TREE;
- gimple_seq cond_expr_stmt_list = NULL;
- basic_block condition_bb;
- gimple_stmt_iterator gsi, cond_exp_gsi;
- basic_block merge_bb;
- basic_block new_exit_bb;
- edge new_exit_e, e;
- gimple orig_phi, new_phi;
- tree arg;
- unsigned prob = 4 * REG_BR_PROB_BASE / 5;
- gimple_seq gimplify_stmt_list = NULL;
- tree scalar_loop_iters = LOOP_VINFO_NITERS (loop_vinfo);
- int min_profitable_iters = 0;
- unsigned int th;
-
- /* Get profitability threshold for vectorized loop. */
- min_profitable_iters = LOOP_VINFO_COST_MODEL_MIN_ITERS (loop_vinfo);
-
- th = conservative_cost_threshold (loop_vinfo,
- min_profitable_iters);
-
- cond_expr =
- build2 (GT_EXPR, boolean_type_node, scalar_loop_iters,
- build_int_cst (TREE_TYPE (scalar_loop_iters), th));
-
- cond_expr = force_gimple_operand (cond_expr, &cond_expr_stmt_list,
- false, NULL_TREE);
-
- if (VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo)))
- vect_create_cond_for_align_checks (loop_vinfo, &cond_expr,
- &cond_expr_stmt_list);
-
- if (VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
- vect_create_cond_for_alias_checks (loop_vinfo, &cond_expr,
- &cond_expr_stmt_list);
-
- cond_expr =
- fold_build2 (NE_EXPR, boolean_type_node, cond_expr, integer_zero_node);
- cond_expr =
- force_gimple_operand (cond_expr, &gimplify_stmt_list, true, NULL_TREE);
- gimple_seq_add_seq (&cond_expr_stmt_list, gimplify_stmt_list);
-
- initialize_original_copy_tables ();
- nloop = loop_version (loop, cond_expr, &condition_bb,
- prob, prob, REG_BR_PROB_BASE - prob, true);
- free_original_copy_tables();
-
- /* Loop versioning violates an assumption we try to maintain during
- vectorization - that the loop exit block has a single predecessor.
- After versioning, the exit block of both loop versions is the same
- basic block (i.e. it has two predecessors). Just in order to simplify
- following transformations in the vectorizer, we fix this situation
- here by adding a new (empty) block on the exit-edge of the loop,
- with the proper loop-exit phis to maintain loop-closed-form. */
-
- merge_bb = single_exit (loop)->dest;
- gcc_assert (EDGE_COUNT (merge_bb->preds) == 2);
- new_exit_bb = split_edge (single_exit (loop));
- new_exit_e = single_exit (loop);
- e = EDGE_SUCC (new_exit_bb, 0);
-
- for (gsi = gsi_start_phis (merge_bb); !gsi_end_p (gsi); gsi_next (&gsi))
- {
- orig_phi = gsi_stmt (gsi);
- new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
- new_exit_bb);
- arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, e);
- add_phi_arg (new_phi, arg, new_exit_e);
- SET_PHI_ARG_DEF (orig_phi, e->dest_idx, PHI_RESULT (new_phi));
- }
-
- /* End loop-exit-fixes after versioning. */
-
- update_ssa (TODO_update_ssa);
- if (cond_expr_stmt_list)
- {
- cond_exp_gsi = gsi_last_bb (condition_bb);
- gsi_insert_seq_before (&cond_exp_gsi, cond_expr_stmt_list, GSI_SAME_STMT);
- }
-}
-
-/* Remove a group of stores (for SLP or interleaving), free their
- stmt_vec_info. */
-
-static void
-vect_remove_stores (gimple first_stmt)
-{
- gimple next = first_stmt;
- gimple tmp;
- gimple_stmt_iterator next_si;
-
- while (next)
- {
- /* Free the attached stmt_vec_info and remove the stmt. */
- next_si = gsi_for_stmt (next);
- gsi_remove (&next_si, true);
- tmp = DR_GROUP_NEXT_DR (vinfo_for_stmt (next));
- free_stmt_vec_info (next);
- next = tmp;
- }
-}
-
-
-/* Vectorize SLP instance tree in postorder. */
-
-static bool
-vect_schedule_slp_instance (slp_tree node, slp_instance instance,
- unsigned int vectorization_factor)
-{
- gimple stmt;
- bool strided_store, is_store;
- gimple_stmt_iterator si;
- stmt_vec_info stmt_info;
- unsigned int vec_stmts_size, nunits, group_size;
- tree vectype;
- int i;
- slp_tree loads_node;
-
- if (!node)
- return false;
-
- vect_schedule_slp_instance (SLP_TREE_LEFT (node), instance,
- vectorization_factor);
- vect_schedule_slp_instance (SLP_TREE_RIGHT (node), instance,
- vectorization_factor);
-
- stmt = VEC_index (gimple, SLP_TREE_SCALAR_STMTS (node), 0);
- stmt_info = vinfo_for_stmt (stmt);
-
- /* VECTYPE is the type of the destination. */
- vectype = get_vectype_for_scalar_type (TREE_TYPE (gimple_assign_lhs (stmt)));
- nunits = (unsigned int) TYPE_VECTOR_SUBPARTS (vectype);
- group_size = SLP_INSTANCE_GROUP_SIZE (instance);
-
- /* For each SLP instance calculate number of vector stmts to be created
- for the scalar stmts in each node of the SLP tree. Number of vector
- elements in one vector iteration is the number of scalar elements in
- one scalar iteration (GROUP_SIZE) multiplied by VF divided by vector
- size. */
- vec_stmts_size = (vectorization_factor * group_size) / nunits;
-
- /* In case of load permutation we have to allocate vectorized statements for
- all the nodes that participate in that permutation. */
- if (SLP_INSTANCE_LOAD_PERMUTATION (instance))
- {
- for (i = 0;
- VEC_iterate (slp_tree, SLP_INSTANCE_LOADS (instance), i, loads_node);
- i++)
- {
- if (!SLP_TREE_VEC_STMTS (loads_node))
- {
- SLP_TREE_VEC_STMTS (loads_node) = VEC_alloc (gimple, heap,
- vec_stmts_size);
- SLP_TREE_NUMBER_OF_VEC_STMTS (loads_node) = vec_stmts_size;
- }
- }
- }
-
- if (!SLP_TREE_VEC_STMTS (node))
- {
- SLP_TREE_VEC_STMTS (node) = VEC_alloc (gimple, heap, vec_stmts_size);
- SLP_TREE_NUMBER_OF_VEC_STMTS (node) = vec_stmts_size;
- }
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "------>vectorizing SLP node starting from: ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- /* Loads should be inserted before the first load. */
- if (SLP_INSTANCE_FIRST_LOAD_STMT (instance)
- && STMT_VINFO_STRIDED_ACCESS (stmt_info)
- && !REFERENCE_CLASS_P (gimple_get_lhs (stmt)))
- si = gsi_for_stmt (SLP_INSTANCE_FIRST_LOAD_STMT (instance));
- else
- si = gsi_for_stmt (stmt);
-
- is_store = vect_transform_stmt (stmt, &si, &strided_store, node, instance);
- if (is_store)
- {
- if (DR_GROUP_FIRST_DR (stmt_info))
- /* If IS_STORE is TRUE, the vectorization of the
- interleaving chain was completed - free all the stores in
- the chain. */
- vect_remove_stores (DR_GROUP_FIRST_DR (stmt_info));
- else
- /* FORNOW: SLP originates only from strided stores. */
- gcc_unreachable ();
-
- return true;
- }
-
- /* FORNOW: SLP originates only from strided stores. */
- return false;
-}
-
-
-static bool
-vect_schedule_slp (loop_vec_info loop_vinfo)
-{
- VEC (slp_instance, heap) *slp_instances =
- LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
- slp_instance instance;
- unsigned int i;
- bool is_store = false;
-
- for (i = 0; VEC_iterate (slp_instance, slp_instances, i, instance); i++)
- {
- /* Schedule the tree of INSTANCE. */
- is_store = vect_schedule_slp_instance (SLP_INSTANCE_TREE (instance),
- instance, LOOP_VINFO_VECT_FACTOR (loop_vinfo));
-
- if (vect_print_dump_info (REPORT_VECTORIZED_LOOPS)
- || vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
- fprintf (vect_dump, "vectorizing stmts using SLP.");
- }
-
- return is_store;
-}
-
-/* Function vect_transform_loop.
-
- The analysis phase has determined that the loop is vectorizable.
- Vectorize the loop - created vectorized stmts to replace the scalar
- stmts in the loop, and update the loop exit condition. */
-
-void
-vect_transform_loop (loop_vec_info loop_vinfo)
-{
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
- int nbbs = loop->num_nodes;
- gimple_stmt_iterator si;
- int i;
- tree ratio = NULL;
- int vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
- bool strided_store;
- bool slp_scheduled = false;
- unsigned int nunits;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== vec_transform_loop ===");
-
- if (VEC_length (gimple, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo))
- || VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo)))
- vect_loop_versioning (loop_vinfo);
-
- /* CHECKME: we wouldn't need this if we called update_ssa once
- for all loops. */
- bitmap_zero (vect_memsyms_to_rename);
-
- /* Peel the loop if there are data refs with unknown alignment.
- Only one data ref with unknown store is allowed. */
-
- if (LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo))
- vect_do_peeling_for_alignment (loop_vinfo);
-
- /* If the loop has a symbolic number of iterations 'n' (i.e. it's not a
- compile time constant), or it is a constant that doesn't divide by the
- vectorization factor, then an epilog loop needs to be created.
- We therefore duplicate the loop: the original loop will be vectorized,
- and will compute the first (n/VF) iterations. The second copy of the loop
- will remain scalar and will compute the remaining (n%VF) iterations.
- (VF is the vectorization factor). */
-
- if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
- || (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
- && LOOP_VINFO_INT_NITERS (loop_vinfo) % vectorization_factor != 0))
- vect_do_peeling_for_loop_bound (loop_vinfo, &ratio);
- else
- ratio = build_int_cst (TREE_TYPE (LOOP_VINFO_NITERS (loop_vinfo)),
- LOOP_VINFO_INT_NITERS (loop_vinfo) / vectorization_factor);
-
- /* 1) Make sure the loop header has exactly two entries
- 2) Make sure we have a preheader basic block. */
-
- gcc_assert (EDGE_COUNT (loop->header->preds) == 2);
-
- split_edge (loop_preheader_edge (loop));
-
- /* FORNOW: the vectorizer supports only loops which body consist
- of one basic block (header + empty latch). When the vectorizer will
- support more involved loop forms, the order by which the BBs are
- traversed need to be reconsidered. */
-
- for (i = 0; i < nbbs; i++)
- {
- basic_block bb = bbs[i];
- stmt_vec_info stmt_info;
- gimple phi;
-
- for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
- {
- phi = gsi_stmt (si);
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "------>vectorizing phi: ");
- print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
- }
- stmt_info = vinfo_for_stmt (phi);
- if (!stmt_info)
- continue;
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info)
- && !STMT_VINFO_LIVE_P (stmt_info))
- continue;
-
- if ((TYPE_VECTOR_SUBPARTS (STMT_VINFO_VECTYPE (stmt_info))
- != (unsigned HOST_WIDE_INT) vectorization_factor)
- && vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "multiple-types.");
-
- if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "transform phi.");
- vect_transform_stmt (phi, NULL, NULL, NULL, NULL);
- }
- }
-
- for (si = gsi_start_bb (bb); !gsi_end_p (si);)
- {
- gimple stmt = gsi_stmt (si);
- bool is_store;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "------>vectorizing statement: ");
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
- }
-
- stmt_info = vinfo_for_stmt (stmt);
-
- /* vector stmts created in the outer-loop during vectorization of
- stmts in an inner-loop may not have a stmt_info, and do not
- need to be vectorized. */
- if (!stmt_info)
- {
- gsi_next (&si);
- continue;
- }
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info)
- && !STMT_VINFO_LIVE_P (stmt_info))
- {
- gsi_next (&si);
- continue;
- }
-
- gcc_assert (STMT_VINFO_VECTYPE (stmt_info));
- nunits =
- (unsigned int) TYPE_VECTOR_SUBPARTS (STMT_VINFO_VECTYPE (stmt_info));
- if (!STMT_SLP_TYPE (stmt_info)
- && nunits != (unsigned int) vectorization_factor
- && vect_print_dump_info (REPORT_DETAILS))
- /* For SLP VF is set according to unrolling factor, and not to
- vector size, hence for SLP this print is not valid. */
- fprintf (vect_dump, "multiple-types.");
-
- /* SLP. Schedule all the SLP instances when the first SLP stmt is
- reached. */
- if (STMT_SLP_TYPE (stmt_info))
- {
- if (!slp_scheduled)
- {
- slp_scheduled = true;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "=== scheduling SLP instances ===");
-
- is_store = vect_schedule_slp (loop_vinfo);
-
- /* IS_STORE is true if STMT is a store. Stores cannot be of
- hybrid SLP type. They are removed in
- vect_schedule_slp_instance and their vinfo is destroyed. */
- if (is_store)
- {
- gsi_next (&si);
- continue;
- }
- }
-
- /* Hybrid SLP stmts must be vectorized in addition to SLP. */
- if (PURE_SLP_STMT (stmt_info))
- {
- gsi_next (&si);
- continue;
- }
- }
-
- /* -------- vectorize statement ------------ */
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "transform statement.");
-
- strided_store = false;
- is_store = vect_transform_stmt (stmt, &si, &strided_store, NULL, NULL);
- if (is_store)
- {
- if (STMT_VINFO_STRIDED_ACCESS (stmt_info))
- {
- /* Interleaving. If IS_STORE is TRUE, the vectorization of the
- interleaving chain was completed - free all the stores in
- the chain. */
- vect_remove_stores (DR_GROUP_FIRST_DR (stmt_info));
- gsi_remove (&si, true);
- continue;
- }
- else
- {
- /* Free the attached stmt_vec_info and remove the stmt. */
- free_stmt_vec_info (stmt);
- gsi_remove (&si, true);
- continue;
- }
- }
- gsi_next (&si);
- } /* stmts in BB */
- } /* BBs in loop */
-
- slpeel_make_loop_iterate_ntimes (loop, ratio);
-
- mark_set_for_renaming (vect_memsyms_to_rename);
-
- /* The memory tags and pointers in vectorized statements need to
- have their SSA forms updated. FIXME, why can't this be delayed
- until all the loops have been transformed? */
- update_ssa (TODO_update_ssa);
-
- if (vect_print_dump_info (REPORT_VECTORIZED_LOOPS))
- fprintf (vect_dump, "LOOP VECTORIZED.");
- if (loop->inner && vect_print_dump_info (REPORT_VECTORIZED_LOOPS))
- fprintf (vect_dump, "OUTER LOOP VECTORIZED.");
-}
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 9a3a9f3c8a7..0636c6adbc6 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -1,7 +1,7 @@
-/* Loop Vectorization
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software
+/* Vectorizer
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
Foundation, Inc.
- Contributed by Dorit Naishlos <dorit@il.ibm.com>
+ Contributed by Dorit Naishlos <dorit@il.ibm.com>
This file is part of GCC.
@@ -19,105 +19,40 @@ 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/>. */
-/* Loop Vectorization Pass.
-
- This pass tries to vectorize loops. This first implementation focuses on
- simple inner-most loops, with no conditional control flow, and a set of
- simple operations which vector form can be expressed using existing
- tree codes (PLUS, MULT etc).
-
- For example, the vectorizer transforms the following simple loop:
-
- short a[N]; short b[N]; short c[N]; int i;
-
- for (i=0; i<N; i++){
- a[i] = b[i] + c[i];
- }
-
- as if it was manually vectorized by rewriting the source code into:
-
- typedef int __attribute__((mode(V8HI))) v8hi;
- short a[N]; short b[N]; short c[N]; int i;
- v8hi *pa = (v8hi*)a, *pb = (v8hi*)b, *pc = (v8hi*)c;
- v8hi va, vb, vc;
-
- for (i=0; i<N/8; i++){
- vb = pb[i];
- vc = pc[i];
- va = vb + vc;
- pa[i] = va;
- }
-
- The main entry to this pass is vectorize_loops(), in which
- the vectorizer applies a set of analyses on a given set of loops,
- followed by the actual vectorization transformation for the loops that
- had successfully passed the analysis phase.
-
- Throughout this pass we make a distinction between two types of
- data: scalars (which are represented by SSA_NAMES), and memory references
- ("data-refs"). These two types of data require different handling both
- during analysis and transformation. The types of data-refs that the
- vectorizer currently supports are ARRAY_REFS which base is an array DECL
- (not a pointer), and INDIRECT_REFS through pointers; both array and pointer
- accesses are required to have a simple (consecutive) access pattern.
-
- Analysis phase:
- ===============
- The driver for the analysis phase is vect_analyze_loop_nest().
- It applies a set of analyses, some of which rely on the scalar evolution
- analyzer (scev) developed by Sebastian Pop.
-
- During the analysis phase the vectorizer records some information
- per stmt in a "stmt_vec_info" struct which is attached to each stmt in the
- loop, as well as general information about the loop as a whole, which is
- recorded in a "loop_vec_info" struct attached to each loop.
-
- Transformation phase:
- =====================
- The loop transformation phase scans all the stmts in the loop, and
- creates a vector stmt (or a sequence of stmts) for each scalar stmt S in
- the loop that needs to be vectorized. It insert the vector code sequence
- just before the scalar stmt S, and records a pointer to the vector code
- in STMT_VINFO_VEC_STMT (stmt_info) (stmt_info is the stmt_vec_info struct
- attached to S). This pointer will be used for the vectorization of following
- stmts which use the def of stmt S. Stmt S is removed if it writes to memory;
- otherwise, we rely on dead code elimination for removing it.
-
- For example, say stmt S1 was vectorized into stmt VS1:
-
- VS1: vb = px[i];
- S1: b = x[i]; STMT_VINFO_VEC_STMT (stmt_info (S1)) = VS1
- S2: a = b;
-
- To vectorize stmt S2, the vectorizer first finds the stmt that defines
- the operand 'b' (S1), and gets the relevant vector def 'vb' from the
- vector stmt VS1 pointed to by STMT_VINFO_VEC_STMT (stmt_info (S1)). The
- resulting sequence would be:
-
- VS1: vb = px[i];
- S1: b = x[i]; STMT_VINFO_VEC_STMT (stmt_info (S1)) = VS1
- VS2: va = vb;
- S2: a = b; STMT_VINFO_VEC_STMT (stmt_info (S2)) = VS2
-
- Operands that are not SSA_NAMEs, are data-refs that appear in
- load/store operations (like 'x[i]' in S1), and are handled differently.
-
- Target modeling:
- =================
- Currently the only target specific information that is used is the
- size of the vector (in bytes) - "UNITS_PER_SIMD_WORD". Targets that can
- support different sizes of vectors, for now will need to specify one value
- for "UNITS_PER_SIMD_WORD". More flexibility will be added in the future.
-
- Since we only vectorize operations which vector form can be
- expressed using existing tree codes, to verify that an operation is
- supported, the vectorizer checks the relevant optab at the relevant
- machine_mode (e.g, optab_handler (add_optab, V8HImode)->insn_code). If
- the value found is CODE_FOR_nothing, then there's no target support, and
- we can't vectorize the stmt.
-
- For additional information on this project see:
- http://gcc.gnu.org/projects/tree-ssa/vectorization.html
+/* Loop and basic block vectorizer.
+
+ This file contains drivers for the three vectorizers:
+ (1) loop vectorizer (inter-iteration parallelism),
+ (2) loop-aware SLP (intra-iteration parallelism) (invoked by the loop
+ vectorizer)
+ (3) BB vectorizer (out-of-loops), aka SLP
+
+ The rest of the vectorizer's code is organized as follows:
+ - tree-vect-loop.c - loop specific parts such as reductions, etc. These are
+ used by drivers (1) and (2).
+ - tree-vect-loop-manip.c - vectorizer's loop control-flow utilities, used by
+ drivers (1) and (2).
+ - tree-vect-slp.c - BB vectorization specific analysis and transformation,
+ used by drivers (2) and (3).
+ - tree-vect-stmts.c - statements analysis and transformation (used by all).
+ - tree-vect-data-refs.c - vectorizer specific data-refs analysis and
+ manipulations (used by all).
+ - tree-vect-patterns.c - vectorizable code patterns detector (used by all)
+
+ Here's a poor attempt at illustrating that:
+
+ tree-vectorizer.c:
+ loop_vect() loop_aware_slp() slp_vect()
+ | / \ /
+ | / \ /
+ tree-vect-loop.c tree-vect-slp.c
+ | \ \ / / |
+ | \ \/ / |
+ | \ /\ / |
+ | \ / \ / |
+ tree-vect-stmts.c tree-vect-data-refs.c
+ \ /
+ tree-vect-patterns.c
*/
#include "config.h"
@@ -126,32 +61,13 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "ggc.h"
#include "tree.h"
-#include "target.h"
-#include "rtl.h"
-#include "basic-block.h"
#include "diagnostic.h"
#include "tree-flow.h"
#include "tree-dump.h"
-#include "timevar.h"
#include "cfgloop.h"
#include "cfglayout.h"
-#include "expr.h"
-#include "recog.h"
-#include "optabs.h"
-#include "params.h"
-#include "toplev.h"
-#include "tree-chrec.h"
-#include "tree-data-ref.h"
-#include "tree-scalar-evolution.h"
-#include "input.h"
-#include "hashtab.h"
#include "tree-vectorizer.h"
#include "tree-pass.h"
-#include "langhooks.h"
-
-/*************************************************************************
- General Vectorization Utilities
- *************************************************************************/
/* vect_dump will be set to stderr or dump_file if exist. */
FILE *vect_dump;
@@ -161,7 +77,7 @@ FILE *vect_dump;
enum verbosity_levels vect_verbosity_level = MAX_VERBOSITY_LEVEL;
/* Loop location. */
-static LOC vect_loop_location;
+LOC vect_loop_location;
/* Bitmap of virtual variables to be renamed. */
bitmap vect_memsyms_to_rename;
@@ -170,1273 +86,6 @@ bitmap vect_memsyms_to_rename;
VEC(vec_void_p,heap) *stmt_vec_info_vec;
-/*************************************************************************
- Simple Loop Peeling Utilities
-
- Utilities to support loop peeling for vectorization purposes.
- *************************************************************************/
-
-
-/* Renames the use *OP_P. */
-
-static void
-rename_use_op (use_operand_p op_p)
-{
- tree new_name;
-
- if (TREE_CODE (USE_FROM_PTR (op_p)) != SSA_NAME)
- return;
-
- new_name = get_current_def (USE_FROM_PTR (op_p));
-
- /* Something defined outside of the loop. */
- if (!new_name)
- return;
-
- /* An ordinary ssa name defined in the loop. */
-
- SET_USE (op_p, new_name);
-}
-
-
-/* Renames the variables in basic block BB. */
-
-void
-rename_variables_in_bb (basic_block bb)
-{
- gimple_stmt_iterator gsi;
- gimple stmt;
- use_operand_p use_p;
- ssa_op_iter iter;
- edge e;
- edge_iterator ei;
- struct loop *loop = bb->loop_father;
-
- for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
- {
- stmt = gsi_stmt (gsi);
- FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES)
- rename_use_op (use_p);
- }
-
- FOR_EACH_EDGE (e, ei, bb->succs)
- {
- if (!flow_bb_inside_loop_p (loop, e->dest))
- continue;
- for (gsi = gsi_start_phis (e->dest); !gsi_end_p (gsi); gsi_next (&gsi))
- rename_use_op (PHI_ARG_DEF_PTR_FROM_EDGE (gsi_stmt (gsi), e));
- }
-}
-
-
-/* Renames variables in new generated LOOP. */
-
-void
-rename_variables_in_loop (struct loop *loop)
-{
- unsigned i;
- basic_block *bbs;
-
- bbs = get_loop_body (loop);
-
- for (i = 0; i < loop->num_nodes; i++)
- rename_variables_in_bb (bbs[i]);
-
- free (bbs);
-}
-
-
-/* Update the PHI nodes of NEW_LOOP.
-
- NEW_LOOP is a duplicate of ORIG_LOOP.
- AFTER indicates whether NEW_LOOP executes before or after ORIG_LOOP:
- AFTER is true if NEW_LOOP executes after ORIG_LOOP, and false if it
- executes before it. */
-
-static void
-slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
- struct loop *new_loop, bool after)
-{
- tree new_ssa_name;
- gimple phi_new, phi_orig;
- tree def;
- edge orig_loop_latch = loop_latch_edge (orig_loop);
- edge orig_entry_e = loop_preheader_edge (orig_loop);
- edge new_loop_exit_e = single_exit (new_loop);
- edge new_loop_entry_e = loop_preheader_edge (new_loop);
- edge entry_arg_e = (after ? orig_loop_latch : orig_entry_e);
- gimple_stmt_iterator gsi_new, gsi_orig;
-
- /*
- step 1. For each loop-header-phi:
- Add the first phi argument for the phi in NEW_LOOP
- (the one associated with the entry of NEW_LOOP)
-
- step 2. For each loop-header-phi:
- Add the second phi argument for the phi in NEW_LOOP
- (the one associated with the latch of NEW_LOOP)
-
- step 3. Update the phis in the successor block of NEW_LOOP.
-
- case 1: NEW_LOOP was placed before ORIG_LOOP:
- The successor block of NEW_LOOP is the header of ORIG_LOOP.
- Updating the phis in the successor block can therefore be done
- along with the scanning of the loop header phis, because the
- header blocks of ORIG_LOOP and NEW_LOOP have exactly the same
- phi nodes, organized in the same order.
-
- case 2: NEW_LOOP was placed after ORIG_LOOP:
- The successor block of NEW_LOOP is the original exit block of
- ORIG_LOOP - the phis to be updated are the loop-closed-ssa phis.
- We postpone updating these phis to a later stage (when
- loop guards are added).
- */
-
-
- /* Scan the phis in the headers of the old and new loops
- (they are organized in exactly the same order). */
-
- for (gsi_new = gsi_start_phis (new_loop->header),
- gsi_orig = gsi_start_phis (orig_loop->header);
- !gsi_end_p (gsi_new) && !gsi_end_p (gsi_orig);
- gsi_next (&gsi_new), gsi_next (&gsi_orig))
- {
- phi_new = gsi_stmt (gsi_new);
- phi_orig = gsi_stmt (gsi_orig);
-
- /* step 1. */
- def = PHI_ARG_DEF_FROM_EDGE (phi_orig, entry_arg_e);
- add_phi_arg (phi_new, def, new_loop_entry_e);
-
- /* step 2. */
- def = PHI_ARG_DEF_FROM_EDGE (phi_orig, orig_loop_latch);
- if (TREE_CODE (def) != SSA_NAME)
- continue;
-
- new_ssa_name = get_current_def (def);
- if (!new_ssa_name)
- {
- /* This only happens if there are no definitions
- inside the loop. use the phi_result in this case. */
- new_ssa_name = PHI_RESULT (phi_new);
- }
-
- /* An ordinary ssa name defined in the loop. */
- add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop));
-
- /* step 3 (case 1). */
- if (!after)
- {
- gcc_assert (new_loop_exit_e == orig_entry_e);
- SET_PHI_ARG_DEF (phi_orig,
- new_loop_exit_e->dest_idx,
- new_ssa_name);
- }
- }
-}
-
-
-/* Update PHI nodes for a guard of the LOOP.
-
- Input:
- - LOOP, GUARD_EDGE: LOOP is a loop for which we added guard code that
- controls whether LOOP is to be executed. GUARD_EDGE is the edge that
- originates from the guard-bb, skips LOOP and reaches the (unique) exit
- bb of LOOP. This loop-exit-bb is an empty bb with one successor.
- We denote this bb NEW_MERGE_BB because before the guard code was added
- it had a single predecessor (the LOOP header), and now it became a merge
- point of two paths - the path that ends with the LOOP exit-edge, and
- the path that ends with GUARD_EDGE.
- - NEW_EXIT_BB: New basic block that is added by this function between LOOP
- and NEW_MERGE_BB. It is used to place loop-closed-ssa-form exit-phis.
-
- ===> The CFG before the guard-code was added:
- LOOP_header_bb:
- loop_body
- if (exit_loop) goto update_bb
- else goto LOOP_header_bb
- update_bb:
-
- ==> The CFG after the guard-code was added:
- guard_bb:
- if (LOOP_guard_condition) goto new_merge_bb
- else goto LOOP_header_bb
- LOOP_header_bb:
- loop_body
- if (exit_loop_condition) goto new_merge_bb
- else goto LOOP_header_bb
- new_merge_bb:
- goto update_bb
- update_bb:
-
- ==> The CFG after this function:
- guard_bb:
- if (LOOP_guard_condition) goto new_merge_bb
- else goto LOOP_header_bb
- LOOP_header_bb:
- loop_body
- if (exit_loop_condition) goto new_exit_bb
- else goto LOOP_header_bb
- new_exit_bb:
- new_merge_bb:
- goto update_bb
- update_bb:
-
- This function:
- 1. creates and updates the relevant phi nodes to account for the new
- incoming edge (GUARD_EDGE) into NEW_MERGE_BB. This involves:
- 1.1. Create phi nodes at NEW_MERGE_BB.
- 1.2. Update the phi nodes at the successor of NEW_MERGE_BB (denoted
- UPDATE_BB). UPDATE_BB was the exit-bb of LOOP before NEW_MERGE_BB
- 2. preserves loop-closed-ssa-form by creating the required phi nodes
- at the exit of LOOP (i.e, in NEW_EXIT_BB).
-
- There are two flavors to this function:
-
- slpeel_update_phi_nodes_for_guard1:
- Here the guard controls whether we enter or skip LOOP, where LOOP is a
- prolog_loop (loop1 below), and the new phis created in NEW_MERGE_BB are
- for variables that have phis in the loop header.
-
- slpeel_update_phi_nodes_for_guard2:
- Here the guard controls whether we enter or skip LOOP, where LOOP is an
- epilog_loop (loop2 below), and the new phis created in NEW_MERGE_BB are
- for variables that have phis in the loop exit.
-
- I.E., the overall structure is:
-
- loop1_preheader_bb:
- guard1 (goto loop1/merge1_bb)
- loop1
- loop1_exit_bb:
- guard2 (goto merge1_bb/merge2_bb)
- merge1_bb
- loop2
- loop2_exit_bb
- merge2_bb
- next_bb
-
- slpeel_update_phi_nodes_for_guard1 takes care of creating phis in
- loop1_exit_bb and merge1_bb. These are entry phis (phis for the vars
- that have phis in loop1->header).
-
- slpeel_update_phi_nodes_for_guard2 takes care of creating phis in
- loop2_exit_bb and merge2_bb. These are exit phis (phis for the vars
- that have phis in next_bb). It also adds some of these phis to
- loop1_exit_bb.
-
- slpeel_update_phi_nodes_for_guard1 is always called before
- slpeel_update_phi_nodes_for_guard2. They are both needed in order
- to create correct data-flow and loop-closed-ssa-form.
-
- Generally slpeel_update_phi_nodes_for_guard1 creates phis for variables
- that change between iterations of a loop (and therefore have a phi-node
- at the loop entry), whereas slpeel_update_phi_nodes_for_guard2 creates
- phis for variables that are used out of the loop (and therefore have
- loop-closed exit phis). Some variables may be both updated between
- iterations and used after the loop. This is why in loop1_exit_bb we
- may need both entry_phis (created by slpeel_update_phi_nodes_for_guard1)
- and exit phis (created by slpeel_update_phi_nodes_for_guard2).
-
- - IS_NEW_LOOP: if IS_NEW_LOOP is true, then LOOP is a newly created copy of
- an original loop. i.e., we have:
-
- orig_loop
- guard_bb (goto LOOP/new_merge)
- new_loop <-- LOOP
- new_exit
- new_merge
- next_bb
-
- If IS_NEW_LOOP is false, then LOOP is an original loop, in which case we
- have:
-
- new_loop
- guard_bb (goto LOOP/new_merge)
- orig_loop <-- LOOP
- new_exit
- new_merge
- next_bb
-
- The SSA names defined in the original loop have a current
- reaching definition that that records the corresponding new
- ssa-name used in the new duplicated loop copy.
- */
-
-/* Function slpeel_update_phi_nodes_for_guard1
-
- Input:
- - GUARD_EDGE, LOOP, IS_NEW_LOOP, NEW_EXIT_BB - as explained above.
- - DEFS - a bitmap of ssa names to mark new names for which we recorded
- information.
-
- In the context of the overall structure, we have:
-
- loop1_preheader_bb:
- guard1 (goto loop1/merge1_bb)
-LOOP-> loop1
- loop1_exit_bb:
- guard2 (goto merge1_bb/merge2_bb)
- merge1_bb
- loop2
- loop2_exit_bb
- merge2_bb
- next_bb
-
- For each name updated between loop iterations (i.e - for each name that has
- an entry (loop-header) phi in LOOP) we create a new phi in:
- 1. merge1_bb (to account for the edge from guard1)
- 2. loop1_exit_bb (an exit-phi to keep LOOP in loop-closed form)
-*/
-
-static void
-slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop,
- bool is_new_loop, basic_block *new_exit_bb,
- bitmap *defs)
-{
- gimple orig_phi, new_phi;
- gimple update_phi, update_phi2;
- tree guard_arg, loop_arg;
- basic_block new_merge_bb = guard_edge->dest;
- edge e = EDGE_SUCC (new_merge_bb, 0);
- basic_block update_bb = e->dest;
- basic_block orig_bb = loop->header;
- edge new_exit_e;
- tree current_new_name;
- tree name;
- gimple_stmt_iterator gsi_orig, gsi_update;
-
- /* Create new bb between loop and new_merge_bb. */
- *new_exit_bb = split_edge (single_exit (loop));
-
- new_exit_e = EDGE_SUCC (*new_exit_bb, 0);
-
- for (gsi_orig = gsi_start_phis (orig_bb),
- gsi_update = gsi_start_phis (update_bb);
- !gsi_end_p (gsi_orig) && !gsi_end_p (gsi_update);
- gsi_next (&gsi_orig), gsi_next (&gsi_update))
- {
- orig_phi = gsi_stmt (gsi_orig);
- update_phi = gsi_stmt (gsi_update);
-
- /* Virtual phi; Mark it for renaming. We actually want to call
- mar_sym_for_renaming, but since all ssa renaming datastructures
- are going to be freed before we get to call ssa_update, we just
- record this name for now in a bitmap, and will mark it for
- renaming later. */
- name = PHI_RESULT (orig_phi);
- if (!is_gimple_reg (SSA_NAME_VAR (name)))
- bitmap_set_bit (vect_memsyms_to_rename, DECL_UID (SSA_NAME_VAR (name)));
-
- /** 1. Handle new-merge-point phis **/
-
- /* 1.1. Generate new phi node in NEW_MERGE_BB: */
- new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
- new_merge_bb);
-
- /* 1.2. NEW_MERGE_BB has two incoming edges: GUARD_EDGE and the exit-edge
- of LOOP. Set the two phi args in NEW_PHI for these edges: */
- loop_arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, EDGE_SUCC (loop->latch, 0));
- guard_arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, loop_preheader_edge (loop));
-
- add_phi_arg (new_phi, loop_arg, new_exit_e);
- add_phi_arg (new_phi, guard_arg, guard_edge);
-
- /* 1.3. Update phi in successor block. */
- gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == loop_arg
- || PHI_ARG_DEF_FROM_EDGE (update_phi, e) == guard_arg);
- SET_PHI_ARG_DEF (update_phi, e->dest_idx, PHI_RESULT (new_phi));
- update_phi2 = new_phi;
-
-
- /** 2. Handle loop-closed-ssa-form phis **/
-
- if (!is_gimple_reg (PHI_RESULT (orig_phi)))
- continue;
-
- /* 2.1. Generate new phi node in NEW_EXIT_BB: */
- new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
- *new_exit_bb);
-
- /* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop. */
- add_phi_arg (new_phi, loop_arg, single_exit (loop));
-
- /* 2.3. Update phi in successor of NEW_EXIT_BB: */
- gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, new_exit_e) == loop_arg);
- SET_PHI_ARG_DEF (update_phi2, new_exit_e->dest_idx, PHI_RESULT (new_phi));
-
- /* 2.4. Record the newly created name with set_current_def.
- We want to find a name such that
- name = get_current_def (orig_loop_name)
- and to set its current definition as follows:
- set_current_def (name, new_phi_name)
-
- If LOOP is a new loop then loop_arg is already the name we're
- looking for. If LOOP is the original loop, then loop_arg is
- the orig_loop_name and the relevant name is recorded in its
- current reaching definition. */
- if (is_new_loop)
- current_new_name = loop_arg;
- else
- {
- current_new_name = get_current_def (loop_arg);
- /* current_def is not available only if the variable does not
- change inside the loop, in which case we also don't care
- about recording a current_def for it because we won't be
- trying to create loop-exit-phis for it. */
- if (!current_new_name)
- continue;
- }
- gcc_assert (get_current_def (current_new_name) == NULL_TREE);
-
- set_current_def (current_new_name, PHI_RESULT (new_phi));
- bitmap_set_bit (*defs, SSA_NAME_VERSION (current_new_name));
- }
-}
-
-
-/* Function slpeel_update_phi_nodes_for_guard2
-
- Input:
- - GUARD_EDGE, LOOP, IS_NEW_LOOP, NEW_EXIT_BB - as explained above.
-
- In the context of the overall structure, we have:
-
- loop1_preheader_bb:
- guard1 (goto loop1/merge1_bb)
- loop1
- loop1_exit_bb:
- guard2 (goto merge1_bb/merge2_bb)
- merge1_bb
-LOOP-> loop2
- loop2_exit_bb
- merge2_bb
- next_bb
-
- For each name used out side the loop (i.e - for each name that has an exit
- phi in next_bb) we create a new phi in:
- 1. merge2_bb (to account for the edge from guard_bb)
- 2. loop2_exit_bb (an exit-phi to keep LOOP in loop-closed form)
- 3. guard2 bb (an exit phi to keep the preceding loop in loop-closed form),
- if needed (if it wasn't handled by slpeel_update_phis_nodes_for_phi1).
-*/
-
-static void
-slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop,
- bool is_new_loop, basic_block *new_exit_bb)
-{
- gimple orig_phi, new_phi;
- gimple update_phi, update_phi2;
- tree guard_arg, loop_arg;
- basic_block new_merge_bb = guard_edge->dest;
- edge e = EDGE_SUCC (new_merge_bb, 0);
- basic_block update_bb = e->dest;
- edge new_exit_e;
- tree orig_def, orig_def_new_name;
- tree new_name, new_name2;
- tree arg;
- gimple_stmt_iterator gsi;
-
- /* Create new bb between loop and new_merge_bb. */
- *new_exit_bb = split_edge (single_exit (loop));
-
- new_exit_e = EDGE_SUCC (*new_exit_bb, 0);
-
- for (gsi = gsi_start_phis (update_bb); !gsi_end_p (gsi); gsi_next (&gsi))
- {
- update_phi = gsi_stmt (gsi);
- orig_phi = update_phi;
- orig_def = PHI_ARG_DEF_FROM_EDGE (orig_phi, e);
- /* This loop-closed-phi actually doesn't represent a use
- out of the loop - the phi arg is a constant. */
- if (TREE_CODE (orig_def) != SSA_NAME)
- continue;
- orig_def_new_name = get_current_def (orig_def);
- arg = NULL_TREE;
-
- /** 1. Handle new-merge-point phis **/
-
- /* 1.1. Generate new phi node in NEW_MERGE_BB: */
- new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
- new_merge_bb);
-
- /* 1.2. NEW_MERGE_BB has two incoming edges: GUARD_EDGE and the exit-edge
- of LOOP. Set the two PHI args in NEW_PHI for these edges: */
- new_name = orig_def;
- new_name2 = NULL_TREE;
- if (orig_def_new_name)
- {
- new_name = orig_def_new_name;
- /* Some variables have both loop-entry-phis and loop-exit-phis.
- Such variables were given yet newer names by phis placed in
- guard_bb by slpeel_update_phi_nodes_for_guard1. I.e:
- new_name2 = get_current_def (get_current_def (orig_name)). */
- new_name2 = get_current_def (new_name);
- }
-
- if (is_new_loop)
- {
- guard_arg = orig_def;
- loop_arg = new_name;
- }
- else
- {
- guard_arg = new_name;
- loop_arg = orig_def;
- }
- if (new_name2)
- guard_arg = new_name2;
-
- add_phi_arg (new_phi, loop_arg, new_exit_e);
- add_phi_arg (new_phi, guard_arg, guard_edge);
-
- /* 1.3. Update phi in successor block. */
- gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == orig_def);
- SET_PHI_ARG_DEF (update_phi, e->dest_idx, PHI_RESULT (new_phi));
- update_phi2 = new_phi;
-
-
- /** 2. Handle loop-closed-ssa-form phis **/
-
- /* 2.1. Generate new phi node in NEW_EXIT_BB: */
- new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
- *new_exit_bb);
-
- /* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop. */
- add_phi_arg (new_phi, loop_arg, single_exit (loop));
-
- /* 2.3. Update phi in successor of NEW_EXIT_BB: */
- gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, new_exit_e) == loop_arg);
- SET_PHI_ARG_DEF (update_phi2, new_exit_e->dest_idx, PHI_RESULT (new_phi));
-
-
- /** 3. Handle loop-closed-ssa-form phis for first loop **/
-
- /* 3.1. Find the relevant names that need an exit-phi in
- GUARD_BB, i.e. names for which
- slpeel_update_phi_nodes_for_guard1 had not already created a
- phi node. This is the case for names that are used outside
- the loop (and therefore need an exit phi) but are not updated
- across loop iterations (and therefore don't have a
- loop-header-phi).
-
- slpeel_update_phi_nodes_for_guard1 is responsible for
- creating loop-exit phis in GUARD_BB for names that have a
- loop-header-phi. When such a phi is created we also record
- the new name in its current definition. If this new name
- exists, then guard_arg was set to this new name (see 1.2
- above). Therefore, if guard_arg is not this new name, this
- is an indication that an exit-phi in GUARD_BB was not yet
- created, so we take care of it here. */
- if (guard_arg == new_name2)
- continue;
- arg = guard_arg;
-
- /* 3.2. Generate new phi node in GUARD_BB: */
- new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
- guard_edge->src);
-
- /* 3.3. GUARD_BB has one incoming edge: */
- gcc_assert (EDGE_COUNT (guard_edge->src->preds) == 1);
- add_phi_arg (new_phi, arg, EDGE_PRED (guard_edge->src, 0));
-
- /* 3.4. Update phi in successor of GUARD_BB: */
- gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, guard_edge)
- == guard_arg);
- SET_PHI_ARG_DEF (update_phi2, guard_edge->dest_idx, PHI_RESULT (new_phi));
- }
-}
-
-
-/* Make the LOOP iterate NITERS times. This is done by adding a new IV
- that starts at zero, increases by one and its limit is NITERS.
-
- Assumption: the exit-condition of LOOP is the last stmt in the loop. */
-
-void
-slpeel_make_loop_iterate_ntimes (struct loop *loop, tree niters)
-{
- tree indx_before_incr, indx_after_incr;
- gimple cond_stmt;
- gimple orig_cond;
- edge exit_edge = single_exit (loop);
- gimple_stmt_iterator loop_cond_gsi;
- gimple_stmt_iterator incr_gsi;
- bool insert_after;
- tree init = build_int_cst (TREE_TYPE (niters), 0);
- tree step = build_int_cst (TREE_TYPE (niters), 1);
- LOC loop_loc;
- enum tree_code code;
-
- orig_cond = get_loop_exit_condition (loop);
- gcc_assert (orig_cond);
- loop_cond_gsi = gsi_for_stmt (orig_cond);
-
- standard_iv_increment_position (loop, &incr_gsi, &insert_after);
- create_iv (init, step, NULL_TREE, loop,
- &incr_gsi, insert_after, &indx_before_incr, &indx_after_incr);
-
- indx_after_incr = force_gimple_operand_gsi (&loop_cond_gsi, indx_after_incr,
- true, NULL_TREE, true,
- GSI_SAME_STMT);
- niters = force_gimple_operand_gsi (&loop_cond_gsi, niters, true, NULL_TREE,
- true, GSI_SAME_STMT);
-
- code = (exit_edge->flags & EDGE_TRUE_VALUE) ? GE_EXPR : LT_EXPR;
- cond_stmt = gimple_build_cond (code, indx_after_incr, niters, NULL_TREE,
- NULL_TREE);
-
- gsi_insert_before (&loop_cond_gsi, cond_stmt, GSI_SAME_STMT);
-
- /* Remove old loop exit test: */
- gsi_remove (&loop_cond_gsi, true);
-
- loop_loc = find_loop_location (loop);
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- if (loop_loc != UNKNOWN_LOC)
- fprintf (dump_file, "\nloop at %s:%d: ",
- LOC_FILE (loop_loc), LOC_LINE (loop_loc));
- print_gimple_stmt (dump_file, cond_stmt, 0, TDF_SLIM);
- }
-
- loop->nb_iterations = niters;
-}
-
-
-/* Given LOOP this function generates a new copy of it and puts it
- on E which is either the entry or exit of LOOP. */
-
-struct loop *
-slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *loop, edge e)
-{
- struct loop *new_loop;
- basic_block *new_bbs, *bbs;
- bool at_exit;
- bool was_imm_dom;
- basic_block exit_dest;
- gimple phi;
- tree phi_arg;
- edge exit, new_exit;
- gimple_stmt_iterator gsi;
-
- at_exit = (e == single_exit (loop));
- if (!at_exit && e != loop_preheader_edge (loop))
- return NULL;
-
- bbs = get_loop_body (loop);
-
- /* Check whether duplication is possible. */
- if (!can_copy_bbs_p (bbs, loop->num_nodes))
- {
- free (bbs);
- return NULL;
- }
-
- /* Generate new loop structure. */
- new_loop = duplicate_loop (loop, loop_outer (loop));
- if (!new_loop)
- {
- free (bbs);
- return NULL;
- }
-
- exit_dest = single_exit (loop)->dest;
- was_imm_dom = (get_immediate_dominator (CDI_DOMINATORS,
- exit_dest) == loop->header ?
- true : false);
-
- new_bbs = XNEWVEC (basic_block, loop->num_nodes);
-
- exit = single_exit (loop);
- copy_bbs (bbs, loop->num_nodes, new_bbs,
- &exit, 1, &new_exit, NULL,
- e->src);
-
- /* Duplicating phi args at exit bbs as coming
- also from exit of duplicated loop. */
- for (gsi = gsi_start_phis (exit_dest); !gsi_end_p (gsi); gsi_next (&gsi))
- {
- phi = gsi_stmt (gsi);
- phi_arg = PHI_ARG_DEF_FROM_EDGE (phi, single_exit (loop));
- if (phi_arg)
- {
- edge new_loop_exit_edge;
-
- if (EDGE_SUCC (new_loop->header, 0)->dest == new_loop->latch)
- new_loop_exit_edge = EDGE_SUCC (new_loop->header, 1);
- else
- new_loop_exit_edge = EDGE_SUCC (new_loop->header, 0);
-
- add_phi_arg (phi, phi_arg, new_loop_exit_edge);
- }
- }
-
- if (at_exit) /* Add the loop copy at exit. */
- {
- redirect_edge_and_branch_force (e, new_loop->header);
- PENDING_STMT (e) = NULL;
- set_immediate_dominator (CDI_DOMINATORS, new_loop->header, e->src);
- if (was_imm_dom)
- set_immediate_dominator (CDI_DOMINATORS, exit_dest, new_loop->header);
- }
- else /* Add the copy at entry. */
- {
- edge new_exit_e;
- edge entry_e = loop_preheader_edge (loop);
- basic_block preheader = entry_e->src;
-
- if (!flow_bb_inside_loop_p (new_loop,
- EDGE_SUCC (new_loop->header, 0)->dest))
- new_exit_e = EDGE_SUCC (new_loop->header, 0);
- else
- new_exit_e = EDGE_SUCC (new_loop->header, 1);
-
- redirect_edge_and_branch_force (new_exit_e, loop->header);
- PENDING_STMT (new_exit_e) = NULL;
- set_immediate_dominator (CDI_DOMINATORS, loop->header,
- new_exit_e->src);
-
- /* We have to add phi args to the loop->header here as coming
- from new_exit_e edge. */
- for (gsi = gsi_start_phis (loop->header);
- !gsi_end_p (gsi);
- gsi_next (&gsi))
- {
- phi = gsi_stmt (gsi);
- phi_arg = PHI_ARG_DEF_FROM_EDGE (phi, entry_e);
- if (phi_arg)
- add_phi_arg (phi, phi_arg, new_exit_e);
- }
-
- redirect_edge_and_branch_force (entry_e, new_loop->header);
- PENDING_STMT (entry_e) = NULL;
- set_immediate_dominator (CDI_DOMINATORS, new_loop->header, preheader);
- }
-
- free (new_bbs);
- free (bbs);
-
- return new_loop;
-}
-
-
-/* Given the condition statement COND, put it as the last statement
- of GUARD_BB; EXIT_BB is the basic block to skip the loop;
- Assumes that this is the single exit of the guarded loop.
- Returns the skip edge. */
-
-static edge
-slpeel_add_loop_guard (basic_block guard_bb, tree cond, basic_block exit_bb,
- basic_block dom_bb)
-{
- gimple_stmt_iterator gsi;
- edge new_e, enter_e;
- gimple cond_stmt;
- gimple_seq gimplify_stmt_list = NULL;
-
- enter_e = EDGE_SUCC (guard_bb, 0);
- enter_e->flags &= ~EDGE_FALLTHRU;
- enter_e->flags |= EDGE_FALSE_VALUE;
- gsi = gsi_last_bb (guard_bb);
-
- cond = force_gimple_operand (cond, &gimplify_stmt_list, true, NULL_TREE);
- cond_stmt = gimple_build_cond (NE_EXPR,
- cond, build_int_cst (TREE_TYPE (cond), 0),
- NULL_TREE, NULL_TREE);
- if (gimplify_stmt_list)
- gsi_insert_seq_after (&gsi, gimplify_stmt_list, GSI_NEW_STMT);
-
- gsi = gsi_last_bb (guard_bb);
- gsi_insert_after (&gsi, cond_stmt, GSI_NEW_STMT);
-
- /* Add new edge to connect guard block to the merge/loop-exit block. */
- new_e = make_edge (guard_bb, exit_bb, EDGE_TRUE_VALUE);
- set_immediate_dominator (CDI_DOMINATORS, exit_bb, dom_bb);
- return new_e;
-}
-
-
-/* This function verifies that the following restrictions apply to LOOP:
- (1) it is innermost
- (2) it consists of exactly 2 basic blocks - header, and an empty latch.
- (3) it is single entry, single exit
- (4) its exit condition is the last stmt in the header
- (5) E is the entry/exit edge of LOOP.
- */
-
-bool
-slpeel_can_duplicate_loop_p (const struct loop *loop, const_edge e)
-{
- edge exit_e = single_exit (loop);
- edge entry_e = loop_preheader_edge (loop);
- gimple orig_cond = get_loop_exit_condition (loop);
- gimple_stmt_iterator loop_exit_gsi = gsi_last_bb (exit_e->src);
-
- if (need_ssa_update_p ())
- return false;
-
- if (loop->inner
- /* All loops have an outer scope; the only case loop->outer is NULL is for
- the function itself. */
- || !loop_outer (loop)
- || loop->num_nodes != 2
- || !empty_block_p (loop->latch)
- || !single_exit (loop)
- /* Verify that new loop exit condition can be trivially modified. */
- || (!orig_cond || orig_cond != gsi_stmt (loop_exit_gsi))
- || (e != exit_e && e != entry_e))
- return false;
-
- return true;
-}
-
-#ifdef ENABLE_CHECKING
-void
-slpeel_verify_cfg_after_peeling (struct loop *first_loop,
- struct loop *second_loop)
-{
- basic_block loop1_exit_bb = single_exit (first_loop)->dest;
- basic_block loop2_entry_bb = loop_preheader_edge (second_loop)->src;
- basic_block loop1_entry_bb = loop_preheader_edge (first_loop)->src;
-
- /* A guard that controls whether the second_loop is to be executed or skipped
- is placed in first_loop->exit. first_loop->exit therefore has two
- successors - one is the preheader of second_loop, and the other is a bb
- after second_loop.
- */
- gcc_assert (EDGE_COUNT (loop1_exit_bb->succs) == 2);
-
- /* 1. Verify that one of the successors of first_loop->exit is the preheader
- of second_loop. */
-
- /* The preheader of new_loop is expected to have two predecessors:
- first_loop->exit and the block that precedes first_loop. */
-
- gcc_assert (EDGE_COUNT (loop2_entry_bb->preds) == 2
- && ((EDGE_PRED (loop2_entry_bb, 0)->src == loop1_exit_bb
- && EDGE_PRED (loop2_entry_bb, 1)->src == loop1_entry_bb)
- || (EDGE_PRED (loop2_entry_bb, 1)->src == loop1_exit_bb
- && EDGE_PRED (loop2_entry_bb, 0)->src == loop1_entry_bb)));
-
- /* Verify that the other successor of first_loop->exit is after the
- second_loop. */
- /* TODO */
-}
-#endif
-
-/* If the run time cost model check determines that vectorization is
- not profitable and hence scalar loop should be generated then set
- FIRST_NITERS to prologue peeled iterations. This will allow all the
- iterations to be executed in the prologue peeled scalar loop. */
-
-void
-set_prologue_iterations (basic_block bb_before_first_loop,
- tree first_niters,
- struct loop *loop,
- unsigned int th)
-{
- edge e;
- basic_block cond_bb, then_bb;
- tree var, prologue_after_cost_adjust_name;
- gimple_stmt_iterator gsi;
- gimple newphi;
- edge e_true, e_false, e_fallthru;
- gimple cond_stmt;
- gimple_seq gimplify_stmt_list = NULL, stmts = NULL;
- tree cost_pre_condition = NULL_TREE;
- tree scalar_loop_iters =
- unshare_expr (LOOP_VINFO_NITERS_UNCHANGED (loop_vec_info_for_loop (loop)));
-
- e = single_pred_edge (bb_before_first_loop);
- cond_bb = split_edge(e);
-
- e = single_pred_edge (bb_before_first_loop);
- then_bb = split_edge(e);
- set_immediate_dominator (CDI_DOMINATORS, then_bb, cond_bb);
-
- e_false = make_single_succ_edge (cond_bb, bb_before_first_loop,
- EDGE_FALSE_VALUE);
- set_immediate_dominator (CDI_DOMINATORS, bb_before_first_loop, cond_bb);
-
- e_true = EDGE_PRED (then_bb, 0);
- e_true->flags &= ~EDGE_FALLTHRU;
- e_true->flags |= EDGE_TRUE_VALUE;
-
- e_fallthru = EDGE_SUCC (then_bb, 0);
-
- cost_pre_condition =
- build2 (LE_EXPR, boolean_type_node, scalar_loop_iters,
- build_int_cst (TREE_TYPE (scalar_loop_iters), th));
- cost_pre_condition =
- force_gimple_operand (cost_pre_condition, &gimplify_stmt_list,
- true, NULL_TREE);
- cond_stmt = gimple_build_cond (NE_EXPR, cost_pre_condition,
- build_int_cst (TREE_TYPE (cost_pre_condition),
- 0), NULL_TREE, NULL_TREE);
-
- gsi = gsi_last_bb (cond_bb);
- if (gimplify_stmt_list)
- gsi_insert_seq_after (&gsi, gimplify_stmt_list, GSI_NEW_STMT);
-
- gsi = gsi_last_bb (cond_bb);
- gsi_insert_after (&gsi, cond_stmt, GSI_NEW_STMT);
-
- var = create_tmp_var (TREE_TYPE (scalar_loop_iters),
- "prologue_after_cost_adjust");
- add_referenced_var (var);
- prologue_after_cost_adjust_name =
- force_gimple_operand (scalar_loop_iters, &stmts, false, var);
-
- gsi = gsi_last_bb (then_bb);
- if (stmts)
- gsi_insert_seq_after (&gsi, stmts, GSI_NEW_STMT);
-
- newphi = create_phi_node (var, bb_before_first_loop);
- add_phi_arg (newphi, prologue_after_cost_adjust_name, e_fallthru);
- add_phi_arg (newphi, first_niters, e_false);
-
- first_niters = PHI_RESULT (newphi);
-}
-
-
-/* Function slpeel_tree_peel_loop_to_edge.
-
- Peel the first (last) iterations of LOOP into a new prolog (epilog) loop
- that is placed on the entry (exit) edge E of LOOP. After this transformation
- we have two loops one after the other - first-loop iterates FIRST_NITERS
- times, and second-loop iterates the remainder NITERS - FIRST_NITERS times.
- If the cost model indicates that it is profitable to emit a scalar
- loop instead of the vector one, then the prolog (epilog) loop will iterate
- for the entire unchanged scalar iterations of the loop.
-
- Input:
- - LOOP: the loop to be peeled.
- - E: the exit or entry edge of LOOP.
- If it is the entry edge, we peel the first iterations of LOOP. In this
- case first-loop is LOOP, and second-loop is the newly created loop.
- If it is the exit edge, we peel the last iterations of LOOP. In this
- case, first-loop is the newly created loop, and second-loop is LOOP.
- - NITERS: the number of iterations that LOOP iterates.
- - FIRST_NITERS: the number of iterations that the first-loop should iterate.
- - UPDATE_FIRST_LOOP_COUNT: specified whether this function is responsible
- for updating the loop bound of the first-loop to FIRST_NITERS. If it
- is false, the caller of this function may want to take care of this
- (this can be useful if we don't want new stmts added to first-loop).
- - TH: cost model profitability threshold of iterations for vectorization.
- - CHECK_PROFITABILITY: specify whether cost model check has not occurred
- during versioning and hence needs to occur during
- prologue generation or whether cost model check
- has not occurred during prologue generation and hence
- needs to occur during epilogue generation.
-
-
- Output:
- The function returns a pointer to the new loop-copy, or NULL if it failed
- to perform the transformation.
-
- The function generates two if-then-else guards: one before the first loop,
- and the other before the second loop:
- The first guard is:
- if (FIRST_NITERS == 0) then skip the first loop,
- and go directly to the second loop.
- The second guard is:
- if (FIRST_NITERS == NITERS) then skip the second loop.
-
- FORNOW only simple loops are supported (see slpeel_can_duplicate_loop_p).
- FORNOW the resulting code will not be in loop-closed-ssa form.
-*/
-
-struct loop*
-slpeel_tree_peel_loop_to_edge (struct loop *loop,
- edge e, tree first_niters,
- tree niters, bool update_first_loop_count,
- unsigned int th, bool check_profitability)
-{
- struct loop *new_loop = NULL, *first_loop, *second_loop;
- edge skip_e;
- tree pre_condition = NULL_TREE;
- bitmap definitions;
- basic_block bb_before_second_loop, bb_after_second_loop;
- basic_block bb_before_first_loop;
- basic_block bb_between_loops;
- basic_block new_exit_bb;
- edge exit_e = single_exit (loop);
- LOC loop_loc;
- tree cost_pre_condition = NULL_TREE;
-
- if (!slpeel_can_duplicate_loop_p (loop, e))
- return NULL;
-
- /* We have to initialize cfg_hooks. Then, when calling
- cfg_hooks->split_edge, the function tree_split_edge
- is actually called and, when calling cfg_hooks->duplicate_block,
- the function tree_duplicate_bb is called. */
- gimple_register_cfg_hooks ();
-
-
- /* 1. Generate a copy of LOOP and put it on E (E is the entry/exit of LOOP).
- Resulting CFG would be:
-
- first_loop:
- do {
- } while ...
-
- second_loop:
- do {
- } while ...
-
- orig_exit_bb:
- */
-
- if (!(new_loop = slpeel_tree_duplicate_loop_to_edge_cfg (loop, e)))
- {
- loop_loc = find_loop_location (loop);
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- if (loop_loc != UNKNOWN_LOC)
- fprintf (dump_file, "\n%s:%d: note: ",
- LOC_FILE (loop_loc), LOC_LINE (loop_loc));
- fprintf (dump_file, "tree_duplicate_loop_to_edge_cfg failed.\n");
- }
- return NULL;
- }
-
- if (e == exit_e)
- {
- /* NEW_LOOP was placed after LOOP. */
- first_loop = loop;
- second_loop = new_loop;
- }
- else
- {
- /* NEW_LOOP was placed before LOOP. */
- first_loop = new_loop;
- second_loop = loop;
- }
-
- definitions = ssa_names_to_replace ();
- slpeel_update_phis_for_duplicate_loop (loop, new_loop, e == exit_e);
- rename_variables_in_loop (new_loop);
-
-
- /* 2. Add the guard code in one of the following ways:
-
- 2.a Add the guard that controls whether the first loop is executed.
- This occurs when this function is invoked for prologue or epilogue
- generation and when the cost model check can be done at compile time.
-
- Resulting CFG would be:
-
- bb_before_first_loop:
- if (FIRST_NITERS == 0) GOTO bb_before_second_loop
- GOTO first-loop
-
- first_loop:
- do {
- } while ...
-
- bb_before_second_loop:
-
- second_loop:
- do {
- } while ...
-
- orig_exit_bb:
-
- 2.b Add the cost model check that allows the prologue
- to iterate for the entire unchanged scalar
- iterations of the loop in the event that the cost
- model indicates that the scalar loop is more
- profitable than the vector one. This occurs when
- this function is invoked for prologue generation
- and the cost model check needs to be done at run
- time.
-
- Resulting CFG after prologue peeling would be:
-
- if (scalar_loop_iterations <= th)
- FIRST_NITERS = scalar_loop_iterations
-
- bb_before_first_loop:
- if (FIRST_NITERS == 0) GOTO bb_before_second_loop
- GOTO first-loop
-
- first_loop:
- do {
- } while ...
-
- bb_before_second_loop:
-
- second_loop:
- do {
- } while ...
-
- orig_exit_bb:
-
- 2.c Add the cost model check that allows the epilogue
- to iterate for the entire unchanged scalar
- iterations of the loop in the event that the cost
- model indicates that the scalar loop is more
- profitable than the vector one. This occurs when
- this function is invoked for epilogue generation
- and the cost model check needs to be done at run
- time.
-
- Resulting CFG after prologue peeling would be:
-
- bb_before_first_loop:
- if ((scalar_loop_iterations <= th)
- ||
- FIRST_NITERS == 0) GOTO bb_before_second_loop
- GOTO first-loop
-
- first_loop:
- do {
- } while ...
-
- bb_before_second_loop:
-
- second_loop:
- do {
- } while ...
-
- orig_exit_bb:
- */
-
- bb_before_first_loop = split_edge (loop_preheader_edge (first_loop));
- bb_before_second_loop = split_edge (single_exit (first_loop));
-
- /* Epilogue peeling. */
- if (!update_first_loop_count)
- {
- pre_condition =
- fold_build2 (LE_EXPR, boolean_type_node, first_niters,
- build_int_cst (TREE_TYPE (first_niters), 0));
- if (check_profitability)
- {
- tree scalar_loop_iters
- = unshare_expr (LOOP_VINFO_NITERS_UNCHANGED
- (loop_vec_info_for_loop (loop)));
- cost_pre_condition =
- build2 (LE_EXPR, boolean_type_node, scalar_loop_iters,
- build_int_cst (TREE_TYPE (scalar_loop_iters), th));
-
- pre_condition = fold_build2 (TRUTH_OR_EXPR, boolean_type_node,
- cost_pre_condition, pre_condition);
- }
- }
-
- /* Prologue peeling. */
- else
- {
- if (check_profitability)
- set_prologue_iterations (bb_before_first_loop, first_niters,
- loop, th);
-
- pre_condition =
- fold_build2 (LE_EXPR, boolean_type_node, first_niters,
- build_int_cst (TREE_TYPE (first_niters), 0));
- }
-
- skip_e = slpeel_add_loop_guard (bb_before_first_loop, pre_condition,
- bb_before_second_loop, bb_before_first_loop);
- slpeel_update_phi_nodes_for_guard1 (skip_e, first_loop,
- first_loop == new_loop,
- &new_exit_bb, &definitions);
-
-
- /* 3. Add the guard that controls whether the second loop is executed.
- Resulting CFG would be:
-
- bb_before_first_loop:
- if (FIRST_NITERS == 0) GOTO bb_before_second_loop (skip first loop)
- GOTO first-loop
-
- first_loop:
- do {
- } while ...
-
- bb_between_loops:
- if (FIRST_NITERS == NITERS) GOTO bb_after_second_loop (skip second loop)
- GOTO bb_before_second_loop
-
- bb_before_second_loop:
-
- second_loop:
- do {
- } while ...
-
- bb_after_second_loop:
-
- orig_exit_bb:
- */
-
- bb_between_loops = new_exit_bb;
- bb_after_second_loop = split_edge (single_exit (second_loop));
-
- pre_condition =
- fold_build2 (EQ_EXPR, boolean_type_node, first_niters, niters);
- skip_e = slpeel_add_loop_guard (bb_between_loops, pre_condition,
- bb_after_second_loop, bb_before_first_loop);
- slpeel_update_phi_nodes_for_guard2 (skip_e, second_loop,
- second_loop == new_loop, &new_exit_bb);
-
- /* 4. Make first-loop iterate FIRST_NITERS times, if requested.
- */
- if (update_first_loop_count)
- slpeel_make_loop_iterate_ntimes (first_loop, first_niters);
-
- BITMAP_FREE (definitions);
- delete_update_ssa ();
-
- return new_loop;
-}
-
-/* Function vect_get_loop_location.
-
- Extract the location of the loop in the source code.
- If the loop is not well formed for vectorization, an estimated
- location is calculated.
- Return the loop location if succeed and NULL if not. */
-
-LOC
-find_loop_location (struct loop *loop)
-{
- gimple stmt = NULL;
- basic_block bb;
- gimple_stmt_iterator si;
-
- if (!loop)
- return UNKNOWN_LOC;
-
- stmt = get_loop_exit_condition (loop);
-
- if (stmt && gimple_location (stmt) != UNKNOWN_LOC)
- return gimple_location (stmt);
-
- /* If we got here the loop is probably not "well formed",
- try to estimate the loop location */
-
- if (!loop->header)
- return UNKNOWN_LOC;
-
- bb = loop->header;
-
- for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
- {
- stmt = gsi_stmt (si);
- if (gimple_location (stmt) != UNKNOWN_LOC)
- return gimple_location (stmt);
- }
-
- return UNKNOWN_LOC;
-}
-
-
-/*************************************************************************
- Vectorization Debug Information.
- *************************************************************************/
/* Function vect_set_verbosity_level.
@@ -1516,1262 +165,6 @@ vect_print_dump_info (enum verbosity_levels vl)
}
-/*************************************************************************
- Vectorization Utilities.
- *************************************************************************/
-
-/* Function new_stmt_vec_info.
-
- Create and initialize a new stmt_vec_info struct for STMT. */
-
-stmt_vec_info
-new_stmt_vec_info (gimple stmt, loop_vec_info loop_vinfo)
-{
- stmt_vec_info res;
- res = (stmt_vec_info) xcalloc (1, sizeof (struct _stmt_vec_info));
-
- STMT_VINFO_TYPE (res) = undef_vec_info_type;
- STMT_VINFO_STMT (res) = stmt;
- STMT_VINFO_LOOP_VINFO (res) = loop_vinfo;
- STMT_VINFO_RELEVANT (res) = 0;
- STMT_VINFO_LIVE_P (res) = false;
- STMT_VINFO_VECTYPE (res) = NULL;
- STMT_VINFO_VEC_STMT (res) = NULL;
- STMT_VINFO_IN_PATTERN_P (res) = false;
- STMT_VINFO_RELATED_STMT (res) = NULL;
- STMT_VINFO_DATA_REF (res) = NULL;
-
- STMT_VINFO_DR_BASE_ADDRESS (res) = NULL;
- STMT_VINFO_DR_OFFSET (res) = NULL;
- STMT_VINFO_DR_INIT (res) = NULL;
- STMT_VINFO_DR_STEP (res) = NULL;
- STMT_VINFO_DR_ALIGNED_TO (res) = NULL;
-
- if (gimple_code (stmt) == GIMPLE_PHI
- && is_loop_header_bb_p (gimple_bb (stmt)))
- STMT_VINFO_DEF_TYPE (res) = vect_unknown_def_type;
- else
- STMT_VINFO_DEF_TYPE (res) = vect_loop_def;
- STMT_VINFO_SAME_ALIGN_REFS (res) = VEC_alloc (dr_p, heap, 5);
- STMT_VINFO_INSIDE_OF_LOOP_COST (res) = 0;
- STMT_VINFO_OUTSIDE_OF_LOOP_COST (res) = 0;
- STMT_SLP_TYPE (res) = 0;
- DR_GROUP_FIRST_DR (res) = NULL;
- DR_GROUP_NEXT_DR (res) = NULL;
- DR_GROUP_SIZE (res) = 0;
- DR_GROUP_STORE_COUNT (res) = 0;
- DR_GROUP_GAP (res) = 0;
- DR_GROUP_SAME_DR_STMT (res) = NULL;
- DR_GROUP_READ_WRITE_DEPENDENCE (res) = false;
-
- return res;
-}
-
-/* Create a hash table for stmt_vec_info. */
-
-void
-init_stmt_vec_info_vec (void)
-{
- gcc_assert (!stmt_vec_info_vec);
- stmt_vec_info_vec = VEC_alloc (vec_void_p, heap, 50);
-}
-
-/* Free hash table for stmt_vec_info. */
-
-void
-free_stmt_vec_info_vec (void)
-{
- gcc_assert (stmt_vec_info_vec);
- VEC_free (vec_void_p, heap, stmt_vec_info_vec);
-}
-
-/* Free stmt vectorization related info. */
-
-void
-free_stmt_vec_info (gimple stmt)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
-
- if (!stmt_info)
- return;
-
- VEC_free (dr_p, heap, STMT_VINFO_SAME_ALIGN_REFS (stmt_info));
- set_vinfo_for_stmt (stmt, NULL);
- free (stmt_info);
-}
-
-
-/* Function bb_in_loop_p
-
- Used as predicate for dfs order traversal of the loop bbs. */
-
-static bool
-bb_in_loop_p (const_basic_block bb, const void *data)
-{
- const struct loop *const loop = (const struct loop *)data;
- if (flow_bb_inside_loop_p (loop, bb))
- return true;
- return false;
-}
-
-
-/* Function new_loop_vec_info.
-
- Create and initialize a new loop_vec_info struct for LOOP, as well as
- stmt_vec_info structs for all the stmts in LOOP. */
-
-loop_vec_info
-new_loop_vec_info (struct loop *loop)
-{
- loop_vec_info res;
- basic_block *bbs;
- gimple_stmt_iterator si;
- unsigned int i, nbbs;
-
- res = (loop_vec_info) xcalloc (1, sizeof (struct _loop_vec_info));
- LOOP_VINFO_LOOP (res) = loop;
-
- bbs = get_loop_body (loop);
-
- /* Create/Update stmt_info for all stmts in the loop. */
- for (i = 0; i < loop->num_nodes; i++)
- {
- basic_block bb = bbs[i];
-
- /* BBs in a nested inner-loop will have been already processed (because
- we will have called vect_analyze_loop_form for any nested inner-loop).
- Therefore, for stmts in an inner-loop we just want to update the
- STMT_VINFO_LOOP_VINFO field of their stmt_info to point to the new
- loop_info of the outer-loop we are currently considering to vectorize
- (instead of the loop_info of the inner-loop).
- For stmts in other BBs we need to create a stmt_info from scratch. */
- if (bb->loop_father != loop)
- {
- /* Inner-loop bb. */
- gcc_assert (loop->inner && bb->loop_father == loop->inner);
- for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
- {
- gimple phi = gsi_stmt (si);
- stmt_vec_info stmt_info = vinfo_for_stmt (phi);
- loop_vec_info inner_loop_vinfo =
- STMT_VINFO_LOOP_VINFO (stmt_info);
- gcc_assert (loop->inner == LOOP_VINFO_LOOP (inner_loop_vinfo));
- STMT_VINFO_LOOP_VINFO (stmt_info) = res;
- }
- for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
- {
- gimple stmt = gsi_stmt (si);
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- loop_vec_info inner_loop_vinfo =
- STMT_VINFO_LOOP_VINFO (stmt_info);
- gcc_assert (loop->inner == LOOP_VINFO_LOOP (inner_loop_vinfo));
- STMT_VINFO_LOOP_VINFO (stmt_info) = res;
- }
- }
- else
- {
- /* bb in current nest. */
- for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
- {
- gimple phi = gsi_stmt (si);
- gimple_set_uid (phi, 0);
- set_vinfo_for_stmt (phi, new_stmt_vec_info (phi, res));
- }
-
- for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
- {
- gimple stmt = gsi_stmt (si);
- gimple_set_uid (stmt, 0);
- set_vinfo_for_stmt (stmt, new_stmt_vec_info (stmt, res));
- }
- }
- }
-
- /* CHECKME: We want to visit all BBs before their successors (except for
- latch blocks, for which this assertion wouldn't hold). In the simple
- case of the loop forms we allow, a dfs order of the BBs would the same
- as reversed postorder traversal, so we are safe. */
-
- free (bbs);
- bbs = XCNEWVEC (basic_block, loop->num_nodes);
- nbbs = dfs_enumerate_from (loop->header, 0, bb_in_loop_p,
- bbs, loop->num_nodes, loop);
- gcc_assert (nbbs == loop->num_nodes);
-
- LOOP_VINFO_BBS (res) = bbs;
- LOOP_VINFO_NITERS (res) = NULL;
- LOOP_VINFO_NITERS_UNCHANGED (res) = NULL;
- LOOP_VINFO_COST_MODEL_MIN_ITERS (res) = 0;
- LOOP_VINFO_VECTORIZABLE_P (res) = 0;
- LOOP_PEELING_FOR_ALIGNMENT (res) = 0;
- LOOP_VINFO_VECT_FACTOR (res) = 0;
- LOOP_VINFO_DATAREFS (res) = VEC_alloc (data_reference_p, heap, 10);
- LOOP_VINFO_DDRS (res) = VEC_alloc (ddr_p, heap, 10 * 10);
- LOOP_VINFO_UNALIGNED_DR (res) = NULL;
- LOOP_VINFO_MAY_MISALIGN_STMTS (res) =
- VEC_alloc (gimple, heap,
- PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIGNMENT_CHECKS));
- LOOP_VINFO_MAY_ALIAS_DDRS (res) =
- VEC_alloc (ddr_p, heap,
- PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS));
- LOOP_VINFO_STRIDED_STORES (res) = VEC_alloc (gimple, heap, 10);
- LOOP_VINFO_SLP_INSTANCES (res) = VEC_alloc (slp_instance, heap, 10);
- LOOP_VINFO_SLP_UNROLLING_FACTOR (res) = 1;
-
- return res;
-}
-
-
-/* Function destroy_loop_vec_info.
-
- Free LOOP_VINFO struct, as well as all the stmt_vec_info structs of all the
- stmts in the loop. */
-
-void
-destroy_loop_vec_info (loop_vec_info loop_vinfo, bool clean_stmts)
-{
- struct loop *loop;
- basic_block *bbs;
- int nbbs;
- gimple_stmt_iterator si;
- int j;
- VEC (slp_instance, heap) *slp_instances;
- slp_instance instance;
-
- if (!loop_vinfo)
- return;
-
- loop = LOOP_VINFO_LOOP (loop_vinfo);
-
- bbs = LOOP_VINFO_BBS (loop_vinfo);
- nbbs = loop->num_nodes;
-
- if (!clean_stmts)
- {
- free (LOOP_VINFO_BBS (loop_vinfo));
- free_data_refs (LOOP_VINFO_DATAREFS (loop_vinfo));
- free_dependence_relations (LOOP_VINFO_DDRS (loop_vinfo));
- VEC_free (gimple, heap, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo));
-
- free (loop_vinfo);
- loop->aux = NULL;
- return;
- }
-
- for (j = 0; j < nbbs; j++)
- {
- basic_block bb = bbs[j];
-
- for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
- free_stmt_vec_info (gsi_stmt (si));
-
- for (si = gsi_start_bb (bb); !gsi_end_p (si); )
- {
- gimple stmt = gsi_stmt (si);
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
-
- if (stmt_info)
- {
- /* Check if this is a "pattern stmt" (introduced by the
- vectorizer during the pattern recognition pass). */
- bool remove_stmt_p = false;
- gimple orig_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
- if (orig_stmt)
- {
- stmt_vec_info orig_stmt_info = vinfo_for_stmt (orig_stmt);
- if (orig_stmt_info
- && STMT_VINFO_IN_PATTERN_P (orig_stmt_info))
- remove_stmt_p = true;
- }
-
- /* Free stmt_vec_info. */
- free_stmt_vec_info (stmt);
-
- /* Remove dead "pattern stmts". */
- if (remove_stmt_p)
- gsi_remove (&si, true);
- }
- gsi_next (&si);
- }
- }
-
- free (LOOP_VINFO_BBS (loop_vinfo));
- free_data_refs (LOOP_VINFO_DATAREFS (loop_vinfo));
- free_dependence_relations (LOOP_VINFO_DDRS (loop_vinfo));
- VEC_free (gimple, heap, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo));
- VEC_free (ddr_p, heap, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo));
- slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
- for (j = 0; VEC_iterate (slp_instance, slp_instances, j, instance); j++)
- vect_free_slp_instance (instance);
-
- VEC_free (slp_instance, heap, LOOP_VINFO_SLP_INSTANCES (loop_vinfo));
- VEC_free (gimple, heap, LOOP_VINFO_STRIDED_STORES (loop_vinfo));
-
- free (loop_vinfo);
- loop->aux = NULL;
-}
-
-
-/* Function vect_force_dr_alignment_p.
-
- Returns whether the alignment of a DECL can be forced to be aligned
- on ALIGNMENT bit boundary. */
-
-bool
-vect_can_force_dr_alignment_p (const_tree decl, unsigned int alignment)
-{
- if (TREE_CODE (decl) != VAR_DECL)
- return false;
-
- if (DECL_EXTERNAL (decl))
- return false;
-
- if (TREE_ASM_WRITTEN (decl))
- return false;
-
- if (TREE_STATIC (decl))
- return (alignment <= MAX_OFILE_ALIGNMENT);
- else
- return (alignment <= MAX_STACK_ALIGNMENT);
-}
-
-
-/* Function get_vectype_for_scalar_type.
-
- Returns the vector type corresponding to SCALAR_TYPE as supported
- by the target. */
-
-tree
-get_vectype_for_scalar_type (tree scalar_type)
-{
- enum machine_mode inner_mode = TYPE_MODE (scalar_type);
- int nbytes = GET_MODE_SIZE (inner_mode);
- int nunits;
- tree vectype;
-
- if (nbytes == 0 || nbytes >= UNITS_PER_SIMD_WORD (inner_mode))
- return NULL_TREE;
-
- /* FORNOW: Only a single vector size per mode (UNITS_PER_SIMD_WORD)
- is expected. */
- nunits = UNITS_PER_SIMD_WORD (inner_mode) / nbytes;
-
- vectype = build_vector_type (scalar_type, nunits);
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "get vectype with %d units of type ", nunits);
- print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
- }
-
- if (!vectype)
- return NULL_TREE;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "vectype: ");
- print_generic_expr (vect_dump, vectype, TDF_SLIM);
- }
-
- if (!VECTOR_MODE_P (TYPE_MODE (vectype))
- && !INTEGRAL_MODE_P (TYPE_MODE (vectype)))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "mode not supported by target.");
- return NULL_TREE;
- }
-
- return vectype;
-}
-
-
-/* Function vect_supportable_dr_alignment
-
- Return whether the data reference DR is supported with respect to its
- alignment. */
-
-enum dr_alignment_support
-vect_supportable_dr_alignment (struct data_reference *dr)
-{
- gimple stmt = DR_STMT (dr);
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- enum machine_mode mode = (int) TYPE_MODE (vectype);
- struct loop *vect_loop = LOOP_VINFO_LOOP (STMT_VINFO_LOOP_VINFO (stmt_info));
- bool nested_in_vect_loop = nested_in_vect_loop_p (vect_loop, stmt);
- bool invariant_in_outerloop = false;
-
- if (aligned_access_p (dr))
- return dr_aligned;
-
- if (nested_in_vect_loop)
- {
- tree outerloop_step = STMT_VINFO_DR_STEP (stmt_info);
- invariant_in_outerloop =
- (tree_int_cst_compare (outerloop_step, size_zero_node) == 0);
- }
-
- /* Possibly unaligned access. */
-
- /* We can choose between using the implicit realignment scheme (generating
- a misaligned_move stmt) and the explicit realignment scheme (generating
- aligned loads with a REALIGN_LOAD). There are two variants to the explicit
- realignment scheme: optimized, and unoptimized.
- We can optimize the realignment only if the step between consecutive
- vector loads is equal to the vector size. Since the vector memory
- accesses advance in steps of VS (Vector Size) in the vectorized loop, it
- is guaranteed that the misalignment amount remains the same throughout the
- execution of the vectorized loop. Therefore, we can create the
- "realignment token" (the permutation mask that is passed to REALIGN_LOAD)
- at the loop preheader.
-
- However, in the case of outer-loop vectorization, when vectorizing a
- memory access in the inner-loop nested within the LOOP that is now being
- vectorized, while it is guaranteed that the misalignment of the
- vectorized memory access will remain the same in different outer-loop
- iterations, it is *not* guaranteed that is will remain the same throughout
- the execution of the inner-loop. This is because the inner-loop advances
- with the original scalar step (and not in steps of VS). If the inner-loop
- step happens to be a multiple of VS, then the misalignment remains fixed
- and we can use the optimized realignment scheme. For example:
-
- for (i=0; i<N; i++)
- for (j=0; j<M; j++)
- s += a[i+j];
-
- When vectorizing the i-loop in the above example, the step between
- consecutive vector loads is 1, and so the misalignment does not remain
- fixed across the execution of the inner-loop, and the realignment cannot
- be optimized (as illustrated in the following pseudo vectorized loop):
-
- for (i=0; i<N; i+=4)
- for (j=0; j<M; j++){
- vs += vp[i+j]; // misalignment of &vp[i+j] is {0,1,2,3,0,1,2,3,...}
- // when j is {0,1,2,3,4,5,6,7,...} respectively.
- // (assuming that we start from an aligned address).
- }
-
- We therefore have to use the unoptimized realignment scheme:
-
- for (i=0; i<N; i+=4)
- for (j=k; j<M; j+=4)
- vs += vp[i+j]; // misalignment of &vp[i+j] is always k (assuming
- // that the misalignment of the initial address is
- // 0).
-
- The loop can then be vectorized as follows:
-
- for (k=0; k<4; k++){
- rt = get_realignment_token (&vp[k]);
- for (i=0; i<N; i+=4){
- v1 = vp[i+k];
- for (j=k; j<M; j+=4){
- v2 = vp[i+j+VS-1];
- va = REALIGN_LOAD <v1,v2,rt>;
- vs += va;
- v1 = v2;
- }
- }
- } */
-
- if (DR_IS_READ (dr))
- {
- if (optab_handler (vec_realign_load_optab, mode)->insn_code !=
- CODE_FOR_nothing
- && (!targetm.vectorize.builtin_mask_for_load
- || targetm.vectorize.builtin_mask_for_load ()))
- {
- tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- if (nested_in_vect_loop
- && (TREE_INT_CST_LOW (DR_STEP (dr))
- != GET_MODE_SIZE (TYPE_MODE (vectype))))
- return dr_explicit_realign;
- else
- return dr_explicit_realign_optimized;
- }
-
- if (optab_handler (movmisalign_optab, mode)->insn_code !=
- CODE_FOR_nothing)
- /* Can't software pipeline the loads, but can at least do them. */
- return dr_unaligned_supported;
- }
-
- /* Unsupported. */
- return dr_unaligned_unsupported;
-}
-
-
-/* Function vect_is_simple_use.
-
- Input:
- LOOP - the loop that is being vectorized.
- OPERAND - operand of a stmt in LOOP.
- DEF - the defining stmt in case OPERAND is an SSA_NAME.
-
- Returns whether a stmt with OPERAND can be vectorized.
- Supportable operands are constants, loop invariants, and operands that are
- defined by the current iteration of the loop. Unsupportable operands are
- those that are defined by a previous iteration of the loop (as is the case
- in reduction/induction computations). */
-
-bool
-vect_is_simple_use (tree operand, loop_vec_info loop_vinfo, gimple *def_stmt,
- tree *def, enum vect_def_type *dt)
-{
- basic_block bb;
- stmt_vec_info stmt_vinfo;
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-
- *def_stmt = NULL;
- *def = NULL_TREE;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "vect_is_simple_use: operand ");
- print_generic_expr (vect_dump, operand, TDF_SLIM);
- }
-
- if (TREE_CODE (operand) == INTEGER_CST || TREE_CODE (operand) == REAL_CST)
- {
- *dt = vect_constant_def;
- return true;
- }
- if (is_gimple_min_invariant (operand))
- {
- *def = operand;
- *dt = vect_invariant_def;
- return true;
- }
-
- if (TREE_CODE (operand) == PAREN_EXPR)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "non-associatable copy.");
- operand = TREE_OPERAND (operand, 0);
- }
- if (TREE_CODE (operand) != SSA_NAME)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "not ssa-name.");
- return false;
- }
-
- *def_stmt = SSA_NAME_DEF_STMT (operand);
- if (*def_stmt == NULL)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "no def_stmt.");
- return false;
- }
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "def_stmt: ");
- print_gimple_stmt (vect_dump, *def_stmt, 0, TDF_SLIM);
- }
-
- /* empty stmt is expected only in case of a function argument.
- (Otherwise - we expect a phi_node or a GIMPLE_ASSIGN). */
- if (gimple_nop_p (*def_stmt))
- {
- *def = operand;
- *dt = vect_invariant_def;
- return true;
- }
-
- bb = gimple_bb (*def_stmt);
- if (!flow_bb_inside_loop_p (loop, bb))
- *dt = vect_invariant_def;
- else
- {
- stmt_vinfo = vinfo_for_stmt (*def_stmt);
- *dt = STMT_VINFO_DEF_TYPE (stmt_vinfo);
- }
-
- if (*dt == vect_unknown_def_type)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Unsupported pattern.");
- return false;
- }
-
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "type of def: %d.",*dt);
-
- switch (gimple_code (*def_stmt))
- {
- case GIMPLE_PHI:
- *def = gimple_phi_result (*def_stmt);
- break;
-
- case GIMPLE_ASSIGN:
- *def = gimple_assign_lhs (*def_stmt);
- break;
-
- case GIMPLE_CALL:
- *def = gimple_call_lhs (*def_stmt);
- if (*def != NULL)
- break;
- /* FALLTHRU */
- default:
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "unsupported defining stmt: ");
- return false;
- }
-
- return true;
-}
-
-
-/* Function supportable_widening_operation
-
- Check whether an operation represented by the code CODE is a
- widening operation that is supported by the target platform in
- vector form (i.e., when operating on arguments of type VECTYPE).
-
- Widening operations we currently support are NOP (CONVERT), FLOAT
- and WIDEN_MULT. This function checks if these operations are supported
- by the target platform either directly (via vector tree-codes), or via
- target builtins.
-
- Output:
- - CODE1 and CODE2 are codes of vector operations to be used when
- vectorizing the operation, if available.
- - DECL1 and DECL2 are decls of target builtin functions to be used
- when vectorizing the operation, if available. In this case,
- CODE1 and CODE2 are CALL_EXPR.
- - MULTI_STEP_CVT determines the number of required intermediate steps in
- case of multi-step conversion (like char->short->int - in that case
- MULTI_STEP_CVT will be 1).
- - INTERM_TYPES contains the intermediate type required to perform the
- widening operation (short in the above example). */
-
-bool
-supportable_widening_operation (enum tree_code code, gimple stmt, tree vectype,
- tree *decl1, tree *decl2,
- enum tree_code *code1, enum tree_code *code2,
- int *multi_step_cvt,
- VEC (tree, heap) **interm_types)
-{
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- loop_vec_info loop_info = STMT_VINFO_LOOP_VINFO (stmt_info);
- struct loop *vect_loop = LOOP_VINFO_LOOP (loop_info);
- bool ordered_p;
- enum machine_mode vec_mode;
- enum insn_code icode1 = 0, icode2 = 0;
- optab optab1, optab2;
- tree type = gimple_expr_type (stmt);
- tree wide_vectype = get_vectype_for_scalar_type (type);
- enum tree_code c1, c2;
-
- /* The result of a vectorized widening operation usually requires two vectors
- (because the widened results do not fit int one vector). The generated
- vector results would normally be expected to be generated in the same
- order as in the original scalar computation, i.e. if 8 results are
- generated in each vector iteration, they are to be organized as follows:
- vect1: [res1,res2,res3,res4], vect2: [res5,res6,res7,res8].
-
- However, in the special case that the result of the widening operation is
- used in a reduction computation only, the order doesn't matter (because
- when vectorizing a reduction we change the order of the computation).
- Some targets can take advantage of this and generate more efficient code.
- For example, targets like Altivec, that support widen_mult using a sequence
- of {mult_even,mult_odd} generate the following vectors:
- vect1: [res1,res3,res5,res7], vect2: [res2,res4,res6,res8].
-
- When vectorizing outer-loops, we execute the inner-loop sequentially
- (each vectorized inner-loop iteration contributes to VF outer-loop
- iterations in parallel). We therefore don't allow to change the order
- of the computation in the inner-loop during outer-loop vectorization. */
-
- if (STMT_VINFO_RELEVANT (stmt_info) == vect_used_by_reduction
- && !nested_in_vect_loop_p (vect_loop, stmt))
- ordered_p = false;
- else
- ordered_p = true;
-
- if (!ordered_p
- && code == WIDEN_MULT_EXPR
- && targetm.vectorize.builtin_mul_widen_even
- && targetm.vectorize.builtin_mul_widen_even (vectype)
- && targetm.vectorize.builtin_mul_widen_odd
- && targetm.vectorize.builtin_mul_widen_odd (vectype))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "Unordered widening operation detected.");
-
- *code1 = *code2 = CALL_EXPR;
- *decl1 = targetm.vectorize.builtin_mul_widen_even (vectype);
- *decl2 = targetm.vectorize.builtin_mul_widen_odd (vectype);
- return true;
- }
-
- switch (code)
- {
- case WIDEN_MULT_EXPR:
- if (BYTES_BIG_ENDIAN)
- {
- c1 = VEC_WIDEN_MULT_HI_EXPR;
- c2 = VEC_WIDEN_MULT_LO_EXPR;
- }
- else
- {
- c2 = VEC_WIDEN_MULT_HI_EXPR;
- c1 = VEC_WIDEN_MULT_LO_EXPR;
- }
- break;
-
- CASE_CONVERT:
- if (BYTES_BIG_ENDIAN)
- {
- c1 = VEC_UNPACK_HI_EXPR;
- c2 = VEC_UNPACK_LO_EXPR;
- }
- else
- {
- c2 = VEC_UNPACK_HI_EXPR;
- c1 = VEC_UNPACK_LO_EXPR;
- }
- break;
-
- case FLOAT_EXPR:
- if (BYTES_BIG_ENDIAN)
- {
- c1 = VEC_UNPACK_FLOAT_HI_EXPR;
- c2 = VEC_UNPACK_FLOAT_LO_EXPR;
- }
- else
- {
- c2 = VEC_UNPACK_FLOAT_HI_EXPR;
- c1 = VEC_UNPACK_FLOAT_LO_EXPR;
- }
- break;
-
- case FIX_TRUNC_EXPR:
- /* ??? Not yet implemented due to missing VEC_UNPACK_FIX_TRUNC_HI_EXPR/
- VEC_UNPACK_FIX_TRUNC_LO_EXPR tree codes and optabs used for
- computing the operation. */
- return false;
-
- default:
- gcc_unreachable ();
- }
-
- if (code == FIX_TRUNC_EXPR)
- {
- /* The signedness is determined from output operand. */
- optab1 = optab_for_tree_code (c1, type, optab_default);
- optab2 = optab_for_tree_code (c2, type, optab_default);
- }
- else
- {
- optab1 = optab_for_tree_code (c1, vectype, optab_default);
- optab2 = optab_for_tree_code (c2, vectype, optab_default);
- }
-
- if (!optab1 || !optab2)
- return false;
-
- vec_mode = TYPE_MODE (vectype);
- if ((icode1 = optab_handler (optab1, vec_mode)->insn_code) == CODE_FOR_nothing
- || (icode2 = optab_handler (optab2, vec_mode)->insn_code)
- == CODE_FOR_nothing)
- return false;
-
- /* Check if it's a multi-step conversion that can be done using intermediate
- types. */
- if (insn_data[icode1].operand[0].mode != TYPE_MODE (wide_vectype)
- || insn_data[icode2].operand[0].mode != TYPE_MODE (wide_vectype))
- {
- int i;
- tree prev_type = vectype, intermediate_type;
- enum machine_mode intermediate_mode, prev_mode = vec_mode;
- optab optab3, optab4;
-
- if (!CONVERT_EXPR_CODE_P (code))
- return false;
-
- *code1 = c1;
- *code2 = c2;
-
- /* We assume here that there will not be more than MAX_INTERM_CVT_STEPS
- intermediate steps in promotion sequence. We try MAX_INTERM_CVT_STEPS
- to get to NARROW_VECTYPE, and fail if we do not. */
- *interm_types = VEC_alloc (tree, heap, MAX_INTERM_CVT_STEPS);
- for (i = 0; i < 3; i++)
- {
- intermediate_mode = insn_data[icode1].operand[0].mode;
- intermediate_type = lang_hooks.types.type_for_mode (intermediate_mode,
- TYPE_UNSIGNED (prev_type));
- optab3 = optab_for_tree_code (c1, intermediate_type, optab_default);
- optab4 = optab_for_tree_code (c2, intermediate_type, optab_default);
-
- if (!optab3 || !optab4
- || (icode1 = optab1->handlers[(int) prev_mode].insn_code)
- == CODE_FOR_nothing
- || insn_data[icode1].operand[0].mode != intermediate_mode
- || (icode2 = optab2->handlers[(int) prev_mode].insn_code)
- == CODE_FOR_nothing
- || insn_data[icode2].operand[0].mode != intermediate_mode
- || (icode1 = optab3->handlers[(int) intermediate_mode].insn_code)
- == CODE_FOR_nothing
- || (icode2 = optab4->handlers[(int) intermediate_mode].insn_code)
- == CODE_FOR_nothing)
- return false;
-
- VEC_quick_push (tree, *interm_types, intermediate_type);
- (*multi_step_cvt)++;
-
- if (insn_data[icode1].operand[0].mode == TYPE_MODE (wide_vectype)
- && insn_data[icode2].operand[0].mode == TYPE_MODE (wide_vectype))
- return true;
-
- prev_type = intermediate_type;
- prev_mode = intermediate_mode;
- }
-
- return false;
- }
-
- *code1 = c1;
- *code2 = c2;
- return true;
-}
-
-
-/* Function supportable_narrowing_operation
-
- Check whether an operation represented by the code CODE is a
- narrowing operation that is supported by the target platform in
- vector form (i.e., when operating on arguments of type VECTYPE).
-
- Narrowing operations we currently support are NOP (CONVERT) and
- FIX_TRUNC. This function checks if these operations are supported by
- the target platform directly via vector tree-codes.
-
- Output:
- - CODE1 is the code of a vector operation to be used when
- vectorizing the operation, if available.
- - MULTI_STEP_CVT determines the number of required intermediate steps in
- case of multi-step conversion (like int->short->char - in that case
- MULTI_STEP_CVT will be 1).
- - INTERM_TYPES contains the intermediate type required to perform the
- narrowing operation (short in the above example). */
-
-bool
-supportable_narrowing_operation (enum tree_code code,
- const_gimple stmt, tree vectype,
- enum tree_code *code1, int *multi_step_cvt,
- VEC (tree, heap) **interm_types)
-{
- enum machine_mode vec_mode;
- enum insn_code icode1;
- optab optab1, interm_optab;
- tree type = gimple_expr_type (stmt);
- tree narrow_vectype = get_vectype_for_scalar_type (type);
- enum tree_code c1;
- tree intermediate_type, prev_type;
- int i;
-
- switch (code)
- {
- CASE_CONVERT:
- c1 = VEC_PACK_TRUNC_EXPR;
- break;
-
- case FIX_TRUNC_EXPR:
- c1 = VEC_PACK_FIX_TRUNC_EXPR;
- break;
-
- case FLOAT_EXPR:
- /* ??? Not yet implemented due to missing VEC_PACK_FLOAT_EXPR
- tree code and optabs used for computing the operation. */
- return false;
-
- default:
- gcc_unreachable ();
- }
-
- if (code == FIX_TRUNC_EXPR)
- /* The signedness is determined from output operand. */
- optab1 = optab_for_tree_code (c1, type, optab_default);
- else
- optab1 = optab_for_tree_code (c1, vectype, optab_default);
-
- if (!optab1)
- return false;
-
- vec_mode = TYPE_MODE (vectype);
- if ((icode1 = optab_handler (optab1, vec_mode)->insn_code)
- == CODE_FOR_nothing)
- return false;
-
- /* Check if it's a multi-step conversion that can be done using intermediate
- types. */
- if (insn_data[icode1].operand[0].mode != TYPE_MODE (narrow_vectype))
- {
- enum machine_mode intermediate_mode, prev_mode = vec_mode;
-
- *code1 = c1;
- prev_type = vectype;
- /* We assume here that there will not be more than MAX_INTERM_CVT_STEPS
- intermediate steps in promotion sequence. We try MAX_INTERM_CVT_STEPS
- to get to NARROW_VECTYPE, and fail if we do not. */
- *interm_types = VEC_alloc (tree, heap, MAX_INTERM_CVT_STEPS);
- for (i = 0; i < 3; i++)
- {
- intermediate_mode = insn_data[icode1].operand[0].mode;
- intermediate_type = lang_hooks.types.type_for_mode (intermediate_mode,
- TYPE_UNSIGNED (prev_type));
- interm_optab = optab_for_tree_code (c1, intermediate_type,
- optab_default);
- if (!interm_optab
- || (icode1 = optab1->handlers[(int) prev_mode].insn_code)
- == CODE_FOR_nothing
- || insn_data[icode1].operand[0].mode != intermediate_mode
- || (icode1
- = interm_optab->handlers[(int) intermediate_mode].insn_code)
- == CODE_FOR_nothing)
- return false;
-
- VEC_quick_push (tree, *interm_types, intermediate_type);
- (*multi_step_cvt)++;
-
- if (insn_data[icode1].operand[0].mode == TYPE_MODE (narrow_vectype))
- return true;
-
- prev_type = intermediate_type;
- prev_mode = intermediate_mode;
- }
-
- return false;
- }
-
- *code1 = c1;
- return true;
-}
-
-
-/* Function reduction_code_for_scalar_code
-
- Input:
- CODE - tree_code of a reduction operations.
-
- Output:
- REDUC_CODE - the corresponding tree-code to be used to reduce the
- vector of partial results into a single scalar result (which
- will also reside in a vector).
-
- Return TRUE if a corresponding REDUC_CODE was found, FALSE otherwise. */
-
-bool
-reduction_code_for_scalar_code (enum tree_code code,
- enum tree_code *reduc_code)
-{
- switch (code)
- {
- case MAX_EXPR:
- *reduc_code = REDUC_MAX_EXPR;
- return true;
-
- case MIN_EXPR:
- *reduc_code = REDUC_MIN_EXPR;
- return true;
-
- case PLUS_EXPR:
- *reduc_code = REDUC_PLUS_EXPR;
- return true;
-
- default:
- return false;
- }
-}
-
-/* Error reporting helper for vect_is_simple_reduction below. GIMPLE statement
- STMT is printed with a message MSG. */
-
-static void
-report_vect_op (gimple stmt, const char *msg)
-{
- fprintf (vect_dump, "%s", msg);
- print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
-}
-
-/* Function vect_is_simple_reduction
-
- Detect a cross-iteration def-use cycle that represents a simple
- reduction computation. We look for the following pattern:
-
- loop_header:
- a1 = phi < a0, a2 >
- a3 = ...
- a2 = operation (a3, a1)
-
- such that:
- 1. operation is commutative and associative and it is safe to
- change the order of the computation.
- 2. no uses for a2 in the loop (a2 is used out of the loop)
- 3. no uses of a1 in the loop besides the reduction operation.
-
- Condition 1 is tested here.
- Conditions 2,3 are tested in vect_mark_stmts_to_be_vectorized. */
-
-gimple
-vect_is_simple_reduction (loop_vec_info loop_info, gimple phi)
-{
- struct loop *loop = (gimple_bb (phi))->loop_father;
- struct loop *vect_loop = LOOP_VINFO_LOOP (loop_info);
- edge latch_e = loop_latch_edge (loop);
- tree loop_arg = PHI_ARG_DEF_FROM_EDGE (phi, latch_e);
- gimple def_stmt, def1, def2;
- enum tree_code code;
- tree op1, op2;
- tree type;
- int nloop_uses;
- tree name;
- imm_use_iterator imm_iter;
- use_operand_p use_p;
-
- gcc_assert (loop == vect_loop || flow_loop_nested_p (vect_loop, loop));
-
- name = PHI_RESULT (phi);
- nloop_uses = 0;
- FOR_EACH_IMM_USE_FAST (use_p, imm_iter, name)
- {
- gimple use_stmt = USE_STMT (use_p);
- if (flow_bb_inside_loop_p (loop, gimple_bb (use_stmt))
- && vinfo_for_stmt (use_stmt)
- && !is_pattern_stmt_p (vinfo_for_stmt (use_stmt)))
- nloop_uses++;
- if (nloop_uses > 1)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "reduction used in loop.");
- return NULL;
- }
- }
-
- if (TREE_CODE (loop_arg) != SSA_NAME)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "reduction: not ssa_name: ");
- print_generic_expr (vect_dump, loop_arg, TDF_SLIM);
- }
- return NULL;
- }
-
- def_stmt = SSA_NAME_DEF_STMT (loop_arg);
- if (!def_stmt)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "reduction: no def_stmt.");
- return NULL;
- }
-
- if (!is_gimple_assign (def_stmt))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- print_gimple_stmt (vect_dump, def_stmt, 0, TDF_SLIM);
- return NULL;
- }
-
- name = gimple_assign_lhs (def_stmt);
- nloop_uses = 0;
- FOR_EACH_IMM_USE_FAST (use_p, imm_iter, name)
- {
- gimple use_stmt = USE_STMT (use_p);
- if (flow_bb_inside_loop_p (loop, gimple_bb (use_stmt))
- && vinfo_for_stmt (use_stmt)
- && !is_pattern_stmt_p (vinfo_for_stmt (use_stmt)))
- nloop_uses++;
- if (nloop_uses > 1)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "reduction used in loop.");
- return NULL;
- }
- }
-
- code = gimple_assign_rhs_code (def_stmt);
-
- if (!commutative_tree_code (code) || !associative_tree_code (code))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- report_vect_op (def_stmt, "reduction: not commutative/associative: ");
- return NULL;
- }
-
- if (get_gimple_rhs_class (code) != GIMPLE_BINARY_RHS)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- report_vect_op (def_stmt, "reduction: not binary operation: ");
- return NULL;
- }
-
- op1 = gimple_assign_rhs1 (def_stmt);
- op2 = gimple_assign_rhs2 (def_stmt);
- if (TREE_CODE (op1) != SSA_NAME || TREE_CODE (op2) != SSA_NAME)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- report_vect_op (def_stmt, "reduction: uses not ssa_names: ");
- return NULL;
- }
-
- /* Check that it's ok to change the order of the computation. */
- type = TREE_TYPE (gimple_assign_lhs (def_stmt));
- if (TYPE_MAIN_VARIANT (type) != TYPE_MAIN_VARIANT (TREE_TYPE (op1))
- || TYPE_MAIN_VARIANT (type) != TYPE_MAIN_VARIANT (TREE_TYPE (op2)))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "reduction: multiple types: operation type: ");
- print_generic_expr (vect_dump, type, TDF_SLIM);
- fprintf (vect_dump, ", operands types: ");
- print_generic_expr (vect_dump, TREE_TYPE (op1), TDF_SLIM);
- fprintf (vect_dump, ",");
- print_generic_expr (vect_dump, TREE_TYPE (op2), TDF_SLIM);
- }
- return NULL;
- }
-
- /* Generally, when vectorizing a reduction we change the order of the
- computation. This may change the behavior of the program in some
- cases, so we need to check that this is ok. One exception is when
- vectorizing an outer-loop: the inner-loop is executed sequentially,
- and therefore vectorizing reductions in the inner-loop during
- outer-loop vectorization is safe. */
-
- /* CHECKME: check for !flag_finite_math_only too? */
- if (SCALAR_FLOAT_TYPE_P (type) && !flag_associative_math
- && !nested_in_vect_loop_p (vect_loop, def_stmt))
- {
- /* Changing the order of operations changes the semantics. */
- if (vect_print_dump_info (REPORT_DETAILS))
- report_vect_op (def_stmt, "reduction: unsafe fp math optimization: ");
- return NULL;
- }
- else if (INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_TRAPS (type)
- && !nested_in_vect_loop_p (vect_loop, def_stmt))
- {
- /* Changing the order of operations changes the semantics. */
- if (vect_print_dump_info (REPORT_DETAILS))
- report_vect_op (def_stmt, "reduction: unsafe int math optimization: ");
- return NULL;
- }
- else if (SAT_FIXED_POINT_TYPE_P (type))
- {
- /* Changing the order of operations changes the semantics. */
- if (vect_print_dump_info (REPORT_DETAILS))
- report_vect_op (def_stmt,
- "reduction: unsafe fixed-point math optimization: ");
- return NULL;
- }
-
- /* reduction is safe. we're dealing with one of the following:
- 1) integer arithmetic and no trapv
- 2) floating point arithmetic, and special flags permit this optimization.
- */
- def1 = SSA_NAME_DEF_STMT (op1);
- def2 = SSA_NAME_DEF_STMT (op2);
- if (!def1 || !def2 || gimple_nop_p (def1) || gimple_nop_p (def2))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- report_vect_op (def_stmt, "reduction: no defs for operands: ");
- return NULL;
- }
-
-
- /* Check that one def is the reduction def, defined by PHI,
- the other def is either defined in the loop ("vect_loop_def"),
- or it's an induction (defined by a loop-header phi-node). */
-
- if (def2 == phi
- && flow_bb_inside_loop_p (loop, gimple_bb (def1))
- && (is_gimple_assign (def1)
- || STMT_VINFO_DEF_TYPE (vinfo_for_stmt (def1)) == vect_induction_def
- || (gimple_code (def1) == GIMPLE_PHI
- && STMT_VINFO_DEF_TYPE (vinfo_for_stmt (def1)) == vect_loop_def
- && !is_loop_header_bb_p (gimple_bb (def1)))))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- report_vect_op (def_stmt, "detected reduction:");
- return def_stmt;
- }
- else if (def1 == phi
- && flow_bb_inside_loop_p (loop, gimple_bb (def2))
- && (is_gimple_assign (def2)
- || STMT_VINFO_DEF_TYPE (vinfo_for_stmt (def2)) == vect_induction_def
- || (gimple_code (def2) == GIMPLE_PHI
- && STMT_VINFO_DEF_TYPE (vinfo_for_stmt (def2)) == vect_loop_def
- && !is_loop_header_bb_p (gimple_bb (def2)))))
- {
- /* Swap operands (just for simplicity - so that the rest of the code
- can assume that the reduction variable is always the last (second)
- argument). */
- if (vect_print_dump_info (REPORT_DETAILS))
- report_vect_op (def_stmt ,
- "detected reduction: need to swap operands:");
- swap_tree_operands (def_stmt, gimple_assign_rhs1_ptr (def_stmt),
- gimple_assign_rhs2_ptr (def_stmt));
- return def_stmt;
- }
- else
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- report_vect_op (def_stmt, "reduction: unknown pattern.");
- return NULL;
- }
-}
-
-
-/* Function vect_is_simple_iv_evolution.
-
- FORNOW: A simple evolution of an induction variables in the loop is
- considered a polynomial evolution with constant step. */
-
-bool
-vect_is_simple_iv_evolution (unsigned loop_nb, tree access_fn, tree * init,
- tree * step)
-{
- tree init_expr;
- tree step_expr;
- tree evolution_part = evolution_part_in_loop_num (access_fn, loop_nb);
-
- /* When there is no evolution in this loop, the evolution function
- is not "simple". */
- if (evolution_part == NULL_TREE)
- return false;
-
- /* When the evolution is a polynomial of degree >= 2
- the evolution function is not "simple". */
- if (tree_is_chrec (evolution_part))
- return false;
-
- step_expr = evolution_part;
- init_expr = unshare_expr (initial_condition_in_loop_num (access_fn, loop_nb));
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "step: ");
- print_generic_expr (vect_dump, step_expr, TDF_SLIM);
- fprintf (vect_dump, ", init: ");
- print_generic_expr (vect_dump, init_expr, TDF_SLIM);
- }
-
- *init = init_expr;
- *step = step_expr;
-
- if (TREE_CODE (step_expr) != INTEGER_CST)
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "step unknown.");
- return false;
- }
-
- return true;
-}
-
-
/* Function vectorize_loops.
Entry Point to loop vectorization phase. */
@@ -2849,6 +242,7 @@ vectorize_loops (void)
return num_vectorized_loops > 0 ? TODO_cleanup_cfg : 0;
}
+
/* Increase alignment of global arrays to improve vectorization potential.
TODO:
@@ -2871,49 +265,53 @@ increase_alignment (void)
unsigned int alignment;
if (TREE_CODE (TREE_TYPE (decl)) != ARRAY_TYPE)
- continue;
+ continue;
vectype = get_vectype_for_scalar_type (TREE_TYPE (TREE_TYPE (decl)));
if (!vectype)
- continue;
+ continue;
alignment = TYPE_ALIGN (vectype);
if (DECL_ALIGN (decl) >= alignment)
- continue;
+ continue;
if (vect_can_force_dr_alignment_p (decl, alignment))
- {
- DECL_ALIGN (decl) = TYPE_ALIGN (vectype);
- DECL_USER_ALIGN (decl) = 1;
- if (dump_file)
- {
- fprintf (dump_file, "Increasing alignment of decl: ");
- print_generic_expr (dump_file, decl, TDF_SLIM);
- }
- }
+ {
+ DECL_ALIGN (decl) = TYPE_ALIGN (vectype);
+ DECL_USER_ALIGN (decl) = 1;
+ if (dump_file)
+ {
+ fprintf (dump_file, "Increasing alignment of decl: ");
+ print_generic_expr (dump_file, decl, TDF_SLIM);
+ }
+ }
}
return 0;
}
+
static bool
gate_increase_alignment (void)
{
return flag_section_anchors && flag_tree_vectorize;
}
-struct simple_ipa_opt_pass pass_ipa_increase_alignment =
+
+struct simple_ipa_opt_pass pass_ipa_increase_alignment =
{
{
SIMPLE_IPA_PASS,
- "increase_alignment", /* name */
- gate_increase_alignment, /* gate */
- increase_alignment, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- 0, /* tv_id */
- 0, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- 0 /* todo_flags_finish */
+ "increase_alignment", /* name */
+ gate_increase_alignment, /* gate */
+ increase_alignment, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ 0, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0 /* todo_flags_finish */
}
};
+
+
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 84bd8ccd04d..2645ebef495 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -1,5 +1,6 @@
-/* Loop Vectorization
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+/* Vectorizer
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
+ Software Foundation, Inc.
Contributed by Dorit Naishlos <dorit@il.ibm.com>
This file is part of GCC.
@@ -21,6 +22,8 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_TREE_VECTORIZER_H
#define GCC_TREE_VECTORIZER_H
+#include "tree-data-ref.h"
+
typedef source_location LOC;
#define UNKNOWN_LOC UNKNOWN_LOCATION
#define EXPR_LOC(e) EXPR_LOCATION(e)
@@ -687,72 +690,124 @@ known_alignment_for_access_p (struct data_reference *data_ref_info)
/* vect_dump will be set to stderr or dump_file if exist. */
extern FILE *vect_dump;
+extern LOC vect_loop_location;
+
extern enum verbosity_levels vect_verbosity_level;
/* Bitmap of virtual variables to be renamed. */
extern bitmap vect_memsyms_to_rename;
+
/*-----------------------------------------------------------------*/
/* Function prototypes. */
/*-----------------------------------------------------------------*/
-/*************************************************************************
- Simple Loop Peeling Utilities - in tree-vectorizer.c
- *************************************************************************/
-/* Entry point for peeling of simple loops.
- Peel the first/last iterations of a loop.
- It can be used outside of the vectorizer for loops that are simple enough
- (see function documentation). In the vectorizer it is used to peel the
- last few iterations when the loop bound is unknown or does not evenly
- divide by the vectorization factor, and to peel the first few iterations
- to force the alignment of data references in the loop. */
-extern struct loop *slpeel_tree_peel_loop_to_edge
- (struct loop *, edge, tree, tree, bool, unsigned int, bool);
-extern void set_prologue_iterations (basic_block, tree,
- struct loop *, unsigned int);
-struct loop *tree_duplicate_loop_on_edge (struct loop *, edge);
+/* Simple loop peeling and versioning utilities for vectorizer's purposes -
+ in tree-vect-loop-manip.c. */
extern void slpeel_make_loop_iterate_ntimes (struct loop *, tree);
extern bool slpeel_can_duplicate_loop_p (const struct loop *, const_edge);
-#ifdef ENABLE_CHECKING
-extern void slpeel_verify_cfg_after_peeling (struct loop *, struct loop *);
-#endif
-
+extern void vect_loop_versioning (loop_vec_info);
+extern void vect_do_peeling_for_loop_bound (loop_vec_info, tree *);
+extern void vect_do_peeling_for_alignment (loop_vec_info);
+extern LOC find_loop_location (struct loop *);
+extern bool vect_can_advance_ivs_p (loop_vec_info);
-/*************************************************************************
- General Vectorization Utilities
- *************************************************************************/
-/** In tree-vectorizer.c **/
+/* In tree-vect-stmts.c. */
extern tree get_vectype_for_scalar_type (tree);
extern bool vect_is_simple_use (tree, loop_vec_info, gimple *, tree *,
enum vect_def_type *);
-extern bool vect_is_simple_iv_evolution (unsigned, tree, tree *, tree *);
-extern gimple vect_is_simple_reduction (loop_vec_info, gimple);
-extern bool vect_can_force_dr_alignment_p (const_tree, unsigned int);
-extern enum dr_alignment_support vect_supportable_dr_alignment
- (struct data_reference *);
-extern bool reduction_code_for_scalar_code (enum tree_code, enum tree_code *);
extern bool supportable_widening_operation (enum tree_code, gimple, tree,
- tree *, tree *, enum tree_code *, enum tree_code *,
- int *, VEC (tree, heap) **);
+ tree *, tree *, enum tree_code *,
+ enum tree_code *, int *,
+ VEC (tree, heap) **);
extern bool supportable_narrowing_operation (enum tree_code, const_gimple,
- tree, enum tree_code *, int *, VEC (tree, heap) **);
-
-/* Creation and deletion of loop and stmt info structs. */
-extern loop_vec_info new_loop_vec_info (struct loop *loop);
-extern void destroy_loop_vec_info (loop_vec_info, bool);
+ tree, enum tree_code *, int *,
+ VEC (tree, heap) **);
extern stmt_vec_info new_stmt_vec_info (gimple stmt, loop_vec_info);
extern void free_stmt_vec_info (gimple stmt);
-
-
-/** In tree-vect-analyze.c **/
-/* Driver for analysis stage. */
+extern tree vectorizable_function (gimple, tree, tree);
+extern void vect_model_simple_cost (stmt_vec_info, int, enum vect_def_type *,
+ slp_tree);
+extern void vect_model_store_cost (stmt_vec_info, int, enum vect_def_type,
+ slp_tree);
+extern void vect_model_load_cost (stmt_vec_info, int, slp_tree);
+extern void vect_finish_stmt_generation (gimple, gimple,
+ gimple_stmt_iterator *);
+extern bool vect_mark_stmts_to_be_vectorized (loop_vec_info);
+extern int cost_for_stmt (gimple);
+extern tree vect_get_vec_def_for_operand (tree, gimple, tree *);
+extern tree vect_init_vector (gimple, tree, tree,
+ gimple_stmt_iterator *);
+extern tree vect_get_vec_def_for_stmt_copy (enum vect_def_type, tree);
+extern bool vect_transform_stmt (gimple, gimple_stmt_iterator *,
+ bool *, slp_tree, slp_instance);
+extern void vect_remove_stores (gimple);
+extern bool vect_analyze_operations (loop_vec_info);
+
+/* In tree-vect-data-refs.c. */
+extern bool vect_can_force_dr_alignment_p (const_tree, unsigned int);
+extern enum dr_alignment_support vect_supportable_dr_alignment
+ (struct data_reference *);
+extern tree vect_get_smallest_scalar_type (gimple, HOST_WIDE_INT *,
+ HOST_WIDE_INT *);
+extern bool vect_analyze_data_ref_dependences (loop_vec_info);
+extern bool vect_enhance_data_refs_alignment (loop_vec_info);
+extern bool vect_analyze_data_refs_alignment (loop_vec_info);
+extern bool vect_analyze_data_ref_accesses (loop_vec_info);
+extern bool vect_prune_runtime_alias_test_list (loop_vec_info);
+extern bool vect_analyze_data_refs (loop_vec_info);
+extern tree vect_create_data_ref_ptr (gimple, struct loop *, tree, tree *,
+ gimple *, bool, bool *, tree);
+extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
+extern tree vect_create_destination_var (tree, tree);
+extern bool vect_strided_store_supported (tree);
+extern bool vect_strided_load_supported (tree);
+extern bool vect_permute_store_chain (VEC(tree,heap) *,unsigned int, gimple,
+ gimple_stmt_iterator *, VEC(tree,heap) **);
+extern tree vect_setup_realignment (gimple, gimple_stmt_iterator *, tree *,
+ enum dr_alignment_support, tree,
+ struct loop **);
+extern bool vect_permute_load_chain (VEC(tree,heap) *,unsigned int, gimple,
+ gimple_stmt_iterator *, VEC(tree,heap) **);
+extern bool vect_transform_strided_load (gimple, VEC(tree,heap) *, int,
+ gimple_stmt_iterator *);
+extern int vect_get_place_in_interleaving_chain (gimple, gimple);
+extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
+extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *,
+ tree, struct loop *);
+
+/* In tree-vect-loop.c. */
+/* FORNOW: Used in tree-parloops.c. */
+extern void destroy_loop_vec_info (loop_vec_info, bool);
+extern gimple vect_is_simple_reduction (loop_vec_info, gimple);
+/* Drive for loop analysis stage. */
extern loop_vec_info vect_analyze_loop (struct loop *);
-extern void vect_free_slp_instance (slp_instance);
+/* Drive for loop transformation stage. */
+extern void vect_transform_loop (loop_vec_info);
extern loop_vec_info vect_analyze_loop_form (struct loop *);
-extern tree vect_get_smallest_scalar_type (gimple, HOST_WIDE_INT *,
- HOST_WIDE_INT *);
+extern bool vectorizable_live_operation (gimple, gimple_stmt_iterator *,
+ gimple *);
+extern bool vectorizable_reduction (gimple, gimple_stmt_iterator *, gimple *);
+extern bool vectorizable_induction (gimple, gimple_stmt_iterator *, gimple *);
+extern int vect_estimate_min_profitable_iters (loop_vec_info);
+extern tree get_initial_def_for_reduction (gimple, tree, tree *);
+extern int vect_min_worthwhile_factor (enum tree_code);
+
-/** In tree-vect-patterns.c **/
+/* In tree-vect-slp.c. */
+extern void vect_free_slp_instance (slp_instance);
+extern bool vect_transform_slp_perm_load (gimple, VEC (tree, heap) *,
+ gimple_stmt_iterator *, int,
+ slp_instance, bool);
+extern bool vect_schedule_slp (loop_vec_info);
+extern void vect_update_slp_costs_according_to_vf (loop_vec_info);
+extern bool vect_analyze_slp (loop_vec_info);
+extern void vect_make_slp_decision (loop_vec_info);
+extern void vect_detect_hybrid_slp (loop_vec_info);
+extern void vect_get_slp_defs (slp_tree, VEC (tree,heap) **,
+ VEC (tree,heap) **);
+
+/* In tree-vect-patterns.c. */
/* Pattern recognition functions.
Additional pattern recognition functions can (and will) be added
in the future. */
@@ -760,46 +815,8 @@ typedef gimple (* vect_recog_func_ptr) (gimple, tree *, tree *);
#define NUM_PATTERNS 4
void vect_pattern_recog (loop_vec_info);
-
-/** In tree-vect-transform.c **/
-extern bool vectorizable_load (gimple, gimple_stmt_iterator *, gimple *,
- slp_tree, slp_instance);
-extern bool vectorizable_store (gimple, gimple_stmt_iterator *, gimple *,
- slp_tree);
-extern bool vectorizable_operation (gimple, gimple_stmt_iterator *, gimple *,
- slp_tree);
-extern bool vectorizable_type_promotion (gimple, gimple_stmt_iterator *,
- gimple *, slp_tree);
-extern bool vectorizable_type_demotion (gimple, gimple_stmt_iterator *,
- gimple *, slp_tree);
-extern bool vectorizable_conversion (gimple, gimple_stmt_iterator *, gimple *,
- slp_tree);
-extern bool vectorizable_assignment (gimple, gimple_stmt_iterator *, gimple *,
- slp_tree);
-extern tree vectorizable_function (gimple, tree, tree);
-extern bool vectorizable_call (gimple, gimple_stmt_iterator *, gimple *);
-extern bool vectorizable_condition (gimple, gimple_stmt_iterator *, gimple *);
-extern bool vectorizable_live_operation (gimple, gimple_stmt_iterator *,
- gimple *);
-extern bool vectorizable_reduction (gimple, gimple_stmt_iterator *, gimple *);
-extern bool vectorizable_induction (gimple, gimple_stmt_iterator *, gimple *);
-extern int vect_estimate_min_profitable_iters (loop_vec_info);
-extern void vect_model_simple_cost (stmt_vec_info, int, enum vect_def_type *,
- slp_tree);
-extern void vect_model_store_cost (stmt_vec_info, int, enum vect_def_type,
- slp_tree);
-extern void vect_model_load_cost (stmt_vec_info, int, slp_tree);
-extern bool vect_transform_slp_perm_load (gimple, VEC (tree, heap) *,
- gimple_stmt_iterator *, int, slp_instance, bool);
-
-/* Driver for transformation stage. */
-extern void vect_transform_loop (loop_vec_info);
-
-/*************************************************************************
- Vectorization Debug Information - in tree-vectorizer.c
- *************************************************************************/
+/* Vectorization debug information - in tree-vectorizer.c. */
extern bool vect_print_dump_info (enum verbosity_levels);
extern void vect_set_verbosity_level (const char *);
-extern LOC find_loop_location (struct loop *);
#endif /* GCC_TREE_VECTORIZER_H */
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 77fff6cf8c2..755b117e54a 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -5067,7 +5067,7 @@ check_array_ref (tree ref, const location_t *location, bool ignore_off_by_one)
address of an ARRAY_REF, and call check_array_ref on it. */
static void
-search_for_addr_array(tree t, const location_t *location)
+search_for_addr_array (tree t, const location_t *location)
{
while (TREE_CODE (t) == SSA_NAME)
{
@@ -5076,8 +5076,8 @@ search_for_addr_array(tree t, const location_t *location)
if (gimple_code (g) != GIMPLE_ASSIGN)
return;
- if (get_gimple_rhs_class (gimple_assign_rhs_code (g)) !=
- GIMPLE_SINGLE_RHS)
+ if (get_gimple_rhs_class (gimple_assign_rhs_code (g))
+ != GIMPLE_SINGLE_RHS)
return;
t = gimple_assign_rhs1 (g);
@@ -5094,7 +5094,7 @@ search_for_addr_array(tree t, const location_t *location)
if (TREE_CODE (t) == ARRAY_REF)
check_array_ref (t, location, true /*ignore_off_by_one*/);
- t = TREE_OPERAND(t,0);
+ t = TREE_OPERAND (t, 0);
}
while (handled_component_p (t));
}
diff --git a/gcc/tree.c b/gcc/tree.c
index 5c641ba3916..76cba271226 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -2098,8 +2098,7 @@ staticp (tree arg)
case COMPONENT_REF:
/* If the thing being referenced is not a field, then it is
something language specific. */
- if (TREE_CODE (TREE_OPERAND (arg, 1)) != FIELD_DECL)
- return (*lang_hooks.staticp) (arg);
+ gcc_assert (TREE_CODE (TREE_OPERAND (arg, 1)) == FIELD_DECL);
/* If we are referencing a bitfield, we can't evaluate an
ADDR_EXPR at compile time and so it isn't a constant. */
@@ -2122,14 +2121,13 @@ staticp (tree arg)
&& TREE_CODE (TREE_OPERAND (arg, 1)) == INTEGER_CST)
return staticp (TREE_OPERAND (arg, 0));
else
- return false;
+ return NULL;
+
+ case COMPOUND_LITERAL_EXPR:
+ return TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (arg)) ? arg : NULL;
default:
- if ((unsigned int) TREE_CODE (arg)
- >= (unsigned int) LAST_AND_UNUSED_TREE_CODE)
- return lang_hooks.staticp (arg);
- else
- return NULL;
+ return NULL;
}
}
@@ -9126,6 +9124,42 @@ block_nonartificial_location (tree block)
return ret;
}
+
+/* If EXP is inlined from an __attribute__((__artificial__))
+ function, return the location of the original call expression. */
+
+location_t
+tree_nonartificial_location (tree exp)
+{
+ tree block = TREE_BLOCK (exp);
+
+ while (block
+ && TREE_CODE (block) == BLOCK
+ && BLOCK_ABSTRACT_ORIGIN (block))
+ {
+ tree ao = BLOCK_ABSTRACT_ORIGIN (block);
+
+ do
+ {
+ if (TREE_CODE (ao) == FUNCTION_DECL
+ && DECL_DECLARED_INLINE_P (ao)
+ && lookup_attribute ("artificial", DECL_ATTRIBUTES (ao)))
+ return BLOCK_SOURCE_LOCATION (block);
+ else if (TREE_CODE (ao) == BLOCK
+ && BLOCK_SUPERCONTEXT (ao) != ao)
+ ao = BLOCK_SUPERCONTEXT (ao);
+ else
+ break;
+ }
+ while (ao);
+
+ block = BLOCK_SUPERCONTEXT (block);
+ }
+
+ return EXPR_LOCATION (exp);
+}
+
+
/* These are the hash table functions for the hash table of OPTIMIZATION_NODEq
nodes. */
diff --git a/gcc/tree.def b/gcc/tree.def
index c67581203d0..a8836c94b45 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -268,9 +268,8 @@ DEFTREECODE (LANG_TYPE, "lang_type", tcc_type, 0)
/* Contents are in TREE_INT_CST_LOW and TREE_INT_CST_HIGH fields,
32 bits each, giving us a 64 bit constant capability. INTEGER_CST
nodes can be shared, and therefore should be considered read only.
- They should be copied, before setting a flag such as
- TREE_OVERFLOW. If an INTEGER_CST has TREE_OVERFLOW or
- TREE_CONSTANT_OVERFLOW already set, it is known to be unique.
+ They should be copied, before setting a flag such as TREE_OVERFLOW.
+ If an INTEGER_CST has TREE_OVERFLOW already set, it is known to be unique.
INTEGER_CST nodes are created for the integral types, for pointer
types and for vector and float types in some circumstances. */
DEFTREECODE (INTEGER_CST, "integer_cst", tcc_constant, 0)
@@ -786,6 +785,13 @@ DEFTREECODE (NON_LVALUE_EXPR, "non_lvalue_expr", tcc_unary, 1)
generating insns. */
DEFTREECODE (VIEW_CONVERT_EXPR, "view_convert_expr", tcc_reference, 1)
+/* A COMPOUND_LITERAL_EXPR represents a literal that is placed in a DECL. The
+ COMPOUND_LITERAL_EXPR_DECL_EXPR is the a DECL_EXPR containing the decl
+ for the anonymous object represented by the COMPOUND_LITERAL;
+ the DECL_INITIAL of that decl is the CONSTRUCTOR that initializes
+ the compound literal. */
+DEFTREECODE (COMPOUND_LITERAL_EXPR, "compound_literal_expr", tcc_expression, 1)
+
/* Represents something we computed once and will use multiple times.
First operand is that expression. After it is evaluated once, it
will be replaced by the temporary variable that holds the value. */
diff --git a/gcc/tree.h b/gcc/tree.h
index 993a120b2c9..2efc9780bda 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1186,9 +1186,6 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
#define TREE_OVERFLOW(NODE) (CST_CHECK (NODE)->base.public_flag)
-/* ??? This is an obsolete synonym for TREE_OVERFLOW. */
-#define TREE_CONSTANT_OVERFLOW(NODE) TREE_OVERFLOW(NODE)
-
/* TREE_OVERFLOW can only be true for EXPR of CONSTANT_CLASS_P. */
#define TREE_OVERFLOW_P(EXPR) \
@@ -1590,6 +1587,12 @@ extern void protected_set_expr_location (tree, location_t);
#define EXIT_EXPR_COND(NODE) TREE_OPERAND (EXIT_EXPR_CHECK (NODE), 0)
+/* COMPOUND_LITERAL_EXPR accessors. */
+#define COMPOUND_LITERAL_EXPR_DECL_EXPR(NODE) \
+ TREE_OPERAND (COMPOUND_LITERAL_EXPR_CHECK (NODE), 0)
+#define COMPOUND_LITERAL_EXPR_DECL(NODE) \
+ DECL_EXPR_DECL (COMPOUND_LITERAL_EXPR_DECL_EXPR (NODE))
+
/* SWITCH_EXPR accessors. These give access to the condition, body and
original condition type (before any compiler conversions)
of the switch statement, respectively. */
@@ -1968,6 +1971,9 @@ struct varray_head_tag;
/* In a BLOCK node. */
#define BLOCK_VARS(NODE) (BLOCK_CHECK (NODE)->block.vars)
+#define BLOCK_NONLOCALIZED_VARS(NODE) (BLOCK_CHECK (NODE)->block.nonlocalized_vars)
+#define BLOCK_NUM_NONLOCALIZED_VARS(NODE) VEC_length (tree, BLOCK_NONLOCALIZED_VARS (NODE))
+#define BLOCK_NONLOCALIZED_VAR(NODE,N) VEC_index (tree, BLOCK_NONLOCALIZED_VARS (NODE), N)
#define BLOCK_SUBBLOCKS(NODE) (BLOCK_CHECK (NODE)->block.subblocks)
#define BLOCK_SUPERCONTEXT(NODE) (BLOCK_CHECK (NODE)->block.supercontext)
/* Note: when changing this, make sure to find the places
@@ -2022,6 +2028,8 @@ struct tree_block GTY(())
location_t locus;
tree vars;
+ VEC(tree,gc) *nonlocalized_vars;
+
tree subblocks;
tree supercontext;
tree abstract_origin;
@@ -2281,6 +2289,7 @@ struct tree_type GTY(())
unsigned user_align : 1;
unsigned int align;
+ alias_set_type alias_set;
tree pointer_to;
tree reference_to;
union tree_type_symtab {
@@ -2297,7 +2306,6 @@ struct tree_type GTY(())
tree binfo;
tree context;
tree canonical;
- alias_set_type alias_set;
/* Points to a structure whose details depend on the language in use. */
struct lang_type *lang_specific;
};
@@ -2721,10 +2729,9 @@ struct tree_decl_common GTY(())
unsigned gimple_reg_flag : 1;
/* In a DECL with pointer type, set if no TBAA should be done. */
unsigned no_tbaa_flag : 1;
- /* Padding so that 'align' can be on a 32-bit boundary. */
+ /* Padding so that 'off_align' can be on a 32-bit boundary. */
unsigned decl_common_unused : 2;
- unsigned int align : 24;
/* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */
unsigned int off_align : 8;
@@ -2733,6 +2740,9 @@ struct tree_decl_common GTY(())
tree attributes;
tree abstract_origin;
+ /* DECL_ALIGN. It should have the same size as TYPE_ALIGN. */
+ unsigned int align;
+
alias_set_type pointer_alias_set;
/* Points to a structure whose details depend on the language in use. */
struct lang_decl *lang_specific;
@@ -4847,6 +4857,8 @@ extern bool tree_call_nonnegative_warnv_p (tree, tree, tree, tree, bool *);
extern bool tree_expr_nonzero_warnv_p (tree, bool *);
extern bool fold_real_zero_addition_p (const_tree, const_tree, int);
+extern tree combine_comparisons (enum tree_code, enum tree_code,
+ enum tree_code, tree, tree, tree);
/* Return nonzero if CODE is a tree code that represents a truth value. */
static inline bool
@@ -4942,6 +4954,7 @@ extern void set_expr_locus (tree, source_location *);
extern tree *tree_block (tree);
extern location_t *block_nonartificial_location (tree);
+extern location_t tree_nonartificial_location (tree);
/* In function.c */
extern void expand_main_function (void);
diff --git a/gcc/tsystem.h b/gcc/tsystem.h
index cbd21dc1ed8..d1ccaaa238c 100644
--- a/gcc/tsystem.h
+++ b/gcc/tsystem.h
@@ -1,6 +1,6 @@
/* Get common system includes and various definitions and declarations
based on target macros.
- Copyright (C) 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2004, 2005, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -99,7 +99,7 @@ extern void *memset (void *, int, size_t);
extern int errno;
#endif
-/* GCC (fixproto) guarantees these system headers exist. */
+/* If these system headers do not exist, fixincludes must create them. */
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
@@ -107,7 +107,7 @@ extern int errno;
/* GCC supplies this header. */
#include <limits.h>
-/* GCC (fixproto) guarantees this system headers exists. */
+/* If these system headers do not exist, fixincludes must create them. */
#include <time.h>
#endif /* inhibit_libc */
diff --git a/gcc/varasm.c b/gcc/varasm.c
index c724fcd721e..e5b9f35fee9 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1677,7 +1677,7 @@ assemble_start_function (tree decl, const char *fnname)
/* When the function starts with a cold section, we need to explicitly
align the hot section and write out the hot section label.
But if the current function is a thunk, we do not have a CFG. */
- if (!crtl->is_thunk
+ if (!cfun->is_thunk
&& BB_PARTITION (ENTRY_BLOCK_PTR->next_bb) == BB_COLD_PARTITION)
{
switch_to_section (text_section);
diff --git a/gcc/varpool.c b/gcc/varpool.c
index 8b9821a9503..8c1259b14ec 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -456,29 +456,6 @@ varpool_empty_needed_queue (void)
varpool_last_needed_node = NULL;
}
-/* Output all variables enqueued to be assembled. */
-void
-varpool_output_debug_info (void)
-{
- timevar_push (TV_SYMOUT);
- if (errorcount == 0 && sorrycount == 0)
- while (varpool_assembled_nodes_queue)
- {
- struct varpool_node *node = varpool_assembled_nodes_queue;
-
- /* Local static variables are never seen by check_global_declarations
- so we need to output debug info by hand. */
- if (DECL_CONTEXT (node->decl)
- && (TREE_CODE (DECL_CONTEXT (node->decl)) == BLOCK
- || TREE_CODE (DECL_CONTEXT (node->decl)) == FUNCTION_DECL)
- && errorcount == 0 && sorrycount == 0)
- (*debug_hooks->global_decl) (node->decl);
- varpool_assembled_nodes_queue = node->next_needed;
- node->next_needed = 0;
- }
- timevar_pop (TV_SYMOUT);
-}
-
/* Create a new global variable of type TYPE. */
tree
add_new_static_var (tree type)
diff --git a/include/ChangeLog b/include/ChangeLog
index a07e075f713..64dd0d962af 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-17 Jason Merrill <jason@redhat.com>
+
+ * demangle.h (enum demangle_component_type): Add
+ DEMANGLE_COMPONENT_FUNCTION_PARAM.
+
2008-12-10 Jason Merrill <jason@redhat.com>
* demangle.h (enum demangle_component_type): Add
diff --git a/include/demangle.h b/include/demangle.h
index 28c69f5e78c..eb39c7c13c4 100644
--- a/include/demangle.h
+++ b/include/demangle.h
@@ -221,6 +221,8 @@ enum demangle_component_type
/* A template parameter. This holds a number, which is the template
parameter index. */
DEMANGLE_COMPONENT_TEMPLATE_PARAM,
+ /* A function parameter. This holds a number, which is the index. */
+ DEMANGLE_COMPONENT_FUNCTION_PARAM,
/* A constructor. This holds a name and the kind of
constructor. */
DEMANGLE_COMPONENT_CTOR,
@@ -466,10 +468,10 @@ struct demangle_component
int len;
} s_string;
- /* For DEMANGLE_COMPONENT_TEMPLATE_PARAM. */
+ /* For DEMANGLE_COMPONENT_*_PARAM. */
struct
{
- /* Template parameter index. */
+ /* Parameter index. */
long number;
} s_number;
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index d86092b677c..a9841c7314d 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,41 @@
+2009-03-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR preprocessor/34695
+ * makedepend.c: Remove.
+ * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
+ (all, clean, TAGS_SOURCES, include): Remove makedepend handling.
+ * directives.c (cpp_errors): Remove.
+ * errors.c (print_location, _cpp_begin_message, v_message):
+ Remove.
+ (cpp_error, cpp_error_with_line): Always use error callback.
+ (cpp_error, cpp_error_with_line, cpp_errno): Return bool.
+ * include/cpplib.h (cpp_options): Remove pedantic_errors,
+ inhibit_warnings, warn_system_headers, inhibit_errors,
+ warnings_are_errors, client_diagnostic.
+ (cpp_callbacks): Add extra arguments to error callback; make it
+ return bool.
+ (cpp_finish): Return void.
+ (cpp_destroy): Remove inaccurate comment about return value.
+ (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
+ (CPP_DL_NOTE): Define.
+ * include/line-map.h (linemap_print_containing_files): Remove.
+ * init.c (cpp_finish): Do not check for or return number of
+ errors.
+ * internal.h (cpp_reader): Remove errors field.
+ * line-map.c (linemap_print_containing_files): Remove.
+ * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
+ about previous definition. Only emit it if previous diagnostic
+ was emitted.
+
+2009-03-28 Joseph Myers <joseph@codesourcery.com>
+
+ * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
+ mkinstalldirs.
+
+2009-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
+
2009-02-21 Joseph Myers <joseph@codesourcery.com>
* lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
index 2d82ebdd8b3..8d99d721a64 100644
--- a/libcpp/Makefile.in
+++ b/libcpp/Makefile.in
@@ -1,7 +1,7 @@
# @configure_input@
# Makefile for libcpp. Run 'configure' to generate Makefile from Makefile.in
-# Copyright (C) 2004, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
#This file is part of libcpp.
@@ -73,13 +73,12 @@ ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS)
libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
mkdeps.o pch.o symtab.o traditional.o
-makedepend_OBJS = makedepend.o
libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \
expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
mkdeps.c pch.c symtab.c traditional.c
-all: libcpp.a makedepend$(EXEEXT) $(USED_CATALOGS)
+all: libcpp.a $(USED_CATALOGS)
.SUFFIXES:
.SUFFIXES: .c .gmo .o .obj .po .pox
@@ -89,12 +88,6 @@ libcpp.a: $(libcpp_a_OBJS)
$(AR) $(ARFLAGS) libcpp.a $(libcpp_a_OBJS)
$(RANLIB) libcpp.a
-makedepend$(EXEEXT): $(makedepend_OBJS) libcpp.a ../libiberty/libiberty.a
- @rm -f makedepend$(EXEEXT)
- $(CC) $(CFLAGS) $(LDFLAGS) -o makedepend$(EXEEXT) \
- $(makedepend_OBJS) libcpp.a ../libiberty/libiberty.a \
- $(LIBINTL) $(LIBICONV)
-
# Rules to rebuild the configuration
Makefile: $(srcdir)/Makefile.in config.status
@@ -166,7 +159,7 @@ mostlyclean:
-rm -f *.o
clean: mostlyclean
- -rm -rf makedepend$(EXEEXT) libcpp.a $(srcdir)/autom4te.cache
+ -rm -rf libcpp.a $(srcdir)/autom4te.cache
distclean: clean
-rm -f config.h stamp-h1 config.status config.cache config.log \
@@ -236,7 +229,7 @@ endif
# Rule for regenerating the message template.
$(PACKAGE).pot: po/$(PACKAGE).pot
po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
- mkinstalldirs $(srcdir)/po
+ $(mkinstalldirs) $(srcdir)/po
$(XGETTEXT) --default-domain=$(PACKAGE) \
--keyword=_ --keyword=N_ \
--keyword=cpp_error:3 --keyword=cpp_errno:3 \
@@ -248,7 +241,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
sed 's:$(srcdir)/::g' <po/$(PACKAGE).pot.tmp >po/$(PACKAGE).pot
rm po/$(PACKAGE).pot.tmp
-TAGS_SOURCES = $(libcpp_a_SOURCES) makedepend.c internal.h ucnid.h \
+TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \
include/line-map.h include/symtab.h include/cpp-id-data.h \
include/cpplib.h include/mkdeps.h system.h
@@ -260,7 +253,7 @@ TAGS: $(TAGS_SOURCES)
.NOEXPORT:
# Dependencies
--include $(patsubst %.o, $(DEPDIR)/%.Po, $(libcpp_a_OBJS) $(makedepend_OBJS))
+-include $(patsubst %.o, $(DEPDIR)/%.Po, $(libcpp_a_OBJS))
# Dependencies on generated headers have to be explicit.
init.o: localedir.h
diff --git a/libcpp/directives.c b/libcpp/directives.c
index 9e0744b23d9..f9e0fc2e6bc 100644
--- a/libcpp/directives.c
+++ b/libcpp/directives.c
@@ -1,7 +1,7 @@
/* CPP Library. (Directive handling.)
Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2007, 2008 Free Software Foundation, Inc.
+ 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Per Bothner, 1994-95.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -2299,13 +2299,6 @@ handle_assertion (cpp_reader *pfile, const char *str, int type)
run_directive (pfile, type, str, count);
}
-/* The number of errors for a given reader. */
-unsigned int
-cpp_errors (cpp_reader *pfile)
-{
- return pfile->errors;
-}
-
/* The options structure. */
cpp_options *
cpp_get_options (cpp_reader *pfile)
diff --git a/libcpp/errors.c b/libcpp/errors.c
index e3d56292848..c053f39355a 100644
--- a/libcpp/errors.c
+++ b/libcpp/errors.c
@@ -1,6 +1,6 @@
/* Default error handlers for CPP Library.
Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1998, 1999, 2000,
- 2001, 2002, 2004, 2008 Free Software Foundation, Inc.
+ 2001, 2002, 2004, 2008, 2009 Free Software Foundation, Inc.
Written by Per Bothner, 1994.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -28,171 +28,69 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "cpplib.h"
#include "internal.h"
-static void print_location (cpp_reader *, source_location, unsigned int);
-
-/* Print the logical file location (LINE, COL) in preparation for a
- diagnostic. Outputs the #include chain if it has changed. A line
- of zero suppresses the include stack, and outputs the program name
- instead. */
-static void
-print_location (cpp_reader *pfile, source_location line, unsigned int col)
-{
- if (line == 0)
- fprintf (stderr, "%s: ", progname);
- else
- {
- const struct line_map *map;
- linenum_type lin;
-
- map = linemap_lookup (pfile->line_table, line);
- linemap_print_containing_files (pfile->line_table, map);
-
- lin = SOURCE_LINE (map, line);
- if (col == 0)
- {
- col = SOURCE_COLUMN (map, line);
- if (col == 0)
- col = 1;
- }
-
- if (lin == 0)
- fprintf (stderr, "%s:", map->to_file);
- else if (CPP_OPTION (pfile, show_column) == 0)
- fprintf (stderr, "%s:%u:", map->to_file, lin);
- else
- fprintf (stderr, "%s:%u:%u:", map->to_file, lin, col);
-
- fputc (' ', stderr);
- }
-}
-
-/* Set up for a diagnostic: print the file and line, bump the error
- counter, etc. SRC_LOC is the logical line number; zero means to print
- at the location of the previously lexed token, which tends to be
- the correct place by default. The column number can be specified either
- using COLUMN or (if COLUMN==0) extracting SOURCE_COLUMN from SRC_LOC.
- (This may seem redundant, but is useful when pre-scanning (cleaning) a line,
- when we haven't yet verified whether the current line_map has a
- big enough max_column_hint.)
-
- Returns 0 if the error has been suppressed. */
-static int
-_cpp_begin_message (cpp_reader *pfile, int code,
- source_location src_loc, unsigned int column)
-{
- int level = CPP_DL_EXTRACT (code);
-
- switch (level)
- {
- case CPP_DL_WARNING:
- case CPP_DL_PEDWARN:
- if (cpp_in_system_header (pfile)
- && ! CPP_OPTION (pfile, warn_system_headers))
- return 0;
- /* Fall through. */
-
- case CPP_DL_WARNING_SYSHDR:
- if (CPP_OPTION (pfile, warnings_are_errors)
- || (level == CPP_DL_PEDWARN && CPP_OPTION (pfile, pedantic_errors)))
- {
- if (CPP_OPTION (pfile, inhibit_errors))
- return 0;
- level = CPP_DL_ERROR;
- pfile->errors++;
- }
- else if (CPP_OPTION (pfile, inhibit_warnings))
- return 0;
- break;
-
- case CPP_DL_ERROR:
- if (CPP_OPTION (pfile, inhibit_errors))
- return 0;
- /* ICEs cannot be inhibited. */
- case CPP_DL_ICE:
- pfile->errors++;
- break;
- }
-
- print_location (pfile, src_loc, column);
- if (CPP_DL_WARNING_P (level))
- fputs (_("warning: "), stderr);
- else if (level == CPP_DL_ICE)
- fputs (_("internal error: "), stderr);
- else
- fputs (_("error: "), stderr);
-
- return 1;
-}
-
-/* Don't remove the blank before do, as otherwise the exgettext
- script will mistake this as a function definition */
-#define v_message(msgid, ap) \
- do { vfprintf (stderr, _(msgid), ap); putc ('\n', stderr); } while (0)
-
-/* Exported interface. */
-
/* Print an error at the location of the previously lexed token. */
-void
+bool
cpp_error (cpp_reader * pfile, int level, const char *msgid, ...)
{
source_location src_loc;
va_list ap;
-
+ bool ret;
+
va_start (ap, msgid);
- if (CPP_OPTION (pfile, client_diagnostic))
- pfile->cb.error (pfile, level, _(msgid), &ap);
- else
+ if (CPP_OPTION (pfile, traditional))
{
- if (CPP_OPTION (pfile, traditional))
- {
- if (pfile->state.in_directive)
- src_loc = pfile->directive_line;
- else
- src_loc = pfile->line_table->highest_line;
- }
- /* We don't want to refer to a token before the beginning of the
- current run -- that is invalid. */
- else if (pfile->cur_token == pfile->cur_run->base)
- {
- if (pfile->cur_run->prev != NULL)
- src_loc = pfile->cur_run->prev->limit->src_loc;
- else
- src_loc = 0;
- }
+ if (pfile->state.in_directive)
+ src_loc = pfile->directive_line;
else
- {
- src_loc = pfile->cur_token[-1].src_loc;
- }
-
- if (_cpp_begin_message (pfile, level, src_loc, 0))
- v_message (msgid, ap);
+ src_loc = pfile->line_table->highest_line;
+ }
+ /* We don't want to refer to a token before the beginning of the
+ current run -- that is invalid. */
+ else if (pfile->cur_token == pfile->cur_run->base)
+ {
+ if (pfile->cur_run->prev != NULL)
+ src_loc = pfile->cur_run->prev->limit->src_loc;
+ else
+ src_loc = 0;
}
+ else
+ {
+ src_loc = pfile->cur_token[-1].src_loc;
+ }
+
+ if (!pfile->cb.error)
+ abort ();
+ ret = pfile->cb.error (pfile, level, src_loc, 0, _(msgid), &ap);
va_end (ap);
+ return ret;
}
/* Print an error at a specific location. */
-void
+bool
cpp_error_with_line (cpp_reader *pfile, int level,
source_location src_loc, unsigned int column,
const char *msgid, ...)
{
va_list ap;
+ bool ret;
va_start (ap, msgid);
- if (_cpp_begin_message (pfile, level, src_loc, column))
- v_message (msgid, ap);
+ if (!pfile->cb.error)
+ abort ();
+ ret = pfile->cb.error (pfile, level, src_loc, column, _(msgid), &ap);
va_end (ap);
+ return ret;
}
-void
+bool
cpp_errno (cpp_reader *pfile, int level, const char *msgid)
{
if (msgid[0] == '\0')
msgid = _("stdout");
- cpp_error (pfile, level, "%s: %s", msgid, xstrerror (errno));
+ return cpp_error (pfile, level, "%s: %s", msgid, xstrerror (errno));
}
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index 7faff381837..a53858b4d2f 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -1,6 +1,6 @@
/* Definitions for CPP library.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2007, 2008
+ 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
Written by Per Bothner, 1994-95.
@@ -302,22 +302,9 @@ struct cpp_options
/* Nonzero means print names of header files (-H). */
unsigned char print_include_names;
- /* Nonzero means cpp_pedwarn causes a hard error. */
- unsigned char pedantic_errors;
-
- /* Nonzero means don't print warning messages. */
- unsigned char inhibit_warnings;
-
/* Nonzero means complain about deprecated features. */
unsigned char warn_deprecated;
- /* Nonzero means don't suppress warnings from system headers. */
- unsigned char warn_system_headers;
-
- /* Nonzero means don't print error messages. Has no option to
- select it, but can be set by a user of cpplib (e.g. fix-header). */
- unsigned char inhibit_errors;
-
/* Nonzero means warn if slash-star appears in a comment. */
unsigned char warn_comments;
@@ -353,9 +340,6 @@ struct cpp_options
explicitly undefined. */
unsigned char warn_builtin_macro_redefined;
- /* Nonzero means turn warnings into errors. */
- unsigned char warnings_are_errors;
-
/* Nonzero means we should look for header.gcc files that remap file
names. */
unsigned char remap;
@@ -450,9 +434,6 @@ struct cpp_options
/* Nonzero means __STDC__ should have the value 0 in system headers. */
unsigned char stdc_0_in_system_headers;
- /* True means error callback should be used for diagnostics. */
- bool client_diagnostic;
-
/* True disables tokenization outside of preprocessing directives. */
bool directives_only;
};
@@ -492,10 +473,11 @@ struct cpp_callbacks
be expanded. */
cpp_hashnode * (*macro_to_expand) (cpp_reader *, const cpp_token *);
- /* Called to emit a diagnostic if client_diagnostic option is true.
- This callback receives the translated message. */
- void (*error) (cpp_reader *, int, const char *, va_list *)
- ATTRIBUTE_FPTR_PRINTF(3,0);
+ /* Called to emit a diagnostic. This callback receives the
+ translated message. */
+ bool (*error) (cpp_reader *, int, source_location, unsigned int,
+ const char *, va_list *)
+ ATTRIBUTE_FPTR_PRINTF(5,0);
/* Callbacks for when a macro is expanded, or tested (whether
defined or not at the time) in #ifdef, #ifndef or "defined". */
@@ -516,14 +498,17 @@ struct cpp_dir
char *name;
unsigned int len;
- /* The canonicalized NAME as determined by lrealpath. This field
- is only used by hosts that lack reliable inode numbers. */
- char *canonical_name;
-
/* One if a system header, two if a system header that has extern
"C" guards for C++. */
unsigned char sysp;
+ /* Is this a user-supplied directory? */
+ bool user_supplied_p;
+
+ /* The canonicalized NAME as determined by lrealpath. This field
+ is only used by hosts that lack reliable inode numbers. */
+ char *canonical_name;
+
/* Mapping of file names for this directory for MS-DOS and related
platforms. A NULL-terminated array of (from, to) pairs. */
const char **name_map;
@@ -538,9 +523,6 @@ struct cpp_dir
directories in the search path. */
ino_t ino;
dev_t dev;
-
- /* Is this a user-supplied directory? */
- bool user_supplied_p;
};
/* Name under which this program was invoked. */
@@ -697,19 +679,13 @@ extern void cpp_init_iconv (cpp_reader *);
/* Call this to finish preprocessing. If you requested dependency
generation, pass an open stream to write the information to,
- otherwise NULL. It is your responsibility to close the stream.
-
- Returns cpp_errors (pfile). */
-extern int cpp_finish (cpp_reader *, FILE *deps_stream);
+ otherwise NULL. It is your responsibility to close the stream. */
+extern void cpp_finish (cpp_reader *, FILE *deps_stream);
/* Call this to release the handle at the end of preprocessing. Any
- use of the handle after this function returns is invalid. Returns
- cpp_errors (pfile). */
+ use of the handle after this function returns is invalid. */
extern void cpp_destroy (cpp_reader *);
-/* Error count. */
-extern unsigned int cpp_errors (cpp_reader *);
-
extern unsigned int cpp_token_len (const cpp_token *);
extern unsigned char *cpp_token_as_text (cpp_reader *, const cpp_token *);
extern unsigned char *cpp_spell_token (cpp_reader *, const cpp_token *,
@@ -836,24 +812,21 @@ cpp_num cpp_num_sign_extend (cpp_num, size_t);
/* An internal consistency check failed. Prints "internal error: ",
otherwise the same as CPP_DL_ERROR. */
#define CPP_DL_ICE 0x04
-/* Extracts a diagnostic level from an int. */
-#define CPP_DL_EXTRACT(l) (l & 0xf)
-/* Nonzero if a diagnostic level is one of the warnings. */
-#define CPP_DL_WARNING_P(l) (CPP_DL_EXTRACT (l) >= CPP_DL_WARNING \
- && CPP_DL_EXTRACT (l) <= CPP_DL_PEDWARN)
+/* An informative note following a warning. */
+#define CPP_DL_NOTE 0x05
/* Output a diagnostic of some kind. */
-extern void cpp_error (cpp_reader *, int, const char *msgid, ...)
+extern bool cpp_error (cpp_reader *, int, const char *msgid, ...)
ATTRIBUTE_PRINTF_3;
/* Output a diagnostic with "MSGID: " preceding the
error string of errno. No location is printed. */
-extern void cpp_errno (cpp_reader *, int, const char *msgid);
+extern bool cpp_errno (cpp_reader *, int, const char *msgid);
/* Same as cpp_error, except additionally specifies a position as a
(translation unit) physical line and physical column. If the line is
zero, then no location is printed. */
-extern void cpp_error_with_line (cpp_reader *, int, source_location, unsigned,
+extern bool cpp_error_with_line (cpp_reader *, int, source_location, unsigned,
const char *msgid, ...) ATTRIBUTE_PRINTF_5;
/* In lex.c */
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index 81e888bc20f..a8ce298064b 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -1,5 +1,5 @@
/* Map logical line numbers to (source file, line number) pairs.
- Copyright (C) 2001, 2003, 2004, 2007
+ Copyright (C) 2001, 2003, 2004, 2007, 2008, 2009
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
@@ -144,12 +144,6 @@ extern const struct line_map *linemap_add
extern const struct line_map *linemap_lookup
(struct line_maps *, source_location);
-/* Print the file names and line numbers of the #include commands
- which led to the map MAP, if any, to stderr. Nothing is output if
- the most recently listed stack is the same as the current one. */
-extern void linemap_print_containing_files (struct line_maps *,
- const struct line_map *);
-
/* Converts a map and a source_location to source line. */
#define SOURCE_LINE(MAP, LOC) \
((((LOC) - (MAP)->start_location) >> (MAP)->column_bits) + (MAP)->to_line)
diff --git a/libcpp/init.c b/libcpp/init.c
index cc7a09ed8c2..ffba852032e 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -1,6 +1,7 @@
/* CPP Library.
Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
Contributed by Per Bothner, 1994-95.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -615,12 +616,11 @@ read_original_directory (cpp_reader *pfile)
}
/* This is called at the end of preprocessing. It pops the last
- buffer and writes dependency output, and returns the number of
- errors.
+ buffer and writes dependency output.
Maybe it should also reset state, such that you could call
cpp_start_read with a new filename to restart processing. */
-int
+void
cpp_finish (cpp_reader *pfile, FILE *deps_stream)
{
/* Warn about unused macros before popping the final buffer. */
@@ -635,9 +635,8 @@ cpp_finish (cpp_reader *pfile, FILE *deps_stream)
while (pfile->buffer)
_cpp_pop_buffer (pfile);
- /* Don't write the deps file if there are errors. */
if (CPP_OPTION (pfile, deps.style) != DEPS_NONE
- && deps_stream && pfile->errors == 0)
+ && deps_stream)
{
deps_write (pfile->deps, deps_stream, 72);
@@ -648,8 +647,6 @@ cpp_finish (cpp_reader *pfile, FILE *deps_stream)
/* Report on headers that could use multiple include guards. */
if (CPP_OPTION (pfile, print_include_names))
_cpp_report_missing_guards (pfile);
-
- return pfile->errors;
}
static void
diff --git a/libcpp/internal.h b/libcpp/internal.h
index af075b4b1c9..d4eeda4bc61 100644
--- a/libcpp/internal.h
+++ b/libcpp/internal.h
@@ -1,6 +1,6 @@
/* Part of CPP library.
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
- Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
+ 2008, 2009 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -388,9 +388,6 @@ struct cpp_reader
/* Nonzero prevents the lexer from re-using the token runs. */
unsigned int keep_tokens;
- /* Error counter for exit code. */
- unsigned int errors;
-
/* Buffer to hold macro definition string. */
unsigned char *macro_buffer;
unsigned int macro_buffer_len;
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
index 964a7cd9a77..2802c672aae 100644
--- a/libcpp/line-map.c
+++ b/libcpp/line-map.c
@@ -1,5 +1,5 @@
/* Map logical line numbers to (source file, line number) pairs.
- Copyright (C) 2001, 2003, 2004, 2007, 2008
+ Copyright (C) 2001, 2003, 2004, 2007, 2008, 2009
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
@@ -302,45 +302,6 @@ linemap_lookup (struct line_maps *set, source_location line)
return &set->maps[mn];
}
-/* Print the file names and line numbers of the #include commands
- which led to the map MAP, if any, to stderr. Nothing is output if
- the most recently listed stack is the same as the current one. */
-
-void
-linemap_print_containing_files (struct line_maps *set,
- const struct line_map *map)
-{
- if (MAIN_FILE_P (map) || set->last_listed == map->included_from)
- return;
-
- set->last_listed = map->included_from;
- map = INCLUDED_FROM (set, map);
-
- fprintf (stderr, _("In file included from %s:%u"),
- map->to_file, LAST_SOURCE_LINE (map));
-
- while (! MAIN_FILE_P (map))
- {
- map = INCLUDED_FROM (set, map);
- /* Translators note: this message is used in conjunction
- with "In file included from %s:%ld" and some other
- tricks. We want something like this:
-
- | In file included from sys/select.h:123,
- | from sys/types.h:234,
- | from userfile.c:31:
- | bits/select.h:45: <error message here>
-
- with all the "from"s lined up.
- The trailing comma is at the beginning of this message,
- and the trailing colon is not translated. */
- fprintf (stderr, _(",\n from %s:%u"),
- map->to_file, LAST_SOURCE_LINE (map));
- }
-
- fputs (":\n", stderr);
-}
-
/* Print an include trace, for e.g. the -H option of the preprocessor. */
static void
diff --git a/libcpp/macro.c b/libcpp/macro.c
index 8122648ea39..3a20c36ed39 100644
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -1,7 +1,7 @@
/* Part of CPP library. (Macro and #define handling.)
Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Written by Per Bothner, 1994.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -1807,11 +1807,13 @@ _cpp_create_definition (cpp_reader *pfile, cpp_hashnode *node)
if (warn_of_redefinition (pfile, node, macro))
{
- cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->directive_line, 0,
- "\"%s\" redefined", NODE_NAME (node));
+ bool warned;
+ warned = cpp_error_with_line (pfile, CPP_DL_PEDWARN,
+ pfile->directive_line, 0,
+ "\"%s\" redefined", NODE_NAME (node));
- if (node->type == NT_MACRO && !(node->flags & NODE_BUILTIN))
- cpp_error_with_line (pfile, CPP_DL_PEDWARN,
+ if (warned && node->type == NT_MACRO && !(node->flags & NODE_BUILTIN))
+ cpp_error_with_line (pfile, CPP_DL_NOTE,
node->value.macro->line, 0,
"this is the location of the previous definition");
}
diff --git a/libcpp/makedepend.c b/libcpp/makedepend.c
deleted file mode 100644
index c67f64e236e..00000000000
--- a/libcpp/makedepend.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/* Dependency generator utility.
- Copyright (C) 2004 Free Software Foundation, Inc.
- Contributed by Zack Weinberg, May 2004
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
-later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- In other words, you are welcome to use, share and improve this program.
- You are forbidden to forbid anyone else to use, share and improve
- what you give them. Help stamp out software-hoarding! */
-
-#include "config.h"
-#include "system.h"
-#include "line-map.h"
-#include "cpplib.h"
-#include "getopt.h"
-#include "mkdeps.h"
-
-const char *progname;
-const char *vpath;
-
-static const char *output_file;
-static bool had_errors;
-
-/* Option lists, to give to cpplib before each input file. */
-struct cmd_line_macro
-{
- struct cmd_line_macro *next;
- bool is_undef;
- const char *macro;
-};
-
-static struct cmd_line_macro *cmd_line_macros;
-static cpp_dir *cmd_line_searchpath;
-
-static void
-add_clm (const char *macro, bool is_undef)
-{
- struct cmd_line_macro *clm = XNEW (struct cmd_line_macro);
- clm->next = cmd_line_macros;
- clm->is_undef = is_undef;
- clm->macro = macro;
- cmd_line_macros = clm;
-}
-
-static void
-add_dir (char *name, bool sysp)
-{
- cpp_dir *dir = XNEW (cpp_dir);
- dir->next = cmd_line_searchpath;
- dir->name = name;
- dir->sysp = sysp;
- dir->construct = 0;
- dir->user_supplied_p = 1;
- cmd_line_searchpath = dir;
-}
-
-/* Command line processing. */
-
-static void ATTRIBUTE_NORETURN
-usage (int errcode)
-{
- fprintf (stderr,
-"usage: %s [-vh] [-V vpath] [-Dname[=def]...] [-Uname] [-Idir...] [-o file] sources...\n",
- progname);
- exit (errcode);
-}
-
-static int
-parse_options (int argc, char **argv)
-{
- static const struct option longopts[] = {
- { "--help", no_argument, 0, 'h' },
- { 0, 0, 0, 0 }
- };
-
- for (;;)
- switch (getopt_long (argc, argv, "hD:U:I:J:o:V:", longopts, 0))
- {
- case 'h': usage (0);
- case 'D': add_clm (optarg, false); break;
- case 'U': add_clm (optarg, true); break;
- case 'I': add_dir (optarg, false); break;
- case 'J': add_dir (optarg, true); break;
- case 'o':
- if (output_file)
- {
- fprintf (stderr, "%s: too many output files\n", progname);
- usage (2);
- }
- output_file = optarg;
- break;
- case 'V':
- if (vpath)
- {
- fprintf (stderr, "%s: too many vpaths\n", progname);
- usage (2);
- }
- vpath = optarg;
- break;
- case '?':
- usage (2); /* getopt has issued the error message. */
-
- case -1: /* end of options */
- if (optind == argc)
- {
- fprintf (stderr, "%s: no input files\n", progname);
- usage (2);
- }
- return optind;
-
- default:
- abort ();
- }
-}
-
-/* Set up cpplib from command line options. */
-static cpp_reader *
-reader_init (struct line_maps *line_table)
-{
- cpp_reader *reader;
- cpp_options *options;
-
- linemap_init (line_table);
- reader = cpp_create_reader (CLK_GNUC89, 0, line_table);
-
- /* Ignore warnings and errors (we don't have access to system
- headers). Request dependency output. */
- options = cpp_get_options (reader);
- options->inhibit_warnings = 1;
- options->inhibit_errors = 1;
- options->deps.style = DEPS_USER;
-
- /* Further initialization. */
- cpp_post_options (reader);
- cpp_init_iconv (reader);
- cpp_set_include_chains (reader, cmd_line_searchpath, cmd_line_searchpath,
- false);
- if (vpath)
- {
- struct deps *deps = cpp_get_deps (reader);
- deps_add_vpath (deps, vpath);
- }
-
- return reader;
-}
-
-/* Process one input source file. */
-static void
-process_file (const char *file)
-{
- struct line_maps line_table;
- cpp_reader *reader = reader_init (&line_table);
-
- if (!cpp_read_main_file (reader, file))
- had_errors = true;
- else
- {
- struct cmd_line_macro *clm;
-
- cpp_init_builtins (reader, true);
- for (clm = cmd_line_macros; clm; clm = clm->next)
- (clm->is_undef ? cpp_undef : cpp_define) (reader, clm->macro);
-
- cpp_scan_nooutput (reader);
- if (cpp_finish (reader, stdout))
- had_errors = true;
- }
- cpp_destroy (reader);
- linemap_free (&line_table);
-}
-
-/* Master control. */
-
-int
-main(int argc, char **argv)
-{
- int first_input, i;
-
- progname = argv[0];
- xmalloc_set_program_name (progname);
-
- first_input = parse_options (argc, argv);
- if (output_file)
- if (!freopen (output_file, "w", stdout))
- {
- perror (output_file);
- return 1;
- }
-
- for (i = first_input; i < argc; i++)
- process_file (argv[i]);
-
- return had_errors;
-}
diff --git a/libcpp/po/ChangeLog b/libcpp/po/ChangeLog
index 354082b7a01..f953ffbb54b 100644
--- a/libcpp/po/ChangeLog
+++ b/libcpp/po/ChangeLog
@@ -1,3 +1,11 @@
+2009-03-28 Joseph Myers <joseph@codesourcery.com>
+
+ * cpplib.pot: Regenerate.
+
+2009-03-04 Joseph Myers <joseph@codesourcery.com>
+
+ * es.po: Update.
+
2009-02-13 Joseph S. Myers <joseph@codesourcery.com>
* zh_CN.po: Update.
diff --git a/libcpp/po/cpplib.pot b/libcpp/po/cpplib.pot
index c4ae3af86c0..62c28846e4c 100644
--- a/libcpp/po/cpplib.pot
+++ b/libcpp/po/cpplib.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
-"POT-Creation-Date: 2008-11-18 20:02+0000\n"
+"POT-Creation-Date: 2009-03-28 06:55+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -398,7 +398,7 @@ msgid "unterminated #%s"
msgstr ""
#: directives-only.c:222
-#: lex.c:1138
+#: lex.c:1148
#: traditional.c:162
msgid "unterminated comment"
msgstr ""
@@ -748,28 +748,28 @@ msgstr ""
msgid "__VA_ARGS__ can only appear in the expansion of a C99 variadic macro"
msgstr ""
-#: lex.c:664
+#: lex.c:674
msgid "null character(s) preserved in literal"
msgstr ""
-#: lex.c:667
+#: lex.c:677
#, c-format
msgid "missing terminating %c character"
msgstr ""
-#: lex.c:1149
+#: lex.c:1159
msgid "C++ style comments are not allowed in ISO C90"
msgstr ""
-#: lex.c:1151
+#: lex.c:1161
msgid "(this will be reported only once per input file)"
msgstr ""
-#: lex.c:1156
+#: lex.c:1166
msgid "multi-line comment"
msgstr ""
-#: lex.c:1469
+#: lex.c:1480
#, c-format
msgid "unspellable token %s"
msgstr ""
@@ -924,28 +924,33 @@ msgstr ""
msgid "while writing precompiled header"
msgstr ""
-#: pch.c:485
+#: pch.c:484
+#, c-format
+msgid "%s: not used because `%.*s' is poisoned"
+msgstr ""
+
+#: pch.c:506
#, c-format
msgid "%s: not used because `%.*s' not defined"
msgstr ""
-#: pch.c:497
+#: pch.c:518
#, c-format
msgid "%s: not used because `%.*s' defined as `%s' not `%.*s'"
msgstr ""
-#: pch.c:538
+#: pch.c:559
#, c-format
msgid "%s: not used because `%s' is defined"
msgstr ""
-#: pch.c:558
+#: pch.c:579
#, c-format
msgid "%s: not used because `__COUNTER__' is invalid"
msgstr ""
-#: pch.c:567
-#: pch.c:737
+#: pch.c:588
+#: pch.c:758
msgid "while reading precompiled header"
msgstr ""
diff --git a/libcpp/po/es.po b/libcpp/po/es.po
index 8e45e979d69..b96ef24b2d0 100644
--- a/libcpp/po/es.po
+++ b/libcpp/po/es.po
@@ -1,14 +1,14 @@
-# Mensajes en español para cpplib-4.3.0
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Mensajes en español para cpplib-4.4-b20081121
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file is distributed under the same license as the gcc package.
-# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008.
+# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009.
#
msgid ""
msgstr ""
-"Project-Id-Version: cpplib-4.3.0\n"
+"Project-Id-Version: cpplib 4.4-b20081121\n"
"Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
"POT-Creation-Date: 2008-11-18 20:02+0000\n"
-"PO-Revision-Date: 2008-03-18 12:01-0600\n"
+"PO-Revision-Date: 2009-03-03 23:45-0600\n"
"Last-Translator: Cristian Othón Martínez Vera <cfuga@itam.mx>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
@@ -160,9 +160,9 @@ msgid "#%s is a GCC extension"
msgstr "#%s es una extensión de GCC"
#: directives.c:352
-#, fuzzy, c-format
+#, c-format
msgid "#%s is a deprecated GCC extension"
-msgstr "#%s es una extensión de GCC"
+msgstr "#%s es una extensión de GCC obsoleta"
#: directives.c:366
msgid "suggest not using #elif in traditional C"
@@ -267,7 +267,7 @@ msgstr "\"%s\" después de # no es un entero positivo"
#: directives.c:1042
#, c-format
msgid "%s"
-msgstr ""
+msgstr "%s"
#: directives.c:1066
#, c-format
@@ -522,14 +522,12 @@ msgid "\"%s\" is not defined"
msgstr "\"%s\" no está definido"
#: expr.c:756
-#, fuzzy
msgid "assertions are a GCC extension"
-msgstr "las constantes binarias son una extensión GCC"
+msgstr "las aserciones son una extensión GCC"
#: expr.c:759
-#, fuzzy
msgid "assertions are a deprecated extension"
-msgstr "las constantes binarias son una extensión GCC"
+msgstr "las aserciones son una extensión obsoleta"
#: expr.c:892 expr.c:921
#, c-format
@@ -546,9 +544,9 @@ msgid "missing expression between '(' and ')'"
msgstr "falta una expresión entre '(' y ')'"
#: expr.c:932
-#, fuzzy, c-format
+#, c-format
msgid "%s with no expression"
-msgstr "#if sin expresión"
+msgstr "%s sin expresión"
#: expr.c:935
#, c-format
@@ -565,9 +563,9 @@ msgid " ':' without preceding '?'"
msgstr " ':' sin una '?' precedente"
#: expr.c:994
-#, fuzzy, c-format
+#, c-format
msgid "unbalanced stack in %s"
-msgstr "pila desbalanceada en #if"
+msgstr "pila desbalanceada en %s"
#: expr.c:1014
#, c-format
@@ -830,7 +828,7 @@ msgstr "la función de macro \"%s\" se debe usar con argumentos en C tradicional"
#: macro.c:1016
#, c-format
msgid "invoking macro %s argument %d: empty macro arguments are undefined in ISO C90 and ISO C++98"
-msgstr ""
+msgstr "al invocar el macro %s argumento %d: los argumentos de macro vacíos están indefinidos en ISO C90 y en ISO C++98"
#: macro.c:1453
#, c-format
diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog
index 21943b9e9ae..864694a9daa 100644
--- a/libdecnumber/ChangeLog
+++ b/libdecnumber/ChangeLog
@@ -1,3 +1,12 @@
+2009-03-30 Ben Elliston <bje@au.ibm.com>
+
+ * decNumber.c, decNumber.h, decNumberLocal.h, decDouble.c,
+ decDouble.h, decSingle.c, decContext.c, decSingle.h, decPacked.c,
+ decCommon.c, decContext.h, decQuad.c, decPacked.h, decQuad.h,
+ decDPD.h, decBasic.c: Upgrade to decNumber 3.61.
+ * dpd/decimal128.h, dpd/decimal32.c, dpd/decimal32.h,
+ dpd/decimal64.c, dpd/decimal128.c, dpd/decimal64.h: Likewise.
+
2009-02-10 Joseph Myers <joseph@codesourcery.com>
* Makefile.in (clean): Don't remove makedepend$(EXEEXT).
diff --git a/libdecnumber/decBasic.c b/libdecnumber/decBasic.c
index fddba979053..06aa8bae320 100644
--- a/libdecnumber/decBasic.c
+++ b/libdecnumber/decBasic.c
@@ -32,8 +32,8 @@
/* decBasic.c -- common base code for Basic decimal types */
/* ------------------------------------------------------------------ */
/* This module comprises code that is shared between decDouble and */
-/* decQuad (but not decSingle). The main arithmetic operations are */
-/* here (Add, Subtract, Multiply, FMA, and Division operators). */
+/* decQuad (but not decSingle). The main arithmetic operations are */
+/* here (Add, Subtract, Multiply, FMA, and Division operators). */
/* */
/* Unlike decNumber, parameterization takes place at compile time */
/* rather than at runtime. The parameters are set in the decDouble.c */
@@ -59,7 +59,7 @@
#define DIVIDE 0x80000000 /* Divide operations [as flags] */
#define REMAINDER 0x40000000 /* .. */
#define DIVIDEINT 0x20000000 /* .. */
-#define REMNEAR 0x10000000 /* .. */
+#define REMNEAR 0x10000000 /* .. */
/* Private functions (local, used only by routines in this module) */
static decFloat *decDivide(decFloat *, const decFloat *,
@@ -81,7 +81,7 @@ static uInt decToInt32(const decFloat *, decContext *, enum rounding,
/* decCanonical -- copy a decFloat, making canonical */
/* */
/* result gets the canonicalized df */
-/* df is the decFloat to copy and make canonical */
+/* df is the decFloat to copy and make canonical */
/* returns result */
/* */
/* This is exposed via decFloatCanonical for Double and Quad only. */
@@ -141,14 +141,14 @@ static decFloat * decCanonical(decFloat *result, const decFloat *df) {
uoff-=32;
dpd|=encode<<(10-uoff); /* get pending bits */
}
- dpd&=0x3ff; /* clear uninteresting bits */
+ dpd&=0x3ff; /* clear uninteresting bits */
if (dpd<0x16e) continue; /* must be canonical */
canon=BIN2DPD[DPD2BIN[dpd]]; /* determine canonical declet */
if (canon==dpd) continue; /* have canonical declet */
/* need to replace declet */
if (uoff>=10) { /* all within current word */
encode&=~(0x3ff<<(uoff-10)); /* clear the 10 bits ready for replace */
- encode|=canon<<(uoff-10); /* insert the canonical form */
+ encode|=canon<<(uoff-10); /* insert the canonical form */
DFWORD(result, inword)=encode; /* .. and save */
continue;
}
@@ -167,16 +167,16 @@ static decFloat * decCanonical(decFloat *result, const decFloat *df) {
/* decDivide -- divide operations */
/* */
/* result gets the result of dividing dfl by dfr: */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
-/* op is the operation selector */
+/* op is the operation selector */
/* returns result */
/* */
/* op is one of DIVIDE, REMAINDER, DIVIDEINT, or REMNEAR. */
/* ------------------------------------------------------------------ */
#define DIVCOUNT 0 /* 1 to instrument subtractions counter */
-#define DIVBASE BILLION /* the base used for divide */
+#define DIVBASE ((uInt)BILLION) /* the base used for divide */
#define DIVOPLEN DECPMAX9 /* operand length ('digits' base 10**9) */
#define DIVACCLEN (DIVOPLEN*3) /* accumulator length (ditto) */
static decFloat * decDivide(decFloat *result, const decFloat *dfl,
@@ -184,17 +184,18 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
decFloat quotient; /* for remainders */
bcdnum num; /* for final conversion */
uInt acc[DIVACCLEN]; /* coefficent in base-billion .. */
- uInt div[DIVOPLEN]; /* divisor in base-billion .. */
+ uInt div[DIVOPLEN]; /* divisor in base-billion .. */
uInt quo[DIVOPLEN+1]; /* quotient in base-billion .. */
- uByte bcdacc[(DIVOPLEN+1)*9+2]; /* for quotient in BCD, +1, +1 */
+ uByte bcdacc[(DIVOPLEN+1)*9+2]; /* for quotient in BCD, +1, +1 */
uInt *msua, *msud, *msuq; /* -> msu of acc, div, and quo */
Int divunits, accunits; /* lengths */
Int quodigits; /* digits in quotient */
uInt *lsua, *lsuq; /* -> current acc and quo lsus */
Int length, multiplier; /* work */
uInt carry, sign; /* .. */
- uInt *ua, *ud, *uq; /* .. */
- uByte *ub; /* .. */
+ uInt *ua, *ud, *uq; /* .. */
+ uByte *ub; /* .. */
+ uInt uiwork; /* for macros */
uInt divtop; /* top unit of div adjusted for estimating */
#if DIVCOUNT
static uInt maxcount=0; /* worst-seen subtractions count */
@@ -235,7 +236,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
if (op&(REMAINDER|REMNEAR)) return decInvalid(result, set); /* bad rem */
set->status|=DEC_Division_by_zero;
DFWORD(result, 0)=num.sign;
- return decInfinity(result, result); /* x/0 -> signed Infinity */
+ return decInfinity(result, result); /* x/0 -> signed Infinity */
}
num.exponent=GETEXPUN(dfl)-GETEXPUN(dfr); /* ideal exponent */
if (DFISZERO(dfl)) { /* 0/x (x!=0) */
@@ -246,7 +247,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
DFWORD(result, 0)|=num.sign; /* add sign */
return result;
}
- if (!(op&DIVIDE)) { /* a remainder */
+ if (!(op&DIVIDE)) { /* a remainder */
/* exponent is the minimum of the operands */
num.exponent=MINI(GETEXPUN(dfl), GETEXPUN(dfr));
/* if the result is zero the sign shall be sign of dfl */
@@ -289,7 +290,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
#endif
/* set msu and lsu pointers */
- msua=acc+DIVACCLEN-1; /* [leading zeros removed below] */
+ msua=acc+DIVACCLEN-1; /* [leading zeros removed below] */
msuq=quo+DIVOPLEN;
/*[loop for div will terminate because operands are non-zero] */
for (msud=div+DIVOPLEN-1; *msud==0;) msud--;
@@ -298,7 +299,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
/* This moves one position towards the least possible for each */
/* iteration */
divunits=(Int)(msud-div+1); /* precalculate */
- lsua=msua-divunits+1; /* initial working lsu of acc */
+ lsua=msua-divunits+1; /* initial working lsu of acc */
lsuq=msuq; /* and of quo */
/* set up the estimator for the multiplier; this is the msu of div, */
@@ -371,7 +372,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
for (ud=msud, ua=msua; ud>div; ud--, ua--) if (*ud!=*ua) break;
/* [now at first mismatch or lsu] */
if (*ud>*ua) break; /* next time... */
- if (*ud==*ua) { /* all compared equal */
+ if (*ud==*ua) { /* all compared equal */
*lsuq+=1; /* increment result */
msua=lsua; /* collapse acc units */
*msua=0; /* .. to a zero */
@@ -418,10 +419,11 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
}
else if (divunits==1) {
mul=(uLong)*msua * DIVBASE + *(msua-1);
- mul/=*msud; /* no more to the right */
+ mul/=*msud; /* no more to the right */
}
else {
- mul=(uLong)(*msua) * (uInt)(DIVBASE<<2) + (*(msua-1)<<2);
+ mul=(uLong)(*msua) * (uInt)(DIVBASE<<2)
+ + (*(msua-1)<<2);
mul/=divtop; /* [divtop already allows for sticky bits] */
}
multiplier=(Int)mul;
@@ -540,10 +542,10 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
/* most significant end [offset by one into bcdacc to leave room */
/* for a possible carry digit if rounding for REMNEAR is needed] */
for (uq=msuq, ub=bcdacc+1; uq>=lsuq; uq--, ub+=9) {
- uInt top, mid, rem; /* work */
+ uInt top, mid, rem; /* work */
if (*uq==0) { /* no split needed */
- UINTAT(ub)=0; /* clear 9 BCD8s */
- UINTAT(ub+4)=0; /* .. */
+ UBFROMUI(ub, 0); /* clear 9 BCD8s */
+ UBFROMUI(ub+4, 0); /* .. */
*(ub+8)=0; /* .. */
continue;
}
@@ -558,11 +560,11 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
mid=rem/divsplit6;
rem=rem%divsplit6;
/* lay out the nine BCD digits (plus one unwanted byte) */
- UINTAT(ub) =UINTAT(&BIN2BCD8[top*4]);
- UINTAT(ub+3)=UINTAT(&BIN2BCD8[mid*4]);
- UINTAT(ub+6)=UINTAT(&BIN2BCD8[rem*4]);
+ UBFROMUI(ub, UBTOUI(&BIN2BCD8[top*4]));
+ UBFROMUI(ub+3, UBTOUI(&BIN2BCD8[mid*4]));
+ UBFROMUI(ub+6, UBTOUI(&BIN2BCD8[rem*4]));
} /* BCD conversion loop */
- ub--; /* -> lsu */
+ ub--; /* -> lsu */
/* complete the bcdnum; quodigits is correct, so the position of */
/* the first non-zero is known */
@@ -642,7 +644,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
num.msd--; /* use the 0 .. */
num.lsd=num.msd; /* .. at the new MSD place */
}
- if (reround!=0) { /* discarding non-zero */
+ if (reround!=0) { /* discarding non-zero */
uInt bump=0;
/* rounding is DEC_ROUND_HALF_EVEN always */
if (reround>5) bump=1; /* >0.5 goes up */
@@ -651,7 +653,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
if (bump!=0) { /* need increment */
/* increment the coefficient; this might end up with 1000... */
ub=num.lsd;
- for (; UINTAT(ub-3)==0x09090909; ub-=4) UINTAT(ub-3)=0;
+ for (; UBTOUI(ub-3)==0x09090909; ub-=4) UBFROMUI(ub-3, 0);
for (; *ub==9; ub--) *ub=0; /* at most 3 more */
*ub+=1;
if (ub<num.msd) num.msd--; /* carried */
@@ -680,7 +682,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
/* */
/* num gets the result of multiplying dfl and dfr */
/* bcdacc .. with the coefficient in this array */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* */
/* This effects the multiplication of two decFloats, both known to be */
@@ -695,7 +697,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
/* variables (Ints and uInts) or smaller; the other uses uLongs (for */
/* multiplication and addition only). Both implementations cover */
/* both arithmetic sizes (DOUBLE and QUAD) in order to allow timing */
-/* comparisons. In any one compilation only one implementation for */
+/* comparisons. In any one compilation only one implementation for */
/* each size can be used, and if DECUSE64 is 0 then use of the 32-bit */
/* version is forced. */
/* */
@@ -704,7 +706,7 @@ static decFloat * decDivide(decFloat *result, const decFloat *dfl,
/* during lazy carry splitting because the initial quotient estimate */
/* (est) can exceed 32 bits. */
-#define MULTBASE BILLION /* the base used for multiply */
+#define MULTBASE ((uInt)BILLION) /* the base used for multiply */
#define MULOPLEN DECPMAX9 /* operand length ('digits' base 10**9) */
#define MULACCLEN (MULOPLEN*2) /* accumulator length (ditto) */
#define LEADZEROS (MULACCLEN*9 - DECPMAX*2) /* leading zeros always */
@@ -723,11 +725,12 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc,
uInt bufl[MULOPLEN]; /* left coefficient (base-billion) */
uInt bufr[MULOPLEN]; /* right coefficient (base-billion) */
uInt *ui, *uj; /* work */
- uByte *ub; /* .. */
+ uByte *ub; /* .. */
+ uInt uiwork; /* for macros */
#if DECUSE64
- uLong accl[MULACCLEN]; /* lazy accumulator (base-billion+) */
- uLong *pl; /* work -> lazy accumulator */
+ uLong accl[MULACCLEN]; /* lazy accumulator (base-billion+) */
+ uLong *pl; /* work -> lazy accumulator */
uInt acc[MULACCLEN]; /* coefficent in base-billion .. */
#else
uInt acc[MULACCLEN*2]; /* accumulator in base-billion .. */
@@ -760,7 +763,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc,
/* zero the accumulator */
#if MULACCLEN==4
accl[0]=0; accl[1]=0; accl[2]=0; accl[3]=0;
- #else /* use a loop */
+ #else /* use a loop */
/* MULACCLEN is a multiple of four, asserted above */
for (pl=accl; pl<accl+MULACCLEN; pl+=4) {
*pl=0; *(pl+1)=0; *(pl+2)=0; *(pl+3)=0;/* [reduce overhead] */
@@ -812,8 +815,8 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc,
/* */
/* Type OPLEN A B maxX maxError maxCorrection */
/* --------------------------------------------------------- */
- /* DOUBLE 2 29 32 <2*10**18 0.63 1 */
- /* QUAD 4 30 31 <4*10**18 1.17 2 */
+ /* DOUBLE 2 29 32 <2*10**18 0.63 1 */
+ /* QUAD 4 30 31 <4*10**18 1.17 2 */
/* */
/* In the OPLEN==2 case there is most choice, but the value for B */
/* of 32 has a big advantage as then the calculation of the */
@@ -840,7 +843,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc,
for (pl=accl, pa=acc; pl<accl+MULACCLEN; pl++, pa++) { /* each column position */
uInt lo, hop; /* work */
uInt est; /* cannot exceed 4E+9 */
- if (*pl>MULTBASE) {
+ if (*pl>=MULTBASE) {
/* *pl holds a binary number which needs to be split */
hop=(uInt)(*pl>>MULSHIFTA);
est=(uInt)(((uLong)hop*MULMAGIC)>>MULSHIFTB);
@@ -905,7 +908,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc,
/* quotient/remainder has to be calculated for base-billion (1E+9). */
/* For this, Clark & Cowlishaw's quotient estimation approach (also */
/* used in decNumber) is needed, because 64-bit divide is generally */
- /* extremely slow on 32-bit machines. This algorithm splits X */
+ /* extremely slow on 32-bit machines. This algorithm splits X */
/* using: */
/* */
/* magic=2**(A+B)/1E+9; // 'magic number' */
@@ -927,8 +930,8 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc,
/* */
/* Type OPLEN A B maxX maxError maxCorrection */
/* --------------------------------------------------------- */
- /* DOUBLE 2 29 32 <2*10**18 0.63 1 */
- /* QUAD 4 30 31 <4*10**18 1.17 2 */
+ /* DOUBLE 2 29 32 <2*10**18 0.63 1 */
+ /* QUAD 4 30 31 <4*10**18 1.17 2 */
/* */
/* In the OPLEN==2 case there is most choice, but the value for B */
/* of 32 has a big advantage as then the calculation of the */
@@ -952,15 +955,15 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc,
printf("\n");
#endif
- for (pa=acc;; pa++) { /* each low uInt */
+ for (pa=acc;; pa++) { /* each low uInt */
uInt hi, lo; /* words of exact multiply result */
uInt hop, estlo; /* work */
#if QUAD
- uInt esthi; /* .. */
+ uInt esthi; /* .. */
#endif
lo=*pa;
- hi=*(pa+MULACCLEN); /* top 32 bits */
+ hi=*(pa+MULACCLEN); /* top 32 bits */
/* hi and lo now hold a binary number which needs to be split */
#if DOUBLE
@@ -1032,7 +1035,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc,
uInt top, mid, rem; /* work */
/* *pa is non-zero -- split the base-billion acc digit into */
/* hi, mid, and low three-digits */
- #define mulsplit9 1000000 /* divisor */
+ #define mulsplit9 1000000 /* divisor */
#define mulsplit6 1000 /* divisor */
/* The splitting is done by simple divides and remainders, */
/* assuming the compiler will optimize these where useful */
@@ -1042,13 +1045,13 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc,
mid=rem/mulsplit6;
rem=rem%mulsplit6;
/* lay out the nine BCD digits (plus one unwanted byte) */
- UINTAT(ub) =UINTAT(&BIN2BCD8[top*4]);
- UINTAT(ub+3)=UINTAT(&BIN2BCD8[mid*4]);
- UINTAT(ub+6)=UINTAT(&BIN2BCD8[rem*4]);
+ UBFROMUI(ub, UBTOUI(&BIN2BCD8[top*4]));
+ UBFROMUI(ub+3, UBTOUI(&BIN2BCD8[mid*4]));
+ UBFROMUI(ub+6, UBTOUI(&BIN2BCD8[rem*4]));
}
else { /* *pa==0 */
- UINTAT(ub)=0; /* clear 9 BCD8s */
- UINTAT(ub+4)=0; /* .. */
+ UBFROMUI(ub, 0); /* clear 9 BCD8s */
+ UBFROMUI(ub+4, 0); /* .. */
*(ub+8)=0; /* .. */
}
if (pa==acc) break;
@@ -1068,7 +1071,7 @@ static void decFiniteMultiply(bcdnum *num, uByte *bcdacc,
/* decFloatAbs -- absolute value, heeding NaNs, etc. */
/* */
/* result gets the canonicalized df with sign 0 */
-/* df is the decFloat to abs */
+/* df is the decFloat to abs */
/* set is the context */
/* returns result */
/* */
@@ -1090,26 +1093,45 @@ decFloat * decFloatAbs(decFloat *result, const decFloat *df,
/* decFloatAdd -- add two decFloats */
/* */
/* result gets the result of adding dfl and dfr: */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result */
/* */
/* ------------------------------------------------------------------ */
+#if QUAD
+/* Table for testing MSDs for fastpath elimination; returns the MSD of */
+/* a decDouble or decQuad (top 6 bits tested) ignoring the sign. */
+/* Infinities return -32 and NaNs return -128 so that summing the two */
+/* MSDs also allows rapid tests for the Specials (see code below). */
+const Int DECTESTMSD[64]={
+ 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 8, 9, -32, -128,
+ 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 8, 9, -32, -128};
+#else
+/* The table for testing MSDs is shared between the modules */
+extern const Int DECTESTMSD[64];
+#endif
+
decFloat * decFloatAdd(decFloat *result,
const decFloat *dfl, const decFloat *dfr,
decContext *set) {
bcdnum num; /* for final conversion */
- Int expl, expr; /* left and right exponents */
- uInt *ui, *uj; /* work */
- uByte *ub; /* .. */
+ Int bexpl, bexpr; /* left and right biased exponents */
+ uByte *ub, *us, *ut; /* work */
+ uInt uiwork; /* for macros */
+ #if QUAD
+ uShort uswork; /* .. */
+ #endif
uInt sourhil, sourhir; /* top words from source decFloats */
- /* [valid only until specials */
- /* handled or exponents decoded] */
+ /* [valid only through end of */
+ /* fastpath code -- before swap] */
uInt diffsign; /* non-zero if signs differ */
uInt carry; /* carry: 0 or 1 before add loop */
- Int overlap; /* coefficient overlap (if full) */
+ Int overlap; /* coefficient overlap (if full) */
+ Int summ; /* sum of the MSDs */
/* the following buffers hold coefficients with various alignments */
/* (see commentary and diagrams below) */
uByte acc[4+2+DECPMAX*3+8];
@@ -1117,48 +1139,116 @@ decFloat * decFloatAdd(decFloat *result,
uByte *umsd, *ulsd; /* local MSD and LSD pointers */
#if DECLITEND
- #define CARRYPAT 0x01000000 /* carry=1 pattern */
+ #define CARRYPAT 0x01000000 /* carry=1 pattern */
#else
- #define CARRYPAT 0x00000001 /* carry=1 pattern */
+ #define CARRYPAT 0x00000001 /* carry=1 pattern */
#endif
/* Start decoding the arguments */
- /* the initial exponents are placed into the opposite Ints to */
+ /* The initial exponents are placed into the opposite Ints to */
/* that which might be expected; there are two sets of data to */
/* keep track of (each decFloat and the corresponding exponent), */
/* and this scheme means that at the swap point (after comparing */
/* exponents) only one pair of words needs to be swapped */
- /* whichever path is taken (thereby minimising worst-case path) */
+ /* whichever path is taken (thereby minimising worst-case path). */
+ /* The calculated exponents will be nonsense when the arguments are */
+ /* Special, but are not used in that path */
sourhil=DFWORD(dfl, 0); /* LHS top word */
- expr=DECCOMBEXP[sourhil>>26]; /* get exponent high bits (in place) */
+ summ=DECTESTMSD[sourhil>>26]; /* get first MSD for testing */
+ bexpr=DECCOMBEXP[sourhil>>26]; /* get exponent high bits (in place) */
+ bexpr+=GETECON(dfl); /* .. + continuation */
+
sourhir=DFWORD(dfr, 0); /* RHS top word */
- expl=DECCOMBEXP[sourhir>>26];
+ summ+=DECTESTMSD[sourhir>>26]; /* sum MSDs for testing */
+ bexpl=DECCOMBEXP[sourhir>>26];
+ bexpl+=GETECON(dfr);
+
+ /* here bexpr has biased exponent from lhs, and vice versa */
diffsign=(sourhil^sourhir)&DECFLOAT_Sign;
- if (EXPISSPECIAL(expl | expr)) { /* either is special? */
- if (DFISNAN(dfl) || DFISNAN(dfr)) return decNaNs(result, dfl, dfr, set);
- /* one or two infinities */
- /* two infinities with different signs is invalid */
- if (diffsign && DFISINF(dfl) && DFISINF(dfr))
- return decInvalid(result, set);
- if (DFISINF(dfl)) return decInfinity(result, dfl); /* LHS is infinite */
- return decInfinity(result, dfr); /* RHS must be Infinite */
- }
+ /* now determine whether to take a fast path or the full-function */
+ /* slow path. The slow path must be taken when: */
+ /* -- both numbers are finite, and: */
+ /* the exponents are different, or */
+ /* the signs are different, or */
+ /* the sum of the MSDs is >8 (hence might overflow) */
+ /* specialness and the sum of the MSDs can be tested at once using */
+ /* the summ value just calculated, so the test for specials is no */
+ /* longer on the worst-case path (as of 3.60) */
+
+ if (summ<=8) { /* MSD+MSD is good, or there is a special */
+ if (summ<0) { /* there is a special */
+ /* Inf+Inf would give -64; Inf+finite is -32 or higher */
+ if (summ<-64) return decNaNs(result, dfl, dfr, set); /* one or two NaNs */
+ /* two infinities with different signs is invalid */
+ if (summ==-64 && diffsign) return decInvalid(result, set);
+ if (DFISINF(dfl)) return decInfinity(result, dfl); /* LHS is infinite */
+ return decInfinity(result, dfr); /* RHS must be Inf */
+ }
+ /* Here when both arguments are finite; fast path is possible */
+ /* (currently only for aligned and same-sign) */
+ if (bexpr==bexpl && !diffsign) {
+ uInt tac[DECLETS+1]; /* base-1000 coefficient */
+ uInt encode; /* work */
+
+ /* Get one coefficient as base-1000 and add the other */
+ GETCOEFFTHOU(dfl, tac); /* least-significant goes to [0] */
+ ADDCOEFFTHOU(dfr, tac);
+ /* here the sum of the MSDs (plus any carry) will be <10 due to */
+ /* the fastpath test earlier */
+
+ /* construct the result; low word is the same for both formats */
+ encode =BIN2DPD[tac[0]];
+ encode|=BIN2DPD[tac[1]]<<10;
+ encode|=BIN2DPD[tac[2]]<<20;
+ encode|=BIN2DPD[tac[3]]<<30;
+ DFWORD(result, (DECBYTES/4)-1)=encode;
+
+ /* collect next two declets (all that remains, for Double) */
+ encode =BIN2DPD[tac[3]]>>2;
+ encode|=BIN2DPD[tac[4]]<<8;
- /* Here when both arguments are finite */
+ #if QUAD
+ /* complete and lay out middling words */
+ encode|=BIN2DPD[tac[5]]<<18;
+ encode|=BIN2DPD[tac[6]]<<28;
+ DFWORD(result, 2)=encode;
+
+ encode =BIN2DPD[tac[6]]>>4;
+ encode|=BIN2DPD[tac[7]]<<6;
+ encode|=BIN2DPD[tac[8]]<<16;
+ encode|=BIN2DPD[tac[9]]<<26;
+ DFWORD(result, 1)=encode;
+
+ /* and final two declets */
+ encode =BIN2DPD[tac[9]]>>6;
+ encode|=BIN2DPD[tac[10]]<<4;
+ #endif
- /* complete exponent gathering (keeping swapped) */
- expr+=GETECON(dfl)-DECBIAS; /* .. + continuation and unbias */
- expl+=GETECON(dfr)-DECBIAS;
- /* here expr has exponent from lhs, and vice versa */
+ /* add exponent continuation and sign (from either argument) */
+ encode|=sourhil & (ECONMASK | DECFLOAT_Sign);
+
+ /* create lookup index = MSD + top two bits of biased exponent <<4 */
+ tac[DECLETS]|=(bexpl>>DECECONL)<<4;
+ encode|=DECCOMBFROM[tac[DECLETS]]; /* add constructed combination field */
+ DFWORD(result, 0)=encode; /* complete */
+
+ /* decFloatShow(result, ">"); */
+ return result;
+ } /* fast path OK */
+ /* drop through to slow path */
+ } /* low sum or Special(s) */
+
+ /* Slow path required -- arguments are finite and might overflow, */
+ /* or require alignment, or might have different signs */
/* now swap either exponents or argument pointers */
- if (expl<=expr) {
+ if (bexpl<=bexpr) {
/* original left is bigger */
- Int expswap=expl;
- expl=expr;
- expr=expswap;
+ Int bexpswap=bexpl;
+ bexpl=bexpr;
+ bexpr=bexpswap;
/* printf("left bigger\n"); */
}
else {
@@ -1167,7 +1257,7 @@ decFloat * decFloatAdd(decFloat *result,
dfr=dfswap;
/* printf("right bigger\n"); */
}
- /* [here dfl and expl refer to the datum with the larger exponent, */
+ /* [here dfl and bexpl refer to the datum with the larger exponent, */
/* of if the exponents are equal then the original LHS argument] */
/* if lhs is zero then result will be the rhs (now known to have */
@@ -1209,19 +1299,19 @@ decFloat * decFloatAdd(decFloat *result,
#if DOUBLE
#define COFF 4 /* offset into acc */
#elif QUAD
- USHORTAT(acc+4)=0; /* prefix 00 */
+ UBFROMUS(acc+4, 0); /* prefix 00 */
#define COFF 6 /* offset into acc */
#endif
GETCOEFF(dfl, acc+COFF); /* decode from decFloat */
ulsd=acc+COFF+DECPMAX-1;
umsd=acc+4; /* [having this here avoids */
- /* weird GCC optimizer failure] */
+
#if DECTRACE
{bcdnum tum;
tum.msd=umsd;
tum.lsd=ulsd;
- tum.exponent=expl;
+ tum.exponent=bexpl-DECBIAS;
tum.sign=DFWORD(dfl, 0) & DECFLOAT_Sign;
decShowNum(&tum, "dflx");}
#endif
@@ -1235,16 +1325,16 @@ decFloat * decFloatAdd(decFloat *result,
carry=0; /* assume no carry */
if (diffsign) {
carry=CARRYPAT; /* for +1 during add */
- UINTAT(acc+ 4)=0x09090909-UINTAT(acc+ 4);
- UINTAT(acc+ 8)=0x09090909-UINTAT(acc+ 8);
- UINTAT(acc+12)=0x09090909-UINTAT(acc+12);
- UINTAT(acc+16)=0x09090909-UINTAT(acc+16);
+ UBFROMUI(acc+ 4, 0x09090909-UBTOUI(acc+ 4));
+ UBFROMUI(acc+ 8, 0x09090909-UBTOUI(acc+ 8));
+ UBFROMUI(acc+12, 0x09090909-UBTOUI(acc+12));
+ UBFROMUI(acc+16, 0x09090909-UBTOUI(acc+16));
#if QUAD
- UINTAT(acc+20)=0x09090909-UINTAT(acc+20);
- UINTAT(acc+24)=0x09090909-UINTAT(acc+24);
- UINTAT(acc+28)=0x09090909-UINTAT(acc+28);
- UINTAT(acc+32)=0x09090909-UINTAT(acc+32);
- UINTAT(acc+36)=0x09090909-UINTAT(acc+36);
+ UBFROMUI(acc+20, 0x09090909-UBTOUI(acc+20));
+ UBFROMUI(acc+24, 0x09090909-UBTOUI(acc+24));
+ UBFROMUI(acc+28, 0x09090909-UBTOUI(acc+28));
+ UBFROMUI(acc+32, 0x09090909-UBTOUI(acc+32));
+ UBFROMUI(acc+36, 0x09090909-UBTOUI(acc+36));
#endif
} /* diffsign */
@@ -1252,9 +1342,9 @@ decFloat * decFloatAdd(decFloat *result,
/* it can be put straight into acc (with an appropriate gap, if */
/* needed) because no actual addition will be needed (except */
/* possibly to complete ten's complement) */
- overlap=DECPMAX-(expl-expr);
+ overlap=DECPMAX-(bexpl-bexpr);
#if DECTRACE
- printf("exps: %ld %ld\n", (LI)expl, (LI)expr);
+ printf("exps: %ld %ld\n", (LI)(bexpl-DECBIAS), (LI)(bexpr-DECBIAS));
printf("Overlap=%ld carry=%08lx\n", (LI)overlap, (LI)carry);
#endif
@@ -1274,13 +1364,13 @@ decFloat * decFloatAdd(decFloat *result,
/* safe because the lhs is non-zero]. */
gap=-overlap;
if (gap>DECPMAX) {
- expr+=gap-1;
+ bexpr+=gap-1;
gap=DECPMAX;
}
ub=ulsd+gap+1; /* where MSD will go */
/* Fill the gap with 0s; note that there is no addition to do */
- ui=&UINTAT(acc+COFF+DECPMAX); /* start of gap */
- for (; ui<&UINTAT(ub); ui++) *ui=0; /* mind the gap */
+ ut=acc+COFF+DECPMAX; /* start of gap */
+ for (; ut<ub; ut+=4) UBFROMUI(ut, 0); /* mind the gap */
if (overlap<-DECPMAX) { /* gap was > DECPMAX */
*ub=(uByte)(!DFISZERO(dfr)); /* make sticky digit */
}
@@ -1294,63 +1384,74 @@ decFloat * decFloatAdd(decFloat *result,
else { /* overlap>0 */
/* coefficients overlap (perhaps completely, although also */
/* perhaps only where zeros) */
- ub=buf+COFF+DECPMAX-overlap; /* where MSD will go */
- /* Fill the prefix gap with 0s; 8 will cover most common */
- /* unalignments, so start with direct assignments (a loop is */
- /* then used for any remaining -- the loop (and the one in a */
- /* moment) is not then on the critical path because the number */
- /* of additions is reduced by (at least) two in this case) */
- UINTAT(buf+4)=0; /* [clears decQuad 00 too] */
- UINTAT(buf+8)=0;
- if (ub>buf+12) {
- ui=&UINTAT(buf+12); /* start of any remaining */
- for (; ui<&UINTAT(ub); ui++) *ui=0; /* fill them */
- }
- GETCOEFF(dfr, ub); /* decode from decFloat */
-
- /* now move tail of rhs across to main acc; again use direct */
- /* assignment for 8 digits-worth */
- UINTAT(acc+COFF+DECPMAX)=UINTAT(buf+COFF+DECPMAX);
- UINTAT(acc+COFF+DECPMAX+4)=UINTAT(buf+COFF+DECPMAX+4);
- if (buf+COFF+DECPMAX+8<ub+DECPMAX) {
- uj=&UINTAT(buf+COFF+DECPMAX+8); /* source */
- ui=&UINTAT(acc+COFF+DECPMAX+8); /* target */
- for (; uj<&UINTAT(ub+DECPMAX); ui++, uj++) *ui=*uj;
+ if (overlap==DECPMAX) { /* aligned */
+ ub=buf+COFF; /* where msd will go */
+ #if QUAD
+ UBFROMUS(buf+4, 0); /* clear quad's 00 */
+ #endif
+ GETCOEFF(dfr, ub); /* decode from decFloat */
}
+ else { /* unaligned */
+ ub=buf+COFF+DECPMAX-overlap; /* where MSD will go */
+ /* Fill the prefix gap with 0s; 8 will cover most common */
+ /* unalignments, so start with direct assignments (a loop is */
+ /* then used for any remaining -- the loop (and the one in a */
+ /* moment) is not then on the critical path because the number */
+ /* of additions is reduced by (at least) two in this case) */
+ UBFROMUI(buf+4, 0); /* [clears decQuad 00 too] */
+ UBFROMUI(buf+8, 0);
+ if (ub>buf+12) {
+ ut=buf+12; /* start any remaining */
+ for (; ut<ub; ut+=4) UBFROMUI(ut, 0); /* fill them */
+ }
+ GETCOEFF(dfr, ub); /* decode from decFloat */
+
+ /* now move tail of rhs across to main acc; again use direct */
+ /* copies for 8 digits-worth */
+ UBFROMUI(acc+COFF+DECPMAX, UBTOUI(buf+COFF+DECPMAX));
+ UBFROMUI(acc+COFF+DECPMAX+4, UBTOUI(buf+COFF+DECPMAX+4));
+ if (buf+COFF+DECPMAX+8<ub+DECPMAX) {
+ us=buf+COFF+DECPMAX+8; /* source */
+ ut=acc+COFF+DECPMAX+8; /* target */
+ for (; us<ub+DECPMAX; us+=4, ut+=4) UBFROMUI(ut, UBTOUI(us));
+ }
+ } /* unaligned */
ulsd=acc+(ub-buf+DECPMAX-1); /* update LSD pointer */
- /* now do the add of the non-tail; this is all nicely aligned, */
+ /* Now do the add of the non-tail; this is all nicely aligned, */
/* and is over a multiple of four digits (because for Quad two */
- /* two 0 digits were added on the left); words in both acc and */
+ /* zero digits were added on the left); words in both acc and */
/* buf (buf especially) will often be zero */
- /* [byte-by-byte add, here, is about 15% slower than the by-fours] */
+ /* [byte-by-byte add, here, is about 15% slower total effect than */
+ /* the by-fours] */
/* Now effect the add; this is harder on a little-endian */
/* machine as the inter-digit carry cannot use the usual BCD */
/* addition trick because the bytes are loaded in the wrong order */
/* [this loop could be unrolled, but probably scarcely worth it] */
- ui=&UINTAT(acc+COFF+DECPMAX-4); /* target LSW (acc) */
- uj=&UINTAT(buf+COFF+DECPMAX-4); /* source LSW (buf, to add to acc) */
+ ut=acc+COFF+DECPMAX-4; /* target LSW (acc) */
+ us=buf+COFF+DECPMAX-4; /* source LSW (buf, to add to acc) */
#if !DECLITEND
- for (; ui>=&UINTAT(acc+4); ui--, uj--) {
+ for (; ut>=acc+4; ut-=4, us-=4) { /* big-endian add loop */
/* bcd8 add */
- carry+=*uj; /* rhs + carry */
+ carry+=UBTOUI(us); /* rhs + carry */
if (carry==0) continue; /* no-op */
- carry+=*ui; /* lhs */
+ carry+=UBTOUI(ut); /* lhs */
/* Big-endian BCD adjust (uses internal carry) */
carry+=0x76f6f6f6; /* note top nibble not all bits */
- *ui=(carry & 0x0f0f0f0f) - ((carry & 0x60606060)>>4); /* BCD adjust */
+ /* apply BCD adjust and save */
+ UBFROMUI(ut, (carry & 0x0f0f0f0f) - ((carry & 0x60606060)>>4));
carry>>=31; /* true carry was at far left */
} /* add loop */
#else
- for (; ui>=&UINTAT(acc+4); ui--, uj--) {
+ for (; ut>=acc+4; ut-=4, us-=4) { /* little-endian add loop */
/* bcd8 add */
- carry+=*uj; /* rhs + carry */
+ carry+=UBTOUI(us); /* rhs + carry */
if (carry==0) continue; /* no-op [common if unaligned] */
- carry+=*ui; /* lhs */
+ carry+=UBTOUI(ut); /* lhs */
/* Little-endian BCD adjust; inter-digit carry must be manual */
/* because the lsb from the array will be in the most-significant */
/* byte of carry */
@@ -1359,12 +1460,13 @@ decFloat * decFloatAdd(decFloat *result,
carry+=(carry & 0x00800000)>>15;
carry+=(carry & 0x00008000)>>15;
carry-=(carry & 0x60606060)>>4; /* BCD adjust back */
- *ui=carry & 0x0f0f0f0f; /* clear debris and save */
+ UBFROMUI(ut, carry & 0x0f0f0f0f); /* clear debris and save */
/* here, final carry-out bit is at 0x00000080; move it ready */
/* for next word-add (i.e., to 0x01000000) */
carry=(carry & 0x00000080)<<17;
} /* add loop */
#endif
+
#if DECTRACE
{bcdnum tum;
printf("Add done, carry=%08lx, diffsign=%ld\n", (LI)carry, (LI)diffsign);
@@ -1392,36 +1494,36 @@ decFloat * decFloatAdd(decFloat *result,
*(ulsd+1)=0;
#endif
/* there are always at least four coefficient words */
- UINTAT(umsd) =0x09090909-UINTAT(umsd);
- UINTAT(umsd+4) =0x09090909-UINTAT(umsd+4);
- UINTAT(umsd+8) =0x09090909-UINTAT(umsd+8);
- UINTAT(umsd+12)=0x09090909-UINTAT(umsd+12);
+ UBFROMUI(umsd, 0x09090909-UBTOUI(umsd));
+ UBFROMUI(umsd+4, 0x09090909-UBTOUI(umsd+4));
+ UBFROMUI(umsd+8, 0x09090909-UBTOUI(umsd+8));
+ UBFROMUI(umsd+12, 0x09090909-UBTOUI(umsd+12));
#if DOUBLE
#define BNEXT 16
#elif QUAD
- UINTAT(umsd+16)=0x09090909-UINTAT(umsd+16);
- UINTAT(umsd+20)=0x09090909-UINTAT(umsd+20);
- UINTAT(umsd+24)=0x09090909-UINTAT(umsd+24);
- UINTAT(umsd+28)=0x09090909-UINTAT(umsd+28);
- UINTAT(umsd+32)=0x09090909-UINTAT(umsd+32);
+ UBFROMUI(umsd+16, 0x09090909-UBTOUI(umsd+16));
+ UBFROMUI(umsd+20, 0x09090909-UBTOUI(umsd+20));
+ UBFROMUI(umsd+24, 0x09090909-UBTOUI(umsd+24));
+ UBFROMUI(umsd+28, 0x09090909-UBTOUI(umsd+28));
+ UBFROMUI(umsd+32, 0x09090909-UBTOUI(umsd+32));
#define BNEXT 36
#endif
if (ulsd>=umsd+BNEXT) { /* unaligned */
/* eight will handle most unaligments for Double; 16 for Quad */
- UINTAT(umsd+BNEXT)=0x09090909-UINTAT(umsd+BNEXT);
- UINTAT(umsd+BNEXT+4)=0x09090909-UINTAT(umsd+BNEXT+4);
+ UBFROMUI(umsd+BNEXT, 0x09090909-UBTOUI(umsd+BNEXT));
+ UBFROMUI(umsd+BNEXT+4, 0x09090909-UBTOUI(umsd+BNEXT+4));
#if DOUBLE
#define BNEXTY (BNEXT+8)
#elif QUAD
- UINTAT(umsd+BNEXT+8)=0x09090909-UINTAT(umsd+BNEXT+8);
- UINTAT(umsd+BNEXT+12)=0x09090909-UINTAT(umsd+BNEXT+12);
+ UBFROMUI(umsd+BNEXT+8, 0x09090909-UBTOUI(umsd+BNEXT+8));
+ UBFROMUI(umsd+BNEXT+12, 0x09090909-UBTOUI(umsd+BNEXT+12));
#define BNEXTY (BNEXT+16)
#endif
if (ulsd>=umsd+BNEXTY) { /* very unaligned */
- ui=&UINTAT(umsd+BNEXTY); /* -> continue */
- for (;;ui++) {
- *ui=0x09090909-*ui; /* invert four digits */
- if (ui>=&UINTAT(ulsd-3)) break; /* all done */
+ ut=umsd+BNEXTY; /* -> continue */
+ for (;;ut+=4) {
+ UBFROMUI(ut, 0x09090909-UBTOUI(ut)); /* invert four digits */
+ if (ut>=ulsd-3) break; /* all done */
}
}
}
@@ -1446,10 +1548,10 @@ decFloat * decFloatAdd(decFloat *result,
umsd=acc+COFF+DECPMAX-1; /* so far, so zero */
if (ulsd>umsd) { /* more to check */
umsd++; /* to align after checked area */
- for (; UINTAT(umsd)==0 && umsd+3<ulsd;) umsd+=4;
+ for (; UBTOUI(umsd)==0 && umsd+3<ulsd;) umsd+=4;
for (; *umsd==0 && umsd<ulsd;) umsd++;
}
- if (*umsd==0) { /* must be true zero (and diffsign) */
+ if (*umsd==0) { /* must be true zero (and diffsign) */
num.sign=0; /* assume + */
if (set->round==DEC_ROUND_FLOOR) num.sign=DECFLOAT_Sign;
}
@@ -1468,9 +1570,9 @@ decFloat * decFloatAdd(decFloat *result,
#endif
} /* same sign */
- num.msd=umsd; /* set MSD .. */
- num.lsd=ulsd; /* .. and LSD */
- num.exponent=expr; /* set exponent to smaller */
+ num.msd=umsd; /* set MSD .. */
+ num.lsd=ulsd; /* .. and LSD */
+ num.exponent=bexpr-DECBIAS; /* set exponent to smaller, unbiassed */
#if DECTRACE
decFloatShow(dfl, "dfl");
@@ -1484,12 +1586,12 @@ decFloat * decFloatAdd(decFloat *result,
/* decFloatAnd -- logical digitwise AND of two decFloats */
/* */
/* result gets the result of ANDing dfl and dfr */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result, which will be canonical with sign=0 */
/* */
-/* The operands must be positive, finite with exponent q=0, and */
+/* The operands must be positive, finite with exponent q=0, and */
/* comprise just zeros and ones; if not, Invalid operation results. */
/* ------------------------------------------------------------------ */
decFloat * decFloatAnd(decFloat *result,
@@ -1516,7 +1618,7 @@ decFloat * decFloatAnd(decFloat *result,
/* decFloatCanonical -- copy a decFloat, making canonical */
/* */
/* result gets the canonicalized df */
-/* df is the decFloat to copy and make canonical */
+/* df is the decFloat to copy and make canonical */
/* returns result */
/* */
/* This works on specials, too; no error or exception is possible. */
@@ -1528,7 +1630,7 @@ decFloat * decFloatCanonical(decFloat *result, const decFloat *df) {
/* ------------------------------------------------------------------ */
/* decFloatClass -- return the class of a decFloat */
/* */
-/* df is the decFloat to test */
+/* df is the decFloat to test */
/* returns the decClass that df falls into */
/* ------------------------------------------------------------------ */
enum decClass decFloatClass(const decFloat *df) {
@@ -1560,7 +1662,7 @@ enum decClass decFloatClass(const decFloat *df) {
/* ------------------------------------------------------------------ */
/* decFloatClassString -- return the class of a decFloat as a string */
/* */
-/* df is the decFloat to test */
+/* df is the decFloat to test */
/* returns a constant string describing the class df falls into */
/* ------------------------------------------------------------------ */
const char *decFloatClassString(const decFloat *df) {
@@ -1579,10 +1681,10 @@ const char *decFloatClassString(const decFloat *df) {
} /* decFloatClassString */
/* ------------------------------------------------------------------ */
-/* decFloatCompare -- compare two decFloats; quiet NaNs allowed */
+/* decFloatCompare -- compare two decFloats; quiet NaNs allowed */
/* */
/* result gets the result of comparing dfl and dfr */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result, which may be -1, 0, 1, or NaN (Unordered) */
@@ -1606,7 +1708,7 @@ decFloat * decFloatCompare(decFloat *result,
/* decFloatCompareSignal -- compare two decFloats; all NaNs signal */
/* */
/* result gets the result of comparing dfl and dfr */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result, which may be -1, 0, 1, or NaN (Unordered) */
@@ -1633,17 +1735,21 @@ decFloat * decFloatCompareSignal(decFloat *result,
/* decFloatCompareTotal -- compare two decFloats with total ordering */
/* */
/* result gets the result of comparing dfl and dfr */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* returns result, which may be -1, 0, or 1 */
/* ------------------------------------------------------------------ */
decFloat * decFloatCompareTotal(decFloat *result,
const decFloat *dfl, const decFloat *dfr) {
- Int comp; /* work */
+ Int comp; /* work */
+ uInt uiwork; /* for macros */
+ #if QUAD
+ uShort uswork; /* .. */
+ #endif
if (DFISNAN(dfl) || DFISNAN(dfr)) {
Int nanl, nanr; /* work */
/* morph NaNs to +/- 1 or 2, leave numbers as 0 */
- nanl=DFISSNAN(dfl)+DFISQNAN(dfl)*2; /* quiet > signalling */
+ nanl=DFISSNAN(dfl)+DFISQNAN(dfl)*2; /* quiet > signalling */
if (DFISSIGNED(dfl)) nanl=-nanl;
nanr=DFISSNAN(dfr)+DFISQNAN(dfr)*2;
if (DFISSIGNED(dfr)) nanr=-nanr;
@@ -1654,23 +1760,22 @@ decFloat * decFloatCompareTotal(decFloat *result,
uByte bufl[DECPMAX+4]; /* for LHS coefficient + foot */
uByte bufr[DECPMAX+4]; /* for RHS coefficient + foot */
uByte *ub, *uc; /* work */
- Int sigl; /* signum of LHS */
+ Int sigl; /* signum of LHS */
sigl=(DFISSIGNED(dfl) ? -1 : +1);
/* decode the coefficients */
/* (shift both right two if Quad to make a multiple of four) */
#if QUAD
- ub = bufl; /* avoid type-pun violation */
- USHORTAT(ub)=0;
- uc = bufr; /* avoid type-pun violation */
- USHORTAT(uc)=0;
+ UBFROMUS(bufl, 0);
+ UBFROMUS(bufr, 0);
#endif
GETCOEFF(dfl, bufl+QUAD*2); /* decode from decFloat */
GETCOEFF(dfr, bufr+QUAD*2); /* .. */
/* all multiples of four, here */
comp=0; /* assume equal */
for (ub=bufl, uc=bufr; ub<bufl+DECPMAX+QUAD*2; ub+=4, uc+=4) {
- if (UINTAT(ub)==UINTAT(uc)) continue; /* so far so same */
+ uInt ui=UBTOUI(ub);
+ if (ui==UBTOUI(uc)) continue; /* so far so same */
/* about to find a winner; go by bytes in case little-endian */
for (;; ub++, uc++) {
if (*ub==*uc) continue;
@@ -1696,7 +1801,7 @@ decFloat * decFloatCompareTotal(decFloat *result,
/* decFloatCompareTotalMag -- compare magnitudes with total ordering */
/* */
/* result gets the result of comparing abs(dfl) and abs(dfr) */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* returns result, which may be -1, 0, or 1 */
/* ------------------------------------------------------------------ */
@@ -1747,7 +1852,7 @@ decFloat * decFloatCopyAbs(decFloat *result, const decFloat *dfl) {
/* ------------------------------------------------------------------ */
/* decFloatCopyNegate -- copy a decFloat as-is with inverted sign bit */
/* */
-/* result gets the copy of dfl with sign bit inverted */
+/* result gets the copy of dfl with sign bit inverted */
/* dfl is the decFloat to copy */
/* returns result */
/* */
@@ -1760,10 +1865,10 @@ decFloat * decFloatCopyNegate(decFloat *result, const decFloat *dfl) {
} /* decFloatCopyNegate */
/* ------------------------------------------------------------------ */
-/* decFloatCopySign -- copy a decFloat with the sign of another */
+/* decFloatCopySign -- copy a decFloat with the sign of another */
/* */
-/* result gets the result of copying dfl with the sign of dfr */
-/* dfl is the first decFloat (lhs) */
+/* result gets the result of copying dfl with the sign of dfr */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* returns result */
/* */
@@ -1795,7 +1900,7 @@ decFloat * decFloatCopySign(decFloat *result,
/* next one is used when it is known that the declet must be */
/* non-zero, or is the final zero declet */
#define dpdlendun(n, form) {dpd=(form)&0x3ff; \
- if (dpd==0) return 1; \
+ if (dpd==0) return 1; \
return (DECPMAX-1-3*(n))-(3-DPD2BCD8[dpd*4+3]);}
uInt decFloatDigits(const decFloat *df) {
@@ -1819,7 +1924,7 @@ uInt decFloatDigits(const decFloat *df) {
} /* [cannot drop through] */
sourlo=DFWORD(df, 1); /* sourhi not involved now */
if (sourlo&0xfff00000) { /* in one of first two */
- dpdlenchk(1, sourlo>>30); /* very rare */
+ dpdlenchk(1, sourlo>>30); /* very rare */
dpdlendun(2, sourlo>>20);
} /* [cannot drop through] */
dpdlenchk(3, sourlo>>10);
@@ -1850,7 +1955,7 @@ uInt decFloatDigits(const decFloat *df) {
} /* [cannot drop through] */
sourlo=DFWORD(df, 3);
if (sourlo&0xfff00000) { /* in one of first two */
- dpdlenchk(7, sourlo>>30); /* very rare */
+ dpdlenchk(7, sourlo>>30); /* very rare */
dpdlendun(8, sourlo>>20);
} /* [cannot drop through] */
dpdlenchk(9, sourlo>>10);
@@ -1863,7 +1968,7 @@ uInt decFloatDigits(const decFloat *df) {
/* decFloatDivide -- divide a decFloat by another */
/* */
/* result gets the result of dividing dfl by dfr: */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result */
@@ -1880,7 +1985,7 @@ decFloat * decFloatDivide(decFloat *result,
/* decFloatDivideInteger -- integer divide a decFloat by another */
/* */
/* result gets the result of dividing dfl by dfr: */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result */
@@ -1896,9 +2001,9 @@ decFloat * decFloatDivideInteger(decFloat *result,
/* decFloatFMA -- multiply and add three decFloats, fused */
/* */
/* result gets the result of (dfl*dfr)+dff with a single rounding */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
-/* dff is the final decFloat (fhs) */
+/* dff is the final decFloat (fhs) */
/* set is the context */
/* returns result */
/* */
@@ -1906,21 +2011,23 @@ decFloat * decFloatDivideInteger(decFloat *result,
decFloat * decFloatFMA(decFloat *result, const decFloat *dfl,
const decFloat *dfr, const decFloat *dff,
decContext *set) {
+
/* The accumulator has the bytes needed for FiniteMultiply, plus */
/* one byte to the left in case of carry, plus DECPMAX+2 to the */
/* right for the final addition (up to full fhs + round & sticky) */
- #define FMALEN (1+ (DECPMAX9*18) +DECPMAX+2)
- uByte acc[FMALEN]; /* for multiplied coefficient in BCD */
+ #define FMALEN (ROUNDUP4(1+ (DECPMAX9*18+1) +DECPMAX+2))
+ uByte acc[FMALEN]; /* for multiplied coefficient in BCD */
/* .. and for final result */
bcdnum mul; /* for multiplication result */
bcdnum fin; /* for final operand, expanded */
- uByte coe[DECPMAX]; /* dff coefficient in BCD */
+ uByte coe[ROUNDUP4(DECPMAX)]; /* dff coefficient in BCD */
bcdnum *hi, *lo; /* bcdnum with higher/lower exponent */
uInt diffsign; /* non-zero if signs differ */
- uInt hipad; /* pad digit for hi if needed */
+ uInt hipad; /* pad digit for hi if needed */
Int padding; /* excess exponent */
- uInt carry; /* +1 for ten's complement and during add */
- uByte *ub, *uh, *ul; /* work */
+ uInt carry; /* +1 for ten's complement and during add */
+ uByte *ub, *uh, *ul; /* work */
+ uInt uiwork; /* for macros */
/* handle all the special values [any special operand leads to a */
/* special result] */
@@ -1971,8 +2078,8 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl,
GETCOEFF(dff, coe); /* extract the coefficient */
/* now set hi and lo so that hi points to whichever of mul and fin */
- /* has the higher exponent and lo point to the other [don't care if */
- /* the same] */
+ /* has the higher exponent and lo points to the other [don't care, */
+ /* if the same]. One coefficient will be in acc, the other in coe. */
if (mul.exponent>=fin.exponent) {
hi=&mul;
lo=&fin;
@@ -1983,22 +2090,23 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl,
}
/* remove leading zeros on both operands; this will save time later */
- /* and make testing for zero trivial */
- for (; UINTAT(hi->msd)==0 && hi->msd+3<hi->lsd;) hi->msd+=4;
+ /* and make testing for zero trivial (tests are safe because acc */
+ /* and coe are rounded up to uInts) */
+ for (; UBTOUI(hi->msd)==0 && hi->msd+3<hi->lsd;) hi->msd+=4;
for (; *hi->msd==0 && hi->msd<hi->lsd;) hi->msd++;
- for (; UINTAT(lo->msd)==0 && lo->msd+3<lo->lsd;) lo->msd+=4;
+ for (; UBTOUI(lo->msd)==0 && lo->msd+3<lo->lsd;) lo->msd+=4;
for (; *lo->msd==0 && lo->msd<lo->lsd;) lo->msd++;
/* if hi is zero then result will be lo (which has the smaller */
/* exponent), which also may need to be tested for zero for the */
/* weird IEEE 754 sign rules */
- if (*hi->msd==0 && hi->msd==hi->lsd) { /* hi is zero */
+ if (*hi->msd==0) { /* hi is zero */
/* "When the sum of two operands with opposite signs is */
/* exactly zero, the sign of that sum shall be '+' in all */
/* rounding modes except round toward -Infinity, in which */
/* mode that sign shall be '-'." */
if (diffsign) {
- if (*lo->msd==0 && lo->msd==lo->lsd) { /* lo is zero */
+ if (*lo->msd==0) { /* lo is zero */
lo->sign=0;
if (set->round==DEC_ROUND_FLOOR) lo->sign=DECFLOAT_Sign;
} /* diffsign && lo=0 */
@@ -2006,10 +2114,11 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl,
return decFinalize(result, lo, set); /* may need clamping */
} /* numfl is zero */
/* [here, both are minimal length and hi is non-zero] */
+ /* (if lo is zero then padding with zeros may be needed, below) */
/* if signs differ, take the ten's complement of hi (zeros to the */
- /* right do not matter because the complement of zero is zero); */
- /* the +1 is done later, as part of the addition, inserted at the */
+ /* right do not matter because the complement of zero is zero); the */
+ /* +1 is done later, as part of the addition, inserted at the */
/* correct digit */
hipad=0;
carry=0;
@@ -2017,7 +2126,7 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl,
hipad=9;
carry=1;
/* exactly the correct number of digits must be inverted */
- for (uh=hi->msd; uh<hi->lsd-3; uh+=4) UINTAT(uh)=0x09090909-UINTAT(uh);
+ for (uh=hi->msd; uh<hi->lsd-3; uh+=4) UBFROMUI(uh, 0x09090909-UBTOUI(uh));
for (; uh<=hi->lsd; uh++) *uh=(uByte)(0x09-*uh);
}
@@ -2032,7 +2141,8 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl,
/* printf("FMA pad %ld\n", (LI)padding); */
/* the result of the addition will be built into the accumulator, */
- /* starting from the far right; this could be either hi or lo */
+ /* starting from the far right; this could be either hi or lo, and */
+ /* will be aligned */
ub=acc+FMALEN-1; /* where lsd of result will go */
ul=lo->lsd; /* lsd of rhs */
@@ -2042,45 +2152,43 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl,
/* digit at the right place, as it stays clear of hi digits */
/* [it must be DECPMAX+2 because during a subtraction the msd */
/* could become 0 after a borrow from 1.000 to 0.9999...] */
- Int hilen=(Int)(hi->lsd-hi->msd+1); /* lengths */
- Int lolen=(Int)(lo->lsd-lo->msd+1); /* .. */
- Int newexp=MINI(hi->exponent, hi->exponent+hilen-DECPMAX)-3;
- Int reduce=newexp-lo->exponent;
- if (reduce>0) { /* [= case gives reduce=0 nop] */
+
+ Int hilen=(Int)(hi->lsd-hi->msd+1); /* length of hi */
+ Int lolen=(Int)(lo->lsd-lo->msd+1); /* and of lo */
+
+ if (hilen+padding-lolen > DECPMAX+2) { /* can reduce lo to single */
+ /* make sure it is virtually at least DECPMAX from hi->msd, at */
+ /* least to right of hi->lsd (in case of destructive subtract), */
+ /* and separated by at least two digits from either of those */
+ /* (the tricky DOUBLE case is when hi is a 1 that will become a */
+ /* 0.9999... by subtraction: */
+ /* hi: 1 E+16 */
+ /* lo: .................1000000000000000 E-16 */
+ /* which for the addition pads to: */
+ /* hi: 1000000000000000000 E-16 */
+ /* lo: .................1000000000000000 E-16 */
+ Int newexp=MINI(hi->exponent, hi->exponent+hilen-DECPMAX)-3;
+
/* printf("FMA reduce: %ld\n", (LI)reduce); */
- if (reduce>=lolen) { /* eating all */
- lo->lsd=lo->msd; /* reduce to single digit */
- lo->exponent=newexp; /* [known to be non-zero] */
- }
- else { /* < */
- uByte *up=lo->lsd;
- lo->lsd=lo->lsd-reduce;
- if (*lo->lsd==0) /* could need sticky bit */
- for (; up>lo->lsd; up--) { /* search discarded digits */
- if (*up!=0) { /* found one... */
- *lo->lsd=1; /* set sticky bit */
- break;
- }
- }
- lo->exponent+=reduce;
- }
- padding=hi->exponent-lo->exponent; /* recalculate */
- ul=lo->lsd; /* .. */
- } /* maybe reduce */
- /* padding is now <= DECPMAX+2 but still > 0; tricky DOUBLE case */
- /* is when hi is a 1 that will become a 0.9999... by subtraction: */
- /* hi: 1 E+16 */
- /* lo: .................1000000000000000 E-16 */
- /* which for the addition pads and reduces to: */
- /* hi: 1000000000000000000 E-2 */
- /* lo: .................1 E-2 */
+ lo->lsd=lo->msd; /* to single digit [maybe 0] */
+ lo->exponent=newexp; /* new lowest exponent */
+ padding=hi->exponent-lo->exponent; /* recalculate */
+ ul=lo->lsd; /* .. and repoint */
+ }
+
+ /* padding is still > 0, but will fit in acc (less leading carry slot) */
#if DECCHECK
- if (padding>DECPMAX+2) printf("FMA excess padding: %ld\n", (LI)padding);
if (padding<=0) printf("FMA low padding: %ld\n", (LI)padding);
+ if (hilen+padding+1>FMALEN)
+ printf("FMA excess hilen+padding: %ld+%ld \n", (LI)hilen, (LI)padding);
/* printf("FMA padding: %ld\n", (LI)padding); */
#endif
+
/* padding digits can now be set in the result; one or more of */
/* these will come from lo; others will be zeros in the gap */
+ for (; ul-3>=lo->msd && padding>3; padding-=4, ul-=4, ub-=4) {
+ UBFROMUI(ub-3, UBTOUI(ul-3)); /* [cannot overlap] */
+ }
for (; ul>=lo->msd && padding>0; padding--, ul--, ub--) *ub=*ul;
for (;padding>0; padding--, ub--) *ub=0; /* mind the gap */
}
@@ -2088,23 +2196,39 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl,
/* addition now complete to the right of the rightmost digit of hi */
uh=hi->lsd;
- /* carry was set up depending on ten's complement above; do the add... */
+ /* dow do the add from hi->lsd to the left */
+ /* [bytewise, because either operand can run out at any time] */
+ /* carry was set up depending on ten's complement above */
+ /* first assume both operands have some digits */
for (;; ub--) {
- uInt hid, lod;
- if (uh<hi->msd) {
+ if (uh<hi->msd || ul<lo->msd) break;
+ *ub=(uByte)(carry+(*uh--)+(*ul--));
+ carry=0;
+ if (*ub<10) continue;
+ *ub-=10;
+ carry=1;
+ } /* both loop */
+
+ if (ul<lo->msd) { /* to left of lo */
+ for (;; ub--) {
+ if (uh<hi->msd) break;
+ *ub=(uByte)(carry+(*uh--)); /* [+0] */
+ carry=0;
+ if (*ub<10) continue;
+ *ub-=10;
+ carry=1;
+ } /* hi loop */
+ }
+ else { /* to left of hi */
+ for (;; ub--) {
if (ul<lo->msd) break;
- hid=hipad;
- }
- else hid=*uh--;
- if (ul<lo->msd) lod=0;
- else lod=*ul--;
- *ub=(uByte)(carry+hid+lod);
- if (*ub<10) carry=0;
- else {
+ *ub=(uByte)(carry+hipad+(*ul--));
+ carry=0;
+ if (*ub<10) continue;
*ub-=10;
carry=1;
- }
- } /* addition loop */
+ } /* lo loop */
+ }
/* addition complete -- now handle carry, borrow, etc. */
/* use lo to set up the num (its exponent is already correct, and */
@@ -2122,7 +2246,7 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl,
if (!carry) { /* no carry out means hi<lo */
/* borrowed -- take ten's complement of the right digits */
lo->sign=hi->sign; /* sign is lhs sign */
- for (ul=lo->msd; ul<lo->lsd-3; ul+=4) UINTAT(ul)=0x09090909-UINTAT(ul);
+ for (ul=lo->msd; ul<lo->lsd-3; ul+=4) UBFROMUI(ul, 0x09090909-UBTOUI(ul));
for (; ul<=lo->lsd; ul++) *ul=(uByte)(0x09-*ul); /* [leaves ul at lsd+1] */
/* complete the ten's complement by adding 1 [cannot overrun] */
for (ul--; *ul==9; ul--) *ul=0;
@@ -2133,7 +2257,7 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl,
/* all done except for the special IEEE 754 exact-zero-result */
/* rule (see above); while testing for zero, strip leading */
/* zeros (which will save decFinalize doing it) */
- for (; UINTAT(lo->msd)==0 && lo->msd+3<lo->lsd;) lo->msd+=4;
+ for (; UBTOUI(lo->msd)==0 && lo->msd+3<lo->lsd;) lo->msd+=4;
for (; *lo->msd==0 && lo->msd<lo->lsd;) lo->msd++;
if (*lo->msd==0) { /* must be true zero (and diffsign) */
lo->sign=0; /* assume + */
@@ -2143,11 +2267,18 @@ decFloat * decFloatFMA(decFloat *result, const decFloat *dfl,
} /* subtraction gave positive result */
} /* diffsign */
+ #if DECCHECK
+ /* assert no left underrun */
+ if (lo->msd<acc) {
+ printf("FMA underrun by %ld \n", (LI)(acc-lo->msd));
+ }
+ #endif
+
return decFinalize(result, lo, set); /* round, check, and lay out */
} /* decFloatFMA */
/* ------------------------------------------------------------------ */
-/* decFloatFromInt -- initialise a decFloat from an Int */
+/* decFloatFromInt -- initialise a decFloat from an Int */
/* */
/* result gets the converted Int */
/* n is the Int to convert */
@@ -2213,7 +2344,7 @@ decFloat * decFloatFromUInt32(decFloat *result, uInt u) {
/* decFloatInvert -- logical digitwise INVERT of a decFloat */
/* */
/* result gets the result of INVERTing df */
-/* df is the decFloat to invert */
+/* df is the decFloat to invert */
/* set is the context */
/* returns result, which will be canonical with sign=0 */
/* */
@@ -2241,12 +2372,12 @@ decFloat * decFloatInvert(decFloat *result, const decFloat *df,
/* ------------------------------------------------------------------ */
/* decFloatIs -- decFloat tests (IsSigned, etc.) */
/* */
-/* df is the decFloat to test */
-/* returns 0 or 1 in an int32_t */
+/* df is the decFloat to test */
+/* returns 0 or 1 in a uInt */
/* */
/* Many of these could be macros, but having them as real functions */
-/* is a bit cleaner (and they can be referred to here by the generic */
-/* names) */
+/* is a little cleaner (and they can be referred to here by the */
+/* generic names) */
/* ------------------------------------------------------------------ */
uInt decFloatIsCanonical(const decFloat *df) {
if (DFISSPECIAL(df)) {
@@ -2333,10 +2464,10 @@ uInt decFloatIsZero(const decFloat *df) {
} /* decFloatIs... */
/* ------------------------------------------------------------------ */
-/* decFloatLogB -- return adjusted exponent, by 754r rules */
+/* decFloatLogB -- return adjusted exponent, by 754 rules */
/* */
/* result gets the adjusted exponent as an integer, or a NaN etc. */
-/* df is the decFloat to be examined */
+/* df is the decFloat to be examined */
/* set is the context */
/* returns result */
/* */
@@ -2353,12 +2484,12 @@ decFloat * decFloatLogB(decFloat *result, const decFloat *df,
if (DFISNAN(df)) return decNaNs(result, df, NULL, set);
if (DFISINF(df)) {
DFWORD(result, 0)=0; /* need +ve */
- return decInfinity(result, result); /* canonical +Infinity */
+ return decInfinity(result, result); /* canonical +Infinity */
}
if (DFISZERO(df)) {
- set->status|=DEC_Division_by_zero; /* as per 754r */
+ set->status|=DEC_Division_by_zero; /* as per 754 */
DFWORD(result, 0)=DECFLOAT_Sign; /* make negative */
- return decInfinity(result, result); /* canonical -Infinity */
+ return decInfinity(result, result); /* canonical -Infinity */
}
ae=GETEXPUN(df) /* get unbiased exponent .. */
+decFloatDigits(df)-1; /* .. and make adjusted exponent */
@@ -2381,10 +2512,10 @@ decFloat * decFloatLogB(decFloat *result, const decFloat *df,
} /* decFloatLogB */
/* ------------------------------------------------------------------ */
-/* decFloatMax -- return maxnum of two operands */
+/* decFloatMax -- return maxnum of two operands */
/* */
/* result gets the chosen decFloat */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result */
@@ -2416,7 +2547,7 @@ decFloat * decFloatMax(decFloat *result,
/* decFloatMaxMag -- return maxnummag of two operands */
/* */
/* result gets the chosen decFloat */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result */
@@ -2440,10 +2571,10 @@ decFloat * decFloatMaxMag(decFloat *result,
} /* decFloatMaxMag */
/* ------------------------------------------------------------------ */
-/* decFloatMin -- return minnum of two operands */
+/* decFloatMin -- return minnum of two operands */
/* */
/* result gets the chosen decFloat */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result */
@@ -2475,7 +2606,7 @@ decFloat * decFloatMin(decFloat *result,
/* decFloatMinMag -- return minnummag of two operands */
/* */
/* result gets the chosen decFloat */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result */
@@ -2501,8 +2632,8 @@ decFloat * decFloatMinMag(decFloat *result,
/* ------------------------------------------------------------------ */
/* decFloatMinus -- negate value, heeding NaNs, etc. */
/* */
-/* result gets the canonicalized 0-df */
-/* df is the decFloat to minus */
+/* result gets the canonicalized 0-df */
+/* df is the decFloat to minus */
/* set is the context */
/* returns result */
/* */
@@ -2524,8 +2655,8 @@ decFloat * decFloatMinus(decFloat *result, const decFloat *df,
/* ------------------------------------------------------------------ */
/* decFloatMultiply -- multiply two decFloats */
/* */
-/* result gets the result of multiplying dfl and dfr: */
-/* dfl is the first decFloat (lhs) */
+/* result gets the result of multiplying dfl and dfr: */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result */
@@ -2535,7 +2666,7 @@ decFloat * decFloatMultiply(decFloat *result,
const decFloat *dfl, const decFloat *dfr,
decContext *set) {
bcdnum num; /* for final conversion */
- uByte bcdacc[DECPMAX9*18+1]; /* for coefficent in BCD */
+ uByte bcdacc[DECPMAX9*18+1]; /* for coefficent in BCD */
if (DFISSPECIAL(dfl) || DFISSPECIAL(dfr)) { /* either is special? */
/* NaNs are handled as usual */
@@ -2561,7 +2692,7 @@ decFloat * decFloatMultiply(decFloat *result,
/* set is the context */
/* returns result */
/* */
-/* This is 754r nextdown; Invalid is the only status possible (from */
+/* This is 754 nextdown; Invalid is the only status possible (from */
/* an sNaN). */
/* ------------------------------------------------------------------ */
decFloat * decFloatNextMinus(decFloat *result, const decFloat *dfl,
@@ -2580,19 +2711,19 @@ decFloat * decFloatNextMinus(decFloat *result, const decFloat *dfl,
/* here (but can be done with normal add if the sign of zero is */
/* treated carefully, because no Inexactitude is interesting); */
/* rounding to -Infinity then pushes the result to next below */
- decFloatZero(&delta); /* set up tiny delta */
- DFWORD(&delta, DECWORDS-1)=1; /* coefficient=1 */
+ decFloatZero(&delta); /* set up tiny delta */
+ DFWORD(&delta, DECWORDS-1)=1; /* coefficient=1 */
DFWORD(&delta, 0)=DECFLOAT_Sign; /* Sign=1 + biased exponent=0 */
/* set up for the directional round */
- saveround=set->round; /* save mode */
+ saveround=set->round; /* save mode */
set->round=DEC_ROUND_FLOOR; /* .. round towards -Infinity */
- savestat=set->status; /* save status */
+ savestat=set->status; /* save status */
decFloatAdd(result, dfl, &delta, set);
/* Add rules mess up the sign when going from +Ntiny to 0 */
if (DFISZERO(result)) DFWORD(result, 0)^=DECFLOAT_Sign; /* correct */
set->status&=DEC_Invalid_operation; /* preserve only sNaN status */
set->status|=savestat; /* restore pending flags */
- set->round=saveround; /* .. and mode */
+ set->round=saveround; /* .. and mode */
return result;
} /* decFloatNextMinus */
@@ -2604,7 +2735,7 @@ decFloat * decFloatNextMinus(decFloat *result, const decFloat *dfl,
/* set is the context */
/* returns result */
/* */
-/* This is 754r nextup; Invalid is the only status possible (from */
+/* This is 754 nextup; Invalid is the only status possible (from */
/* an sNaN). */
/* ------------------------------------------------------------------ */
decFloat * decFloatNextPlus(decFloat *result, const decFloat *dfl,
@@ -2624,19 +2755,19 @@ decFloat * decFloatNextPlus(decFloat *result, const decFloat *dfl,
/* here (but can be done with normal add if the sign of zero is */
/* treated carefully, because no Inexactitude is interesting); */
/* rounding to +Infinity then pushes the result to next above */
- decFloatZero(&delta); /* set up tiny delta */
- DFWORD(&delta, DECWORDS-1)=1; /* coefficient=1 */
+ decFloatZero(&delta); /* set up tiny delta */
+ DFWORD(&delta, DECWORDS-1)=1; /* coefficient=1 */
DFWORD(&delta, 0)=0; /* Sign=0 + biased exponent=0 */
/* set up for the directional round */
- saveround=set->round; /* save mode */
- set->round=DEC_ROUND_CEILING; /* .. round towards +Infinity */
- savestat=set->status; /* save status */
+ saveround=set->round; /* save mode */
+ set->round=DEC_ROUND_CEILING; /* .. round towards +Infinity */
+ savestat=set->status; /* save status */
decFloatAdd(result, dfl, &delta, set);
/* Add rules mess up the sign when going from -Ntiny to -0 */
if (DFISZERO(result)) DFWORD(result, 0)^=DECFLOAT_Sign; /* correct */
set->status&=DEC_Invalid_operation; /* preserve only sNaN status */
set->status|=savestat; /* restore pending flags */
- set->round=saveround; /* .. and mode */
+ set->round=saveround; /* .. and mode */
return result;
} /* decFloatNextPlus */
@@ -2649,8 +2780,9 @@ decFloat * decFloatNextPlus(decFloat *result, const decFloat *dfl,
/* set is the context */
/* returns result */
/* */
-/* This is 754r nextafter; status may be set unless the result is a */
-/* normal number. */
+/* This is 754-1985 nextafter, as modified during revision (dropped */
+/* from 754-2008); status may be set unless the result is a normal */
+/* number. */
/* ------------------------------------------------------------------ */
decFloat * decFloatNextToward(decFloat *result,
const decFloat *dfl, const decFloat *dfr,
@@ -2676,7 +2808,7 @@ decFloat * decFloatNextToward(decFloat *result,
}
saveround=set->round; /* save mode */
set->round=DEC_ROUND_CEILING; /* .. round towards +Infinity */
- deltatop=0; /* positive delta */
+ deltatop=0; /* positive delta */
}
else { /* lhs>rhs, do NextMinus, see above for commentary */
if (DFISINF(dfl) && !DFISSIGNED(dfl)) { /* +Infinity special case */
@@ -2684,23 +2816,23 @@ decFloat * decFloatNextToward(decFloat *result,
return result;
}
saveround=set->round; /* save mode */
- set->round=DEC_ROUND_FLOOR; /* .. round towards -Infinity */
+ set->round=DEC_ROUND_FLOOR; /* .. round towards -Infinity */
deltatop=DECFLOAT_Sign; /* negative delta */
}
- savestat=set->status; /* save status */
+ savestat=set->status; /* save status */
/* Here, Inexact is needed where appropriate (and hence Underflow, */
/* etc.). Therefore the tiny delta which is otherwise */
/* unrepresentable (see NextPlus and NextMinus) is constructed */
/* using the multiplication of FMA. */
- decFloatZero(&delta); /* set up tiny delta */
- DFWORD(&delta, DECWORDS-1)=1; /* coefficient=1 */
+ decFloatZero(&delta); /* set up tiny delta */
+ DFWORD(&delta, DECWORDS-1)=1; /* coefficient=1 */
DFWORD(&delta, 0)=deltatop; /* Sign + biased exponent=0 */
decFloatFromString(&pointone, "1E-1", set); /* set up multiplier */
decFloatFMA(result, &delta, &pointone, dfl, set);
/* [Delta is truly tiny, so no need to correct sign of zero] */
/* use new status unless the result is normal */
if (decFloatIsNormal(result)) set->status=savestat; /* else goes forward */
- set->round=saveround; /* restore mode */
+ set->round=saveround; /* restore mode */
return result;
} /* decFloatNextToward */
@@ -2708,12 +2840,12 @@ decFloat * decFloatNextToward(decFloat *result,
/* decFloatOr -- logical digitwise OR of two decFloats */
/* */
/* result gets the result of ORing dfl and dfr */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result, which will be canonical with sign=0 */
/* */
-/* The operands must be positive, finite with exponent q=0, and */
+/* The operands must be positive, finite with exponent q=0, and */
/* comprise just zeros and ones; if not, Invalid operation results. */
/* ------------------------------------------------------------------ */
decFloat * decFloatOr(decFloat *result,
@@ -2739,14 +2871,14 @@ decFloat * decFloatOr(decFloat *result,
/* ------------------------------------------------------------------ */
/* decFloatPlus -- add value to 0, heeding NaNs, etc. */
/* */
-/* result gets the canonicalized 0+df */
-/* df is the decFloat to plus */
+/* result gets the canonicalized 0+df */
+/* df is the decFloat to plus */
/* set is the context */
/* returns result */
/* */
/* This has the same effect as 0+df where the exponent of the zero is */
/* the same as that of df (if df is finite). */
-/* The effect is also the same as decFloatCopy except that NaNs */
+/* The effect is also the same as decFloatCopy except that NaNs */
/* are handled normally (the sign of a NaN is not affected, and an */
/* sNaN will signal), the result is canonical, and zero gets sign 0. */
/* ------------------------------------------------------------------ */
@@ -2762,7 +2894,7 @@ decFloat * decFloatPlus(decFloat *result, const decFloat *df,
/* decFloatQuantize -- quantize a decFloat */
/* */
/* result gets the result of quantizing dfl to match dfr */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs), which sets the exponent */
/* set is the context */
/* returns result */
@@ -2775,16 +2907,19 @@ decFloat * decFloatQuantize(decFloat *result,
decContext *set) {
Int explb, exprb; /* left and right biased exponents */
uByte *ulsd; /* local LSD pointer */
- uInt *ui; /* work */
- uByte *ub; /* .. */
+ uByte *ub, *uc; /* work */
Int drop; /* .. */
uInt dpd; /* .. */
- uInt encode; /* encoding accumulator */
+ uInt encode; /* encoding accumulator */
uInt sourhil, sourhir; /* top words from source decFloats */
+ uInt uiwork; /* for macros */
+ #if QUAD
+ uShort uswork; /* .. */
+ #endif
/* the following buffer holds the coefficient for manipulation */
- uByte buf[4+DECPMAX*3]; /* + space for zeros to left or right */
+ uByte buf[4+DECPMAX*3+2*QUAD]; /* + space for zeros to left or right */
#if DECTRACE
- bcdnum num; /* for trace displays */
+ bcdnum num; /* for trace displays */
#endif
/* Start decoding the arguments */
@@ -2827,7 +2962,7 @@ decFloat * decFloatQuantize(decFloat *result,
decShowNum(&num, "dfl");
#endif
- if (drop>0) { /* [most common case] */
+ if (drop>0) { /* [most common case] */
/* (this code is very similar to that in decFloatFinalize, but */
/* has many differences so is duplicated here -- so any changes */
/* may need to be made there, too) */
@@ -2838,7 +2973,7 @@ decFloat * decFloatQuantize(decFloat *result,
/* there is at least one zero needed to the left, in all but one */
/* exceptional (all-nines) case, so place four zeros now; this is */
/* needed almost always and makes rounding all-nines by fours safe */
- UINTAT(BUFOFF-4)=0;
+ UBFROMUI(BUFOFF-4, 0);
/* Three cases here: */
/* 1. new LSD is in coefficient (almost always) */
@@ -2849,7 +2984,7 @@ decFloat * decFloatQuantize(decFloat *result,
/* [duplicate check-stickies code to save a test] */
/* [by-digit check for stickies as runs of zeros are rare] */
- if (drop<DECPMAX) { /* NB lengths not addresses */
+ if (drop<DECPMAX) { /* NB lengths not addresses */
roundat=BUFOFF+DECPMAX-drop;
reround=*roundat;
for (ub=roundat+1; ub<BUFOFF+DECPMAX; ub++) {
@@ -2932,7 +3067,7 @@ decFloat * decFloatQuantize(decFloat *result,
/* increment the coefficient; this could give 1000... (after */
/* the all nines case) */
ub=ulsd;
- for (; UINTAT(ub-3)==0x09090909; ub-=4) UINTAT(ub-3)=0;
+ for (; UBTOUI(ub-3)==0x09090909; ub-=4) UBFROMUI(ub-3, 0);
/* now at most 3 digits left to non-9 (usually just the one) */
for (; *ub==9; ub--) *ub=0;
*ub+=1;
@@ -2945,8 +3080,8 @@ decFloat * decFloatQuantize(decFloat *result,
/* available in the coefficent -- the first word to the left was */
/* cleared earlier for safe carry; now add any more needed */
if (drop>4) {
- UINTAT(BUFOFF-8)=0; /* must be at least 5 */
- for (ui=&UINTAT(BUFOFF-12); ui>&UINTAT(ulsd-DECPMAX-3); ui--) *ui=0;
+ UBFROMUI(BUFOFF-8, 0); /* must be at least 5 */
+ for (uc=BUFOFF-12; uc>ulsd-DECPMAX-3; uc-=4) UBFROMUI(uc, 0);
}
} /* need round (drop>0) */
@@ -2967,18 +3102,21 @@ decFloat * decFloatQuantize(decFloat *result,
#else
static const uInt dmask[]={0, 0xff000000, 0xffff0000, 0xffffff00};
#endif
- for (ui=&UINTAT(BUFOFF+DECPMAX);; ui++) {
- *ui=0;
- if (UINTAT(&UBYTEAT(ui)-DECPMAX)!=0) { /* could be bad */
+ /* note that here zeros to the right are added by fours, so in */
+ /* the Quad case this could write 36 zeros if the coefficient has */
+ /* fewer than three significant digits (hence the +2*QUAD for buf) */
+ for (uc=BUFOFF+DECPMAX;; uc+=4) {
+ UBFROMUI(uc, 0);
+ if (UBTOUI(uc-DECPMAX)!=0) { /* could be bad */
/* if all four digits should be zero, definitely bad */
- if (ui<=&UINTAT(BUFOFF+DECPMAX+(-drop)-4))
+ if (uc<=BUFOFF+DECPMAX+(-drop)-4)
return decInvalid(result, set);
/* must be a 1- to 3-digit sequence; check more carefully */
- if ((UINTAT(&UBYTEAT(ui)-DECPMAX)&dmask[(-drop)%4])!=0)
+ if ((UBTOUI(uc-DECPMAX)&dmask[(-drop)%4])!=0)
return decInvalid(result, set);
break; /* no need for loop end test */
}
- if (ui>=&UINTAT(BUFOFF+DECPMAX+(-drop)-4)) break; /* done */
+ if (uc>=BUFOFF+DECPMAX+(-drop)-4) break; /* done */
}
ulsd=BUFOFF+DECPMAX+(-drop)-1;
} /* pad and check leading zeros */
@@ -3045,7 +3183,7 @@ decFloat * decFloatQuantize(decFloat *result,
/* decFloatReduce -- reduce finite coefficient to minimum length */
/* */
/* result gets the reduced decFloat */
-/* df is the source decFloat */
+/* df is the source decFloat */
/* set is the context */
/* returns result, which will be canonical */
/* */
@@ -3085,7 +3223,7 @@ decFloat * decFloatReduce(decFloat *result, const decFloat *df,
/* decFloatRemainder -- integer divide and return remainder */
/* */
/* result gets the remainder of dividing dfl by dfr: */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result */
@@ -3101,7 +3239,7 @@ decFloat * decFloatRemainder(decFloat *result,
/* decFloatRemainderNear -- integer divide to nearest and remainder */
/* */
/* result gets the remainder of dividing dfl by dfr: */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result */
@@ -3145,7 +3283,7 @@ decFloat * decFloatRotate(decFloat *result,
if (DFISNAN(dfl)||DFISNAN(dfr)) return decNaNs(result, dfl, dfr, set);
if (!DFISINT(dfr)) return decInvalid(result, set);
digits=decFloatDigits(dfr); /* calculate digits */
- if (digits>2) return decInvalid(result, set); /* definitely out of range */
+ if (digits>2) return decInvalid(result, set); /* definitely out of range */
rotate=DPD2BIN[DFWORD(dfr, DECWORDS-1)&0x3ff]; /* is in bottom declet */
if (rotate>DECPMAX) return decInvalid(result, set); /* too big */
/* [from here on no error or status change is possible] */
@@ -3178,16 +3316,16 @@ decFloat * decFloatRotate(decFloat *result,
num.lsd=num.msd+DECPMAX-1;
num.sign=DFWORD(dfl, 0)&DECFLOAT_Sign;
num.exponent=GETEXPUN(dfl);
- savestat=set->status; /* record */
+ savestat=set->status; /* record */
decFinalize(result, &num, set);
- set->status=savestat; /* restore */
+ set->status=savestat; /* restore */
return result;
} /* decFloatRotate */
/* ------------------------------------------------------------------ */
/* decFloatSameQuantum -- test decFloats for same quantum */
/* */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* returns 1 if the operands have the same quantum, 0 otherwise */
/* */
@@ -3204,11 +3342,11 @@ uInt decFloatSameQuantum(const decFloat *dfl, const decFloat *dfr) {
} /* decFloatSameQuantum */
/* ------------------------------------------------------------------ */
-/* decFloatScaleB -- multiply by a power of 10, as per 754r */
+/* decFloatScaleB -- multiply by a power of 10, as per 754 */
/* */
/* result gets the result of the operation */
-/* dfl is the first decFloat (lhs) */
-/* dfr is the second decFloat (rhs), am integer (with q=0) */
+/* dfl is the first decFloat (lhs) */
+/* dfr is the second decFloat (rhs), am integer (with q=0) */
/* set is the context */
/* returns result */
/* */
@@ -3229,10 +3367,10 @@ decFloat * decFloatScaleB(decFloat *result,
digits=decFloatDigits(dfr); /* calculate digits */
#if DOUBLE
- if (digits>3) return decInvalid(result, set); /* definitely out of range */
+ if (digits>3) return decInvalid(result, set); /* definitely out of range */
expr=DPD2BIN[DFWORD(dfr, 1)&0x3ff]; /* must be in bottom declet */
#elif QUAD
- if (digits>5) return decInvalid(result, set); /* definitely out of range */
+ if (digits>5) return decInvalid(result, set); /* definitely out of range */
expr=DPD2BIN[DFWORD(dfr, 3)&0x3ff] /* in bottom 2 declets .. */
+DPD2BIN[(DFWORD(dfr, 3)>>10)&0x3ff]*1000; /* .. */
#endif
@@ -3241,7 +3379,7 @@ decFloat * decFloatScaleB(decFloat *result,
if (DFISINF(dfl)) return decInfinity(result, dfl); /* canonical */
if (DFISSIGNED(dfr)) expr=-expr;
/* dfl is finite and expr is valid */
- *result=*dfl; /* copy to target */
+ *result=*dfl; /* copy to target */
return decFloatSetExponent(result, set, GETEXPUN(result)+expr);
} /* decFloatScaleB */
@@ -3266,23 +3404,24 @@ decFloat * decFloatScaleB(decFloat *result,
decFloat * decFloatShift(decFloat *result,
const decFloat *dfl, const decFloat *dfr,
decContext *set) {
- Int shift; /* dfr as an Int */
- uByte buf[DECPMAX*2]; /* coefficient + padding */
- uInt digits, savestat; /* work */
+ Int shift; /* dfr as an Int */
+ uByte buf[DECPMAX*2]; /* coefficient + padding */
+ uInt digits, savestat; /* work */
bcdnum num; /* .. */
+ uInt uiwork; /* for macros */
if (DFISNAN(dfl)||DFISNAN(dfr)) return decNaNs(result, dfl, dfr, set);
if (!DFISINT(dfr)) return decInvalid(result, set);
digits=decFloatDigits(dfr); /* calculate digits */
- if (digits>2) return decInvalid(result, set); /* definitely out of range */
- shift=DPD2BIN[DFWORD(dfr, DECWORDS-1)&0x3ff]; /* is in bottom declet */
+ if (digits>2) return decInvalid(result, set); /* definitely out of range */
+ shift=DPD2BIN[DFWORD(dfr, DECWORDS-1)&0x3ff]; /* is in bottom declet */
if (shift>DECPMAX) return decInvalid(result, set); /* too big */
/* [from here on no error or status change is possible] */
if (DFISINF(dfl)) return decInfinity(result, dfl); /* canonical */
/* handle no-shift and all-shift (clear to zero) cases */
if (shift==0) return decCanonical(result, dfl);
- if (shift==DECPMAX) { /* zero with sign */
+ if (shift==DECPMAX) { /* zero with sign */
uByte sign=(uByte)(DFBYTE(dfl, 0)&0x80); /* save sign bit */
decFloatZero(result); /* make +0 */
DFBYTE(result, 0)=(uByte)(DFBYTE(result, 0)|sign); /* and set sign */
@@ -3299,23 +3438,23 @@ decFloat * decFloatShift(decFloat *result,
num.lsd=buf+DECPMAX-shift-1;
}
else { /* shift left -- zero padding needed to right */
- UINTAT(buf+DECPMAX)=0; /* 8 will handle most cases */
- UINTAT(buf+DECPMAX+4)=0; /* .. */
+ UBFROMUI(buf+DECPMAX, 0); /* 8 will handle most cases */
+ UBFROMUI(buf+DECPMAX+4, 0); /* .. */
if (shift>8) memset(buf+DECPMAX+8, 0, 8+QUAD*18); /* all other cases */
num.msd+=shift;
num.lsd=num.msd+DECPMAX-1;
}
- savestat=set->status; /* record */
+ savestat=set->status; /* record */
decFinalize(result, &num, set);
- set->status=savestat; /* restore */
+ set->status=savestat; /* restore */
return result;
} /* decFloatShift */
/* ------------------------------------------------------------------ */
-/* decFloatSubtract -- subtract a decFloat from another */
+/* decFloatSubtract -- subtract a decFloat from another */
/* */
/* result gets the result of subtracting dfr from dfl: */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result */
@@ -3333,9 +3472,9 @@ decFloat * decFloatSubtract(decFloat *result,
} /* decFloatSubtract */
/* ------------------------------------------------------------------ */
-/* decFloatToInt -- round to 32-bit binary integer (4 flavours) */
+/* decFloatToInt -- round to 32-bit binary integer (4 flavours) */
/* */
-/* df is the decFloat to round */
+/* df is the decFloat to round */
/* set is the context */
/* round is the rounding mode to use */
/* returns a uInt or an Int, rounded according to the name */
@@ -3361,12 +3500,12 @@ Int decFloatToInt32Exact(const decFloat *df, decContext *set,
return (Int)decToInt32(df, set, round, 1, 0);}
/* ------------------------------------------------------------------ */
-/* decFloatToIntegral -- round to integral value (two flavours) */
+/* decFloatToIntegral -- round to integral value (two flavours) */
/* */
/* result gets the result */
-/* df is the decFloat to round */
+/* df is the decFloat to round */
/* set is the context */
-/* round is the rounding mode to use */
+/* round is the rounding mode to use */
/* returns result */
/* */
/* No exceptions, even Inexact, are raised except for sNaN input, or */
@@ -3384,12 +3523,12 @@ decFloat * decFloatToIntegralExact(decFloat *result, const decFloat *df,
/* decFloatXor -- logical digitwise XOR of two decFloats */
/* */
/* result gets the result of XORing dfl and dfr */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) */
/* set is the context */
/* returns result, which will be canonical with sign=0 */
/* */
-/* The operands must be positive, finite with exponent q=0, and */
+/* The operands must be positive, finite with exponent q=0, and */
/* comprise just zeros and ones; if not, Invalid operation results. */
/* ------------------------------------------------------------------ */
decFloat * decFloatXor(decFloat *result,
@@ -3432,14 +3571,14 @@ static decFloat *decInvalid(decFloat *result, decContext *set) {
/* decInfinity -- set canonical Infinity with sign from a decFloat */
/* */
/* result gets a canonical Infinity */
-/* df is source decFloat (only the sign is used) */
+/* df is source decFloat (only the sign is used) */
/* returns result */
/* */
-/* df may be the same as result */
+/* df may be the same as result */
/* ------------------------------------------------------------------ */
static decFloat *decInfinity(decFloat *result, const decFloat *df) {
uInt sign=DFWORD(df, 0); /* save source signword */
- decFloatZero(result); /* clear everything */
+ decFloatZero(result); /* clear everything */
DFWORD(result, 0)=DECFLOAT_Inf | (sign & DECFLOAT_Sign);
return result;
} /* decInfinity */
@@ -3449,7 +3588,7 @@ static decFloat *decInfinity(decFloat *result, const decFloat *df) {
/* */
/* result gets the result of handling dfl and dfr, one or both of */
/* which is a NaN */
-/* dfl is the first decFloat (lhs) */
+/* dfl is the first decFloat (lhs) */
/* dfr is the second decFloat (rhs) -- may be NULL for a single- */
/* operand operation */
/* set is the context */
@@ -3476,19 +3615,20 @@ static decFloat *decNaNs(decFloat *result,
} /* decNaNs */
/* ------------------------------------------------------------------ */
-/* decNumCompare -- numeric comparison of two decFloats */
+/* decNumCompare -- numeric comparison of two decFloats */
/* */
/* dfl is the left-hand decFloat, which is not a NaN */
/* dfr is the right-hand decFloat, which is not a NaN */
/* tot is 1 for total order compare, 0 for simple numeric */
-/* returns -1, 0, or +1 for dfl<dfr, dfl=dfr, dfl>dfr */
+/* returns -1, 0, or +1 for dfl<dfr, dfl=dfr, dfl>dfr */
/* */
-/* No error is possible; status and mode are unchanged. */
+/* No error is possible; status and mode are unchanged. */
/* ------------------------------------------------------------------ */
static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) {
Int sigl, sigr; /* LHS and RHS non-0 signums */
Int shift; /* shift needed to align operands */
uByte *ub, *uc; /* work */
+ uInt uiwork; /* for macros */
/* buffers +2 if Quad (36 digits), need double plus 4 for safe padding */
uByte bufl[DECPMAX*2+QUAD*2+4]; /* for LHS coefficient + padding */
uByte bufr[DECPMAX*2+QUAD*2+4]; /* for RHS coefficient + padding */
@@ -3512,7 +3652,7 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) {
sigr=-sigl; /* sign to return if abs(RHS) wins */
if (DFISINF(dfl)) {
- if (DFISINF(dfr)) return 0; /* both infinite & same sign */
+ if (DFISINF(dfr)) return 0; /* both infinite & same sign */
return sigl; /* inf > n */
}
if (DFISINF(dfr)) return sigr; /* n < inf [dfl is finite] */
@@ -3544,17 +3684,16 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) {
/* decode the coefficients */
/* (shift both right two if Quad to make a multiple of four) */
#if QUAD
- ub=bufl; /* avoid type-pun violation */
- UINTAT(ub)=0;
- uc=bufr; /* avoid type-pun violation */
- UINTAT(uc)=0;
+ UBFROMUI(bufl, 0);
+ UBFROMUI(bufr, 0);
#endif
GETCOEFF(dfl, bufl+QUAD*2); /* decode from decFloat */
GETCOEFF(dfr, bufr+QUAD*2); /* .. */
if (shift==0) { /* aligned; common and easy */
/* all multiples of four, here */
for (ub=bufl, uc=bufr; ub<bufl+DECPMAX+QUAD*2; ub+=4, uc+=4) {
- if (UINTAT(ub)==UINTAT(uc)) continue; /* so far so same */
+ uInt ui=UBTOUI(ub);
+ if (ui==UBTOUI(uc)) continue; /* so far so same */
/* about to find a winner; go by bytes in case little-endian */
for (;; ub++, uc++) {
if (*ub>*uc) return sigl; /* difference found */
@@ -3565,17 +3704,17 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) {
else if (shift>0) { /* lhs to left */
ub=bufl; /* RHS pointer */
/* pad bufl so right-aligned; most shifts will fit in 8 */
- UINTAT(bufl+DECPMAX+QUAD*2)=0; /* add eight zeros */
- UINTAT(bufl+DECPMAX+QUAD*2+4)=0; /* .. */
+ UBFROMUI(bufl+DECPMAX+QUAD*2, 0); /* add eight zeros */
+ UBFROMUI(bufl+DECPMAX+QUAD*2+4, 0); /* .. */
if (shift>8) {
/* more than eight; fill the rest, and also worth doing the */
/* lead-in by fours */
- uByte *up; /* work */
+ uByte *up; /* work */
uByte *upend=bufl+DECPMAX+QUAD*2+shift;
- for (up=bufl+DECPMAX+QUAD*2+8; up<upend; up+=4) UINTAT(up)=0;
+ for (up=bufl+DECPMAX+QUAD*2+8; up<upend; up+=4) UBFROMUI(up, 0);
/* [pads up to 36 in all for Quad] */
for (;; ub+=4) {
- if (UINTAT(ub)!=0) return sigl;
+ if (UBTOUI(ub)!=0) return sigl;
if (ub+4>bufl+shift-4) break;
}
}
@@ -3585,7 +3724,8 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) {
/* comparison can go for the full length of bufr, which is a */
/* multiple of 4 bytes */
for (uc=bufr; ; uc+=4, ub+=4) {
- if (UINTAT(uc)!=UINTAT(ub)) { /* mismatch found */
+ uInt ui=UBTOUI(ub);
+ if (ui!=UBTOUI(uc)) { /* mismatch found */
for (;; uc++, ub++) { /* check from left [little-endian?] */
if (*ub>*uc) return sigl; /* difference found */
if (*ub<*uc) return sigr; /* .. */
@@ -3598,17 +3738,17 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) {
else { /* shift<0) .. RHS is to left of LHS; mirror shift>0 */
uc=bufr; /* RHS pointer */
/* pad bufr so right-aligned; most shifts will fit in 8 */
- UINTAT(bufr+DECPMAX+QUAD*2)=0; /* add eight zeros */
- UINTAT(bufr+DECPMAX+QUAD*2+4)=0; /* .. */
+ UBFROMUI(bufr+DECPMAX+QUAD*2, 0); /* add eight zeros */
+ UBFROMUI(bufr+DECPMAX+QUAD*2+4, 0); /* .. */
if (shift<-8) {
/* more than eight; fill the rest, and also worth doing the */
/* lead-in by fours */
- uByte *up; /* work */
+ uByte *up; /* work */
uByte *upend=bufr+DECPMAX+QUAD*2-shift;
- for (up=bufr+DECPMAX+QUAD*2+8; up<upend; up+=4) UINTAT(up)=0;
+ for (up=bufr+DECPMAX+QUAD*2+8; up<upend; up+=4) UBFROMUI(up, 0);
/* [pads up to 36 in all for Quad] */
for (;; uc+=4) {
- if (UINTAT(uc)!=0) return sigr;
+ if (UBTOUI(uc)!=0) return sigr;
if (uc+4>bufr-shift-4) break;
}
}
@@ -3618,7 +3758,8 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) {
/* comparison can go for the full length of bufl, which is a */
/* multiple of 4 bytes */
for (ub=bufl; ; ub+=4, uc+=4) {
- if (UINTAT(ub)!=UINTAT(uc)) { /* mismatch found */
+ uInt ui=UBTOUI(ub);
+ if (ui!=UBTOUI(uc)) { /* mismatch found */
for (;; ub++, uc++) { /* check from left [little-endian?] */
if (*ub>*uc) return sigl; /* difference found */
if (*ub<*uc) return sigr; /* .. */
@@ -3639,10 +3780,10 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) {
/* ------------------------------------------------------------------ */
/* decToInt32 -- local routine to effect ToInteger conversions */
/* */
-/* df is the decFloat to convert */
+/* df is the decFloat to convert */
/* set is the context */
-/* rmode is the rounding mode to use */
-/* exact is 1 if Inexact should be signalled */
+/* rmode is the rounding mode to use */
+/* exact is 1 if Inexact should be signalled */
/* unsign is 1 if the result a uInt, 0 if an Int (cast to uInt) */
/* returns 32-bit result as a uInt */
/* */
@@ -3652,13 +3793,13 @@ static Int decNumCompare(const decFloat *dfl, const decFloat *dfr, Flag tot) {
static uInt decToInt32(const decFloat *df, decContext *set,
enum rounding rmode, Flag exact, Flag unsign) {
Int exp; /* exponent */
- uInt sourhi, sourpen, sourlo; /* top word from source decFloat .. */
+ uInt sourhi, sourpen, sourlo; /* top word from source decFloat .. */
uInt hi, lo; /* .. penultimate, least, etc. */
decFloat zero, result; /* work */
Int i; /* .. */
/* Start decoding the argument */
- sourhi=DFWORD(df, 0); /* top word */
+ sourhi=DFWORD(df, 0); /* top word */
exp=DECCOMBEXP[sourhi>>26]; /* get exponent high bits (in place) */
if (EXPISSPECIAL(exp)) { /* is special? */
set->status|=DEC_Invalid_operation; /* signal */
@@ -3730,10 +3871,10 @@ static uInt decToInt32(const decFloat *df, decContext *set,
/* decToIntegral -- local routine to effect ToIntegral value */
/* */
/* result gets the result */
-/* df is the decFloat to round */
+/* df is the decFloat to round */
/* set is the context */
-/* rmode is the rounding mode to use */
-/* exact is 1 if Inexact should be signalled */
+/* rmode is the rounding mode to use */
+/* exact is 1 if Inexact should be signalled */
/* returns result */
/* ------------------------------------------------------------------ */
static decFloat * decToIntegral(decFloat *result, const decFloat *df,
@@ -3746,7 +3887,7 @@ static decFloat * decToIntegral(decFloat *result, const decFloat *df,
decFloat zero; /* work */
/* Start decoding the argument */
- sourhi=DFWORD(df, 0); /* top word */
+ sourhi=DFWORD(df, 0); /* top word */
exp=DECCOMBEXP[sourhi>>26]; /* get exponent high bits (in place) */
if (EXPISSPECIAL(exp)) { /* is special? */
@@ -3762,12 +3903,12 @@ static decFloat * decToIntegral(decFloat *result, const decFloat *df,
if (exp>=0) return decCanonical(result, df); /* already integral */
- saveround=set->round; /* save rounding mode .. */
+ saveround=set->round; /* save rounding mode .. */
savestatus=set->status; /* .. and status */
set->round=rmode; /* set mode */
decFloatZero(&zero); /* make 0E+0 */
decFloatQuantize(result, df, &zero, set); /* 'integrate'; cannot fail */
- set->round=saveround; /* restore rounding mode .. */
+ set->round=saveround; /* restore rounding mode .. */
if (!exact) set->status=savestatus; /* .. and status, unless exact */
return result;
} /* decToIntegral */
diff --git a/libdecnumber/decCommon.c b/libdecnumber/decCommon.c
index fa16e792e66..845b9143d61 100644
--- a/libdecnumber/decCommon.c
+++ b/libdecnumber/decCommon.c
@@ -104,15 +104,15 @@ static decFloat * decFinalize(decFloat *, bcdnum *, decContext *);
static Flag decBiStr(const char *, const char *, const char *);
/* Macros and private tables; those which are not format-dependent */
-/* are only included if decQuad is being built. */
+/* are only included if decQuad is being built. */
/* ------------------------------------------------------------------ */
/* Combination field lookup tables (uInts to save measurable work) */
/* */
-/* DECCOMBEXP - 2 most-significant-bits of exponent (00, 01, or */
+/* DECCOMBEXP - 2 most-significant-bits of exponent (00, 01, or */
/* 10), shifted left for format, or DECFLOAT_Inf/NaN */
/* DECCOMBWEXP - The same, for the next-wider format (unless QUAD) */
-/* DECCOMBMSD - 4-bit most-significant-digit */
+/* DECCOMBMSD - 4-bit most-significant-digit */
/* [0 if the index is a special (Infinity or NaN)] */
/* DECCOMBFROM - 5-bit combination field from EXP top bits and MSD */
/* (placed in uInt so no shift is needed) */
@@ -123,7 +123,7 @@ static Flag decBiStr(const char *, const char *, const char *);
/* DECCOMBFROM is indexed by expTopTwoBits*16 + msd */
/* */
/* DECCOMBMSD and DECCOMBFROM are not format-dependent and so are */
-/* only included once, when QUAD is being built */
+/* only included once, when QUAD is being built */
/* ------------------------------------------------------------------ */
static const uInt DECCOMBEXP[64]={
0, 0, 0, 0, 0, 0, 0, 0,
@@ -161,7 +161,7 @@ static const uInt DECCOMBWEXP[64]={
#if QUAD
const uInt DECCOMBMSD[64]={
0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 8, 9, 0, 1,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 8, 9, 0, 0,
0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 8, 9, 0, 0};
@@ -223,7 +223,7 @@ static Flag decBiStr(const char *targ, const char *str1, const char *str2) {
/* returns df */
/* */
/* The num descriptor may point to a bcd8 string of any length; this */
-/* string may have leading insignificant zeros. If it has more than */
+/* string may have leading insignificant zeros. If it has more than */
/* DECPMAX digits then the final digit can be a round-for-reround */
/* digit (i.e., it may include a sticky bit residue). */
/* */
@@ -248,8 +248,9 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
decContext *set) {
uByte *ub; /* work */
uInt dpd; /* .. */
- uByte *umsd=num->msd; /* local copy */
- uByte *ulsd=num->lsd; /* .. */
+ uInt uiwork; /* for macros */
+ uByte *umsd=num->msd; /* local copy */
+ uByte *ulsd=num->lsd; /* .. */
uInt encode; /* encoding accumulator */
Int length; /* coefficient length */
@@ -275,11 +276,11 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
length=(uInt)(ulsd-umsd+1); /* coefficient length */
if (!NUMISSPECIAL(num)) {
- Int drop; /* digits to be dropped */
+ Int drop; /* digits to be dropped */
/* skip leading insignificant zeros to calculate an exact length */
/* [this is quite expensive] */
if (*umsd==0) {
- for (; UINTAT(umsd)==0 && umsd+3<ulsd;) umsd+=4;
+ for (; umsd+3<ulsd && UBTOUI(umsd)==0;) umsd+=4;
for (; *umsd==0 && umsd<ulsd;) umsd++;
length=ulsd-umsd+1; /* recalculate */
}
@@ -305,12 +306,12 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
roundat=umsd+length-drop;
reround=*roundat;
for (ub=roundat+1; ub<=ulsd; ub++) {
- if (*ub!=0) { /* non-zero to be discarded */
+ if (*ub!=0) { /* non-zero to be discarded */
reround=DECSTICKYTAB[reround]; /* apply sticky bit */
break; /* [remainder don't-care] */
}
} /* check stickies */
- ulsd=roundat-1; /* new LSD */
+ ulsd=roundat-1; /* new LSD */
}
else { /* edge case */
if (drop==length) {
@@ -322,7 +323,7 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
reround=0;
}
for (ub=roundat+1; ub<=ulsd; ub++) {
- if (*ub!=0) { /* non-zero to be discarded */
+ if (*ub!=0) { /* non-zero to be discarded */
reround=DECSTICKYTAB[reround]; /* apply sticky bit */
break; /* [remainder don't-care] */
}
@@ -331,7 +332,7 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
ulsd=umsd; /* .. */
}
- if (reround!=0) { /* discarding non-zero */
+ if (reround!=0) { /* discarding non-zero */
uInt bump=0;
set->status|=DEC_Inexact;
/* if adjusted exponent [exp+digits-1] is < EMIN then num is */
@@ -342,7 +343,7 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
/* next decide whether increment of the coefficient is needed */
if (set->round==DEC_ROUND_HALF_EVEN) { /* fastpath slowest case */
if (reround>5) bump=1; /* >0.5 goes up */
- else if (reround==5) /* exactly 0.5000 .. */
+ else if (reround==5) /* exactly 0.5000 .. */
bump=*ulsd & 0x01; /* .. up iff [new] lsd is odd */
} /* r-h-e */
else switch (set->round) {
@@ -382,13 +383,15 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
#endif
break;}
} /* switch (not r-h-e) */
- /* printf("ReRound: %ld bump: %ld\n", (LI)reround, (LI)bump); */
+ /* printf("ReRound: %ld bump: %ld\n", (LI)reround, (LI)bump); */
if (bump!=0) { /* need increment */
/* increment the coefficient; this might end up with 1000... */
/* (after the all nines case) */
ub=ulsd;
- for(; ub-3>=umsd && UINTAT(ub-3)==0x09090909; ub-=4) UINTAT(ub-3)=0;
+ for(; ub-3>=umsd && UBTOUI(ub-3)==0x09090909; ub-=4) {
+ UBFROMUI(ub-3, 0); /* to 00000000 */
+ }
/* [note ub could now be to left of msd, and it is not safe */
/* to write to the the left of the msd] */
/* now at most 3 digits left to non-9 (usually just the one) */
@@ -436,7 +439,7 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
else if ((num->exponent+length-1)>DECEMAX) { /* > Nmax */
/* Overflow -- these could go straight to encoding, here, but */
/* instead num is adjusted to keep the code cleaner */
- Flag needmax=0; /* 1 for finite result */
+ Flag needmax=0; /* 1 for finite result */
set->status|=(DEC_Overflow | DEC_Inexact);
switch (set->round) {
case DEC_ROUND_DOWN: {
@@ -453,12 +456,12 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
break;} /* r-f */
default: break; /* Infinity in all other cases */
}
- if (!needmax) { /* easy .. set Infinity */
+ if (!needmax) { /* easy .. set Infinity */
num->exponent=DECFLOAT_Inf;
*umsd=0; /* be clean: coefficient to 0 */
ulsd=umsd; /* .. */
}
- else { /* return Nmax */
+ else { /* return Nmax */
umsd=allnines; /* use constant array */
ulsd=allnines+DECPMAX-1;
num->exponent=DECEMAX-(DECPMAX-1);
@@ -475,8 +478,8 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
uByte *t=buffer; /* safe target */
uByte *tlsd=buffer+(ulsd-umsd)+shift; /* target LSD */
/* printf("folddown shift=%ld\n", (LI)shift); */
- for (; s<=ulsd; s+=4, t+=4) UINTAT(t)=UINTAT(s);
- for (t=tlsd-shift+1; t<=tlsd; t+=4) UINTAT(t)=0; /* pad */
+ for (; s<=ulsd; s+=4, t+=4) UBFROMUI(t, UBTOUI(s));
+ for (t=tlsd-shift+1; t<=tlsd; t+=4) UBFROMUI(t, 0); /* pad 0s */
num->exponent-=shift;
umsd=buffer;
ulsd=tlsd;
@@ -492,23 +495,23 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
/*------------------------------------------------------------------*/
/* Following code does not alter coefficient (could be allnines array) */
+ /* fast path possible when DECPMAX digits */
if (length==DECPMAX) {
return decFloatFromBCD(df, num->exponent, umsd, num->sign);
- }
+ } /* full-length */
- /* Here when length is short */
+ /* slower path when not a full-length number; must care about length */
+ /* [coefficient length here will be < DECPMAX] */
if (!NUMISSPECIAL(num)) { /* is still finite */
/* encode the combination field and exponent continuation */
uInt uexp=(uInt)(num->exponent+DECBIAS); /* biased exponent */
uInt code=(uexp>>DECECONL)<<4; /* top two bits of exp */
- /* [msd=0] */
+ /* [msd==0] */
/* look up the combination field and make high word */
encode=DECCOMBFROM[code]; /* indexed by (0-2)*16+msd */
encode|=(uexp<<(32-6-DECECONL)) & 0x03ffffff; /* exponent continuation */
}
else encode=num->exponent; /* special [already in word] */
- /* [coefficient length here will be < DECPMAX] */
-
encode|=num->sign; /* add sign */
/* private macro to extract a declet, n (where 0<=n<DECLETS and 0 */
@@ -519,7 +522,7 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
/* working pointer, uInt *ub. */
/* As not full-length then chances are there are many leading zeros */
/* [and there may be a partial triad] */
- #define getDPD(dpd, n) ub=ulsd-(3*(n))-2; \
+ #define getDPDt(dpd, n) ub=ulsd-(3*(n))-2; \
if (ub<umsd-2) dpd=0; \
else if (ub>=umsd) dpd=BCD2DPD[(*ub*256)+(*(ub+1)*16)+*(ub+2)]; \
else {dpd=*(ub+2); if (ub+1==umsd) dpd+=*(ub+1)*16; dpd=BCD2DPD[dpd];}
@@ -528,48 +531,48 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
/* according to endianness; in all cases complete the sign word */
/* first */
#if DECPMAX==7
- getDPD(dpd, 1);
+ getDPDt(dpd, 1);
encode|=dpd<<10;
- getDPD(dpd, 0);
+ getDPDt(dpd, 0);
encode|=dpd;
DFWORD(df, 0)=encode; /* just the one word */
#elif DECPMAX==16
- getDPD(dpd, 4); encode|=dpd<<8;
- getDPD(dpd, 3); encode|=dpd>>2;
+ getDPDt(dpd, 4); encode|=dpd<<8;
+ getDPDt(dpd, 3); encode|=dpd>>2;
DFWORD(df, 0)=encode;
encode=dpd<<30;
- getDPD(dpd, 2); encode|=dpd<<20;
- getDPD(dpd, 1); encode|=dpd<<10;
- getDPD(dpd, 0); encode|=dpd;
+ getDPDt(dpd, 2); encode|=dpd<<20;
+ getDPDt(dpd, 1); encode|=dpd<<10;
+ getDPDt(dpd, 0); encode|=dpd;
DFWORD(df, 1)=encode;
#elif DECPMAX==34
- getDPD(dpd,10); encode|=dpd<<4;
- getDPD(dpd, 9); encode|=dpd>>6;
+ getDPDt(dpd,10); encode|=dpd<<4;
+ getDPDt(dpd, 9); encode|=dpd>>6;
DFWORD(df, 0)=encode;
encode=dpd<<26;
- getDPD(dpd, 8); encode|=dpd<<16;
- getDPD(dpd, 7); encode|=dpd<<6;
- getDPD(dpd, 6); encode|=dpd>>4;
+ getDPDt(dpd, 8); encode|=dpd<<16;
+ getDPDt(dpd, 7); encode|=dpd<<6;
+ getDPDt(dpd, 6); encode|=dpd>>4;
DFWORD(df, 1)=encode;
encode=dpd<<28;
- getDPD(dpd, 5); encode|=dpd<<18;
- getDPD(dpd, 4); encode|=dpd<<8;
- getDPD(dpd, 3); encode|=dpd>>2;
+ getDPDt(dpd, 5); encode|=dpd<<18;
+ getDPDt(dpd, 4); encode|=dpd<<8;
+ getDPDt(dpd, 3); encode|=dpd>>2;
DFWORD(df, 2)=encode;
encode=dpd<<30;
- getDPD(dpd, 2); encode|=dpd<<20;
- getDPD(dpd, 1); encode|=dpd<<10;
- getDPD(dpd, 0); encode|=dpd;
+ getDPDt(dpd, 2); encode|=dpd<<20;
+ getDPDt(dpd, 1); encode|=dpd<<10;
+ getDPDt(dpd, 0); encode|=dpd;
DFWORD(df, 3)=encode;
#endif
/* printf("Status: %08lx\n", (LI)set->status); */
- /* decFloatShow(df, "final"); */
+ /* decFloatShow(df, "final2"); */
return df;
} /* decFinalize */
@@ -579,12 +582,12 @@ static decFloat * decFinalize(decFloat *df, bcdnum *num,
/* df is the target decFloat */
/* exp is the in-range unbiased exponent, q, or a special value in */
/* the form returned by decFloatGetExponent */
-/* bcdar holds DECPMAX digits to set the coefficient from, one */
+/* bcdar holds DECPMAX digits to set the coefficient from, one */
/* digit in each byte (BCD8 encoding); the first (MSD) is ignored */
/* if df is a NaN; all are ignored if df is infinite. */
-/* All bytes must be in 0-9; results undefined otherwise. */
+/* All bytes must be in 0-9; results are undefined otherwise. */
/* sig is DECFLOAT_Sign to set the sign bit, 0 otherwise */
-/* returns df, which will be canonical */
+/* returns df, which will be canonical */
/* */
/* No error is possible, and no status will be set. */
/* ------------------------------------------------------------------ */
@@ -609,53 +612,53 @@ decFloat * decFloatFromBCD(decFloat *df, Int exp, const uByte *bcdar,
/* and put the corresponding DPD code into dpd. */
/* Use of a working pointer, uInt *ub, is assumed. */
- #define getDPDf(dpd, n) ub=bcdar+DECPMAX-1-(3*(n))-2; \
+ #define getDPDb(dpd, n) ub=bcdar+DECPMAX-1-(3*(n))-2; \
dpd=BCD2DPD[(*ub*256)+(*(ub+1)*16)+*(ub+2)];
/* place the declets in the encoding words and copy to result (df), */
/* according to endianness; in all cases complete the sign word */
/* first */
#if DECPMAX==7
- getDPDf(dpd, 1);
+ getDPDb(dpd, 1);
encode|=dpd<<10;
- getDPDf(dpd, 0);
+ getDPDb(dpd, 0);
encode|=dpd;
DFWORD(df, 0)=encode; /* just the one word */
#elif DECPMAX==16
- getDPDf(dpd, 4); encode|=dpd<<8;
- getDPDf(dpd, 3); encode|=dpd>>2;
+ getDPDb(dpd, 4); encode|=dpd<<8;
+ getDPDb(dpd, 3); encode|=dpd>>2;
DFWORD(df, 0)=encode;
encode=dpd<<30;
- getDPDf(dpd, 2); encode|=dpd<<20;
- getDPDf(dpd, 1); encode|=dpd<<10;
- getDPDf(dpd, 0); encode|=dpd;
+ getDPDb(dpd, 2); encode|=dpd<<20;
+ getDPDb(dpd, 1); encode|=dpd<<10;
+ getDPDb(dpd, 0); encode|=dpd;
DFWORD(df, 1)=encode;
#elif DECPMAX==34
- getDPDf(dpd,10); encode|=dpd<<4;
- getDPDf(dpd, 9); encode|=dpd>>6;
+ getDPDb(dpd,10); encode|=dpd<<4;
+ getDPDb(dpd, 9); encode|=dpd>>6;
DFWORD(df, 0)=encode;
encode=dpd<<26;
- getDPDf(dpd, 8); encode|=dpd<<16;
- getDPDf(dpd, 7); encode|=dpd<<6;
- getDPDf(dpd, 6); encode|=dpd>>4;
+ getDPDb(dpd, 8); encode|=dpd<<16;
+ getDPDb(dpd, 7); encode|=dpd<<6;
+ getDPDb(dpd, 6); encode|=dpd>>4;
DFWORD(df, 1)=encode;
encode=dpd<<28;
- getDPDf(dpd, 5); encode|=dpd<<18;
- getDPDf(dpd, 4); encode|=dpd<<8;
- getDPDf(dpd, 3); encode|=dpd>>2;
+ getDPDb(dpd, 5); encode|=dpd<<18;
+ getDPDb(dpd, 4); encode|=dpd<<8;
+ getDPDb(dpd, 3); encode|=dpd>>2;
DFWORD(df, 2)=encode;
encode=dpd<<30;
- getDPDf(dpd, 2); encode|=dpd<<20;
- getDPDf(dpd, 1); encode|=dpd<<10;
- getDPDf(dpd, 0); encode|=dpd;
+ getDPDb(dpd, 2); encode|=dpd<<20;
+ getDPDb(dpd, 1); encode|=dpd<<10;
+ getDPDb(dpd, 0); encode|=dpd;
DFWORD(df, 3)=encode;
#endif
- /* decFloatShow(df, "final"); */
+ /* decFloatShow(df, "fromB"); */
return df;
} /* decFloatFromBCD */
@@ -671,7 +674,7 @@ decFloat * decFloatFromBCD(decFloat *df, Int exp, const uByte *bcdar,
/* and QUAD the first (pad) nibble is also ignored in all cases. */
/* All coefficient nibbles must be in 0-9 and sign in A-F; results */
/* are undefined otherwise. */
-/* returns df, which will be canonical */
+/* returns df, which will be canonical */
/* */
/* No error is possible, and no status will be set. */
/* ------------------------------------------------------------------ */
@@ -691,7 +694,7 @@ decFloat * decFloatFromPacked(decFloat *df, Int exp, const uByte *packed) {
*op++=*ip>>4;
*op++=(uByte)(*ip&0x0f); /* [final nibble is sign] */
}
- op--; /* -> sign byte */
+ op--; /* -> sign byte */
if (*op==DECPMINUS || *op==DECPMINUSALT) sig=DECFLOAT_Sign;
if (EXPISSPECIAL(exp)) { /* Infinity or NaN */
@@ -702,7 +705,71 @@ decFloat * decFloatFromPacked(decFloat *df, Int exp, const uByte *packed) {
} /* decFloatFromPacked */
/* ------------------------------------------------------------------ */
-/* decFloatFromString -- conversion from numeric string */
+/* decFloatFromPackedChecked -- set from exponent and packed; checked */
+/* */
+/* df is the target decFloat */
+/* exp is the in-range unbiased exponent, q, or a special value in */
+/* the form returned by decFloatGetExponent */
+/* packed holds DECPMAX packed decimal digits plus a sign nibble */
+/* (all 6 codes are OK); the first (MSD) must be 0 if df is a NaN */
+/* and all digits must be 0 if df is infinite. For DOUBLE and */
+/* QUAD the first (pad) nibble must be 0. */
+/* All coefficient nibbles must be in 0-9 and sign in A-F. */
+/* returns df, which will be canonical or NULL if any of the */
+/* requirements are not met (if this case df is unchanged); that */
+/* is, the input data must be as returned by decFloatToPacked, */
+/* except that all six sign codes are acccepted. */
+/* */
+/* No status will be set. */
+/* ------------------------------------------------------------------ */
+decFloat * decFloatFromPackedChecked(decFloat *df, Int exp,
+ const uByte *packed) {
+ uByte bcdar[DECPMAX+2]; /* work [+1 for pad, +1 for sign] */
+ const uByte *ip; /* .. */
+ uByte *op; /* .. */
+ Int sig=0; /* sign */
+
+ /* expand coefficient and sign to BCDAR */
+ #if SINGLE
+ op=bcdar+1; /* no pad digit */
+ #else
+ op=bcdar; /* first (pad) digit here */
+ #endif
+ for (ip=packed; ip<packed+((DECPMAX+2)/2); ip++) {
+ *op=*ip>>4;
+ if (*op>9) return NULL;
+ op++;
+ *op=(uByte)(*ip&0x0f); /* [final nibble is sign] */
+ if (*op>9 && ip<packed+((DECPMAX+2)/2)-1) return NULL;
+ op++;
+ }
+ op--; /* -> sign byte */
+ if (*op<=9) return NULL; /* bad sign */
+ if (*op==DECPMINUS || *op==DECPMINUSALT) sig=DECFLOAT_Sign;
+
+ #if !SINGLE
+ if (bcdar[0]!=0) return NULL; /* bad pad nibble */
+ #endif
+
+ if (EXPISNAN(exp)) { /* a NaN */
+ if (bcdar[1]!=0) return NULL; /* bad msd */
+ } /* NaN */
+ else if (EXPISINF(exp)) { /* is infinite */
+ Int i;
+ for (i=0; i<DECPMAX; i++) {
+ if (bcdar[i+1]!=0) return NULL; /* should be all zeros */
+ }
+ } /* infinity */
+ else { /* finite */
+ /* check the exponent is in range */
+ if (exp>DECEMAX-DECPMAX+1) return NULL;
+ if (exp<DECEMIN-DECPMAX+1) return NULL;
+ }
+ return decFloatFromBCD(df, exp, bcdar+1, sig);
+ } /* decFloatFromPacked */
+
+/* ------------------------------------------------------------------ */
+/* decFloatFromString -- conversion from numeric string */
/* */
/* result is the decFloat format number which gets the result of */
/* the conversion */
@@ -710,12 +777,12 @@ decFloat * decFloatFromPacked(decFloat *df, Int exp, const uByte *packed) {
/* number (which may be a special value), \0-terminated */
/* If there are too many significant digits in the */
/* coefficient it will be rounded. */
-/* set is the context */
+/* set is the context */
/* returns result */
/* */
/* The length of the coefficient and the size of the exponent are */
/* checked by this routine, so the correct error (Underflow or */
-/* Overflow) can be reported or rounding applied, as necessary. */
+/* Overflow) can be reported or rounding applied, as necessary. */
/* */
/* There is no limit to the coefficient length for finite inputs; */
/* NaN payloads must be integers with no more than DECPMAX-1 digits. */
@@ -726,20 +793,21 @@ decFloat * decFloatFromPacked(decFloat *df, Int exp, const uByte *packed) {
decFloat * decFloatFromString(decFloat *result, const char *string,
decContext *set) {
Int digits; /* count of digits in coefficient */
- const char *dotchar=NULL; /* where dot was found [NULL if none] */
- const char *cfirst=string; /* -> first character of decimal part */
- const char *c; /* work */
+ const char *dotchar=NULL; /* where dot was found [NULL if none] */
+ const char *cfirst=string; /* -> first character of decimal part */
+ const char *c; /* work */
uByte *ub; /* .. */
+ uInt uiwork; /* for macros */
bcdnum num; /* collects data for finishing */
uInt error=DEC_Conversion_syntax; /* assume the worst */
- uByte buffer[ROUNDUP(DECSTRING+11, 8)]; /* room for most coefficents, */
+ uByte buffer[ROUNDUP(DECSTRING+11, 8)]; /* room for most coefficents, */
/* some common rounding, +3, & pad */
#if DECTRACE
/* printf("FromString %s ...\n", string); */
#endif
for(;;) { /* once-only 'loop' */
- num.sign=0; /* assume non-negative */
+ num.sign=0; /* assume non-negative */
num.msd=buffer; /* MSD is here always */
/* detect and validate the coefficient, including any leading, */
@@ -810,7 +878,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string,
exp-=(Int)(clast-dotchar); /* adjust exponent */
/* [the '.' can now be ignored] */
}
- num.exponent=exp; /* exponent is good; store it */
+ num.exponent=exp; /* exponent is good; store it */
/* Here when whole string has been inspected and syntax is good */
/* cfirst->first digit or dot, clast->last digit or dot */
@@ -832,8 +900,8 @@ decFloat * decFloatFromString(decFloat *result, const char *string,
/* as usual, go by fours when safe; NB it has been asserted */
/* that a '.' does not have the same mask as a digit */
if (c<=clast-3 /* safe for four */
- && (UINTAT(c)&0xf0f0f0f0)==CHARMASK) { /* test four */
- UINTAT(ub)=UINTAT(c)&0x0f0f0f0f; /* to BCD8 */
+ && (UBTOUI(c)&0xf0f0f0f0)==CHARMASK) { /* test four */
+ UBFROMUI(ub, UBTOUI(c)&0x0f0f0f0f); /* to BCD8 */
ub+=4;
c+=4;
continue;
@@ -846,7 +914,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string,
}
} /* had dot */
/* Now no dot; do this by fours (where safe) */
- for (; c<=clast-3; c+=4, ub+=4) UINTAT(ub)=UINTAT(c)&0x0f0f0f0f;
+ for (; c<=clast-3; c+=4, ub+=4) UBFROMUI(ub, UBTOUI(c)&0x0f0f0f0f);
for (; c<=clast; c++, ub++) *ub=(uByte)(*c-'0');
num.lsd=buffer+digits-1; /* record new LSD */
} /* fits */
@@ -857,7 +925,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string,
if (*cfirst=='.') cfirst++; /* step past dot at start */
if (*cfirst=='0') { /* [cfirst always -> digit] */
for (; cfirst<clast; cfirst++) {
- if (*cfirst!='0') { /* non-zero found */
+ if (*cfirst!='0') { /* non-zero found */
if (*cfirst=='.') continue; /* [ignore] */
break; /* done */
}
@@ -871,8 +939,8 @@ decFloat * decFloatFromString(decFloat *result, const char *string,
for (c=cfirst; c<=clast && ub<=buffer+DECPMAX; c++) {
/* (see commentary just above) */
if (c<=clast-3 /* safe for four */
- && (UINTAT(c)&0xf0f0f0f0)==CHARMASK) { /* four digits */
- UINTAT(ub)=UINTAT(c)&0x0f0f0f0f; /* to BCD8 */
+ && (UBTOUI(c)&0xf0f0f0f0)==CHARMASK) { /* four digits */
+ UBFROMUI(ub, UBTOUI(c)&0x0f0f0f0f); /* to BCD8 */
ub+=4;
c+=3; /* [will become 4] */
continue;
@@ -881,7 +949,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string,
*ub++=(uByte)(*c-'0');
}
ub--; /* -> LSD */
- for (; c<=clast; c++) { /* inspect remaining chars */
+ for (; c<=clast; c++) { /* inspect remaining chars */
if (*c!='0') { /* sticky bit needed */
if (*c=='.') continue; /* [ignore] */
*ub=DECSTICKYTAB[*ub]; /* update round-for-reround */
@@ -925,7 +993,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string,
*ub=(uByte)(*c-'0'); /* good bcd8 */
}
if (*c!='\0') break; /* not all digits, or too many */
- num.lsd=ub-1; /* record new LSD */
+ num.lsd=ub-1; /* record new LSD */
}
} /* NaN or sNaN */
error=0; /* syntax is OK */
@@ -938,8 +1006,8 @@ decFloat * decFloatFromString(decFloat *result, const char *string,
if (error!=0) {
set->status|=error;
- num.exponent=DECFLOAT_qNaN; /* set up quiet NaN */
- num.sign=0; /* .. with 0 sign */
+ num.exponent=DECFLOAT_qNaN; /* set up quiet NaN */
+ num.sign=0; /* .. with 0 sign */
buffer[0]=0; /* .. and coefficient */
num.lsd=buffer; /* .. */
/* decShowNum(&num, "oops"); */
@@ -957,7 +1025,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string,
/* result is the decFloat format number which gets the result of */
/* the conversion */
/* wider is the decFloatWider format number which will be narrowed */
-/* set is the context */
+/* set is the context */
/* returns result */
/* */
/* Narrowing can cause rounding, overflow, etc., but not Invalid */
@@ -968,7 +1036,7 @@ decFloat * decFloatFromString(decFloat *result, const char *string,
decFloat * decFloatFromWider(decFloat *result, const decFloatWider *wider,
decContext *set) {
bcdnum num; /* collects data for finishing */
- uByte bcdar[DECWPMAX]; /* room for wider coefficient */
+ uByte bcdar[DECWPMAX]; /* room for wider coefficient */
uInt widerhi=DFWWORD(wider, 0); /* top word */
Int exp;
@@ -979,7 +1047,7 @@ decFloat * decFloatFromWider(decFloat *result, const decFloatWider *wider,
num.sign=widerhi&0x80000000; /* extract sign [DECFLOAT_Sign=Neg] */
/* decode the wider combination field to exponent */
- exp=DECCOMBWEXP[widerhi>>26]; /* decode from wider combination field */
+ exp=DECCOMBWEXP[widerhi>>26]; /* decode from wider combination field */
/* if it is a special there's nothing to do unless sNaN; if it's */
/* finite then add the (wider) exponent continuation and unbias */
if (EXPISSPECIAL(exp)) exp=widerhi&0x7e000000; /* include sNaN selector */
@@ -1001,7 +1069,7 @@ decFloat * decFloatFromWider(decFloat *result, const decFloatWider *wider,
/* returns the sign of the coefficient (DECFLOAT_Sign if negative, */
/* 0 otherwise) */
/* */
-/* No error is possible, and no status will be set. If df is a */
+/* No error is possible, and no status will be set. If df is a */
/* special value the array is set to zeros (for Infinity) or to the */
/* payload of a qNaN or sNaN. */
/* ------------------------------------------------------------------ */
@@ -1015,12 +1083,12 @@ Int decFloatGetCoefficient(const decFloat *df, uByte *bcdar) {
} /* decFloatGetCoefficient */
/* ------------------------------------------------------------------ */
-/* decFloatGetExponent -- get unbiased exponent */
+/* decFloatGetExponent -- get unbiased exponent */
/* */
/* df is the decFloat from which to extract the exponent */
/* returns the exponent, q. */
/* */
-/* No error is possible, and no status will be set. If df is a */
+/* No error is possible, and no status will be set. If df is a */
/* special value the first seven bits of the decFloat are returned, */
/* left adjusted and with the first (sign) bit set to 0 (followed by */
/* 25 0 bits). e.g., -sNaN would return 0x7e000000 (DECFLOAT_sNaN). */
@@ -1034,11 +1102,11 @@ Int decFloatGetExponent(const decFloat *df) {
/* decFloatSetCoefficient -- set coefficient from BCD8 */
/* */
/* df is the target decFloat (and source of exponent/special value) */
-/* bcdar holds DECPMAX digits to set the coefficient from, one */
+/* bcdar holds DECPMAX digits to set the coefficient from, one */
/* digit in each byte (BCD8 encoding); the first (MSD) is ignored */
/* if df is a NaN; all are ignored if df is infinite. */
/* sig is DECFLOAT_Sign to set the sign bit, 0 otherwise */
-/* returns df, which will be canonical */
+/* returns df, which will be canonical */
/* */
/* No error is possible, and no status will be set. */
/* ------------------------------------------------------------------ */
@@ -1060,18 +1128,18 @@ decFloat * decFloatSetCoefficient(decFloat *df, const uByte *bcdar,
} /* decFloatSetCoefficient */
/* ------------------------------------------------------------------ */
-/* decFloatSetExponent -- set exponent or special value */
+/* decFloatSetExponent -- set exponent or special value */
/* */
/* df is the target decFloat (and source of coefficient/payload) */
/* set is the context for reporting status */
/* exp is the unbiased exponent, q, or a special value in the form */
/* returned by decFloatGetExponent */
-/* returns df, which will be canonical */
+/* returns df, which will be canonical */
/* */
-/* No error is possible, but Overflow or Underflow might occur. */
+/* No error is possible, but Overflow or Underflow might occur. */
/* ------------------------------------------------------------------ */
decFloat * decFloatSetExponent(decFloat *df, decContext *set, Int exp) {
- uByte bcdcopy[DECPMAX]; /* for coefficient */
+ uByte bcdcopy[DECPMAX]; /* for coefficient */
bcdnum num; /* work */
num.exponent=exp;
num.sign=decFloatGetCoefficient(df, bcdcopy); /* extract coefficient */
@@ -1095,15 +1163,15 @@ uInt decFloatRadix(const decFloat *df) {
} /* decFloatRadix */
/* ------------------------------------------------------------------ */
-/* decFloatShow -- printf a decFloat in hexadecimal and decimal */
-/* df is the decFloat to show */
+/* decFloatShow -- printf a decFloat in hexadecimal and decimal */
+/* df is the decFloat to show */
/* tag is a tag string displayed with the number */
/* */
/* This is a debug aid; the precise format of the string may change. */
/* ------------------------------------------------------------------ */
void decFloatShow(const decFloat *df, const char *tag) {
char hexbuf[DECBYTES*2+DECBYTES/4+1]; /* NB blank after every fourth */
- char buff[DECSTRING]; /* for value in decimal */
+ char buff[DECSTRING]; /* for value in decimal */
Int i, j=0;
for (i=0; i<DECBYTES; i++) {
@@ -1126,7 +1194,7 @@ void decFloatShow(const decFloat *df, const char *tag) {
/* */
/* df is the source decFloat */
/* exp will be set to the unbiased exponent, q, or to a special */
-/* value in the form returned by decFloatGetExponent */
+/* value in the form returned by decFloatGetExponent */
/* bcdar is where DECPMAX bytes will be written, one BCD digit in */
/* each byte (BCD8 encoding); if df is a NaN the first byte will */
/* be zero, and if it is infinite they will all be zero */
@@ -1156,7 +1224,7 @@ Int decFloatToBCD(const decFloat *df, Int *exp, uByte *bcdar) {
/* ------------------------------------------------------------------ */
/* decFloatToEngString -- conversion to numeric string, engineering */
/* */
-/* df is the decFloat format number to convert */
+/* df is the decFloat format number to convert */
/* string is the string where the result will be laid out */
/* */
/* string must be at least DECPMAX+9 characters (the worst case is */
@@ -1169,11 +1237,14 @@ char * decFloatToEngString(const decFloat *df, char *string){
uInt msd; /* coefficient MSD */
Int exp; /* exponent top two bits or full */
uInt comb; /* combination field */
- char *cstart; /* coefficient start */
+ char *cstart; /* coefficient start */
char *c; /* output pointer in string */
char *s, *t; /* .. (source, target) */
Int pre, e; /* work */
const uByte *u; /* .. */
+ uInt uiwork; /* for macros [one compiler needs */
+ /* volatile here to avoid bug, but */
+ /* that doubles execution time] */
/* Source words; macro handles endianness */
uInt sourhi=DFWORD(df, 0); /* word with sign */
@@ -1188,12 +1259,12 @@ char * decFloatToEngString(const decFloat *df, char *string){
c=string; /* where result will go */
if (((Int)sourhi)<0) *c++='-'; /* handle sign */
comb=sourhi>>26; /* sign+combination field */
- msd=DECCOMBMSD[comb]; /* decode the combination field */
- exp=DECCOMBEXP[comb]; /* .. */
+ msd=DECCOMBMSD[comb]; /* decode the combination field */
+ exp=DECCOMBEXP[comb]; /* .. */
if (EXPISSPECIAL(exp)) { /* special */
if (exp==DECFLOAT_Inf) { /* infinity */
- strcpy(c, "Inf");
+ strcpy(c, "Inf");
strcpy(c+3, "inity");
return string; /* easy */
}
@@ -1225,44 +1296,44 @@ char * decFloatToEngString(const decFloat *df, char *string){
/* are the three encoded BCD8 digits followed by a 1-byte length */
/* (significant digits, except that 000 has length 0). This allows */
/* us to left-align the first declet with non-zero content, then */
- /* the remaining ones are full 3-char length. Fixed-length copies */
+ /* the remaining ones are full 3-char length. Fixed-length copies */
/* are used because variable-length memcpy causes a subroutine call */
- /* in at least two compilers. (The copies are length 4 for speed */
+ /* in at least two compilers. (The copies are length 4 for speed */
/* and are safe because the last item in the array is of length */
/* three and has the length byte following.) */
#define dpd2char(dpdin) u=&DPD2BCD8[((dpdin)&0x3ff)*4]; \
- if (c!=cstart) {UINTAT(c)=UINTAT(u)|CHARMASK; c+=3;} \
+ if (c!=cstart) {UBFROMUI(c, UBTOUI(u)|CHARMASK); c+=3;} \
else if (*(u+3)) { \
- UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK; c+=*(u+3);}
+ UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK); c+=*(u+3);}
#if DECPMAX==7
- dpd2char(sourhi>>10); /* declet 1 */
+ dpd2char(sourhi>>10); /* declet 1 */
dpd2char(sourhi); /* declet 2 */
#elif DECPMAX==16
dpd2char(sourhi>>8); /* declet 1 */
dpd2char((sourhi<<2) | (sourlo>>30)); /* declet 2 */
- dpd2char(sourlo>>20); /* declet 3 */
- dpd2char(sourlo>>10); /* declet 4 */
+ dpd2char(sourlo>>20); /* declet 3 */
+ dpd2char(sourlo>>10); /* declet 4 */
dpd2char(sourlo); /* declet 5 */
#elif DECPMAX==34
dpd2char(sourhi>>4); /* declet 1 */
dpd2char((sourhi<<6) | (sourmh>>26)); /* declet 2 */
- dpd2char(sourmh>>16); /* declet 3 */
+ dpd2char(sourmh>>16); /* declet 3 */
dpd2char(sourmh>>6); /* declet 4 */
dpd2char((sourmh<<4) | (sourml>>28)); /* declet 5 */
- dpd2char(sourml>>18); /* declet 6 */
+ dpd2char(sourml>>18); /* declet 6 */
dpd2char(sourml>>8); /* declet 7 */
dpd2char((sourml<<2) | (sourlo>>30)); /* declet 8 */
- dpd2char(sourlo>>20); /* declet 9 */
- dpd2char(sourlo>>10); /* declet 10 */
+ dpd2char(sourlo>>20); /* declet 9 */
+ dpd2char(sourlo>>10); /* declet 10 */
dpd2char(sourlo); /* declet 11 */
#endif
if (c==cstart) *c++='0'; /* all zeros, empty -- make "0" */
- if (exp==0) { /* integer or NaN case -- easy */
+ if (exp==0) { /* integer or NaN case -- easy */
*c='\0'; /* terminate */
return string;
}
@@ -1275,7 +1346,7 @@ char * decFloatToEngString(const decFloat *df, char *string){
if (exp>0 || pre<-5) { /* need exponential form */
e=pre-1; /* calculate E value */
pre=1; /* assume one digit before '.' */
- if (e!=0) { /* engineering: may need to adjust */
+ if (e!=0) { /* engineering: may need to adjust */
Int adj; /* adjustment */
/* The C remainder operator is undefined for negative numbers, so */
/* a positive remainder calculation must be used here */
@@ -1310,8 +1381,8 @@ char * decFloatToEngString(const decFloat *df, char *string){
/* because there is still space for exponent */
s=dotat+ROUNDDOWN4(c-dotat); /* source */
t=s+1; /* target */
- /* open the gap */
- for (; s>=dotat; s-=4, t-=4) UINTAT(t)=UINTAT(s);
+ /* open the gap [cannot use memcpy] */
+ for (; s>=dotat; s-=4, t-=4) UBFROMUI(t, UBTOUI(s));
*dotat='.';
c++; /* length increased by one */
} /* need dot? */
@@ -1321,24 +1392,24 @@ char * decFloatToEngString(const decFloat *df, char *string){
/* -5<=pre<=0: here for plain 0.ddd or 0.000ddd forms (may have
E, but only for 0.00E+3 kind of case -- with plenty of spare
space in this case */
- pre=-pre+2; /* gap width, including "0." */
+ pre=-pre+2; /* gap width, including "0." */
t=cstart+ROUNDDOWN4(c-cstart)+pre; /* preferred first target point */
/* backoff if too far to the right */
if (t>string+DECSTRING-5) t=string+DECSTRING-5; /* adjust to fit */
/* now shift the entire coefficient to the right, being careful not */
- /* to access to the left of string */
- for (s=t-pre; s>=string; s-=4, t-=4) UINTAT(t)=UINTAT(s);
+ /* to access to the left of string [cannot use memcpy] */
+ for (s=t-pre; s>=string; s-=4, t-=4) UBFROMUI(t, UBTOUI(s));
/* for Quads and Singles there may be a character or two left... */
s+=3; /* where next would come from */
for(; s>=cstart; s--, t--) *(t+3)=*(s);
/* now have fill 0. through 0.00000; use overlaps to avoid tests */
if (pre>=4) {
- UINTAT(cstart+pre-4)=UINTAT("0000");
- UINTAT(cstart)=UINTAT("0.00");
+ memcpy(cstart+pre-4, "0000", 4);
+ memcpy(cstart, "0.00", 4);
}
else { /* 2 or 3 */
*(cstart+pre-1)='0';
- USHORTAT(cstart)=USHORTAT("0.");
+ memcpy(cstart, "0.", 2);
}
c+=pre; /* to end */
}
@@ -1346,7 +1417,7 @@ char * decFloatToEngString(const decFloat *df, char *string){
/* finally add the E-part, if needed; it will never be 0, and has */
/* a maximum length of 3 or 4 digits (asserted above) */
if (e!=0) {
- USHORTAT(c)=USHORTAT("E+"); /* starts with E, assume + */
+ memcpy(c, "E+", 2); /* starts with E, assume + */
c++;
if (e<0) {
*c='-'; /* oops, need '-' */
@@ -1355,15 +1426,15 @@ char * decFloatToEngString(const decFloat *df, char *string){
c++;
/* Three-character exponents are easy; 4-character a little trickier */
#if DECEMAXD<=3
- u=&BIN2BCD8[e*4]; /* -> 3 digits + length byte */
+ u=&BIN2BCD8[e*4]; /* -> 3 digits + length byte */
/* copy fixed 4 characters [is safe], starting at non-zero */
/* and with character mask to convert BCD to char */
- UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK;
+ UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK);
c+=*(u+3); /* bump pointer appropriately */
#elif DECEMAXD==4
if (e<1000) { /* 3 (or fewer) digits case */
u=&BIN2BCD8[e*4]; /* -> 3 digits + length byte */
- UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK; /* [as above] */
+ UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK); /* [as above] */
c+=*(u+3); /* bump pointer appropriately */
}
else { /* 4-digits */
@@ -1371,7 +1442,7 @@ char * decFloatToEngString(const decFloat *df, char *string){
Int rem=e-(1000*thou); /* e%1000 */
*c++=(char)('0'+(char)thou); /* the thousands digit */
u=&BIN2BCD8[rem*4]; /* -> 3 digits + length byte */
- UINTAT(c)=UINTAT(u)|CHARMASK; /* copy fixed 3+1 characters [is safe] */
+ UBFROMUI(c, UBTOUI(u)|CHARMASK);/* copy fixed 3+1 characters [is safe] */
c+=3; /* bump pointer, always 3 digits */
}
#endif
@@ -1386,7 +1457,7 @@ char * decFloatToEngString(const decFloat *df, char *string){
/* */
/* df is the source decFloat */
/* exp will be set to the unbiased exponent, q, or to a special */
-/* value in the form returned by decFloatGetExponent */
+/* value in the form returned by decFloatGetExponent */
/* packed is where DECPMAX nibbles will be written with the sign as */
/* final nibble (0x0c for +, 0x0d for -); a NaN has a first nibble */
/* of zero, and an infinity is all zeros. decDouble and decQuad */
@@ -1432,7 +1503,7 @@ Int decFloatToPacked(const decFloat *df, Int *exp, uByte *packed) {
/* ------------------------------------------------------------------ */
/* decFloatToString -- conversion to numeric string */
/* */
-/* df is the decFloat format number to convert */
+/* df is the decFloat format number to convert */
/* string is the string where the result will be laid out */
/* */
/* string must be at least DECPMAX+9 characters (the worst case is */
@@ -1445,11 +1516,14 @@ char * decFloatToString(const decFloat *df, char *string){
uInt msd; /* coefficient MSD */
Int exp; /* exponent top two bits or full */
uInt comb; /* combination field */
- char *cstart; /* coefficient start */
+ char *cstart; /* coefficient start */
char *c; /* output pointer in string */
char *s, *t; /* .. (source, target) */
Int pre, e; /* work */
const uByte *u; /* .. */
+ uInt uiwork; /* for macros [one compiler needs */
+ /* volatile here to avoid bug, but */
+ /* that doubles execution time] */
/* Source words; macro handles endianness */
uInt sourhi=DFWORD(df, 0); /* word with sign */
@@ -1464,10 +1538,14 @@ char * decFloatToString(const decFloat *df, char *string){
c=string; /* where result will go */
if (((Int)sourhi)<0) *c++='-'; /* handle sign */
comb=sourhi>>26; /* sign+combination field */
- msd=DECCOMBMSD[comb]; /* decode the combination field */
- exp=DECCOMBEXP[comb]; /* .. */
+ msd=DECCOMBMSD[comb]; /* decode the combination field */
+ exp=DECCOMBEXP[comb]; /* .. */
- if (EXPISSPECIAL(exp)) { /* special */
+ if (!EXPISSPECIAL(exp)) { /* finite */
+ /* complete exponent; top two bits are in place */
+ exp+=GETECON(df)-DECBIAS; /* .. + continuation and unbias */
+ }
+ else { /* IS special */
if (exp==DECFLOAT_Inf) { /* infinity */
strcpy(c, "Infinity");
return string; /* easy */
@@ -1487,9 +1565,6 @@ char * decFloatToString(const decFloat *df, char *string){
/* otherwise drop through to add integer; set correct exp etc. */
exp=0; msd=0; /* setup for following code */
}
- else { /* complete exponent; top two bits are in place */
- exp+=GETECON(df)-DECBIAS; /* .. + continuation and unbias */
- }
/* convert the digits of the significand to characters */
cstart=c; /* save start of coefficient */
@@ -1500,38 +1575,38 @@ char * decFloatToString(const decFloat *df, char *string){
/* are the three encoded BCD8 digits followed by a 1-byte length */
/* (significant digits, except that 000 has length 0). This allows */
/* us to left-align the first declet with non-zero content, then */
- /* the remaining ones are full 3-char length. Fixed-length copies */
+ /* the remaining ones are full 3-char length. Fixed-length copies */
/* are used because variable-length memcpy causes a subroutine call */
- /* in at least two compilers. (The copies are length 4 for speed */
+ /* in at least two compilers. (The copies are length 4 for speed */
/* and are safe because the last item in the array is of length */
/* three and has the length byte following.) */
#define dpd2char(dpdin) u=&DPD2BCD8[((dpdin)&0x3ff)*4]; \
- if (c!=cstart) {UINTAT(c)=UINTAT(u)|CHARMASK; c+=3;} \
+ if (c!=cstart) {UBFROMUI(c, UBTOUI(u)|CHARMASK); c+=3;} \
else if (*(u+3)) { \
- UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK; c+=*(u+3);}
+ UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK); c+=*(u+3);}
#if DECPMAX==7
- dpd2char(sourhi>>10); /* declet 1 */
+ dpd2char(sourhi>>10); /* declet 1 */
dpd2char(sourhi); /* declet 2 */
#elif DECPMAX==16
dpd2char(sourhi>>8); /* declet 1 */
dpd2char((sourhi<<2) | (sourlo>>30)); /* declet 2 */
- dpd2char(sourlo>>20); /* declet 3 */
- dpd2char(sourlo>>10); /* declet 4 */
+ dpd2char(sourlo>>20); /* declet 3 */
+ dpd2char(sourlo>>10); /* declet 4 */
dpd2char(sourlo); /* declet 5 */
#elif DECPMAX==34
dpd2char(sourhi>>4); /* declet 1 */
dpd2char((sourhi<<6) | (sourmh>>26)); /* declet 2 */
- dpd2char(sourmh>>16); /* declet 3 */
+ dpd2char(sourmh>>16); /* declet 3 */
dpd2char(sourmh>>6); /* declet 4 */
dpd2char((sourmh<<4) | (sourml>>28)); /* declet 5 */
- dpd2char(sourml>>18); /* declet 6 */
+ dpd2char(sourml>>18); /* declet 6 */
dpd2char(sourml>>8); /* declet 7 */
dpd2char((sourml<<2) | (sourlo>>30)); /* declet 8 */
- dpd2char(sourlo>>20); /* declet 9 */
- dpd2char(sourlo>>10); /* declet 10 */
+ dpd2char(sourlo>>20); /* declet 9 */
+ dpd2char(sourlo>>10); /* declet 10 */
dpd2char(sourlo); /* declet 11 */
#endif
@@ -1556,12 +1631,13 @@ char * decFloatToString(const decFloat *df, char *string){
if (pre>0) { /* ddd.ddd (plain), perhaps with E */
char *dotat=cstart+pre;
if (dotat<c) { /* if embedded dot needed... */
+ /* [memmove is a disaster, here] */
/* move by fours; there must be space for junk at the end */
- /* because there is still space for exponent */
+ /* because exponent is still possible */
s=dotat+ROUNDDOWN4(c-dotat); /* source */
t=s+1; /* target */
- /* open the gap */
- for (; s>=dotat; s-=4, t-=4) UINTAT(t)=UINTAT(s);
+ /* open the gap [cannot use memcpy] */
+ for (; s>=dotat; s-=4, t-=4) UBFROMUI(t, UBTOUI(s));
*dotat='.';
c++; /* length increased by one */
} /* need dot? */
@@ -1569,10 +1645,10 @@ char * decFloatToString(const decFloat *df, char *string){
/* finally add the E-part, if needed; it will never be 0, and has */
/* a maximum length of 3 or 4 digits (asserted above) */
if (e!=0) {
- USHORTAT(c)=USHORTAT("E+"); /* starts with E, assume + */
+ memcpy(c, "E+", 2); /* starts with E, assume + */
c++;
if (e<0) {
- *c='-'; /* oops, need '-' */
+ *c='-'; /* oops, need '-' */
e=-e; /* uInt, please */
}
c++;
@@ -1581,21 +1657,21 @@ char * decFloatToString(const decFloat *df, char *string){
u=&BIN2BCD8[e*4]; /* -> 3 digits + length byte */
/* copy fixed 4 characters [is safe], starting at non-zero */
/* and with character mask to convert BCD to char */
- UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK;
+ UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK);
c+=*(u+3); /* bump pointer appropriately */
#elif DECEMAXD==4
if (e<1000) { /* 3 (or fewer) digits case */
u=&BIN2BCD8[e*4]; /* -> 3 digits + length byte */
- UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK; /* [as above] */
+ UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK); /* [as above] */
c+=*(u+3); /* bump pointer appropriately */
}
- else { /* 4-digits */
+ else { /* 4-digits */
Int thou=((e>>3)*1049)>>17; /* e/1000 */
Int rem=e-(1000*thou); /* e%1000 */
*c++=(char)('0'+(char)thou); /* the thousands digit */
u=&BIN2BCD8[rem*4]; /* -> 3 digits + length byte */
- UINTAT(c)=UINTAT(u)|CHARMASK; /* copy fixed 3+1 characters [is safe] */
- c+=3; /* bump pointer, always 3 digits */
+ UBFROMUI(c, UBTOUI(u)|CHARMASK); /* copy fixed 3+1 characters [is safe] */
+ c+=3; /* bump pointer, always 3 digits */
}
#endif
}
@@ -1618,19 +1694,19 @@ char * decFloatToString(const decFloat *df, char *string){
/* backoff if too far to the right */
if (t>string+DECSTRING-5) t=string+DECSTRING-5; /* adjust to fit */
/* now shift the entire coefficient to the right, being careful not */
- /* to access to the left of string */
- for (s=t-pre; s>=string; s-=4, t-=4) UINTAT(t)=UINTAT(s);
+ /* to access to the left of string [cannot use memcpy] */
+ for (s=t-pre; s>=string; s-=4, t-=4) UBFROMUI(t, UBTOUI(s));
/* for Quads and Singles there may be a character or two left... */
- s+=3; /* where next would come from */
+ s+=3; /* where next would come from */
for(; s>=cstart; s--, t--) *(t+3)=*(s);
/* now have fill 0. through 0.00000; use overlaps to avoid tests */
if (pre>=4) {
- UINTAT(cstart+pre-4)=UINTAT("0000");
- UINTAT(cstart)=UINTAT("0.00");
+ memcpy(cstart+pre-4, "0000", 4);
+ memcpy(cstart, "0.00", 4);
}
else { /* 2 or 3 */
*(cstart+pre-1)='0';
- USHORTAT(cstart)=USHORTAT("0.");
+ memcpy(cstart, "0.", 2);
}
*(c+pre)='\0'; /* terminate */
return string;
@@ -1665,7 +1741,7 @@ decFloatWider * decFloatToWider(const decFloat *source, decFloatWider *wider) {
code|=(exp<<(32-6-DECWECONL)) & 0x03ffffff; /* add exponent continuation */
code|=DFWORD(source, 0)&0x80000000; /* add sign */
DFWWORD(wider, 0)=code; /* .. and place top word in wider */
- msd=GETMSD(source); /* get source coefficient MSD [0-9] */
+ msd=GETMSD(source); /* get source coefficient MSD [0-9] */
}
/* Copy the coefficient and clear any 'unused' words to left */
#if SINGLE
@@ -1723,6 +1799,7 @@ decFloat * decFloatZero(decFloat *df){
void decShowNum(const bcdnum *num, const char *tag) {
const char *csign="+"; /* sign character */
uByte *ub; /* work */
+ uInt uiwork; /* for macros */
if (num->sign==DECFLOAT_Sign) csign="-";
printf(">%s> ", tag);
@@ -1747,7 +1824,7 @@ decFloat * decFloatZero(decFloat *df){
if (e==0) *c++='0'; /* 0-length case */
else if (e<1000) { /* 3 (or fewer) digits case */
u=&BIN2BCD8[e*4]; /* -> 3 digits + length byte */
- UINTAT(c)=UINTAT(u+3-*(u+3))|CHARMASK; /* [as above] */
+ UBFROMUI(c, UBTOUI(u+3-*(u+3))|CHARMASK); /* [as above] */
c+=*(u+3); /* bump pointer appropriately */
}
else { /* 4-digits */
@@ -1755,7 +1832,7 @@ decFloat * decFloatZero(decFloat *df){
Int rem=e-(1000*thou); /* e%1000 */
*c++=(char)('0'+(char)thou); /* the thousands digit */
u=&BIN2BCD8[rem*4]; /* -> 3 digits + length byte */
- UINTAT(c)=UINTAT(u)|CHARMASK; /* copy fixed 3+1 characters [is safe] */
+ UBFROMUI(c, UBTOUI(u)|CHARMASK); /* copy fixed 3+1 characters [is safe] */
c+=3; /* bump pointer, always 3 digits */
}
*c='\0'; /* add terminator */
diff --git a/libdecnumber/decContext.c b/libdecnumber/decContext.c
index d2e3bed4397..b1d1cc4e47b 100644
--- a/libdecnumber/decContext.c
+++ b/libdecnumber/decContext.c
@@ -38,15 +38,13 @@
#include <string.h> /* for strcmp */
#include <stdio.h> /* for printf if DECCHECK */
#include "dconfig.h" /* for GCC definitions */
-#include "decContext.h" /* context and base types */
+#include "decContext.h" /* context and base types */
#include "decNumberLocal.h" /* decNumber local types, etc. */
-#if DECCHECK
/* compile-time endian tester [assumes sizeof(Int)>1] */
static const Int mfcone=1; /* constant 1 */
-static const Flag *mfctop=(Flag *)&mfcone; /* -> top byte */
+static const Flag *mfctop=(const Flag *)&mfcone; /* -> top byte */
#define LITEND *mfctop /* named flag; 1=little-endian */
-#endif
/* ------------------------------------------------------------------ */
/* round-for-reround digits */
@@ -64,7 +62,7 @@ const uInt DECPOWERS[10]={1, 10, 100, 1000, 10000, 100000, 1000000,
/* */
/* context is the context structure to be queried */
/* mask indicates the bits to be cleared (the status bit that */
-/* corresponds to each 1 bit in the mask is cleared) */
+/* corresponds to each 1 bit in the mask is cleared) */
/* returns context */
/* */
/* No error is possible. */
@@ -80,9 +78,9 @@ decContext *decContextClearStatus(decContext *context, uInt mask) {
/* context is the structure to be initialized */
/* kind selects the required set of default values, one of: */
/* DEC_INIT_BASE -- select ANSI X3-274 defaults */
-/* DEC_INIT_DECIMAL32 -- select IEEE 754r defaults, 32-bit */
-/* DEC_INIT_DECIMAL64 -- select IEEE 754r defaults, 64-bit */
-/* DEC_INIT_DECIMAL128 -- select IEEE 754r defaults, 128-bit */
+/* DEC_INIT_DECIMAL32 -- select IEEE 754 defaults, 32-bit */
+/* DEC_INIT_DECIMAL64 -- select IEEE 754 defaults, 64-bit */
+/* DEC_INIT_DECIMAL128 -- select IEEE 754 defaults, 128-bit */
/* For any other value a valid context is returned, but with */
/* Invalid_operation set in the status field. */
/* returns a context structure with the appropriate initial values. */
@@ -105,11 +103,11 @@ decContext * decContextDefault(decContext *context, Int kind) {
break;
case DEC_INIT_DECIMAL32:
context->digits=7; /* digits */
- context->emax=96; /* Emax */
+ context->emax=96; /* Emax */
context->emin=-95; /* Emin */
context->round=DEC_ROUND_HALF_EVEN; /* 0.5 to nearest even */
- context->traps=0; /* no traps set */
- context->clamp=1; /* clamp exponents */
+ context->traps=0; /* no traps set */
+ context->clamp=1; /* clamp exponents */
#if DECSUBSET
context->extended=1; /* set */
#endif
@@ -119,8 +117,8 @@ decContext * decContextDefault(decContext *context, Int kind) {
context->emax=384; /* Emax */
context->emin=-383; /* Emin */
context->round=DEC_ROUND_HALF_EVEN; /* 0.5 to nearest even */
- context->traps=0; /* no traps set */
- context->clamp=1; /* clamp exponents */
+ context->traps=0; /* no traps set */
+ context->clamp=1; /* clamp exponents */
#if DECSUBSET
context->extended=1; /* set */
#endif
@@ -130,8 +128,8 @@ decContext * decContextDefault(decContext *context, Int kind) {
context->emax=6144; /* Emax */
context->emin=-6143; /* Emin */
context->round=DEC_ROUND_HALF_EVEN; /* 0.5 to nearest even */
- context->traps=0; /* no traps set */
- context->clamp=1; /* clamp exponents */
+ context->traps=0; /* no traps set */
+ context->clamp=1; /* clamp exponents */
#if DECSUBSET
context->extended=1; /* set */
#endif
@@ -142,15 +140,6 @@ decContext * decContextDefault(decContext *context, Int kind) {
decContextSetStatus(context, DEC_Invalid_operation); /* trap */
}
- #if DECCHECK
- if (LITEND!=DECLITEND) {
- const char *adj;
- if (LITEND) adj="little";
- else adj="big";
- printf("Warning: DECLITEND is set to %d, but this computer appears to be %s-endian\n",
- DECLITEND, adj);
- }
- #endif
return context;} /* decContextDefault */
/* ------------------------------------------------------------------ */
@@ -166,7 +155,7 @@ enum rounding decContextGetRounding(decContext *context) {
} /* decContextGetRounding */
/* ------------------------------------------------------------------ */
-/* decContextGetStatus -- return current status */
+/* decContextGetStatus -- return current status */
/* */
/* context is the context structure to be queried */
/* returns status */
@@ -181,8 +170,8 @@ uInt decContextGetStatus(decContext *context) {
/* decContextRestoreStatus -- restore bits in current status */
/* */
/* context is the context structure to be updated */
-/* newstatus is the source for the bits to be restored */
-/* mask indicates the bits to be restored (the status bit that */
+/* newstatus is the source for the bits to be restored */
+/* mask indicates the bits to be restored (the status bit that */
/* corresponds to each 1 bit in the mask is set to the value of */
/* the correspnding bit in newstatus) */
/* returns context */
@@ -252,7 +241,7 @@ decContext * decContextSetStatus(decContext *context, uInt status) {
/* */
/* returns the context structure, unless the string is equal to */
/* DEC_Condition_MU or is not recognized. In these cases NULL is */
-/* returned. */
+/* returned. */
/* ------------------------------------------------------------------ */
decContext * decContextSetStatusFromString(decContext *context,
const char *string) {
@@ -303,7 +292,7 @@ decContext * decContextSetStatusFromString(decContext *context,
/* */
/* returns the context structure, unless the string is equal to */
/* DEC_Condition_MU or is not recognized. In these cases NULL is */
-/* returned. */
+/* returned. */
/* ------------------------------------------------------------------ */
decContext * decContextSetStatusFromStringQuiet(decContext *context,
const char *string) {
@@ -356,11 +345,11 @@ decContext * decContextSetStatusQuiet(decContext *context, uInt status) {
return context;} /* decContextSetStatusQuiet */
/* ------------------------------------------------------------------ */
-/* decContextStatusToString -- convert status flags to a string */
+/* decContextStatusToString -- convert status flags to a string */
/* */
/* context is a context with valid status field */
/* */
-/* returns a constant string describing the condition. If multiple */
+/* returns a constant string describing the condition. If multiple */
/* (or no) flags are set, a generic constant message is returned. */
/* ------------------------------------------------------------------ */
const char *decContextStatusToString(const decContext *context) {
@@ -385,11 +374,41 @@ const char *decContextStatusToString(const decContext *context) {
#if DECSUBSET
if (status==DEC_Lost_digits ) return DEC_Condition_LD;
#endif
- if (status==0 ) return DEC_Condition_ZE;
+ if (status==0 ) return DEC_Condition_ZE;
return DEC_Condition_MU; /* Multiple errors */
} /* decContextStatusToString */
/* ------------------------------------------------------------------ */
+/* decContextTestEndian -- test whether DECLITEND is set correctly */
+/* */
+/* quiet is 1 to suppress message; 0 otherwise */
+/* returns 0 if DECLITEND is correct */
+/* 1 if DECLITEND is incorrect and should be 1 */
+/* -1 if DECLITEND is incorrect and should be 0 */
+/* */
+/* A message is displayed if the return value is not 0 and quiet==0. */
+/* */
+/* No error is possible. */
+/* ------------------------------------------------------------------ */
+Int decContextTestEndian(Flag quiet) {
+ Int res=0; /* optimist */
+ uInt dle=(uInt)DECLITEND; /* unsign */
+ if (dle>1) dle=1; /* ensure 0 or 1 */
+
+ if (LITEND!=DECLITEND) {
+ const char *adj;
+ if (!quiet) {
+ if (LITEND) adj="little";
+ else adj="big";
+ printf("Warning: DECLITEND is set to %d, but this computer appears to be %s-endian\n",
+ DECLITEND, adj);
+ }
+ res=(Int)LITEND-dle;
+ }
+ return res;
+ } /* decContextTestEndian */
+
+/* ------------------------------------------------------------------ */
/* decContextTestSavedStatus -- test bits in saved status */
/* */
/* oldstatus is the status word to be tested */
diff --git a/libdecnumber/decContext.h b/libdecnumber/decContext.h
index f80d03c50cf..70effd80083 100644
--- a/libdecnumber/decContext.h
+++ b/libdecnumber/decContext.h
@@ -34,7 +34,7 @@
/* */
/* Context variables must always have valid values: */
/* */
-/* status -- [any bits may be cleared, but not set, by user] */
+/* status -- [any bits may be cleared, but not set, by user] */
/* round -- must be one of the enumerated rounding modes */
/* */
/* The following variables are implied for fixed size formats (i.e., */
@@ -54,36 +54,42 @@
#define DECCONTEXT
#define DECCNAME "decContext" /* Short name */
#define DECCFULLNAME "Decimal Context Descriptor" /* Verbose name */
- #define DECCAUTHOR "Mike Cowlishaw" /* Who to blame */
+ #define DECCAUTHOR "Mike Cowlishaw" /* Who to blame */
- #include "gstdint.h" /* C99 standard integers */
+ #if !defined(int32_t)
+ #include <stdint.h> /* C99 standard integers */
+ #endif
#include <stdio.h> /* for printf, etc. */
- #include <signal.h> /* for traps */
+ #include <signal.h> /* for traps */
/* Extended flags setting -- set this to 0 to use only IEEE flags */
+ #if !defined(DECEXTFLAG)
#define DECEXTFLAG 1 /* 1=enable extended flags */
+ #endif
/* Conditional code flag -- set this to 0 for best performance */
+ #if !defined(DECSUBSET)
#define DECSUBSET 0 /* 1=enable subset arithmetic */
+ #endif
/* Context for operations, with associated constants */
enum rounding {
DEC_ROUND_CEILING, /* round towards +infinity */
- DEC_ROUND_UP, /* round away from 0 */
+ DEC_ROUND_UP, /* round away from 0 */
DEC_ROUND_HALF_UP, /* 0.5 rounds up */
DEC_ROUND_HALF_EVEN, /* 0.5 rounds to nearest even */
DEC_ROUND_HALF_DOWN, /* 0.5 rounds down */
DEC_ROUND_DOWN, /* round towards 0 (truncate) */
DEC_ROUND_FLOOR, /* round towards -infinity */
- DEC_ROUND_05UP, /* round for reround */
+ DEC_ROUND_05UP, /* round for reround */
DEC_ROUND_MAX /* enum must be less than this */
};
#define DEC_ROUND_DEFAULT DEC_ROUND_HALF_EVEN;
typedef struct {
- int32_t digits; /* working precision */
- int32_t emax; /* maximum positive exponent */
- int32_t emin; /* minimum negative exponent */
+ int32_t digits; /* working precision */
+ int32_t emax; /* maximum positive exponent */
+ int32_t emin; /* minimum negative exponent */
enum rounding round; /* rounding mode */
uint32_t traps; /* trap-enabler flags */
uint32_t status; /* status flags */
@@ -102,9 +108,9 @@
#define DEC_MIN_EMIN -999999999
#define DEC_MAX_MATH 999999 /* max emax, etc., for math funcs. */
- /* Classifications for decimal numbers, aligned with 754r (note */
- /* that 'normal' and 'subnormal' are meaningful only with a */
- /* decContext or a fixed size format). */
+ /* Classifications for decimal numbers, aligned with 754 (note that */
+ /* 'normal' and 'subnormal' are meaningful only with a decContext */
+ /* or a fixed size format). */
enum decClass {
DEC_CLASS_SNAN,
DEC_CLASS_QNAN,
@@ -139,15 +145,15 @@
#define DEC_Division_impossible 0x00000004
#define DEC_Division_undefined 0x00000008
#define DEC_Insufficient_storage 0x00000010 /* [when malloc fails] */
- #define DEC_Inexact 0x00000020
- #define DEC_Invalid_context 0x00000040
+ #define DEC_Inexact 0x00000020
+ #define DEC_Invalid_context 0x00000040
#define DEC_Invalid_operation 0x00000080
#if DECSUBSET
#define DEC_Lost_digits 0x00000100
#endif
#define DEC_Overflow 0x00000200
- #define DEC_Clamped 0x00000400
- #define DEC_Rounded 0x00000800
+ #define DEC_Clamped 0x00000400
+ #define DEC_Rounded 0x00000800
#define DEC_Subnormal 0x00001000
#define DEC_Underflow 0x00002000
#else
@@ -157,43 +163,43 @@
#define DEC_Division_impossible 0x00000010
#define DEC_Division_undefined 0x00000010
#define DEC_Insufficient_storage 0x00000010 /* [when malloc fails] */
- #define DEC_Inexact 0x00000001
- #define DEC_Invalid_context 0x00000010
+ #define DEC_Inexact 0x00000001
+ #define DEC_Invalid_context 0x00000010
#define DEC_Invalid_operation 0x00000010
#if DECSUBSET
#define DEC_Lost_digits 0x00000000
#endif
#define DEC_Overflow 0x00000008
- #define DEC_Clamped 0x00000000
- #define DEC_Rounded 0x00000000
+ #define DEC_Clamped 0x00000000
+ #define DEC_Rounded 0x00000000
#define DEC_Subnormal 0x00000000
#define DEC_Underflow 0x00000004
#endif
- /* IEEE 854 groupings for the flags */
+ /* IEEE 754 groupings for the flags */
/* [DEC_Clamped, DEC_Lost_digits, DEC_Rounded, and DEC_Subnormal */
- /* are not in IEEE 854] */
- #define DEC_IEEE_854_Division_by_zero (DEC_Division_by_zero)
+ /* are not in IEEE 754] */
+ #define DEC_IEEE_754_Division_by_zero (DEC_Division_by_zero)
#if DECSUBSET
- #define DEC_IEEE_854_Inexact (DEC_Inexact | DEC_Lost_digits)
+ #define DEC_IEEE_754_Inexact (DEC_Inexact | DEC_Lost_digits)
#else
- #define DEC_IEEE_854_Inexact (DEC_Inexact)
+ #define DEC_IEEE_754_Inexact (DEC_Inexact)
#endif
- #define DEC_IEEE_854_Invalid_operation (DEC_Conversion_syntax | \
+ #define DEC_IEEE_754_Invalid_operation (DEC_Conversion_syntax | \
DEC_Division_impossible | \
DEC_Division_undefined | \
DEC_Insufficient_storage | \
- DEC_Invalid_context | \
+ DEC_Invalid_context | \
DEC_Invalid_operation)
- #define DEC_IEEE_854_Overflow (DEC_Overflow)
- #define DEC_IEEE_854_Underflow (DEC_Underflow)
+ #define DEC_IEEE_754_Overflow (DEC_Overflow)
+ #define DEC_IEEE_754_Underflow (DEC_Underflow)
/* flags which are normally errors (result is qNaN, infinite, or 0) */
- #define DEC_Errors (DEC_IEEE_854_Division_by_zero | \
- DEC_IEEE_854_Invalid_operation | \
- DEC_IEEE_854_Overflow | DEC_IEEE_854_Underflow)
+ #define DEC_Errors (DEC_IEEE_754_Division_by_zero | \
+ DEC_IEEE_754_Invalid_operation | \
+ DEC_IEEE_754_Overflow | DEC_IEEE_754_Underflow)
/* flags which cause a result to become qNaN */
- #define DEC_NaNs DEC_IEEE_854_Invalid_operation
+ #define DEC_NaNs DEC_IEEE_754_Invalid_operation
/* flags which are normally for information only (finite results) */
#if DECSUBSET
@@ -203,6 +209,13 @@
#define DEC_Information (DEC_Clamped | DEC_Rounded | DEC_Inexact)
#endif
+ /* IEEE 854 names (for compatibility with older decNumber versions) */
+ #define DEC_IEEE_854_Division_by_zero DEC_IEEE_754_Division_by_zero
+ #define DEC_IEEE_854_Inexact DEC_IEEE_754_Inexact
+ #define DEC_IEEE_854_Invalid_operation DEC_IEEE_754_Invalid_operation
+ #define DEC_IEEE_854_Overflow DEC_IEEE_754_Overflow
+ #define DEC_IEEE_854_Underflow DEC_IEEE_754_Underflow
+
/* Name strings for the exceptional conditions */
#define DEC_Condition_CS "Conversion syntax"
#define DEC_Condition_DZ "Division by zero"
@@ -226,7 +239,7 @@
/* including terminator */
/* Initialization descriptors, used by decContextDefault */
- #define DEC_INIT_BASE 0
+ #define DEC_INIT_BASE 0
#define DEC_INIT_DECIMAL32 32
#define DEC_INIT_DECIMAL64 64
#define DEC_INIT_DECIMAL128 128
@@ -251,6 +264,7 @@
extern decContext * decContextSetStatusFromStringQuiet(decContext *, const char *);
extern decContext * decContextSetStatusQuiet(decContext *, uint32_t);
extern const char * decContextStatusToString(const decContext *);
+ extern int32_t decContextTestEndian(uint8_t);
extern uint32_t decContextTestSavedStatus(uint32_t, uint32_t);
extern uint32_t decContextTestStatus(decContext *, uint32_t);
extern decContext * decContextZeroStatus(decContext *);
diff --git a/libdecnumber/decDPD.h b/libdecnumber/decDPD.h
index a4710d64391..87b35d038b8 100644
--- a/libdecnumber/decDPD.h
+++ b/libdecnumber/decDPD.h
@@ -30,10 +30,9 @@
/* ------------------------------------------------------------------------ */
/* Binary Coded Decimal and Densely Packed Decimal conversion lookup tables */
-/* [Automatically generated -- do not edit. 2007.05.05] */
+/* [Automatically generated -- do not edit. 2008.06.21] */
/* ------------------------------------------------------------------------ */
-/* ------------------------------------------------------------------------ */
-/* For details, see: http://www2.hursley.ibm.com/decimal/DPDecimal.html */
+/* For details, see DPDecimal.html on the General Decimal Arithmetic page. */
#include "decDPDSymbols.h"
@@ -43,9 +42,9 @@
/* uint16_t BIN2DPD[1000]; -- Bin -> DPD (999 => 2457) */
/* uint8_t BIN2CHAR[4001]; -- Bin -> CHAR (999 => '\3' '9' '9' '9') */
/* uint8_t BIN2BCD8[4000]; -- Bin -> bytes (999 => 9 9 9 3) */
-/* uint16_t DPD2BCD[1024]; -- DPD -> BCD (0x3FF => 0x999) */
+/* uint16_t DPD2BCD[1024]; -- DPD -> BCD (0x3FF => 0x999) */
/* uint16_t DPD2BIN[1024]; -- DPD -> BIN (0x3FF => 999) */
-/* uint32_t DPD2BINK[1024]; -- DPD -> BIN * 1000 (0x3FF => 999000) */
+/* uint32_t DPD2BINK[1024]; -- DPD -> BIN * 1000 (0x3FF => 999000) */
/* uint32_t DPD2BINM[1024]; -- DPD -> BIN * 1E+6 (0x3FF => 999000000) */
/* uint8_t DPD2BCD8[4096]; -- DPD -> bytes (x3FF => 9 9 9 3) */
/* */
@@ -53,10 +52,10 @@
/* in the table entry. BIN2CHAR entries are a single byte length (0 for */
/* value 0) followed by three digit characters; a trailing terminator is */
/* included to allow 4-char moves always. BIN2BCD8 and DPD2BCD8 entries */
-/* are similar with the three BCD8 digits followed by a one-byte length */
+/* are similar with the three BCD8 digits followed by a one-byte length */
/* (again, length=0 for value 0). */
/* */
-/* To use a table, its name, prefixed with DEC_, must be defined with a */
+/* To use a table, its name, prefixed with DEC_, must be defined with a */
/* value of 1 before this header file is included. For example: */
/* #define DEC_BCD2DPD 1 */
/* This mechanism allows software to only include tables that are needed. */
@@ -513,7 +512,7 @@ const uint16_t DPD2BIN[1024]={ 0, 1, 2, 3, 4, 5, 6, 7,
#if defined(DEC_DPD2BINK) && DEC_DPD2BINK==1 && !defined(DECDPD2BINK)
#define DECDPD2BINK
-const uint32_t DPD2BINK[1024]={ 0, 1000, 2000, 3000, 4000, 5000,
+const uint32_t DPD2BINK[1024]={ 0, 1000, 2000, 3000, 4000, 5000,
6000, 7000, 8000, 9000, 80000, 81000, 800000, 801000, 880000, 881000,
10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000,
90000, 91000, 810000, 811000, 890000, 891000, 20000, 21000, 22000, 23000,
@@ -621,24 +620,24 @@ const uint32_t DPD2BINK[1024]={ 0, 1000, 2000, 3000, 4000, 5000,
#if defined(DEC_DPD2BINM) && DEC_DPD2BINM==1 && !defined(DECDPD2BINM)
#define DECDPD2BINM
-const uint32_t DPD2BINM[1024]={0, 1000000, 2000000, 3000000, 4000000,
- 5000000, 6000000, 7000000, 8000000, 9000000, 80000000, 81000000,
- 800000000, 801000000, 880000000, 881000000, 10000000, 11000000, 12000000,
- 13000000, 14000000, 15000000, 16000000, 17000000, 18000000, 19000000,
+const uint32_t DPD2BINM[1024]={0, 1000000, 2000000, 3000000, 4000000,
+ 5000000, 6000000, 7000000, 8000000, 9000000, 80000000, 81000000,
+ 800000000, 801000000, 880000000, 881000000, 10000000, 11000000, 12000000,
+ 13000000, 14000000, 15000000, 16000000, 17000000, 18000000, 19000000,
90000000, 91000000, 810000000, 811000000, 890000000, 891000000, 20000000,
- 21000000, 22000000, 23000000, 24000000, 25000000, 26000000, 27000000,
+ 21000000, 22000000, 23000000, 24000000, 25000000, 26000000, 27000000,
28000000, 29000000, 82000000, 83000000, 820000000, 821000000, 808000000,
- 809000000, 30000000, 31000000, 32000000, 33000000, 34000000, 35000000,
- 36000000, 37000000, 38000000, 39000000, 92000000, 93000000, 830000000,
- 831000000, 818000000, 819000000, 40000000, 41000000, 42000000, 43000000,
- 44000000, 45000000, 46000000, 47000000, 48000000, 49000000, 84000000,
- 85000000, 840000000, 841000000, 88000000, 89000000, 50000000, 51000000,
- 52000000, 53000000, 54000000, 55000000, 56000000, 57000000, 58000000,
- 59000000, 94000000, 95000000, 850000000, 851000000, 98000000, 99000000,
- 60000000, 61000000, 62000000, 63000000, 64000000, 65000000, 66000000,
+ 809000000, 30000000, 31000000, 32000000, 33000000, 34000000, 35000000,
+ 36000000, 37000000, 38000000, 39000000, 92000000, 93000000, 830000000,
+ 831000000, 818000000, 819000000, 40000000, 41000000, 42000000, 43000000,
+ 44000000, 45000000, 46000000, 47000000, 48000000, 49000000, 84000000,
+ 85000000, 840000000, 841000000, 88000000, 89000000, 50000000, 51000000,
+ 52000000, 53000000, 54000000, 55000000, 56000000, 57000000, 58000000,
+ 59000000, 94000000, 95000000, 850000000, 851000000, 98000000, 99000000,
+ 60000000, 61000000, 62000000, 63000000, 64000000, 65000000, 66000000,
67000000, 68000000, 69000000, 86000000, 87000000, 860000000, 861000000,
- 888000000, 889000000, 70000000, 71000000, 72000000, 73000000, 74000000,
- 75000000, 76000000, 77000000, 78000000, 79000000, 96000000, 97000000,
+ 888000000, 889000000, 70000000, 71000000, 72000000, 73000000, 74000000,
+ 75000000, 76000000, 77000000, 78000000, 79000000, 96000000, 97000000,
870000000, 871000000, 898000000, 899000000, 100000000, 101000000, 102000000,
103000000, 104000000, 105000000, 106000000, 107000000, 108000000, 109000000,
180000000, 181000000, 900000000, 901000000, 980000000, 981000000, 110000000,
diff --git a/libdecnumber/decDouble.c b/libdecnumber/decDouble.c
index ba6a0af893b..030cc2b86cd 100644
--- a/libdecnumber/decDouble.c
+++ b/libdecnumber/decDouble.c
@@ -34,19 +34,19 @@
/* This module comprises decDouble operations (including conversions) */
/* ------------------------------------------------------------------ */
-#include "decContext.h" /* public includes */
+#include "decContext.h" /* public includes */
#include "decDouble.h" /* .. */
/* Constant mappings for shared code */
-#define DECPMAX DECDOUBLE_Pmax
-#define DECEMIN DECDOUBLE_Emin
-#define DECEMAX DECDOUBLE_Emax
+#define DECPMAX DECDOUBLE_Pmax
+#define DECEMIN DECDOUBLE_Emin
+#define DECEMAX DECDOUBLE_Emax
#define DECEMAXD DECDOUBLE_EmaxD
#define DECBYTES DECDOUBLE_Bytes
#define DECSTRING DECDOUBLE_String
#define DECECONL DECDOUBLE_EconL
-#define DECBIAS DECDOUBLE_Bias
-#define DECLETS DECDOUBLE_Declets
+#define DECBIAS DECDOUBLE_Bias
+#define DECLETS DECDOUBLE_Declets
#define DECQTINY (-DECDOUBLE_Bias)
/* parameters of next-wider format */
#define DECWBYTES DECQUAD_Bytes
@@ -55,100 +55,98 @@
#define DECWBIAS DECQUAD_Bias
/* Type and function mappings for shared code */
-#define decFloat decDouble /* Type name */
-#define decFloatWider decQuad /* Type name */
+#define decFloat decDouble /* Type name */
+#define decFloatWider decQuad /* Type name */
/* Utilities and conversions (binary results, extractors, etc.) */
-#define decFloatFromBCD decDoubleFromBCD
-#define decFloatFromInt32 decDoubleFromInt32
-#define decFloatFromPacked decDoubleFromPacked
-#define decFloatFromString decDoubleFromString
-#define decFloatFromUInt32 decDoubleFromUInt32
-#define decFloatFromWider decDoubleFromWider
-#define decFloatGetCoefficient decDoubleGetCoefficient
-#define decFloatGetExponent decDoubleGetExponent
-#define decFloatSetCoefficient decDoubleSetCoefficient
-#define decFloatSetExponent decDoubleSetExponent
-#define decFloatShow decDoubleShow
-#define decFloatToBCD decDoubleToBCD
-#define decFloatToEngString decDoubleToEngString
-#define decFloatToInt32 decDoubleToInt32
-#define decFloatToInt32Exact decDoubleToInt32Exact
-#define decFloatToPacked decDoubleToPacked
-#define decFloatToString decDoubleToString
-#define decFloatToUInt32 decDoubleToUInt32
-#define decFloatToUInt32Exact decDoubleToUInt32Exact
-#define decFloatToWider decDoubleToWider
-#define decFloatZero decDoubleZero
+#define decFloatFromBCD decDoubleFromBCD
+#define decFloatFromInt32 decDoubleFromInt32
+#define decFloatFromPacked decDoubleFromPacked
+#define decFloatFromPackedChecked decDoubleFromPackedChecked
+#define decFloatFromString decDoubleFromString
+#define decFloatFromUInt32 decDoubleFromUInt32
+#define decFloatFromWider decDoubleFromWider
+#define decFloatGetCoefficient decDoubleGetCoefficient
+#define decFloatGetExponent decDoubleGetExponent
+#define decFloatSetCoefficient decDoubleSetCoefficient
+#define decFloatSetExponent decDoubleSetExponent
+#define decFloatShow decDoubleShow
+#define decFloatToBCD decDoubleToBCD
+#define decFloatToEngString decDoubleToEngString
+#define decFloatToInt32 decDoubleToInt32
+#define decFloatToInt32Exact decDoubleToInt32Exact
+#define decFloatToPacked decDoubleToPacked
+#define decFloatToString decDoubleToString
+#define decFloatToUInt32 decDoubleToUInt32
+#define decFloatToUInt32Exact decDoubleToUInt32Exact
+#define decFloatToWider decDoubleToWider
+#define decFloatZero decDoubleZero
/* Computational (result is a decFloat) */
-#define decFloatAbs decDoubleAbs
-#define decFloatAdd decDoubleAdd
-#define decFloatAnd decDoubleAnd
-#define decFloatDivide decDoubleDivide
-#define decFloatDivideInteger decDoubleDivideInteger
-#define decFloatFMA decDoubleFMA
-#define decFloatInvert decDoubleInvert
-#define decFloatLogB decDoubleLogB
-#define decFloatMax decDoubleMax
-#define decFloatMaxMag decDoubleMaxMag
-#define decFloatMin decDoubleMin
-#define decFloatMinMag decDoubleMinMag
-#define decFloatMinus decDoubleMinus
-#define decFloatMultiply decDoubleMultiply
-#define decFloatNextMinus decDoubleNextMinus
-#define decFloatNextPlus decDoubleNextPlus
-#define decFloatNextToward decDoubleNextToward
-#define decFloatOr decDoubleOr
-#define decFloatPlus decDoublePlus
-#define decFloatQuantize decDoubleQuantize
-#define decFloatReduce decDoubleReduce
-#define decFloatRemainder decDoubleRemainder
-#define decFloatRemainderNear decDoubleRemainderNear
-#define decFloatRotate decDoubleRotate
-#define decFloatScaleB decDoubleScaleB
-#define decFloatShift decDoubleShift
-#define decFloatSubtract decDoubleSubtract
-#define decFloatToIntegralValue decDoubleToIntegralValue
-#define decFloatToIntegralExact decDoubleToIntegralExact
-#define decFloatXor decDoubleXor
+#define decFloatAbs decDoubleAbs
+#define decFloatAdd decDoubleAdd
+#define decFloatAnd decDoubleAnd
+#define decFloatDivide decDoubleDivide
+#define decFloatDivideInteger decDoubleDivideInteger
+#define decFloatFMA decDoubleFMA
+#define decFloatInvert decDoubleInvert
+#define decFloatLogB decDoubleLogB
+#define decFloatMax decDoubleMax
+#define decFloatMaxMag decDoubleMaxMag
+#define decFloatMin decDoubleMin
+#define decFloatMinMag decDoubleMinMag
+#define decFloatMinus decDoubleMinus
+#define decFloatMultiply decDoubleMultiply
+#define decFloatNextMinus decDoubleNextMinus
+#define decFloatNextPlus decDoubleNextPlus
+#define decFloatNextToward decDoubleNextToward
+#define decFloatOr decDoubleOr
+#define decFloatPlus decDoublePlus
+#define decFloatQuantize decDoubleQuantize
+#define decFloatReduce decDoubleReduce
+#define decFloatRemainder decDoubleRemainder
+#define decFloatRemainderNear decDoubleRemainderNear
+#define decFloatRotate decDoubleRotate
+#define decFloatScaleB decDoubleScaleB
+#define decFloatShift decDoubleShift
+#define decFloatSubtract decDoubleSubtract
+#define decFloatToIntegralValue decDoubleToIntegralValue
+#define decFloatToIntegralExact decDoubleToIntegralExact
+#define decFloatXor decDoubleXor
/* Comparisons */
-#define decFloatCompare decDoubleCompare
-#define decFloatCompareSignal decDoubleCompareSignal
-#define decFloatCompareTotal decDoubleCompareTotal
-#define decFloatCompareTotalMag decDoubleCompareTotalMag
+#define decFloatCompare decDoubleCompare
+#define decFloatCompareSignal decDoubleCompareSignal
+#define decFloatCompareTotal decDoubleCompareTotal
+#define decFloatCompareTotalMag decDoubleCompareTotalMag
/* Copies */
-#define decFloatCanonical decDoubleCanonical
-#define decFloatCopy decDoubleCopy
-#define decFloatCopyAbs decDoubleCopyAbs
-#define decFloatCopyNegate decDoubleCopyNegate
-#define decFloatCopySign decDoubleCopySign
+#define decFloatCanonical decDoubleCanonical
+#define decFloatCopy decDoubleCopy
+#define decFloatCopyAbs decDoubleCopyAbs
+#define decFloatCopyNegate decDoubleCopyNegate
+#define decFloatCopySign decDoubleCopySign
/* Non-computational */
-#define decFloatClass decDoubleClass
-#define decFloatClassString decDoubleClassString
-#define decFloatDigits decDoubleDigits
-#define decFloatIsCanonical decDoubleIsCanonical
-#define decFloatIsFinite decDoubleIsFinite
-#define decFloatIsInfinite decDoubleIsInfinite
-#define decFloatIsInteger decDoubleIsInteger
-#define decFloatIsNaN decDoubleIsNaN
-#define decFloatIsNormal decDoubleIsNormal
-#define decFloatIsSignaling decDoubleIsSignaling
-#define decFloatIsSignalling decDoubleIsSignalling
-#define decFloatIsSigned decDoubleIsSigned
-#define decFloatIsSubnormal decDoubleIsSubnormal
-#define decFloatIsZero decDoubleIsZero
-#define decFloatRadix decDoubleRadix
-#define decFloatSameQuantum decDoubleSameQuantum
-#define decFloatVersion decDoubleVersion
-
+#define decFloatClass decDoubleClass
+#define decFloatClassString decDoubleClassString
+#define decFloatDigits decDoubleDigits
+#define decFloatIsCanonical decDoubleIsCanonical
+#define decFloatIsFinite decDoubleIsFinite
+#define decFloatIsInfinite decDoubleIsInfinite
+#define decFloatIsInteger decDoubleIsInteger
+#define decFloatIsNaN decDoubleIsNaN
+#define decFloatIsNormal decDoubleIsNormal
+#define decFloatIsSignaling decDoubleIsSignaling
+#define decFloatIsSignalling decDoubleIsSignalling
+#define decFloatIsSigned decDoubleIsSigned
+#define decFloatIsSubnormal decDoubleIsSubnormal
+#define decFloatIsZero decDoubleIsZero
+#define decFloatRadix decDoubleRadix
+#define decFloatSameQuantum decDoubleSameQuantum
+#define decFloatVersion decDoubleVersion
#include "decNumberLocal.h" /* local includes (need DECPMAX) */
#include "decCommon.c" /* non-arithmetic decFloat routines */
#include "decBasic.c" /* basic formats routines */
-/* Below here will move to shared file as completed */
-
diff --git a/libdecnumber/decDouble.h b/libdecnumber/decDouble.h
index 53fcf406bec..aa8d77d4b73 100644
--- a/libdecnumber/decDouble.h
+++ b/libdecnumber/decDouble.h
@@ -31,24 +31,22 @@
/* ------------------------------------------------------------------ */
/* decDouble.h -- Decimal 64-bit format module header */
/* ------------------------------------------------------------------ */
-/* Please see decFloats.h for an overview and documentation details. */
-/* ------------------------------------------------------------------ */
#if !defined(DECDOUBLE)
#define DECDOUBLE
- #define DECDOUBLENAME "decimalDouble" /* Short name */
+ #define DECDOUBLENAME "decimalDouble" /* Short name */
#define DECDOUBLETITLE "Decimal 64-bit datum" /* Verbose name */
#define DECDOUBLEAUTHOR "Mike Cowlishaw" /* Who to blame */
/* parameters for decDoubles */
#define DECDOUBLE_Bytes 8 /* length */
#define DECDOUBLE_Pmax 16 /* maximum precision (digits) */
- #define DECDOUBLE_Emin -383 /* minimum adjusted exponent */
- #define DECDOUBLE_Emax 384 /* maximum adjusted exponent */
+ #define DECDOUBLE_Emin -383 /* minimum adjusted exponent */
+ #define DECDOUBLE_Emax 384 /* maximum adjusted exponent */
#define DECDOUBLE_EmaxD 3 /* maximum exponent digits */
- #define DECDOUBLE_Bias 398 /* bias for the exponent */
- #define DECDOUBLE_String 25 /* maximum string length, +1 */
+ #define DECDOUBLE_Bias 398 /* bias for the exponent */
+ #define DECDOUBLE_String 25 /* maximum string length, +1 */
#define DECDOUBLE_EconL 8 /* exponent continuation length */
#define DECDOUBLE_Declets 5 /* count of declets */
/* highest biased exponent (Elimit-1) */
@@ -58,11 +56,14 @@
#include "decContext.h"
#include "decQuad.h"
- /* The decDouble decimal 64-bit type, accessible by various types */
+ /* The decDouble decimal 64-bit type, accessible by all sizes */
typedef union {
- uint8_t bytes[DECDOUBLE_Bytes]; /* fields: 1, 5, 8, 50 bits */
+ uint8_t bytes[DECDOUBLE_Bytes]; /* fields: 1, 5, 8, 50 bits */
uint16_t shorts[DECDOUBLE_Bytes/2];
- uint32_t words[DECDOUBLE_Bytes/4];
+ uint32_t words[DECDOUBLE_Bytes/4];
+ #if DECUSE64
+ uint64_t longs[DECDOUBLE_Bytes/8];
+ #endif
} decDouble;
/* ---------------------------------------------------------------- */
@@ -75,6 +76,7 @@
extern decDouble * decDoubleFromBCD(decDouble *, int32_t, const uint8_t *, int32_t);
extern decDouble * decDoubleFromInt32(decDouble *, int32_t);
extern decDouble * decDoubleFromPacked(decDouble *, int32_t, const uint8_t *);
+ extern decDouble * decDoubleFromPackedChecked(decDouble *, int32_t, const uint8_t *);
extern decDouble * decDoubleFromString(decDouble *, const char *, decContext *);
extern decDouble * decDoubleFromUInt32(decDouble *, uint32_t);
extern decDouble * decDoubleFromWider(decDouble *, const decQuad *, decContext *);
@@ -160,7 +162,8 @@
/* decNumber conversions; these are implemented as macros so as not */
/* to force a dependency on decimal64 and decNumber in decDouble. */
+ /* decDoubleFromNumber returns a decimal64 * to avoid warnings. */
#define decDoubleToNumber(dq, dn) decimal64ToNumber((decimal64 *)(dq), dn)
- #define decDoubleFromNumber(dq, dn, set) (decDouble *)decimal64FromNumber((decimal64 *)(dq), dn, set)
+ #define decDoubleFromNumber(dq, dn, set) decimal64FromNumber((decimal64 *)(dq), dn, set)
#endif
diff --git a/libdecnumber/decNumber.c b/libdecnumber/decNumber.c
index f9a624a1afa..ebc7cf0fb50 100644
--- a/libdecnumber/decNumber.c
+++ b/libdecnumber/decNumber.c
@@ -31,24 +31,35 @@
/* ------------------------------------------------------------------ */
/* Decimal Number arithmetic module */
/* ------------------------------------------------------------------ */
-/* This module comprises the routines for General Decimal Arithmetic */
-/* as defined in the specification which may be found on the */
-/* http://www2.hursley.ibm.com/decimal web pages. It implements both */
+/* This module comprises the routines for arbitrary-precision General */
+/* Decimal Arithmetic as defined in the specification which may be */
+/* found on the General Decimal Arithmetic pages. It implements both */
/* the full ('extended') arithmetic and the simpler ('subset') */
/* arithmetic. */
/* */
-/* Usage notes: */
+/* Usage notes: */
/* */
/* 1. This code is ANSI C89 except: */
/* */
-/* If DECDPUN>4 or DECUSE64=1, the C99 64-bit int64_t and */
+/* a) C99 line comments (double forward slash) are used. (Most C */
+/* compilers accept these. If yours does not, a simple script */
+/* can be used to convert them to ANSI C comments.) */
+/* */
+/* b) Types from C99 stdint.h are used. If you do not have this */
+/* header file, see the User's Guide section of the decNumber */
+/* documentation; this lists the necessary definitions. */
+/* */
+/* c) If DECDPUN>4 or DECUSE64=1, the C99 64-bit int64_t and */
/* uint64_t types may be used. To avoid these, set DECUSE64=0 */
/* and DECDPUN<=4 (see documentation). */
/* */
+/* The code also conforms to C99 restrictions; in particular, */
+/* strict aliasing rules are observed. */
+/* */
/* 2. The decNumber format which this library uses is optimized for */
/* efficient processing of relatively short numbers; in particular */
/* it allows the use of fixed sized structures and minimizes copy */
-/* and move operations. It does, however, support arbitrary */
+/* and move operations. It does, however, support arbitrary */
/* precision (up to 999,999,999 digits) and arbitrary exponent */
/* range (Emax in the range 0 through 999,999,999 and Emin in the */
/* range -999,999,999 through 0). Mathematical functions (for */
@@ -67,7 +78,7 @@
/* permitted). Other than that case, operands must not overlap. */
/* */
/* 5. Error handling: the type of the error is ORed into the status */
-/* flags in the current context (decContext structure). The */
+/* flags in the current context (decContext structure). The */
/* SIGFPE signal is then raised if the corresponding trap-enabler */
/* flag in the decContext is set (is 1). */
/* */
@@ -76,7 +87,7 @@
/* */
/* The result of any routine which returns a number will always */
/* be a valid number (which may be a special value, such as an */
-/* Infinity or NaN). */
+/* Infinity or NaN). */
/* */
/* 6. The decNumber format is not an exchangeable concrete */
/* representation as it comprises fields which may be machine- */
@@ -84,10 +95,10 @@
/* Canonical conversions to and from strings are provided; other */
/* conversions are available in separate modules. */
/* */
-/* 7. Normally, input operands are assumed to be valid. Set DECCHECK */
+/* 7. Normally, input operands are assumed to be valid. Set DECCHECK */
/* to 1 for extended operand checking (including NULL operands). */
/* Results are undefined if a badly-formed structure (or a NULL */
-/* pointer to a structure) is provided, though with DECCHECK */
+/* pointer to a structure) is provided, though with DECCHECK */
/* enabled the operator routines are protected against exceptions. */
/* (Except if the result pointer is NULL, which is unrecoverable.) */
/* */
@@ -98,7 +109,7 @@
/* */
/* 8. Subset arithmetic is available only if DECSUBSET is set to 1. */
/* ------------------------------------------------------------------ */
-/* Implementation notes for maintenance of this module: */
+/* Implementation notes for maintenance of this module: */
/* */
/* 1. Storage leak protection: Routines which use malloc are not */
/* permitted to use return for fastpath or error exits (i.e., */
@@ -115,7 +126,7 @@
/* 3. Setting status in the context must always be the very last */
/* action in a routine, as non-0 status may raise a trap and hence */
/* the call to set status may not return (if the handler uses long */
-/* jump). Therefore all cleanup must be done first. In general, */
+/* jump). Therefore all cleanup must be done first. In general, */
/* to achieve this status is accumulated and is only applied just */
/* before return by calling decContextSetStatus (via decStatus). */
/* */
@@ -127,9 +138,9 @@
/* */
/* 4. Exponent checking is minimized by allowing the exponent to */
/* grow outside its limits during calculations, provided that */
-/* the decFinalize function is called later. Multiplication and */
+/* the decFinalize function is called later. Multiplication and */
/* division, and intermediate calculations in exponentiation, */
-/* require more careful checks because of the risk of 31-bit */
+/* require more careful checks because of the risk of 31-bit */
/* overflow (the most negative valid exponent is -1999999997, for */
/* a 999999999-digit number with adjusted exponent of -999999999). */
/* */
@@ -151,18 +162,18 @@
/* is not useful for longer numbers because overflow of 32 bits */
/* would lead to 4 multiplies, which is almost as expensive as */
/* a divide (unless a floating-point or 64-bit multiply is */
-/* assumed to be available). */
+/* assumed to be available). */
/* */
-/* 8. Unusual abbreviations that may be used in the commentary: */
+/* 8. Unusual abbreviations that may be used in the commentary: */
/* lhs -- left hand side (operand, of an operation) */
-/* lsd -- least significant digit (of coefficient) */
+/* lsd -- least significant digit (of coefficient) */
/* lsu -- least significant Unit (of coefficient) */
/* msd -- most significant digit (of coefficient) */
/* msi -- most significant item (in an array) */
/* msu -- most significant Unit (of coefficient) */
/* rhs -- right hand side (operand, of an operation) */
-/* +ve -- positive */
-/* -ve -- negative */
+/* +ve -- positive */
+/* -ve -- negative */
/* ** -- raise to the power */
/* ------------------------------------------------------------------ */
@@ -178,25 +189,25 @@
/* Public lookup table used by the D2U macro */
const uByte d2utable[DECMAXD2U+1]=D2UTABLE;
-#define DECVERB 1 /* set to 1 for verbose DECCHECK */
+#define DECVERB 1 /* set to 1 for verbose DECCHECK */
#define powers DECPOWERS /* old internal name */
/* Local constants */
#define DIVIDE 0x80 /* Divide operators */
#define REMAINDER 0x40 /* .. */
#define DIVIDEINT 0x20 /* .. */
-#define REMNEAR 0x10 /* .. */
-#define COMPARE 0x01 /* Compare operators */
-#define COMPMAX 0x02 /* .. */
-#define COMPMIN 0x03 /* .. */
+#define REMNEAR 0x10 /* .. */
+#define COMPARE 0x01 /* Compare operators */
+#define COMPMAX 0x02 /* .. */
+#define COMPMIN 0x03 /* .. */
#define COMPTOTAL 0x04 /* .. */
-#define COMPNAN 0x05 /* .. [NaN processing] */
-#define COMPSIG 0x06 /* .. [signaling COMPARE] */
+#define COMPNAN 0x05 /* .. [NaN processing] */
+#define COMPSIG 0x06 /* .. [signaling COMPARE] */
#define COMPMAXMAG 0x07 /* .. */
#define COMPMINMAG 0x08 /* .. */
-#define DEC_sNaN 0x40000000 /* local status: sNaN signal */
-#define BADINT (Int)0x80000000 /* most-negative Int; error indicator */
+#define DEC_sNaN 0x40000000 /* local status: sNaN signal */
+#define BADINT (Int)0x80000000 /* most-negative Int; error indicator */
/* Next two indicate an integer >= 10**6, and its parity (bottom bit) */
#define BIGEVEN (Int)0x80000002
#define BIGODD (Int)0x80000003
@@ -262,7 +273,7 @@ static Int decShiftToLeast(Unit *, Int, Int);
static Int decShiftToMost(Unit *, Int, Int);
static void decStatus(decNumber *, uInt, decContext *);
static void decToString(const decNumber *, char[], Flag);
-static decNumber * decTrim(decNumber *, decContext *, Flag, Int *);
+static decNumber * decTrim(decNumber *, decContext *, Flag, Flag, Int *);
static Int decUnitAddSub(const Unit *, Int, const Unit *, Int, Int,
Unit *, Int);
static Int decUnitCompare(const Unit *, Int, const Unit *, Int, Int);
@@ -302,7 +313,7 @@ uInt decAllocBytes=0; /* count of bytes allocated */
#if DECCHECK
/* Optional checking routines. Enabling these means that decNumber */
/* and decContext operands to operator routines are checked for */
-/* correctness. This roughly doubles the execution time of the */
+/* correctness. This roughly doubles the execution time of the */
/* fastest routines (and adds 600+ bytes), so should not normally be */
/* used in 'production'. */
/* decCheckInexact is used to check that inexact results have a full */
@@ -382,7 +393,7 @@ Int decNumberToInt32(const decNumber *dn, decContext *set) {
Int d; /* work */
const Unit *up; /* .. */
uInt hi=0, lo; /* .. */
- up=dn->lsu; /* -> lsu */
+ up=dn->lsu; /* -> lsu */
lo=*up; /* get 1 to 9 digits */
#if DECDPUN>1 /* split to higher */
hi=lo/10;
@@ -418,7 +429,7 @@ uInt decNumberToUInt32(const decNumber *dn, decContext *set) {
Int d; /* work */
const Unit *up; /* .. */
uInt hi=0, lo; /* .. */
- up=dn->lsu; /* -> lsu */
+ up=dn->lsu; /* -> lsu */
lo=*up; /* get 1 to 9 digits */
#if DECDPUN>1 /* split to higher */
hi=lo/10;
@@ -437,7 +448,7 @@ uInt decNumberToUInt32(const decNumber *dn, decContext *set) {
} /* decNumberToUInt32 */
/* ------------------------------------------------------------------ */
-/* to-scientific-string -- conversion to numeric string */
+/* to-scientific-string -- conversion to numeric string */
/* to-engineering-string -- conversion to numeric string */
/* */
/* decNumberToString(dn, string); */
@@ -464,30 +475,30 @@ char * decNumberToEngString(const decNumber *dn, char *string){
/* to-number -- conversion from numeric string */
/* */
/* decNumberFromString -- convert string to decNumber */
-/* dn -- the number structure to fill */
+/* dn -- the number structure to fill */
/* chars[] -- the string to convert ('\0' terminated) */
/* set -- the context used for processing any error, */
/* determining the maximum precision available */
/* (set.digits), determining the maximum and minimum */
/* exponent (set.emax and set.emin), determining if */
-/* extended values are allowed, and checking the */
+/* extended values are allowed, and checking the */
/* rounding mode if overflow occurs or rounding is */
/* needed. */
/* */
/* The length of the coefficient and the size of the exponent are */
/* checked by this routine, so the correct error (Underflow or */
-/* Overflow) can be reported or rounding applied, as necessary. */
+/* Overflow) can be reported or rounding applied, as necessary. */
/* */
/* If bad syntax is detected, the result will be a quiet NaN. */
/* ------------------------------------------------------------------ */
decNumber * decNumberFromString(decNumber *dn, const char chars[],
decContext *set) {
Int exponent=0; /* working exponent [assume 0] */
- uByte bits=0; /* working flags [assume +ve] */
+ uByte bits=0; /* working flags [assume +ve] */
Unit *res; /* where result will be built */
Unit resbuff[SD2U(DECBUFFER+9)];/* local buffer in case need temporary */
/* [+9 allows for ln() constants] */
- Unit *allocres=NULL; /* -> allocated result, iff allocated */
+ Unit *allocres=NULL; /* -> allocated result, iff allocated */
Int d=0; /* count of digits found in decimal part */
const char *dotchar=NULL; /* where dot was found */
const char *cfirst=chars; /* -> first character of decimal part */
@@ -507,7 +518,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[],
do { /* status & malloc protection */
for (c=chars;; c++) { /* -> input character */
- if (*c>='0' && *c<='9') { /* test for Arabic digit */
+ if (*c>='0' && *c<='9') { /* test for Arabic digit */
last=c;
d++; /* count of real digits */
continue; /* still in decimal part */
@@ -537,7 +548,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[],
if (!set->extended) break; /* hopeless */
#endif
/* Infinities and NaNs are possible, here */
- if (dotchar!=NULL) break; /* .. unless had a dot */
+ if (dotchar!=NULL) break; /* .. unless had a dot */
decNumberZero(dn); /* be optimistic */
if (decBiStr(c, "infinity", "INFINITY")
|| decBiStr(c, "inf", "INF")) {
@@ -548,7 +559,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[],
/* a NaN expected */
/* 2003.09.10 NaNs are now permitted to have a sign */
dn->bits=bits | DECNAN; /* assume simple NaN */
- if (*c=='s' || *c=='S') { /* looks like an sNaN */
+ if (*c=='s' || *c=='S') { /* looks like an sNaN */
c++;
dn->bits=bits | DECSNAN;
}
@@ -578,7 +589,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[],
if (d>set->digits) break;
} /* too many digits? */
/* good; drop through to convert the integer to coefficient */
- status=0; /* syntax is OK */
+ status=0; /* syntax is OK */
bits=dn->bits; /* for copy-back */
} /* last==NULL */
@@ -613,14 +624,14 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[],
/* [up to 1999999999 is OK, for example 1E-1000000998] */
}
if (nege) exponent=-exponent; /* was negative */
- status=0; /* is OK */
+ status=0; /* is OK */
} /* stuff after digits */
/* Here when whole string has been inspected; syntax is good */
/* cfirst->first digit (never dot), last->last digit (ditto) */
/* strip leading zeros/dot [leave final 0 if all 0's] */
- if (*cfirst=='0') { /* [cfirst has stepped over .] */
+ if (*cfirst=='0') { /* [cfirst has stepped over .] */
for (c=cfirst; c<last; c++, cfirst++) {
if (*c=='.') continue; /* ignore dots */
if (*c!='0') break; /* non-zero found */
@@ -637,7 +648,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[],
/* Handle decimal point... */
if (dotchar!=NULL && dotchar<last) /* non-trailing '.' found? */
- exponent-=(last-dotchar); /* adjust exponent */
+ exponent-=(last-dotchar); /* adjust exponent */
/* [we can now ignore the .] */
/* OK, the digits string is good. Assemble in the decNumber, or in */
@@ -703,7 +714,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[],
}
}
/* decNumberShow(dn); */
- } while(0); /* [for break] */
+ } while(0); /* [for break] */
if (allocres!=NULL) free(allocres); /* drop any storage used */
if (status!=0) decStatus(dn, status, set);
@@ -721,7 +732,7 @@ decNumber * decNumberFromString(decNumber *dn, const char chars[],
/* */
/* res is C, the result. C may be A */
/* rhs is A */
-/* set is the context */
+/* set is the context */
/* */
/* See also decNumberCopyAbs for a quiet bitwise version of this. */
/* C must have space for set->digits digits. */
@@ -739,7 +750,7 @@ decNumber * decNumberAbs(decNumber *res, const decNumber *rhs,
#endif
decNumberZero(&dzero); /* set 0 */
- dzero.exponent=rhs->exponent; /* [no coefficient expansion] */
+ dzero.exponent=rhs->exponent; /* [no coefficient expansion] */
decAddOp(res, &dzero, rhs, set, (uByte)(rhs->bits & DECNEG), &status);
if (status!=0) decStatus(res, status, set);
#if DECCHECK
@@ -756,7 +767,7 @@ decNumber * decNumberAbs(decNumber *res, const decNumber *rhs,
/* res is C, the result. C may be A and/or B (e.g., X=X+X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* ------------------------------------------------------------------ */
@@ -851,7 +862,7 @@ decNumber * decNumberAnd(decNumber *res, const decNumber *lhs,
/* res is C, the result. C may be A and/or B (e.g., X=X?X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for one digit (or NaN). */
/* ------------------------------------------------------------------ */
@@ -871,7 +882,7 @@ decNumber * decNumberCompare(decNumber *res, const decNumber *lhs,
/* res is C, the result. C may be A and/or B (e.g., X=X?X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for one digit (or NaN). */
/* ------------------------------------------------------------------ */
@@ -891,10 +902,10 @@ decNumber * decNumberCompareSignal(decNumber *res, const decNumber *lhs,
/* res is C, the result. C may be A and/or B (e.g., X=X?X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for one digit; the result will always be one of */
-/* -1, 0, or 1. */
+/* -1, 0, or 1. */
/* ------------------------------------------------------------------ */
decNumber * decNumberCompareTotal(decNumber *res, const decNumber *lhs,
const decNumber *rhs, decContext *set) {
@@ -912,10 +923,10 @@ decNumber * decNumberCompareTotal(decNumber *res, const decNumber *lhs,
/* res is C, the result. C may be A and/or B (e.g., X=X?X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for one digit; the result will always be one of */
-/* -1, 0, or 1. */
+/* -1, 0, or 1. */
/* ------------------------------------------------------------------ */
decNumber * decNumberCompareTotalMag(decNumber *res, const decNumber *lhs,
const decNumber *rhs, decContext *set) {
@@ -944,7 +955,7 @@ decNumber * decNumberCompareTotalMag(decNumber *res, const decNumber *lhs,
a=allocbufa; /* use the allocated space */
}
decNumberCopy(a, lhs); /* copy content */
- a->bits&=~DECNEG; /* .. and clear the sign */
+ a->bits&=~DECNEG; /* .. and clear the sign */
lhs=a; /* use copy from here on */
}
if (decNumberIsNegative(rhs)) { /* rhs<0 */
@@ -958,11 +969,11 @@ decNumber * decNumberCompareTotalMag(decNumber *res, const decNumber *lhs,
b=allocbufb; /* use the allocated space */
}
decNumberCopy(b, rhs); /* copy content */
- b->bits&=~DECNEG; /* .. and clear the sign */
+ b->bits&=~DECNEG; /* .. and clear the sign */
rhs=b; /* use copy from here on */
}
decCompareOp(res, lhs, rhs, set, COMPTOTAL, &status);
- } while(0); /* end protected */
+ } while(0); /* end protected */
if (allocbufa!=NULL) free(allocbufa); /* drop any storage used */
if (allocbufb!=NULL) free(allocbufb); /* .. */
@@ -978,7 +989,7 @@ decNumber * decNumberCompareTotalMag(decNumber *res, const decNumber *lhs,
/* res is C, the result. C may be A and/or B (e.g., X=X/X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* ------------------------------------------------------------------ */
@@ -994,14 +1005,14 @@ decNumber * decNumberDivide(decNumber *res, const decNumber *lhs,
} /* decNumberDivide */
/* ------------------------------------------------------------------ */
-/* decNumberDivideInteger -- divide and return integer quotient */
+/* decNumberDivideInteger -- divide and return integer quotient */
/* */
/* This computes C = A # B, where # is the integer divide operator */
/* */
/* res is C, the result. C may be A and/or B (e.g., X=X#X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* ------------------------------------------------------------------ */
@@ -1032,7 +1043,7 @@ decNumber * decNumberDivideInteger(decNumber *res, const decNumber *lhs,
/* */
/* An Inexact result is rounded using DEC_ROUND_HALF_EVEN; it will */
/* almost always be correctly rounded, but may be up to 1 ulp in */
-/* error in rare cases. */
+/* error in rare cases. */
/* ------------------------------------------------------------------ */
/* This is a wrapper for decExpOp which can handle the slightly wider */
/* (double) range needed by Ln (which has to be able to calculate */
@@ -1065,7 +1076,7 @@ decNumber * decNumberExp(decNumber *res, const decNumber *rhs,
}
#endif
decExpOp(res, rhs, set, &status);
- } while(0); /* end protected */
+ } while(0); /* end protected */
#if DECSUBSET
if (allocrhs !=NULL) free(allocrhs); /* drop any storage used */
@@ -1087,7 +1098,7 @@ decNumber * decNumberExp(decNumber *res, const decNumber *rhs,
/* lhs is A */
/* rhs is B */
/* fhs is C [far hand side] */
-/* set is the context */
+/* set is the context */
/* */
/* Mathematical function restrictions apply (see above); a NaN is */
/* returned with Invalid_operation if a restriction is violated. */
@@ -1146,7 +1157,7 @@ decNumber * decNumberFMA(decNumber *res, const decNumber *lhs,
/* Note sNaN has to go through addOp to shorten payload if */
/* necessary */
if ((status&DEC_Invalid_operation)!=0) {
- if (!(status&DEC_sNaN)) { /* but be true invalid */
+ if (!(status&DEC_sNaN)) { /* but be true invalid */
decNumberZero(res); /* acc not yet set */
res->bits=DECNAN;
break;
@@ -1156,12 +1167,12 @@ decNumber * decNumberFMA(decNumber *res, const decNumber *lhs,
}
#if DECCHECK
else { /* multiply was OK */
- if (status!=0) printf("Status=%08lx after FMA multiply\n", status);
+ if (status!=0) printf("Status=%08lx after FMA multiply\n", (LI)status);
}
#endif
/* add the third operand and result -> res, and all is done */
decAddOp(res, acc, fhs, set, 0, &status);
- } while(0); /* end protected */
+ } while(0); /* end protected */
if (allocbufa!=NULL) free(allocbufa); /* drop any storage used */
if (status!=0) decStatus(res, status, set);
@@ -1206,7 +1217,7 @@ decNumber * decNumberInvert(decNumber *res, const decNumber *rhs,
msudigs=MSUDIGITS(set->digits); /* [faster than remainder] */
for (; uc<=msuc; ua++, uc++) { /* Unit loop */
Unit a; /* extract unit */
- Int i, j; /* work */
+ Int i, j; /* work */
if (ua>msua) a=0;
else a=*ua;
*uc=0; /* can now write back */
@@ -1252,7 +1263,7 @@ decNumber * decNumberInvert(decNumber *res, const decNumber *rhs,
/* */
/* An Inexact result is rounded using DEC_ROUND_HALF_EVEN; it will */
/* almost always be correctly rounded, but may be up to 1 ulp in */
-/* error in rare cases. */
+/* error in rare cases. */
/* ------------------------------------------------------------------ */
/* This is a wrapper for decLnOp which can handle the slightly wider */
/* (+11) range needed by Ln, Log10, etc. (which may have to be able */
@@ -1287,7 +1298,7 @@ decNumber * decNumberLn(decNumber *res, const decNumber *rhs,
} /* extended=0 */
#endif
decLnOp(res, rhs, set, &status);
- } while(0); /* end protected */
+ } while(0); /* end protected */
#if DECSUBSET
if (allocrhs !=NULL) free(allocrhs); /* drop any storage used */
@@ -1301,7 +1312,7 @@ decNumber * decNumberLn(decNumber *res, const decNumber *rhs,
} /* decNumberLn */
/* ------------------------------------------------------------------ */
-/* decNumberLogB - get adjusted exponent, by 754r rules */
+/* decNumberLogB - get adjusted exponent, by 754 rules */
/* */
/* This computes C = adjustedexponent(A) */
/* */
@@ -1336,9 +1347,9 @@ decNumber * decNumberLogB(decNumber *res, const decNumber *rhs,
if (decNumberIsNaN(rhs)) decNaNs(res, rhs, NULL, set, &status);
else if (decNumberIsInfinite(rhs)) decNumberCopyAbs(res, rhs);
else if (decNumberIsZero(rhs)) {
- decNumberZero(res); /* prepare for Infinity */
+ decNumberZero(res); /* prepare for Infinity */
res->bits=DECNEG|DECINF; /* -Infinity */
- status|=DEC_Division_by_zero; /* as per 754r */
+ status|=DEC_Division_by_zero; /* as per 754 */
}
else { /* finite non-zero */
Int ae=rhs->exponent+rhs->digits-1; /* adjusted exponent */
@@ -1352,7 +1363,7 @@ decNumber * decNumberLogB(decNumber *res, const decNumber *rhs,
/* ------------------------------------------------------------------ */
/* decNumberLog10 -- logarithm in base 10 */
/* */
-/* This computes C = log10(A) */
+/* This computes C = log10(A) */
/* */
/* res is C, the result. C may be A */
/* rhs is A */
@@ -1371,13 +1382,13 @@ decNumber * decNumberLogB(decNumber *res, const decNumber *rhs,
/* */
/* An Inexact result is rounded using DEC_ROUND_HALF_EVEN; it will */
/* almost always be correctly rounded, but may be up to 1 ulp in */
-/* error in rare cases. */
+/* error in rare cases. */
/* ------------------------------------------------------------------ */
/* This calculates ln(A)/ln(10) using appropriate precision. For */
/* ln(A) this is the max(p, rhs->digits + t) + 3, where p is the */
/* requested digits and t is the number of digits in the exponent */
-/* (maximum 6). For ln(10) it is p + 3; this is often handled by the */
-/* fastpath in decLnOp. The final division is done to the requested */
+/* (maximum 6). For ln(10) it is p + 3; this is often handled by the */
+/* fastpath in decLnOp. The final division is done to the requested */
/* precision. */
/* ------------------------------------------------------------------ */
decNumber * decNumberLog10(decNumber *res, const decNumber *rhs,
@@ -1444,7 +1455,7 @@ decNumber * decNumberLog10(decNumber *res, const decNumber *rhs,
decNumberFromInt32(w, w->exponent);
residue=0;
decCopyFit(res, w, set, &residue, &status); /* copy & round */
- decFinish(res, set, &residue, &status); /* cleanup/set flags */
+ decFinish(res, set, &residue, &status); /* cleanup/set flags */
break;
} /* not a power of 10 */
} /* not a candidate for exact */
@@ -1501,7 +1512,7 @@ decNumber * decNumberLog10(decNumber *res, const decNumber *rhs,
aset.digits=set->digits; /* for final divide */
decDivideOp(res, a, b, &aset, DIVIDE, &status); /* into result */
- } while(0); /* [for break] */
+ } while(0); /* [for break] */
if (allocbufa!=NULL) free(allocbufa); /* drop any storage used */
if (allocbufb!=NULL) free(allocbufb); /* .. */
@@ -1519,12 +1530,12 @@ decNumber * decNumberLog10(decNumber *res, const decNumber *rhs,
/* ------------------------------------------------------------------ */
/* decNumberMax -- compare two Numbers and return the maximum */
/* */
-/* This computes C = A ? B, returning the maximum by 754R rules */
+/* This computes C = A ? B, returning the maximum by 754 rules */
/* */
/* res is C, the result. C may be A and/or B (e.g., X=X?X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* ------------------------------------------------------------------ */
@@ -1542,12 +1553,12 @@ decNumber * decNumberMax(decNumber *res, const decNumber *lhs,
/* ------------------------------------------------------------------ */
/* decNumberMaxMag -- compare and return the maximum by magnitude */
/* */
-/* This computes C = A ? B, returning the maximum by 754R rules */
+/* This computes C = A ? B, returning the maximum by 754 rules */
/* */
/* res is C, the result. C may be A and/or B (e.g., X=X?X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* ------------------------------------------------------------------ */
@@ -1565,12 +1576,12 @@ decNumber * decNumberMaxMag(decNumber *res, const decNumber *lhs,
/* ------------------------------------------------------------------ */
/* decNumberMin -- compare two Numbers and return the minimum */
/* */
-/* This computes C = A ? B, returning the minimum by 754R rules */
+/* This computes C = A ? B, returning the minimum by 754 rules */
/* */
/* res is C, the result. C may be A and/or B (e.g., X=X?X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* ------------------------------------------------------------------ */
@@ -1588,12 +1599,12 @@ decNumber * decNumberMin(decNumber *res, const decNumber *lhs,
/* ------------------------------------------------------------------ */
/* decNumberMinMag -- compare and return the minimum by magnitude */
/* */
-/* This computes C = A ? B, returning the minimum by 754R rules */
+/* This computes C = A ? B, returning the minimum by 754 rules */
/* */
/* res is C, the result. C may be A and/or B (e.g., X=X?X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* ------------------------------------------------------------------ */
@@ -1615,7 +1626,7 @@ decNumber * decNumberMinMag(decNumber *res, const decNumber *lhs,
/* */
/* res is C, the result. C may be A */
/* rhs is A */
-/* set is the context */
+/* set is the context */
/* */
/* See also decNumberCopyNegate for a quiet bitwise version of this. */
/* C must have space for set->digits digits. */
@@ -1632,7 +1643,7 @@ decNumber * decNumberMinus(decNumber *res, const decNumber *rhs,
#endif
decNumberZero(&dzero); /* make 0 */
- dzero.exponent=rhs->exponent; /* [no coefficient expansion] */
+ dzero.exponent=rhs->exponent; /* [no coefficient expansion] */
decAddOp(res, &dzero, rhs, set, DECNEG, &status);
if (status!=0) decStatus(res, status, set);
#if DECCHECK
@@ -1642,15 +1653,15 @@ decNumber * decNumberMinus(decNumber *res, const decNumber *rhs,
} /* decNumberMinus */
/* ------------------------------------------------------------------ */
-/* decNumberNextMinus -- next towards -Infinity */
+/* decNumberNextMinus -- next towards -Infinity */
/* */
/* This computes C = A - infinitesimal, rounded towards -Infinity */
/* */
/* res is C, the result. C may be A */
/* rhs is A */
-/* set is the context */
+/* set is the context */
/* */
-/* This is a generalization of 754r NextDown. */
+/* This is a generalization of 754 NextDown. */
/* ------------------------------------------------------------------ */
decNumber * decNumberNextMinus(decNumber *res, const decNumber *rhs,
decContext *set) {
@@ -1684,9 +1695,9 @@ decNumber * decNumberNextMinus(decNumber *res, const decNumber *rhs,
/* */
/* res is C, the result. C may be A */
/* rhs is A */
-/* set is the context */
+/* set is the context */
/* */
-/* This is a generalization of 754r NextUp. */
+/* This is a generalization of 754 NextUp. */
/* ------------------------------------------------------------------ */
decNumber * decNumberNextPlus(decNumber *res, const decNumber *rhs,
decContext *set) {
@@ -1718,14 +1729,15 @@ decNumber * decNumberNextPlus(decNumber *res, const decNumber *rhs,
/* decNumberNextToward -- next towards rhs */
/* */
/* This computes C = A +/- infinitesimal, rounded towards */
-/* +/-Infinity in the direction of B, as per 754r nextafter rules */
+/* +/-Infinity in the direction of B, as per 754-1985 nextafter */
+/* modified during revision but dropped from 754-2008. */
/* */
/* res is C, the result. C may be A or B. */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
-/* This is a generalization of 754r NextAfter. */
+/* This is a generalization of 754-1985 NextAfter. */
/* ------------------------------------------------------------------ */
decNumber * decNumberNextToward(decNumber *res, const decNumber *lhs,
const decNumber *rhs, decContext *set) {
@@ -1747,27 +1759,27 @@ decNumber * decNumberNextToward(decNumber *res, const decNumber *lhs,
if (result==0) decNumberCopySign(res, lhs, rhs); /* easy */
else { /* differ: need NextPlus or NextMinus */
uByte sub; /* add or subtract */
- if (result<0) { /* lhs<rhs, do nextplus */
+ if (result<0) { /* lhs<rhs, do nextplus */
/* -Infinity is the special case */
if ((lhs->bits&(DECINF|DECNEG))==(DECINF|DECNEG)) {
decSetMaxValue(res, set);
res->bits=DECNEG; /* negative */
- return res; /* there is no status to set */
+ return res; /* there is no status to set */
}
workset.round=DEC_ROUND_CEILING;
sub=0; /* add, please */
} /* plus */
- else { /* lhs>rhs, do nextminus */
+ else { /* lhs>rhs, do nextminus */
/* +Infinity is the special case */
if ((lhs->bits&(DECINF|DECNEG))==DECINF) {
decSetMaxValue(res, set);
- return res; /* there is no status to set */
+ return res; /* there is no status to set */
}
workset.round=DEC_ROUND_FLOOR;
sub=DECNEG; /* subtract, please */
} /* minus */
decNumberZero(&dtiny); /* start with 0 */
- dtiny.lsu[0]=1; /* make number that is .. */
+ dtiny.lsu[0]=1; /* make number that is .. */
dtiny.exponent=DEC_MIN_EMIN-1; /* .. smaller than tiniest */
decAddOp(res, lhs, &dtiny, &workset, sub, &status); /* + or - */
/* turn off exceptions if the result is a normal number */
@@ -1856,7 +1868,7 @@ decNumber * decNumberOr(decNumber *res, const decNumber *lhs,
/* */
/* res is C, the result. C may be A */
/* rhs is A */
-/* set is the context */
+/* set is the context */
/* */
/* See also decNumberCopy for a quiet bitwise version of this. */
/* C must have space for set->digits digits. */
@@ -1874,7 +1886,7 @@ decNumber * decNumberPlus(decNumber *res, const decNumber *rhs,
#endif
decNumberZero(&dzero); /* make 0 */
- dzero.exponent=rhs->exponent; /* [no coefficient expansion] */
+ dzero.exponent=rhs->exponent; /* [no coefficient expansion] */
decAddOp(res, &dzero, rhs, set, 0, &status);
if (status!=0) decStatus(res, status, set);
#if DECCHECK
@@ -1891,7 +1903,7 @@ decNumber * decNumberPlus(decNumber *res, const decNumber *rhs,
/* res is C, the result. C may be A and/or B (e.g., X=X+X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* ------------------------------------------------------------------ */
@@ -1914,7 +1926,7 @@ decNumber * decNumberMultiply(decNumber *res, const decNumber *lhs,
/* res is C, the result. C may be A and/or B (e.g., X=X**X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* */
@@ -1930,7 +1942,7 @@ decNumber * decNumberMultiply(decNumber *res, const decNumber *lhs,
/* */
/* The final result is rounded according to the context; it will */
/* almost always be correctly rounded, but may be up to 1 ulp in */
-/* error in rare cases. */
+/* error in rare cases. */
/* ------------------------------------------------------------------ */
decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
const decNumber *rhs, decContext *set) {
@@ -1953,7 +1965,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
Flag seenbit; /* seen a bit while powering */
Int residue=0; /* rounding residue */
uInt status=0; /* accumulators */
- uByte bits=0; /* result sign if errors */
+ uByte bits=0; /* result sign if errors */
decContext aset; /* working context */
decNumber dnOne; /* work value 1... */
/* local accumulator buffer [a decNumber, with digits+elength+1 digits] */
@@ -1993,7 +2005,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
if (decNumberIsNegative(lhs) /* lhs<0 */
&& !decNumberIsZero(lhs)) /* .. */
status|=DEC_Invalid_operation;
- else { /* lhs >=0 */
+ else { /* lhs >=0 */
decNumberZero(&dnOne); /* set up 1 */
dnOne.lsu[0]=1;
decNumberCompare(dac, lhs, &dnOne, set); /* lhs ? 1 */
@@ -2020,14 +2032,14 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
/* Original rhs may be an integer that fits and is in range */
n=decGetInt(rhs);
if (n!=BADINT) { /* it is an integer */
- rhsint=1; /* record the fact for 1**n */
+ rhsint=1; /* record the fact for 1**n */
isoddint=(Flag)n&1; /* [works even if big] */
if (n!=BIGEVEN && n!=BIGODD) /* can use integer path? */
useint=1; /* looks good */
}
if (decNumberIsNegative(lhs) /* -x .. */
- && isoddint) bits=DECNEG; /* .. to an odd power */
+ && isoddint) bits=DECNEG; /* .. to an odd power */
/* handle LHS infinity */
if (decNumberIsInfinite(lhs)) { /* [NaNs already handled] */
@@ -2060,7 +2072,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
uByte rbits=rhs->bits; /* save */
if (rbits & DECNEG) { /* was a 0**(-n) */
#if DECSUBSET
- if (!set->extended) { /* [bad if subset] */
+ if (!set->extended) { /* [bad if subset] */
status|=DEC_Invalid_operation;
break;}
#endif
@@ -2089,7 +2101,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
aset.clamp=0; /* and no concrete format */
/* calculate the result using exp(ln(lhs)*rhs), which can */
- /* all be done into the accumulator, dac. The precision needed */
+ /* all be done into the accumulator, dac. The precision needed */
/* is enough to contain the full information in the lhs (which */
/* is the total digits, including exponent), or the requested */
/* precision, if larger, + 4; 6 is used for the exponent */
@@ -2146,7 +2158,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
if (!rhsint) { /* add padding */
Int shift=set->digits-1;
dac->digits=decShiftToMost(dac->lsu, 1, shift);
- dac->exponent=-shift; /* make 1.0000... */
+ dac->exponent=-shift; /* make 1.0000... */
status|=DEC_Inexact|DEC_Rounded; /* deemed inexact */
}
}
@@ -2164,7 +2176,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
/* if a negative power the constant 1 is needed, and if not subset */
/* invert the lhs now rather than inverting the result later */
if (decNumberIsNegative(rhs)) { /* was a **-n [hence digits>0] */
- decNumber *inv=invbuff; /* asssume use fixed buffer */
+ decNumber *inv=invbuff; /* asssume use fixed buffer */
decNumberCopy(&dnOne, dac); /* dnOne=1; [needed now or later] */
#if DECSUBSET
if (set->extended) { /* need to calculate 1/lhs */
@@ -2197,13 +2209,13 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
}
/* [the following two lines revealed an optimizer bug in a C++ */
/* compiler, with symptom: 5**3 -> 25, when n=n+n was used] */
- n=n<<1; /* move next bit to testable position */
+ n=n<<1; /* move next bit to testable position */
if (n<0) { /* top bit is set */
seenbit=1; /* OK, significant bit seen */
decMultiplyOp(dac, dac, lhs, &aset, &status); /* dac=dac*x */
}
if (i==31) break; /* that was the last bit */
- if (!seenbit) continue; /* no need to square 1 */
+ if (!seenbit) continue; /* no need to square 1 */
decMultiplyOp(dac, dac, dac, &aset, &status); /* dac=dac*dac [square] */
} /*i*/ /* 32 bits */
@@ -2242,9 +2254,9 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
decCopyFit(res, dac, set, &residue, &status);
decFinish(res, set, &residue, &status); /* final cleanup */
#if DECSUBSET
- if (!set->extended) decTrim(res, set, 0, &dropped); /* trailing zeros */
+ if (!set->extended) decTrim(res, set, 0, 1, &dropped); /* trailing zeros */
#endif
- } while(0); /* end protected */
+ } while(0); /* end protected */
if (allocdac!=NULL) free(allocdac); /* drop any storage used */
if (allocinv!=NULL) free(allocinv); /* .. */
@@ -2270,7 +2282,7 @@ decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
/* res is C, the result. C may be A or B */
/* lhs is A, the number to adjust */
/* rhs is B, the number with exponent to match */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* */
@@ -2288,11 +2300,11 @@ decNumber * decNumberQuantize(decNumber *res, const decNumber *lhs,
/* ------------------------------------------------------------------ */
/* decNumberReduce -- remove trailing zeros */
/* */
-/* This computes C = 0 + A, and normalizes the result */
+/* This computes C = 0 + A, and normalizes the result */
/* */
/* res is C, the result. C may be A */
/* rhs is A */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* ------------------------------------------------------------------ */
@@ -2309,7 +2321,7 @@ decNumber * decNumberReduce(decNumber *res, const decNumber *rhs,
#endif
uInt status=0; /* as usual */
Int residue=0; /* as usual */
- Int dropped; /* work */
+ Int dropped; /* work */
#if DECCHECK
if (decCheckOperands(res, DECUNUSED, rhs, set)) return res;
@@ -2337,8 +2349,9 @@ decNumber * decNumberReduce(decNumber *res, const decNumber *rhs,
/* reduce result to the requested length and copy to result */
decCopyFit(res, rhs, set, &residue, &status); /* copy & round */
decFinish(res, set, &residue, &status); /* cleanup/set flags */
- decTrim(res, set, 1, &dropped); /* normalize in place */
- } while(0); /* end protected */
+ decTrim(res, set, 1, 0, &dropped); /* normalize in place */
+ /* [may clamp] */
+ } while(0); /* end protected */
#if DECSUBSET
if (allocrhs !=NULL) free(allocrhs); /* .. */
@@ -2358,7 +2371,7 @@ decNumber * decNumberReduce(decNumber *res, const decNumber *rhs,
/* res is C, the result. C may be A or B */
/* lhs is A, the number to adjust */
/* rhs is B, the requested exponent */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* */
@@ -2381,7 +2394,7 @@ decNumber * decNumberRescale(decNumber *res, const decNumber *lhs,
/* res is C, the result. C may be A and/or B (e.g., X=X%X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* ------------------------------------------------------------------ */
@@ -2404,7 +2417,7 @@ decNumber * decNumberRemainder(decNumber *res, const decNumber *lhs,
/* res is C, the result. C may be A and/or B (e.g., X=X%X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* ------------------------------------------------------------------ */
@@ -2425,15 +2438,15 @@ decNumber * decNumberRemainderNear(decNumber *res, const decNumber *lhs,
/* This computes C = A rot B (in base ten and rotating set->digits */
/* digits). */
/* */
-/* res is C, the result. C may be A and/or B (e.g., X=XrotX) */
+/* res is C, the result. C may be A and/or B (e.g., X=XrotX) */
/* lhs is A */
/* rhs is B, the number of digits to rotate (-ve to right) */
-/* set is the context */
+/* set is the context */
/* */
/* The digits of the coefficient of A are rotated to the left (if B */
/* is positive) or to the right (if B is negative) without adjusting */
/* the exponent or the sign of A. If lhs->digits is less than */
-/* set->digits the coefficient is padded with zeros on the left */
+/* set->digits the coefficient is padded with zeros on the left */
/* before the rotate. Any leading zeros in the result are removed */
/* as usual. */
/* */
@@ -2473,10 +2486,10 @@ decNumber * decNumberRotate(decNumber *res, const decNumber *lhs,
&& !decNumberIsInfinite(res)) { /* lhs was infinite */
/* left-rotate to do; 0 < rotate < set->digits */
uInt units, shift; /* work */
- uInt msudigits; /* digits in result msu */
+ uInt msudigits; /* digits in result msu */
Unit *msu=res->lsu+D2U(res->digits)-1; /* current msu */
Unit *msumax=res->lsu+D2U(set->digits)-1; /* rotation msu */
- for (msu++; msu<=msumax; msu++) *msu=0; /* ensure high units=0 */
+ for (msu++; msu<=msumax; msu++) *msu=0; /* ensure high units=0 */
res->digits=set->digits; /* now full-length */
msudigits=MSUDIGITS(res->digits); /* actual digits in msu */
@@ -2544,7 +2557,7 @@ decNumber * decNumberRotate(decNumber *res, const decNumber *lhs,
/* (reversing is easy and fast) */
decReverse(res->lsu+units, msumax); /* left part */
decReverse(res->lsu, res->lsu+units-1); /* right part */
- decReverse(res->lsu, msumax); /* whole */
+ decReverse(res->lsu, msumax); /* whole */
} /* whole units to rotate */
/* the rotation may have left an undetermined number of zeros */
/* on the left, so true length needs to be calculated */
@@ -2559,7 +2572,7 @@ decNumber * decNumberRotate(decNumber *res, const decNumber *lhs,
/* ------------------------------------------------------------------ */
/* decNumberSameQuantum -- test for equal exponents */
/* */
-/* res is the result number, which will contain either 0 or 1 */
+/* res is the result number, which will contain either 0 or 1 */
/* lhs is a number to test */
/* rhs is the second (usually a pattern) */
/* */
@@ -2586,15 +2599,15 @@ decNumber * decNumberSameQuantum(decNumber *res, const decNumber *lhs,
} /* decNumberSameQuantum */
/* ------------------------------------------------------------------ */
-/* decNumberScaleB -- multiply by a power of 10 */
+/* decNumberScaleB -- multiply by a power of 10 */
/* */
-/* This computes C = A x 10**B where B is an integer (q=0) with */
+/* This computes C = A x 10**B where B is an integer (q=0) with */
/* maximum magnitude 2*(emax+digits) */
/* */
/* res is C, the result. C may be A or B */
/* lhs is A, the number to adjust */
/* rhs is B, the requested power of ten to use */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* */
@@ -2604,7 +2617,7 @@ decNumber * decNumberScaleB(decNumber *res, const decNumber *lhs,
const decNumber *rhs, decContext *set) {
Int reqexp; /* requested exponent change [B] */
uInt status=0; /* accumulator */
- Int residue; /* work */
+ Int residue; /* work */
#if DECCHECK
if (decCheckOperands(res, lhs, rhs, set)) return res;
@@ -2644,7 +2657,7 @@ decNumber * decNumberScaleB(decNumber *res, const decNumber *lhs,
/* res is C, the result. C may be A and/or B (e.g., X=X<<X) */
/* lhs is A */
/* rhs is B, the number of digits to shift (-ve to right) */
-/* set is the context */
+/* set is the context */
/* */
/* The digits of the coefficient of A are shifted to the left (if B */
/* is positive) or to the right (if B is negative) without adjusting */
@@ -2675,8 +2688,8 @@ decNumber * decNumberShift(decNumber *res, const decNumber *lhs,
else { /* both numeric, rhs is an integer */
shift=decGetInt(rhs); /* [cannot fail] */
if (shift==BADINT /* something bad .. */
- || shift==BIGODD || shift==BIGEVEN /* .. very big .. */
- || abs(shift)>set->digits) /* .. or out of range */
+ || shift==BIGODD || shift==BIGEVEN /* .. very big .. */
+ || abs(shift)>set->digits) /* .. or out of range */
status=DEC_Invalid_operation;
else { /* rhs is OK */
decNumberCopy(res, lhs);
@@ -2744,27 +2757,27 @@ decNumber * decNumberShift(decNumber *res, const decNumber *lhs,
/* if x < 0 then */
/* assert false */
/* else */
-/* result 0 */
+/* result 0 */
/* end if */
/* end if */
-/* var f := setexp(x, 0) % fraction part of x [0.1 <= x < 1] */
+/* var f := setexp(x, 0) % fraction part of x [0.1 <= x < 1] */
/* var e := getexp(x) % exponent part of x */
/* var approx : real */
-/* if e mod 2 = 0 then */
+/* if e mod 2 = 0 then */
/* approx := .259 + .819 * f % approx to root of f */
-/* else */
+/* else */
/* f := f/l0 % adjustments */
-/* e := e + 1 % for odd */
-/* approx := .0819 + 2.59 * f % exponent */
+/* e := e + 1 % for odd */
+/* approx := .0819 + 2.59 * f % exponent */
/* end if */
/* */
/* var p:= 3 */
/* const maxp := currentprecision + 2 */
-/* loop */
+/* loop */
/* p := min(2*p - 2, maxp) % p = 4,6,10, . . . , maxp */
/* precision p */
-/* approx := .5 * (approx + f/approx) */
-/* exit when p = maxp */
+/* approx := .5 * (approx + f/approx) */
+/* exit when p = maxp */
/* end loop */
/* */
/* % approx is now within 1 ulp of the properly rounded square root */
@@ -2794,11 +2807,11 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
Int workp; /* working precision */
Int residue=0; /* rounding residue */
uInt status=0, ignore=0; /* status accumulators */
- uInt rstatus; /* .. */
+ uInt rstatus; /* .. */
Int exp; /* working exponent */
Int ideal; /* ideal (preferred) exponent */
Int needbytes; /* work */
- Int dropped; /* .. */
+ Int dropped; /* .. */
#if DECSUBSET
decNumber *allocrhs=NULL; /* non-NULL if rounded rhs allocated */
@@ -2849,9 +2862,9 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
}
/* calculate the ideal (preferred) exponent [floor(exp/2)] */
- /* [We would like to write: ideal=rhs->exponent>>1, but this */
+ /* [It would be nicer to write: ideal=rhs->exponent>>1, but this */
/* generates a compiler warning. Generated code is the same.] */
- ideal=(rhs->exponent&~1)/2; /* target */
+ ideal=(rhs->exponent&~1)/2; /* target */
/* handle zeros */
if (ISZERO(rhs)) {
@@ -2876,6 +2889,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
/* b -- intermediate temporary result (same size as a) */
/* if any is too long for local storage, then allocate */
workp=MAXI(set->digits+1, rhs->digits); /* actual rounding precision */
+ workp=MAXI(workp, 7); /* at least 7 for low cases */
maxp=workp+2; /* largest working precision */
needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit);
@@ -2891,7 +2905,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
if (needbytes>(Int)sizeof(bufa)) { /* [same applies to b] */
allocbufa=(decNumber *)malloc(needbytes);
allocbufb=(decNumber *)malloc(needbytes);
- if (allocbufa==NULL || allocbufb==NULL) { /* hopeless */
+ if (allocbufa==NULL || allocbufb==NULL) { /* hopeless */
status|=DEC_Insufficient_storage;
break;}
a=allocbufa; /* use the allocated spaces */
@@ -2905,6 +2919,8 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
/* set up working context */
decContextDefault(&workset, DEC_INIT_DECIMAL64);
+ workset.emax=DEC_MAX_EMAX;
+ workset.emin=DEC_MIN_EMIN;
/* [Until further notice, no error is possible and status bits */
/* (Rounded, etc.) should be ignored, not accumulated.] */
@@ -2913,7 +2929,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
workset.digits=workp; /* p for initial calculation */
t->bits=0; t->digits=3;
a->bits=0; a->digits=3;
- if ((exp & 1)==0) { /* even exponent */
+ if ((exp & 1)==0) { /* even exponent */
/* Set t=0.259, a=0.819 */
t->exponent=-3;
a->exponent=-3;
@@ -2945,6 +2961,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
a->lsu[0]=9; a->lsu[1]=5; a->lsu[2]=2;
#endif
}
+
decMultiplyOp(a, a, f, &workset, &ignore); /* a=a*f */
decAddOp(a, a, t, &workset, 0, &ignore); /* ..+t */
/* [a is now the initial approximation for sqrt(f), calculated with */
@@ -2956,16 +2973,14 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
t->lsu[0]=5; /* .. */
t->exponent=-1; /* .. */
workset.digits=3; /* initial p */
- for (;;) {
+ for (; workset.digits<maxp;) {
/* set p to min(2*p - 2, maxp) [hence 3; or: 4, 6, 10, ... , maxp] */
- workset.digits=workset.digits*2-2;
- if (workset.digits>maxp) workset.digits=maxp;
+ workset.digits=MINI(workset.digits*2-2, maxp);
/* a = 0.5 * (a + f/a) */
/* [calculated at p then rounded to currentprecision] */
decDivideOp(b, f, a, &workset, DIVIDE, &ignore); /* b=f/a */
- decAddOp(b, b, a, &workset, 0, &ignore); /* b=b+a */
- decMultiplyOp(a, b, t, &workset, &ignore); /* a=b*0.5 */
- if (a->digits==maxp) break; /* have required digits */
+ decAddOp(b, b, a, &workset, 0, &ignore); /* b=b+a */
+ decMultiplyOp(a, b, t, &workset, &ignore); /* a=b*0.5 */
} /* loop */
/* Here, 0.1 <= a < 1 [Hull], and a has maxp digits */
@@ -2974,8 +2989,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
/* correctly */
approxset=*set; /* get emin, emax, etc. */
approxset.round=DEC_ROUND_HALF_EVEN;
- a->exponent+=exp/2; /* set correct exponent */
-
+ a->exponent+=exp/2; /* set correct exponent */
rstatus=0; /* clear status */
residue=0; /* .. and accumulator */
decCopyFit(a, a, &approxset, &residue, &rstatus); /* reduce (if needed) */
@@ -2993,7 +3007,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
status|=(rstatus & ~(DEC_Rounded|DEC_Inexact));
/* Carry out the Hull correction */
- a->exponent-=exp/2; /* back to 0.1->1 */
+ a->exponent-=exp/2; /* back to 0.1->1 */
/* a is now at final precision and within 1 ulp of the properly */
/* rounded square root of f; to ensure proper rounding, compare */
@@ -3035,18 +3049,18 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
/* estimation are irrelevant, so status was not accumulated] */
/* Here, 0.1 <= a < 1 (still), so adjust back */
- a->exponent+=exp/2; /* set correct exponent */
+ a->exponent+=exp/2; /* set correct exponent */
/* count droppable zeros [after any subnormal rounding] by */
/* trimming a copy */
decNumberCopy(b, a);
- decTrim(b, set, 1, &dropped); /* [drops trailing zeros] */
+ decTrim(b, set, 1, 1, &dropped); /* [drops trailing zeros] */
- /* Set Inexact and Rounded. The answer can only be exact if */
- /* it is short enough so that squaring it could fit in workp digits, */
- /* and it cannot have trailing zeros due to clamping, so these are */
- /* the only (relatively rare) conditions a careful check is needed */
- if (b->digits*2-1 > workp && !set->clamp) { /* cannot fit */
+ /* Set Inexact and Rounded. The answer can only be exact if */
+ /* it is short enough so that squaring it could fit in workp */
+ /* digits, so this is the only (relatively rare) condition that */
+ /* a careful check is needed */
+ if (b->digits*2-1 > workp) { /* cannot fit */
status|=DEC_Inexact|DEC_Rounded;
}
else { /* could be exact/unrounded */
@@ -3058,12 +3072,19 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
else { /* plausible */
decCompareOp(t, b, rhs, &workset, COMPARE, &mstatus); /* b ? rhs */
if (!ISZERO(t)) status|=DEC_Inexact|DEC_Rounded; /* not equal */
- else { /* is Exact */
+ else { /* is Exact */
/* here, dropped is the count of trailing zeros in 'a' */
/* use closest exponent to ideal... */
- Int todrop=ideal-a->exponent; /* most that can be dropped */
+ Int todrop=ideal-a->exponent; /* most that can be dropped */
if (todrop<0) status|=DEC_Rounded; /* ideally would add 0s */
else { /* unrounded */
+ /* there are some to drop, but emax may not allow all */
+ Int maxexp=set->emax-set->digits+1;
+ Int maxdrop=maxexp-a->exponent;
+ if (todrop>maxdrop && set->clamp) { /* apply clamping */
+ todrop=maxdrop;
+ status|=DEC_Clamped;
+ }
if (dropped<todrop) { /* clamp to those available */
todrop=dropped;
status|=DEC_Clamped;
@@ -3093,11 +3114,11 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
}
decNumberCopy(res, a); /* a is now the result */
- } while(0); /* end protected */
+ } while(0); /* end protected */
- if (allocbuff!=NULL) free(allocbuff); /* drop any storage used */
- if (allocbufa!=NULL) free(allocbufa); /* .. */
- if (allocbufb!=NULL) free(allocbufb); /* .. */
+ if (allocbuff!=NULL) free(allocbuff); /* drop any storage used */
+ if (allocbufa!=NULL) free(allocbufa); /* .. */
+ if (allocbufb!=NULL) free(allocbufb); /* .. */
#if DECSUBSET
if (allocrhs !=NULL) free(allocrhs); /* .. */
#endif
@@ -3116,7 +3137,7 @@ decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs,
/* res is C, the result. C may be A and/or B (e.g., X=X-X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* */
/* C must have space for set->digits digits. */
/* ------------------------------------------------------------------ */
@@ -3138,7 +3159,7 @@ decNumber * decNumberSubtract(decNumber *res, const decNumber *lhs,
/* */
/* res is the result */
/* rhs is input number */
-/* set is the context */
+/* set is the context */
/* */
/* res must have space for any value of rhs. */
/* */
@@ -3173,9 +3194,9 @@ decNumber * decNumberToIntegralExact(decNumber *res, const decNumber *rhs,
if (rhs->exponent>=0) return decNumberCopy(res, rhs);
/* that was easy, but if negative exponent there is work to do... */
workset=*set; /* clone rounding, etc. */
- workset.digits=rhs->digits; /* no length rounding */
+ workset.digits=rhs->digits; /* no length rounding */
workset.traps=0; /* no traps */
- decNumberZero(&dn); /* make a number with exponent 0 */
+ decNumberZero(&dn); /* make a number with exponent 0 */
decNumberQuantize(res, rhs, &dn, &workset);
status|=workset.status;
}
@@ -3269,9 +3290,9 @@ decNumber * decNumberXor(decNumber *res, const decNumber *lhs,
/* ================================================================== */
/* ------------------------------------------------------------------ */
-/* decNumberClass -- return the decClass of a decNumber */
+/* decNumberClass -- return the decClass of a decNumber */
/* dn -- the decNumber to test */
-/* set -- the context to use for Emin */
+/* set -- the context to use for Emin */
/* returns the decClass enum */
/* ------------------------------------------------------------------ */
enum decClass decNumberClass(const decNumber *dn, decContext *set) {
@@ -3347,7 +3368,7 @@ decNumber * decNumberCopy(decNumber *dest, const decNumber *src) {
const Unit *smsup, *s; /* work */
Unit *d; /* .. */
/* memcpy for the remaining Units would be safe as they cannot */
- /* overlap. However, this explicit loop is faster in short cases. */
+ /* overlap. However, this explicit loop is faster in short cases. */
d=dest->lsu+1; /* -> first destination */
smsup=src->lsu+D2U(src->digits); /* -> source msu+1 */
for (s=src->lsu+1; s<smsup; s++, d++) *d=*s;
@@ -3400,7 +3421,7 @@ decNumber * decNumberCopyNegate(decNumber *res, const decNumber *rhs) {
/* ------------------------------------------------------------------ */
/* decNumberCopySign -- quiet copy and set sign operator */
/* */
-/* This sets C = A with the sign of B */
+/* This sets C = A with the sign of B */
/* */
/* res is C, the result. C may be A */
/* lhs is A */
@@ -3424,7 +3445,7 @@ decNumber * decNumberCopySign(decNumber *res, const decNumber *lhs,
/* ------------------------------------------------------------------ */
/* decNumberGetBCD -- get the coefficient in BCD8 */
-/* dn is the source decNumber */
+/* dn is the source decNumber */
/* bcd is the uInt array that will receive dn->digits BCD bytes, */
/* most-significant at offset 0 */
/* returns bcd */
@@ -3432,14 +3453,14 @@ decNumber * decNumberCopySign(decNumber *res, const decNumber *lhs,
/* bcd must have at least dn->digits bytes. No error is possible; if */
/* dn is a NaN or Infinite, digits must be 1 and the coefficient 0. */
/* ------------------------------------------------------------------ */
-uByte * decNumberGetBCD(const decNumber *dn, uint8_t *bcd) {
+uByte * decNumberGetBCD(const decNumber *dn, uByte *bcd) {
uByte *ub=bcd+dn->digits-1; /* -> lsd */
const Unit *up=dn->lsu; /* Unit pointer, -> lsu */
#if DECDPUN==1 /* trivial simple copy */
for (; ub>=bcd; ub--, up++) *ub=*up;
- #else /* chopping needed */
- uInt u=*up; /* work */
+ #else /* chopping needed */
+ uInt u=*up; /* work */
uInt cut=DECDPUN; /* downcounter through unit */
for (; ub>=bcd; ub--) {
*ub=(uByte)(u%10); /* [*6554 trick inhibits, here] */
@@ -3456,11 +3477,11 @@ uByte * decNumberGetBCD(const decNumber *dn, uint8_t *bcd) {
/* ------------------------------------------------------------------ */
/* decNumberSetBCD -- set (replace) the coefficient from BCD8 */
-/* dn is the target decNumber */
+/* dn is the target decNumber */
/* bcd is the uInt array that will source n BCD bytes, most- */
/* significant at offset 0 */
/* n is the number of digits in the source BCD array (bcd) */
-/* returns dn */
+/* returns dn */
/* */
/* dn must have space for at least n digits. No error is possible; */
/* if dn is a NaN, or Infinite, or is to become a zero, n must be 1 */
@@ -3472,7 +3493,7 @@ decNumber * decNumberSetBCD(decNumber *dn, const uByte *bcd, uInt n) {
#if DECDPUN==1 /* trivial simple copy */
for (; ub<bcd+n; ub++, up--) *up=*ub;
- #else /* some assembly needed */
+ #else /* some assembly needed */
/* calculate how many digits in msu, and hence first cut */
Int cut=MSUDIGITS(n); /* [faster than remainder] */
for (;up>=dn->lsu; up--) { /* each Unit from msu */
@@ -3481,14 +3502,14 @@ decNumber * decNumberSetBCD(decNumber *dn, const uByte *bcd, uInt n) {
cut=DECDPUN; /* next Unit has all digits */
}
#endif
- dn->digits=n; /* set digit count */
+ dn->digits=n; /* set digit count */
return dn;
} /* decNumberSetBCD */
/* ------------------------------------------------------------------ */
/* decNumberIsNormal -- test normality of a decNumber */
/* dn is the decNumber to test */
-/* set is the context to use for Emin */
+/* set is the context to use for Emin */
/* returns 1 if |dn| is finite and >=Nmin, 0 otherwise */
/* ------------------------------------------------------------------ */
Int decNumberIsNormal(const decNumber *dn, decContext *set) {
@@ -3500,7 +3521,7 @@ Int decNumberIsNormal(const decNumber *dn, decContext *set) {
if (decNumberIsSpecial(dn)) return 0; /* not finite */
if (decNumberIsZero(dn)) return 0; /* not non-zero */
- ae=dn->exponent+dn->digits-1; /* adjusted exponent */
+ ae=dn->exponent+dn->digits-1; /* adjusted exponent */
if (ae<set->emin) return 0; /* is subnormal */
return 1;
} /* decNumberIsNormal */
@@ -3508,7 +3529,7 @@ Int decNumberIsNormal(const decNumber *dn, decContext *set) {
/* ------------------------------------------------------------------ */
/* decNumberIsSubnormal -- test subnormality of a decNumber */
/* dn is the decNumber to test */
-/* set is the context to use for Emin */
+/* set is the context to use for Emin */
/* returns 1 if |dn| is finite, non-zero, and <Nmin, 0 otherwise */
/* ------------------------------------------------------------------ */
Int decNumberIsSubnormal(const decNumber *dn, decContext *set) {
@@ -3520,7 +3541,7 @@ Int decNumberIsSubnormal(const decNumber *dn, decContext *set) {
if (decNumberIsSpecial(dn)) return 0; /* not finite */
if (decNumberIsZero(dn)) return 0; /* not non-zero */
- ae=dn->exponent+dn->digits-1; /* adjusted exponent */
+ ae=dn->exponent+dn->digits-1; /* adjusted exponent */
if (ae<set->emin) return 1; /* is subnormal */
return 0;
} /* decNumberIsSubnormal */
@@ -3529,19 +3550,20 @@ Int decNumberIsSubnormal(const decNumber *dn, decContext *set) {
/* decNumberTrim -- remove insignificant zeros */
/* */
/* dn is the number to trim */
-/* returns dn */
+/* returns dn */
/* */
/* All fields are updated as required. This is a utility operation, */
-/* so special values are unchanged and no error is possible. */
+/* so special values are unchanged and no error is possible. The */
+/* zeros are removed unconditionally. */
/* ------------------------------------------------------------------ */
decNumber * decNumberTrim(decNumber *dn) {
- Int dropped; /* work */
+ Int dropped; /* work */
decContext set; /* .. */
#if DECCHECK
if (decCheckOperands(DECUNRESU, DECUNUSED, dn, DECUNCONT)) return dn;
#endif
decContextDefault(&set, DEC_INIT_BASE); /* clamp=0 */
- return decTrim(dn, &set, 0, &dropped);
+ return decTrim(dn, &set, 0, 1, &dropped);
} /* decNumberTrim */
/* ------------------------------------------------------------------ */
@@ -3557,7 +3579,7 @@ const char * decNumberVersion(void) {
/* decNumberZero -- set a number to 0 */
/* */
/* dn is the number to set, with space for one digit */
-/* returns dn */
+/* returns dn */
/* */
/* No error is possible. */
/* ------------------------------------------------------------------ */
@@ -3582,7 +3604,7 @@ decNumber * decNumberZero(decNumber *dn) {
/* ------------------------------------------------------------------ */
/* decToString -- lay out a number into a string */
/* */
-/* dn is the number to lay out */
+/* dn is the number to lay out */
/* string is where to lay out the number */
/* eng is 1 if Engineering, 0 if Scientific */
/* */
@@ -3596,7 +3618,7 @@ decNumber * decNumberZero(decNumber *dn) {
/* If DECCHECK is enabled the string "?" is returned if a number is */
/* invalid. */
static void decToString(const decNumber *dn, char *string, Flag eng) {
- Int exp=dn->exponent; /* local copy */
+ Int exp=dn->exponent; /* local copy */
Int e; /* E-part value */
Int pre; /* digits before the '.' */
Int cut; /* for counting digits in a Unit */
@@ -3616,7 +3638,7 @@ static void decToString(const decNumber *dn, char *string, Flag eng) {
}
if (dn->bits&DECSPECIAL) { /* Is a special value */
if (decNumberIsInfinite(dn)) {
- strcpy(c, "Inf");
+ strcpy(c, "Inf");
strcpy(c+3, "inity");
return;}
/* a NaN */
@@ -3636,7 +3658,7 @@ static void decToString(const decNumber *dn, char *string, Flag eng) {
cut=MSUDIGITS(dn->digits); /* [faster than remainder] */
cut--; /* power of ten for digit */
- if (exp==0) { /* simple integer [common fastpath] */
+ if (exp==0) { /* simple integer [common fastpath] */
for (;up>=dn->lsu; up--) { /* each Unit from msu */
u=*up; /* contains DECDPUN digits to lay out */
for (; cut>=0; c++, cut--) TODIGIT(u, cut, c, pow);
@@ -3649,7 +3671,7 @@ static void decToString(const decNumber *dn, char *string, Flag eng) {
pre=dn->digits+exp; /* digits before '.' */
e=0; /* no E */
if ((exp>0) || (pre<-5)) { /* need exponential form */
- e=exp+dn->digits-1; /* calculate E value */
+ e=exp+dn->digits-1; /* calculate E value */
pre=1; /* assume one digit before '.' */
if (eng && (e!=0)) { /* engineering: may need to adjust */
Int adj; /* adjustment */
@@ -3682,14 +3704,14 @@ static void decToString(const decNumber *dn, char *string, Flag eng) {
Int n=pre;
for (; pre>0; pre--, c++, cut--) {
if (cut<0) { /* need new Unit */
- if (up==dn->lsu) break; /* out of input digits (pre>digits) */
+ if (up==dn->lsu) break; /* out of input digits (pre>digits) */
up--;
cut=DECDPUN-1;
u=*up;
}
TODIGIT(u, cut, c, pow);
}
- if (n<dn->digits) { /* more to come, after '.' */
+ if (n<dn->digits) { /* more to come, after '.' */
*c='.'; c++;
for (;; c++, cut--) {
if (cut<0) { /* need new Unit */
@@ -3709,7 +3731,7 @@ static void decToString(const decNumber *dn, char *string, Flag eng) {
for (; pre<0; pre++, c++) *c='0'; /* add any 0's after '.' */
for (; ; c++, cut--) {
if (cut<0) { /* need new Unit */
- if (up==dn->lsu) break; /* out of input digits */
+ if (up==dn->lsu) break; /* out of input digits */
up--;
cut=DECDPUN-1;
u=*up;
@@ -3718,11 +3740,11 @@ static void decToString(const decNumber *dn, char *string, Flag eng) {
}
}
- /* Finally add the E-part, if needed. It will never be 0, has a
+ /* Finally add the E-part, if needed. It will never be 0, has a
base maximum and minimum of +999999999 through -999999999, but
could range down to -1999999998 for anormal numbers */
if (e!=0) {
- Flag had=0; /* 1=had non-zero */
+ Flag had=0; /* 1=had non-zero */
*c='E'; c++;
*c='+'; c++; /* assume positive */
u=e; /* .. */
@@ -3750,7 +3772,7 @@ static void decToString(const decNumber *dn, char *string, Flag eng) {
/* res is C, the result. C may be A and/or B (e.g., X=X+X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* negate is DECNEG if rhs should be negated, or 0 otherwise */
/* status accumulates status for the caller */
/* */
@@ -3758,9 +3780,9 @@ static void decToString(const decNumber *dn, char *string, Flag eng) {
/* Inexact in status must be 0 for correct Exact zero sign in result */
/* ------------------------------------------------------------------ */
/* If possible, the coefficient is calculated directly into C. */
-/* However, if: */
+/* However, if: */
/* -- a digits+1 calculation is needed because the numbers are */
-/* unaligned and span more than set->digits digits */
+/* unaligned and span more than set->digits digits */
/* -- a carry to digits+1 digits looks possible */
/* -- C is the same as A or B, and the result would destructively */
/* overlap the A or B coefficient */
@@ -3794,7 +3816,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
Unit accbuff[SD2U(DECBUFFER*2+20)]; /* local buffer [*2+20 reduces many */
/* allocations when called from */
/* other operations, notable exp] */
- Unit *allocacc=NULL; /* -> allocated acc buffer, iff allocated */
+ Unit *allocacc=NULL; /* -> allocated acc buffer, iff allocated */
Int reqdigits=set->digits; /* local copy; requested DIGITS */
Int padding; /* work */
@@ -3839,7 +3861,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
else bits=(rhs->bits^negate) & DECNEG;/* RHS must be Infinity */
bits|=DECINF;
decNumberZero(res);
- res->bits=bits; /* set +/- infinity */
+ res->bits=bits; /* set +/- infinity */
} /* an infinity */
break;
}
@@ -3857,7 +3879,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
#endif
/* exponent will be the lower of the two */
adjust=lexp-res->exponent; /* adjustment needed [if -ve] */
- if (ISZERO(res)) { /* both 0: special IEEE 854 rules */
+ if (ISZERO(res)) { /* both 0: special IEEE 754 rules */
if (adjust<0) res->exponent=lexp; /* set exponent */
/* 0-0 gives +0 unless rounding to -infinity, and -0-0 gives -0 */
if (diffsign) {
@@ -3893,7 +3915,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
/* exponent will be the lower of the two */
/* [0-0 case handled above] */
adjust=rexp-res->exponent; /* adjustment needed [if -ve] */
- if (adjust<0) { /* 0-padding needed */
+ if (adjust<0) { /* 0-padding needed */
if ((res->digits-adjust)>set->digits) {
adjust=res->digits-set->digits; /* to fit exactly */
*status|=DEC_Rounded; /* [but exact] */
@@ -3954,7 +3976,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
/* other) padding with up to DIGITS-1 trailing zeros may be */
/* needed; then apply rounding (as exotic rounding modes may be */
/* affected by the residue). */
- rhsshift=0; /* rhs shift to left (padding) in Units */
+ rhsshift=0; /* rhs shift to left (padding) in Units */
bits=lhs->bits; /* assume sign is that of LHS */
mult=1; /* likely multiplier */
@@ -3980,13 +4002,13 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
/* for residue use the relative sign indication... */
Int shift=reqdigits-rhs->digits; /* left shift needed */
residue=1; /* residue for rounding */
- if (diffsign) residue=-residue; /* signs differ */
+ if (diffsign) residue=-residue; /* signs differ */
/* copy, shortening if necessary */
decCopyFit(res, rhs, set, &residue, status);
/* if it was already shorter, then need to pad with zeros */
if (shift>0) {
res->digits=decShiftToMost(res->lsu, res->digits, shift);
- res->exponent-=shift; /* adjust the exponent. */
+ res->exponent-=shift; /* adjust the exponent. */
}
/* flip the result sign if unswapped and rhs was negated */
if (!swapped) res->bits^=negate;
@@ -4111,7 +4133,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
if (set->round==DEC_ROUND_FLOOR) res->bits|=DECNEG; /* sign - */
else res->bits&=~DECNEG; /* sign + */
}
- } while(0); /* end protected */
+ } while(0); /* end protected */
if (allocacc!=NULL) free(allocacc); /* drop any storage used */
#if DECSUBSET
@@ -4132,8 +4154,8 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
/* res is C, the result. C may be A and/or B (e.g., X=X/X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
-/* op is DIVIDE, DIVIDEINT, REMAINDER, or REMNEAR respectively. */
+/* set is the context */
+/* op is DIVIDE, DIVIDEINT, REMAINDER, or REMNEAR respectively. */
/* status is the usual accumulator */
/* */
/* C must have space for set->digits digits. */
@@ -4148,7 +4170,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
/* */
/* Prepare operands and handle special values */
/* Test for x/0 and then 0/x */
-/* Exp =Exp1 - Exp2 */
+/* Exp =Exp1 - Exp2 */
/* Exp =Exp +len(var1) -len(var2) */
/* Sign=Sign1 * Sign2 */
/* Pad accumulator (Var1) to double-length with 0's (pad1) */
@@ -4160,7 +4182,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
/* this_unit=0 */
/* Do forever */
/* compare numbers */
-/* if <0 then leave inner_loop */
+/* if <0 then leave inner_loop */
/* if =0 then (* quick exit without subtract *) do */
/* this_unit=this_unit+1; output this_unit */
/* leave outer_loop; end */
@@ -4168,7 +4190,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
/* If same then tops2=msu2pair -- {units 1&2 of var2} */
/* else tops2=msu2plus -- {0, unit 1 of var2} */
/* tops1=first_unit_of_Var1*10**DECDPUN +second_unit_of_var1 */
-/* mult=tops1/tops2 -- Good and safe guess at divisor */
+/* mult=tops1/tops2 -- Good and safe guess at divisor */
/* if mult=0 then mult=1 */
/* this_unit=this_unit+mult */
/* subtract */
@@ -4180,7 +4202,7 @@ static decNumber * decAddOp(decNumber *res, const decNumber *lhs,
/* exp=exp-1 */
/* end outer_loop */
/* exp=exp+1 -- set the proper exponent */
-/* if have=0 then generate answer=0 */
+/* if have=0 then generate answer=0 */
/* Return (Result is defined by Var1) */
/* */
/* ------------------------------------------------------------------ */
@@ -4200,15 +4222,15 @@ static decNumber * decDivideOp(decNumber *res,
#endif
Unit accbuff[SD2U(DECBUFFER+DECDPUN+10)]; /* local buffer */
Unit *acc=accbuff; /* -> accumulator array for result */
- Unit *allocacc=NULL; /* -> allocated buffer, iff allocated */
+ Unit *allocacc=NULL; /* -> allocated buffer, iff allocated */
Unit *accnext; /* -> where next digit will go */
Int acclength; /* length of acc needed [Units] */
Int accunits; /* count of units accumulated */
Int accdigits; /* count of digits accumulated */
- Unit varbuff[SD2U(DECBUFFER*2+DECDPUN)*sizeof(Unit)]; /* buffer for var1 */
+ Unit varbuff[SD2U(DECBUFFER*2+DECDPUN)]; /* buffer for var1 */
Unit *var1=varbuff; /* -> var1 array for long subtraction */
- Unit *varalloc=NULL; /* -> allocated buffer, iff used */
+ Unit *varalloc=NULL; /* -> allocated buffer, iff used */
Unit *msu1; /* -> msu of var1 */
const Unit *var2; /* -> var2 array */
@@ -4283,7 +4305,7 @@ static decNumber * decDivideOp(decNumber *res,
/* result is [finished clone of] lhs */
decCopyFit(res, lhs, set, &residue, status);
}
- else { /* a division */
+ else { /* a division */
decNumberZero(res);
res->bits=bits; /* set +/- zero */
/* for DIVIDEINT the exponent is always 0. For DIVIDE, result */
@@ -4332,7 +4354,7 @@ static decNumber * decDivideOp(decNumber *res,
decNumberZero(res); /* integer 0 */
res->bits=bits; /* sign as computed */
}
- else { /* a remainder */
+ else { /* a remainder */
exponent=rhs->exponent; /* [save in case overwrite] */
decNumberCopy(res, lhs); /* [zeros always fit] */
if (exponent<res->exponent) res->exponent=exponent; /* use lower */
@@ -4425,8 +4447,8 @@ static decNumber * decDivideOp(decNumber *res,
for (; target>=var1; target--) *target=0;
/* rhs (var2) is left-aligned with var1 at the start */
- var2ulen=var1units; /* rhs logical length (units) */
- var2units=D2U(rhs->digits); /* rhs actual length (units) */
+ var2ulen=var1units; /* rhs logical length (units) */
+ var2units=D2U(rhs->digits); /* rhs actual length (units) */
var2=rhs->lsu; /* -> rhs array */
msu2=var2+var2units-1; /* -> msu of var2 [never changes] */
/* now set up the variables which will be used for estimating the */
@@ -4450,7 +4472,7 @@ static decNumber * decDivideOp(decNumber *res,
for (pow=&powers[1]; *msu2>=*pow; pow++) exponent++;
/* Now, if doing an integer divide or remainder, ensure that */
- /* the result will be Unit-aligned. To do this, shift the var1 */
+ /* the result will be Unit-aligned. To do this, shift the var1 */
/* accumulator towards least if need be. (It's much easier to */
/* do this now than to reassemble the residue afterwards, if */
/* doing a remainder.) Also ensure the exponent is not negative. */
@@ -4463,7 +4485,7 @@ static decNumber * decDivideOp(decNumber *res,
else cut=DECDPUN-exponent%DECDPUN;
decShiftToLeast(var1, var1units, cut);
exponent+=cut; /* maintain numerical value */
- var1initpad-=cut; /* .. and reduce padding */
+ var1initpad-=cut; /* .. and reduce padding */
/* clean any most-significant units which were just emptied */
for (u=msu1; cut>=DECDPUN; cut-=DECDPUN, u--) *u=0;
} /* align */
@@ -4478,7 +4500,7 @@ static decNumber * decDivideOp(decNumber *res,
}
/* ---- start the long-division loops ------------------------------ */
- accunits=0; /* no units accumulated yet */
+ accunits=0; /* no units accumulated yet */
accdigits=0; /* .. or digits */
accnext=acc+acclength-1; /* -> msu of acc [NB: allows digits+1] */
for (;;) { /* outer forever loop */
@@ -4508,7 +4530,7 @@ static decNumber * decDivideOp(decNumber *res,
/* reach here if var1 and var2 are identical; subtraction */
/* would increase digit by one, and the residue will be 0 so */
/* the calculation is done; leave the loop with residue=0. */
- thisunit++; /* as though subtracted */
+ thisunit++; /* as though subtracted */
*var1=0; /* set var1 to 0 */
var1units=1; /* .. */
break; /* from inner */
@@ -4525,7 +4547,7 @@ static decNumber * decDivideOp(decNumber *res,
}
if (mult==0) mult=1; /* must always be at least 1 */
/* subtraction needed; var1 is > var2 */
- thisunit=(Unit)(thisunit+mult); /* accumulate */
+ thisunit=(Unit)(thisunit+mult); /* accumulate */
/* subtract var1-var2, into var1; only the overlap needs */
/* processing, as this is an in-place calculation */
shift=var2ulen-var2units;
@@ -4546,7 +4568,7 @@ static decNumber * decDivideOp(decNumber *res,
/* The next unit has been calculated in full; unless it's a */
/* leading zero, add to acc */
- if (accunits!=0 || thisunit!=0) { /* is first or non-zero */
+ if (accunits!=0 || thisunit!=0) { /* is first or non-zero */
*accnext=thisunit; /* store in accumulator */
/* account exactly for the new digits */
if (accunits==0) {
@@ -4556,7 +4578,7 @@ static decNumber * decDivideOp(decNumber *res,
else accdigits+=DECDPUN;
accunits++; /* update count */
accnext--; /* ready for next */
- if (accdigits>reqdigits) break; /* have enough digits */
+ if (accdigits>reqdigits) break; /* have enough digits */
}
/* if the residue is zero, the operation is done (unless divide */
@@ -4609,7 +4631,7 @@ static decNumber * decDivideOp(decNumber *res,
if ((lsu-QUOT10(lsu, drop+1)
*powers[drop+1])!=0) break; /* found non-0 digit */
#else
- if (lsu%powers[drop+1]!=0) break; /* found non-0 digit */
+ if (lsu%powers[drop+1]!=0) break; /* found non-0 digit */
#endif
exponent++;
}
@@ -4637,11 +4659,11 @@ static decNumber * decDivideOp(decNumber *res,
Unit *quotlsu; /* for save */
Int quotdigits; /* .. */
- bits=lhs->bits; /* remainder sign is always as lhs */
+ bits=lhs->bits; /* remainder sign is always as lhs */
/* Fastpath when residue is truly 0 is worthwhile [and */
/* simplifies the code below] */
- if (*var1==0 && var1units==1) { /* residue is 0 */
+ if (*var1==0 && var1units==1) { /* residue is 0 */
Int exp=lhs->exponent; /* save min(exponents) */
if (rhs->exponent<exp) exp=rhs->exponent;
decNumberZero(res); /* 0 coefficient */
@@ -4672,7 +4694,7 @@ static decNumber * decDivideOp(decNumber *res,
accdigits=decGetDigits(var1, var1units);
accunits=D2U(accdigits);
- exponent=lhs->exponent; /* exponent is smaller of lhs & rhs */
+ exponent=lhs->exponent; /* exponent is smaller of lhs & rhs */
if (rhs->exponent<exponent) exponent=rhs->exponent;
/* Now correct the result if doing remainderNear; if it */
@@ -4720,7 +4742,7 @@ static decNumber * decDivideOp(decNumber *res,
if (quotdigits>DECDPUN) {
if (*up!=DECDPUNMAX) break;/* non-nines */
}
- else { /* this is the last Unit */
+ else { /* this is the last Unit */
if (*up==powers[quotdigits]-1) allnines=1;
break;
}
@@ -4731,9 +4753,9 @@ static decNumber * decDivideOp(decNumber *res,
*status|=DEC_Division_impossible;
break;}
- /* rem-rhs is needed; the sign will invert. Again, var1 */
+ /* rem-rhs is needed; the sign will invert. Again, var1 */
/* can safely be used for the working Units array. */
- exp=rhs->exponent-exponent; /* RHS padding needed */
+ exp=rhs->exponent-exponent; /* RHS padding needed */
/* Calculate units and remainder from exponent. */
expunits=exp/DECDPUN;
exprem=exp%DECDPUN;
@@ -4761,9 +4783,9 @@ static decNumber * decDivideOp(decNumber *res,
#if DECSUBSET
/* If a divide then strip trailing zeros if subset [after round] */
- if (!set->extended && (op==DIVIDE)) decTrim(res, set, 0, &dropped);
+ if (!set->extended && (op==DIVIDE)) decTrim(res, set, 0, 1, &dropped);
#endif
- } while(0); /* end protected */
+ } while(0); /* end protected */
if (varalloc!=NULL) free(varalloc); /* drop any storage used */
if (allocacc!=NULL) free(allocacc); /* .. */
@@ -4782,7 +4804,7 @@ static decNumber * decDivideOp(decNumber *res,
/* res is C, the result. C may be A and/or B (e.g., X=X*X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
+/* set is the context */
/* status is the usual accumulator */
/* */
/* C must have space for set->digits digits. */
@@ -4800,13 +4822,13 @@ static decNumber * decDivideOp(decNumber *res,
/* The fastpath version lumps units together into 8-digit or 9-digit */
/* chunks, and also uses a lazy carry strategy to minimise expensive */
/* 64-bit divisions. The chunks are then broken apart again into */
-/* units for continuing processing. Despite this overhead, the */
+/* units for continuing processing. Despite this overhead, the */
/* fastpath can speed up some 16-digit operations by 10x (and much */
/* more for higher-precision calculations). */
/* */
/* A buffer always has to be used for the accumulator; in the */
/* fastpath, buffers are also always needed for the chunked copies of */
-/* of the operand coefficients. */
+/* of the operand coefficients. */
/* Static buffers are larger than needed just for multiply, to allow */
/* for calls from other operations (notably exp). */
/* ------------------------------------------------------------------ */
@@ -4817,10 +4839,10 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
Int accunits; /* Units of accumulator in use */
Int exponent; /* work */
Int residue=0; /* rounding residue */
- uByte bits; /* result sign */
+ uByte bits; /* result sign */
Unit *acc; /* -> accumulator Unit array */
Int needbytes; /* size calculator */
- void *allocacc=NULL; /* -> allocated accumulator, iff allocated */
+ void *allocacc=NULL; /* -> allocated accumulator, iff allocated */
Unit accbuff[SD2U(DECBUFFER*4+1)]; /* buffer (+1 for DECBUFFER==0, */
/* *4 for calls from other operations) */
const Unit *mer, *mermsup; /* work */
@@ -4852,19 +4874,19 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
/* [allocacc is shared for both paths, as only one will run] */
uLong *zacc=zaccbuff; /* -> accumulator array for exact result */
#if DECDPUN==1
- Int zoff; /* accumulator offset */
+ Int zoff; /* accumulator offset */
#endif
uInt *lip, *rip; /* item pointers */
- uInt *lmsi, *rmsi; /* most significant items */
- Int ilhs, irhs, iacc; /* item counts in the arrays */
- Int lazy; /* lazy carry counter */
+ uInt *lmsi, *rmsi; /* most significant items */
+ Int ilhs, irhs, iacc; /* item counts in the arrays */
+ Int lazy; /* lazy carry counter */
uLong lcarry; /* uLong carry */
uInt carry; /* carry (NB not uLong) */
- Int count; /* work */
+ Int count; /* work */
const Unit *cup; /* .. */
Unit *up; /* .. */
uLong *lp; /* .. */
- Int p; /* .. */
+ Int p; /* .. */
#endif
#if DECSUBSET
@@ -4921,10 +4943,10 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
#endif
/* [following code does not require input rounding] */
- #if FASTMUL /* fastpath can be used */
+ #if FASTMUL /* fastpath can be used */
/* use the fast path if there are enough digits in the shorter */
/* operand to make the setup and takedown worthwhile */
- #define NEEDTWO (DECDPUN*2) /* within two decUnitAddSub calls */
+ #define NEEDTWO (DECDPUN*2) /* within two decUnitAddSub calls */
if (rhs->digits>NEEDTWO) { /* use fastpath... */
/* calculate the number of elements in each array */
ilhs=(lhs->digits+FASTDIGS-1)/FASTDIGS; /* [ceiling] */
@@ -4944,7 +4966,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
/* Allocating the accumulator space needs a special case when */
/* DECDPUN=1 because when converting the accumulator to Units */
/* after the multiplication each 8-byte item becomes 9 1-byte */
- /* units. Therefore iacc extra bytes are needed at the front */
+ /* units. Therefore iacc extra bytes are needed at the front */
/* (rounded up to a multiple of 8 bytes), and the uLong */
/* accumulator starts offset the appropriate number of units */
/* to the right to avoid overwrite during the unchunking. */
@@ -4960,7 +4982,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
*status|=DEC_Insufficient_storage;
break;}
- acc=(Unit *)zacc; /* -> target Unit array */
+ acc=(Unit *)zacc; /* -> target Unit array */
#if DECDPUN==1
zacc+=zoff; /* start uLong accumulator to right */
#endif
@@ -5022,12 +5044,12 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
carry=(uInt)(lcarry-((uLong)FASTBASE*carry2)); /* [inline] */
}
*(lp+1)+=carry; /* add to item above [inline] */
- *lp-=((uLong)FASTBASE*carry); /* [inline] */
+ *lp-=((uLong)FASTBASE*carry); /* [inline] */
} /* carry resolution */
} /* rip loop */
/* The multiplication is complete; time to convert back into */
- /* units. This can be done in-place in the accumulator and in */
+ /* units. This can be done in-place in the accumulator and in */
/* 32-bit operations, because carries were resolved after the */
/* final add. This needs N-1 divides and multiplies for */
/* each item in the accumulator (which will become up to N */
@@ -5096,7 +5118,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
/* There can be a 31-bit wrap in calculating the exponent. */
/* This can only happen if both input exponents are negative and */
- /* both their magnitudes are large. If there was a wrap, set a */
+ /* both their magnitudes are large. If there was a wrap, set a */
/* safe very negative exponent, from which decFinalize() will */
/* raise a hard underflow shortly. */
exponent=lhs->exponent+rhs->exponent; /* calculate exponent */
@@ -5108,7 +5130,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
/* Set the coefficient. If any rounding, residue records */
decSetCoeff(res, set, acc, res->digits, &residue, status);
decFinish(res, set, &residue, status); /* final cleanup */
- } while(0); /* end protected */
+ } while(0); /* end protected */
if (allocacc!=NULL) free(allocacc); /* drop any storage used */
#if DECSUBSET
@@ -5137,13 +5159,13 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
/* Restrictions: */
/* */
/* digits, emax, and -emin in the context must be less than */
-/* 2*DEC_MAX_MATH (1999998), and the rhs must be within these */
+/* 2*DEC_MAX_MATH (1999998), and the rhs must be within these */
/* bounds or a zero. This is an internal routine, so these */
/* restrictions are contractual and not enforced. */
/* */
/* A finite result is rounded using DEC_ROUND_HALF_EVEN; it will */
/* almost always be correctly rounded, but may be up to 1 ulp in */
-/* error in rare cases. */
+/* error in rare cases. */
/* */
/* Finite results will always be full precision and Inexact, except */
/* when A is a zero or -Infinity (giving 1 or 0 respectively). */
@@ -5162,11 +5184,11 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
/* The error analysis in Hull & Abrham's paper applies except for the */
/* round-off error accumulation during the series evaluation. This */
/* code does not precalculate the number of iterations and so cannot */
-/* use Horner's scheme. Instead, the accumulation is done at double- */
+/* use Horner's scheme. Instead, the accumulation is done at double- */
/* precision, which ensures that the additions of the terms are exact */
/* and do not accumulate round-off (and any round-off errors in the */
/* terms themselves move 'to the right' faster than they can */
-/* accumulate). This code also extends the calculation by allowing, */
+/* accumulate). This code also extends the calculation by allowing, */
/* in the spirit of other decNumber operators, the input to be more */
/* precise than the result (the precision used is based on the more */
/* precise of the input or requested result). */
@@ -5189,7 +5211,7 @@ static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
/* more for smaller values. */
/* */
/* The leverage that can be applied in this way is severely */
-/* limited by the cost of the raise-to-the power at the end, */
+/* limited by the cost of the raise-to-the power at the end, */
/* which dominates when the number of iterations is small (less */
/* than ten) or when rhs is short. As an example, the adjustment */
/* x**10,000,000 needs 31 multiplications, all but one full-width. */
@@ -5274,7 +5296,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
*d->lsu=4; /* set 4 .. */
d->exponent=-set->digits; /* * 10**(-d) */
if (decNumberIsNegative(rhs)) d->exponent--; /* negative case */
- comp=decCompare(d, rhs, 1); /* signless compare */
+ comp=decCompare(d, rhs, 1); /* signless compare */
if (comp==BADINT) {
*status|=DEC_Insufficient_storage;
break;}
@@ -5327,18 +5349,18 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
/* front" effect. */
Int lever=MINI(8-h, maxlever); /* leverage attainable */
Int use=-rhs->digits-lever; /* exponent to use for RHS */
- h+=lever; /* apply leverage selected */
+ h+=lever; /* apply leverage selected */
if (h<0) { /* clamp */
- use+=h; /* [may end up subnormal] */
+ use+=h; /* [may end up subnormal] */
h=0;
}
/* Take a copy of RHS if it needs normalization (true whenever x>=1) */
if (rhs->exponent!=use) {
- decNumber *newrhs=bufr; /* assume will fit on stack */
+ decNumber *newrhs=bufr; /* assume will fit on stack */
needbytes=sizeof(decNumber)+(D2U(rhs->digits)-1)*sizeof(Unit);
if (needbytes>sizeof(bufr)) { /* need malloc space */
allocrhs=(decNumber *)malloc(needbytes);
- if (allocrhs==NULL) { /* hopeless -- abandon */
+ if (allocrhs==NULL) { /* hopeless -- abandon */
*status|=DEC_Insufficient_storage;
break;}
newrhs=allocrhs; /* use the allocated space */
@@ -5354,7 +5376,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
/* third term by setting the term variable t=x, the accumulator */
/* a=1, and the divisor d=2. */
- /* First determine the working precision. From Hull & Abrham */
+ /* First determine the working precision. From Hull & Abrham */
/* this is set->digits+h+2. However, if x is 'over-precise' we */
/* need to allow for all its digits to potentially participate */
/* (consider an x where all the excess digits are 9s) so in */
@@ -5411,7 +5433,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
/* only the status from the accumulation is interesting */
/* [but it should remain unchanged after first add] */
decAddOp(a, a, t, &aset, 0, status); /* a=a+t */
- decMultiplyOp(t, t, x, &tset, &ignore); /* t=t*x */
+ decMultiplyOp(t, t, x, &tset, &ignore); /* t=t*x */
decDivideOp(t, t, d, &tset, DIVIDE, &ignore); /* t=t/d */
/* the iteration ends when the term cannot affect the result, */
/* if rounded to p digits, which is when its value is smaller */
@@ -5426,7 +5448,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
/* just a sanity check; comment out test to show always */
if (iterations>p+3)
printf("Exp iterations=%ld, status=%08lx, p=%ld, d=%ld\n",
- iterations, *status, p, x->digits);
+ (LI)iterations, (LI)*status, (LI)p, (LI)x->digits);
#endif
} /* h<=8 */
@@ -5445,13 +5467,13 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
/* abandon if have had overflow or terminal underflow */
if (*status & (DEC_Overflow|DEC_Underflow)) { /* interesting? */
if (*status&DEC_Overflow || ISZERO(t)) break;}
- n=n<<1; /* move next bit to testable position */
+ n=n<<1; /* move next bit to testable position */
if (n<0) { /* top bit is set */
seenbit=1; /* OK, have a significant bit */
decMultiplyOp(t, t, a, &aset, status); /* acc=acc*x */
}
if (i==31) break; /* that was the last bit */
- if (!seenbit) continue; /* no need to square 1 */
+ if (!seenbit) continue; /* no need to square 1 */
decMultiplyOp(t, t, t, &aset, status); /* acc=acc*acc [square] */
} /*i*/ /* 32 bits */
/* decNumberShow(t); */
@@ -5464,7 +5486,7 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
aset.digits=set->digits; /* [use default rounding] */
decCopyFit(res, a, &aset, &residue, status); /* copy & shorten */
decFinish(res, set, &residue, status); /* cleanup/set flags */
- } while(0); /* end protected */
+ } while(0); /* end protected */
if (allocrhs !=NULL) free(allocrhs); /* drop any storage used */
if (allocbufa!=NULL) free(allocbufa); /* .. */
@@ -5489,16 +5511,16 @@ decNumber * decExpOp(decNumber *res, const decNumber *rhs,
/* where x is truncated (NB) into the range 10 through 99, */
/* and then c = k>>2 and e = k&3. */
/* ------------------------------------------------------------------ */
-const uShort LNnn[90]={9016, 8652, 8316, 8008, 7724, 7456, 7208,
- 6972, 6748, 6540, 6340, 6148, 5968, 5792, 5628, 5464, 5312,
- 5164, 5020, 4884, 4748, 4620, 4496, 4376, 4256, 4144, 4032,
+const uShort LNnn[90]={9016, 8652, 8316, 8008, 7724, 7456, 7208,
+ 6972, 6748, 6540, 6340, 6148, 5968, 5792, 5628, 5464, 5312,
+ 5164, 5020, 4884, 4748, 4620, 4496, 4376, 4256, 4144, 4032,
39233, 38181, 37157, 36157, 35181, 34229, 33297, 32389, 31501, 30629,
29777, 28945, 28129, 27329, 26545, 25777, 25021, 24281, 23553, 22837,
22137, 21445, 20769, 20101, 19445, 18801, 18165, 17541, 16925, 16321,
15721, 15133, 14553, 13985, 13421, 12865, 12317, 11777, 11241, 10717,
- 10197, 9685, 9177, 8677, 8185, 7697, 7213, 6737, 6269, 5801,
- 5341, 4889, 4437, 39930, 35534, 31186, 26886, 22630, 18418, 14254,
- 10130, 6046, 20055};
+ 10197, 9685, 9177, 8677, 8185, 7697, 7213, 6737, 6269, 5801,
+ 5341, 4889, 4437, 39930, 35534, 31186, 26886, 22630, 18418, 14254,
+ 10130, 6046, 20055};
/* ------------------------------------------------------------------ */
/* decLnOp -- effect natural logarithm */
@@ -5526,7 +5548,7 @@ const uShort LNnn[90]={9016, 8652, 8316, 8008, 7724, 7456, 7208,
/* */
/* A finite result is rounded using DEC_ROUND_HALF_EVEN; it will */
/* almost always be correctly rounded, but may be up to 1 ulp in */
-/* error in rare cases. */
+/* error in rare cases. */
/* ------------------------------------------------------------------ */
/* The result is calculated using Newton's method, with each */
/* iteration calculating a' = a + x * exp(-a) - 1. See, for example, */
@@ -5538,7 +5560,7 @@ const uShort LNnn[90]={9016, 8652, 8316, 8008, 7724, 7456, 7208,
/* */
/* Implementation notes: */
/* */
-/* 1. This is separated out as decLnOp so it can be called from */
+/* 1. This is separated out as decLnOp so it can be called from */
/* other Mathematical functions (e.g., Log 10) with a wider range */
/* than normal. In particular, it can handle the slightly wider */
/* (+9+2) range needed by a power function. */
@@ -5631,7 +5653,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs,
break;}
} /* integer and short */
- /* Determine the working precision. This is normally the */
+ /* Determine the working precision. This is normally the */
/* requested precision + 2, with a minimum of 9. However, if */
/* the rhs is 'over-precise' then allow for all its digits to */
/* potentially participate (consider an rhs where all the excess */
@@ -5684,7 +5706,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs,
decCopyFit(b, rhs, &aset, &residue, &ignore); /* copy & shorten */
b->exponent=0; /* make integer */
t=decGetInt(b); /* [cannot fail] */
- if (t<10) t=X10(t); /* adjust single-digit b */
+ if (t<10) t=X10(t); /* adjust single-digit b */
t=LNnn[t-10]; /* look up ln(b) */
decNumberFromInt32(b, t>>2); /* b=ln(b) coefficient */
b->exponent=-(t&3)-3; /* set exponent */
@@ -5713,13 +5735,13 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs,
/* [initially 9 as then the sequence starts 7+2, 16+2, and */
/* 34+2, which is ideal for standard-sized numbers] */
aset.digits=pp; /* working context */
- bset.digits=pp+rhs->digits; /* wider context */
+ bset.digits=pp+rhs->digits; /* wider context */
for (;;) { /* iterate */
#if DECCHECK
iterations++;
- if (iterations>24) break; /* consider 9 * 2**24 */
+ if (iterations>24) break; /* consider 9 * 2**24 */
#endif
- /* calculate the adjustment (exp(-a)*x-1) into b. This is a */
+ /* calculate the adjustment (exp(-a)*x-1) into b. This is a */
/* catastrophic subtraction but it really is the difference */
/* from 1 that is of interest. */
/* Use the internal entry point to Exp as it allows the double */
@@ -5728,7 +5750,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs,
decExpOp(b, a, &bset, &ignore); /* b=exp(-a) */
a->bits^=DECNEG; /* restore sign of a */
/* now multiply by rhs and subtract 1, at the wider precision */
- decMultiplyOp(b, b, rhs, &bset, &ignore); /* b=b*rhs */
+ decMultiplyOp(b, b, rhs, &bset, &ignore); /* b=b*rhs */
decAddOp(b, b, &numone, &bset, DECNEG, &ignore); /* b=b-1 */
/* the iteration ends when the adjustment cannot affect the */
@@ -5766,7 +5788,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs,
/* just a sanity check; remove the test to show always */
if (iterations>24)
printf("Ln iterations=%ld, status=%08lx, p=%ld, d=%ld\n",
- iterations, *status, p, rhs->digits);
+ (LI)iterations, (LI)*status, (LI)p, (LI)rhs->digits);
#endif
/* Copy and round the result to res */
@@ -5775,7 +5797,7 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs,
aset.digits=set->digits; /* [use default rounding] */
decCopyFit(res, a, &aset, &residue, status); /* copy & shorten */
decFinish(res, set, &residue, status); /* cleanup/set flags */
- } while(0); /* end protected */
+ } while(0); /* end protected */
if (allocbufa!=NULL) free(allocbufa); /* drop any storage used */
if (allocbufb!=NULL) free(allocbufb); /* .. */
@@ -5788,14 +5810,14 @@ decNumber * decLnOp(decNumber *res, const decNumber *rhs,
/* */
/* This computes C = op(A, B), where op adjusts the coefficient */
/* of C (by rounding or shifting) such that the exponent (-scale) */
-/* of C has the value B or matches the exponent of B. */
+/* of C has the value B or matches the exponent of B. */
/* The numerical value of C will equal A, except for the effects of */
/* any rounding that occurred. */
/* */
/* res is C, the result. C may be A or B */
/* lhs is A, the number to adjust */
/* rhs is B, the requested exponent */
-/* set is the context */
+/* set is the context */
/* quant is 1 for quantize or 0 for rescale */
/* status is the status accumulator (this can be called without */
/* risk of control loss) */
@@ -5814,7 +5836,7 @@ static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs,
#endif
const decNumber *inrhs=rhs; /* save original rhs */
Int reqdigits=set->digits; /* requested DIGITS */
- Int reqexp; /* requested exponent [-scale] */
+ Int reqexp; /* requested exponent [-scale] */
Int residue=0; /* rounding residue */
Int etiny=set->emin-(reqdigits-1);
@@ -5904,7 +5926,7 @@ static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs,
if (res->exponent>reqexp) {
/* re-check needed, e.g., for quantize(0.9999, 0.001) under */
/* set->digits==3 */
- if (res->digits==reqdigits) { /* cannot shift by 1 */
+ if (res->digits==reqdigits) { /* cannot shift by 1 */
*status&=~(DEC_Inexact | DEC_Rounded); /* [clean these] */
*status|=DEC_Invalid_operation;
break;
@@ -5937,9 +5959,9 @@ static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs,
}
else {
decFinalize(res, set, &residue, status); /* set subnormal flags */
- *status&=~DEC_Underflow; /* suppress Underflow [754r] */
+ *status&=~DEC_Underflow; /* suppress Underflow [as per 754] */
}
- } while(0); /* end protected */
+ } while(0); /* end protected */
#if DECSUBSET
if (allocrhs!=NULL) free(allocrhs); /* drop any storage used */
@@ -5956,26 +5978,26 @@ static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs,
/* result of a comparison unless one or both */
/* operands is a NaN (in which case a NaN results) */
/* COMPSIG -- as COMPARE except that a quiet NaN raises */
-/* Invalid operation. */
+/* Invalid operation. */
/* COMPMAX -- returns the larger of the operands, using the */
-/* 754r maxnum operation */
+/* 754 maxnum operation */
/* COMPMAXMAG -- ditto, comparing absolute values */
-/* COMPMIN -- the 754r minnum operation */
+/* COMPMIN -- the 754 minnum operation */
/* COMPMINMAG -- ditto, comparing absolute values */
-/* COMTOTAL -- returns the signum (as a number) giving the */
-/* result of a comparison using 754r total ordering */
+/* COMTOTAL -- returns the signum (as a number) giving the */
+/* result of a comparison using 754 total ordering */
/* */
/* res is C, the result. C may be A and/or B (e.g., X=X?X) */
/* lhs is A */
/* rhs is B */
-/* set is the context */
-/* op is the operation flag */
+/* set is the context */
+/* op is the operation flag */
/* status is the usual accumulator */
/* */
/* C must have space for one digit for COMPARE or set->digits for */
-/* COMPMAX, COMPMIN, COMPMAXMAG, or COMPMINMAG. */
+/* COMPMAX, COMPMIN, COMPMAXMAG, or COMPMINMAG. */
/* ------------------------------------------------------------------ */
-/* The emphasis here is on speed for common cases, and avoiding */
+/* The emphasis here is on speed for common cases, and avoiding */
/* coefficient comparison if possible. */
/* ------------------------------------------------------------------ */
decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
@@ -5986,7 +6008,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
decNumber *allocrhs=NULL; /* .., rhs */
#endif
Int result=0; /* default result value */
- uByte merged; /* work */
+ uByte merged; /* work */
#if DECCHECK
if (decCheckOperands(res, lhs, rhs, set)) return res;
@@ -6026,7 +6048,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
/* This assumes sNaN (even just one) leads to NaN. */
merged=(lhs->bits | rhs->bits) & (DECSNAN | DECNAN);
if (merged) { /* a NaN bit set */
- if (op==COMPARE); /* result will be NaN */
+ if (op==COMPARE); /* result will be NaN */
else if (op==COMPSIG) /* treat qNaN as sNaN */
*status|=DEC_Invalid_operation | DEC_sNaN;
else if (op==COMPTOTAL) { /* total ordering, always finite */
@@ -6049,7 +6071,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
else if (merged & DECSNAN); /* sNaN -> qNaN */
else { /* here if MIN or MAX and one or two quiet NaNs */
- /* min or max -- 754r rules ignore single NaN */
+ /* min or max -- 754 rules ignore single NaN */
if (!decNumberIsNaN(lhs) || !decNumberIsNaN(rhs)) {
/* just one NaN; force choice to be the non-NaN operand */
op=COMPMAX;
@@ -6065,7 +6087,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
/* have numbers */
if (op==COMPMAXMAG || op==COMPMINMAG) result=decCompare(lhs, rhs, 1);
else result=decCompare(lhs, rhs, 0); /* sign matters */
- } while(0); /* end protected */
+ } while(0); /* end protected */
if (result==BADINT) *status|=DEC_Insufficient_storage; /* rare */
else {
@@ -6091,7 +6113,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
/* choose the operand for the result */
const decNumber *choice;
if (result==0) { /* operands are numerically equal */
- /* choose according to sign then exponent (see 754r) */
+ /* choose according to sign then exponent (see 754) */
uByte slhs=(lhs->bits & DECNEG);
uByte srhs=(rhs->bits & DECNEG);
#if DECSUBSET
@@ -6110,7 +6132,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
else result=-1;
/* [if equal, use lhs, technically identical] */
}
- else { /* both positive */
+ else { /* both positive */
if (lhs->exponent>rhs->exponent) result=+1;
else result=-1;
/* [ditto] */
@@ -6145,7 +6167,7 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
/* ------------------------------------------------------------------ */
static Int decCompare(const decNumber *lhs, const decNumber *rhs,
Flag abs) {
- Int result; /* result value */
+ Int result; /* result value */
Int sigr; /* rhs signum */
Int compare; /* work */
@@ -6186,7 +6208,7 @@ static Int decCompare(const decNumber *lhs, const decNumber *rhs,
compare=decUnitCompare(lhs->lsu, D2U(lhs->digits),
rhs->lsu, D2U(rhs->digits),
rhs->exponent-lhs->exponent);
- if (compare!=BADINT) compare*=result; /* comparison succeeded */
+ if (compare!=BADINT) compare*=result; /* comparison succeeded */
return compare;
} /* decCompare */
@@ -6195,7 +6217,7 @@ static Int decCompare(const decNumber *lhs, const decNumber *rhs,
/* */
/* This routine compares A ? B*10**E where A and B are unit arrays */
/* A is a plain integer */
-/* B has an exponent of E (which must be non-negative) */
+/* B has an exponent of E (which must be non-negative) */
/* */
/* Arg1 is A first Unit (lsu) */
/* Arg2 is A length in Units */
@@ -6205,18 +6227,18 @@ static Int decCompare(const decNumber *lhs, const decNumber *rhs,
/* */
/* returns -1, 0, or 1 for A<B, A==B, or A>B, or BADINT if failure */
/* (the only possible failure is an allocation error, which can */
-/* only occur if E!=0) */
+/* only occur if E!=0) */
/* ------------------------------------------------------------------ */
static Int decUnitCompare(const Unit *a, Int alength,
const Unit *b, Int blength, Int exp) {
Unit *acc; /* accumulator for result */
Unit accbuff[SD2U(DECBUFFER*2+1)]; /* local buffer */
- Unit *allocacc=NULL; /* -> allocated acc buffer, iff allocated */
- Int accunits, need; /* units in use or needed for acc */
+ Unit *allocacc=NULL; /* -> allocated acc buffer, iff allocated */
+ Int accunits, need; /* units in use or needed for acc */
const Unit *l, *r, *u; /* work */
Int expunits, exprem, result; /* .. */
- if (exp==0) { /* aligned; fastpath */
+ if (exp==0) { /* aligned; fastpath */
if (alength>blength) return 1;
if (alength<blength) return -1;
/* same number of units in both -- need unit-by-unit compare */
@@ -6229,7 +6251,7 @@ static Int decUnitCompare(const Unit *a, Int alength,
return 0; /* all units match */
} /* aligned */
- /* Unaligned. If one is >1 unit longer than the other, padded */
+ /* Unaligned. If one is >1 unit longer than the other, padded */
/* approximately, then can return easily */
if (alength>blength+(Int)D2U(exp)) return 1;
if (alength+1<blength+(Int)D2U(exp)) return -1;
@@ -6276,7 +6298,7 @@ static Int decUnitCompare(const Unit *a, Int alength,
/* A may be shorter or longer than B. */
/* */
/* Leading zeros are not removed after a calculation. The result is */
-/* either the same length as the longer of A and B (adding any */
+/* either the same length as the longer of A and B (adding any */
/* shift), or one Unit longer than that (if a Unit carry occurred). */
/* */
/* A and B content are not altered unless C is also A or B. */
@@ -6315,10 +6337,10 @@ static Int decUnitAddSub(const Unit *a, Int alength,
const Unit *b, Int blength, Int bshift,
Unit *c, Int m) {
const Unit *alsu=a; /* A lsu [need to remember it] */
- Unit *clsu=c; /* C ditto */
+ Unit *clsu=c; /* C ditto */
Unit *minC; /* low water mark for C */
Unit *maxC; /* high water mark for C */
- eInt carry=0; /* carry integer (could be Long) */
+ eInt carry=0; /* carry integer (could be Long) */
Int add; /* work */
#if DECDPUN<=4 /* myriadal, millenary, etc. */
Int est; /* estimated quotient */
@@ -6378,7 +6400,7 @@ static Int decUnitAddSub(const Unit *a, Int alength,
carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */
est=(((ueInt)carry>>11)*53687)>>18;
*c=(Unit)(carry-est*(DECDPUNMAX+1));
- carry=est-(DECDPUNMAX+1); /* correctly negative */
+ carry=est-(DECDPUNMAX+1); /* correctly negative */
if (*c<DECDPUNMAX+1) continue; /* was OK */
carry++;
*c-=DECDPUNMAX+1;
@@ -6396,7 +6418,7 @@ static Int decUnitAddSub(const Unit *a, Int alength,
carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */
est=(((ueInt)carry>>3)*16777)>>21;
*c=(Unit)(carry-est*(DECDPUNMAX+1));
- carry=est-(DECDPUNMAX+1); /* correctly negative */
+ carry=est-(DECDPUNMAX+1); /* correctly negative */
if (*c<DECDPUNMAX+1) continue; /* was OK */
carry++;
*c-=DECDPUNMAX+1;
@@ -6412,7 +6434,7 @@ static Int decUnitAddSub(const Unit *a, Int alength,
carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */
est=QUOT10(carry, DECDPUN);
*c=(Unit)(carry-est*(DECDPUNMAX+1));
- carry=est-(DECDPUNMAX+1); /* correctly negative */
+ carry=est-(DECDPUNMAX+1); /* correctly negative */
#else
/* remainder operator is undefined if negative, so must test */
if ((ueInt)carry<(DECDPUNMAX+1)*2) { /* fastpath carry +1 */
@@ -6465,7 +6487,7 @@ static Int decUnitAddSub(const Unit *a, Int alength,
carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */
est=(((ueInt)carry>>11)*53687)>>18;
*c=(Unit)(carry-est*(DECDPUNMAX+1));
- carry=est-(DECDPUNMAX+1); /* correctly negative */
+ carry=est-(DECDPUNMAX+1); /* correctly negative */
if (*c<DECDPUNMAX+1) continue; /* was OK */
carry++;
*c-=DECDPUNMAX+1;
@@ -6483,7 +6505,7 @@ static Int decUnitAddSub(const Unit *a, Int alength,
carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */
est=(((ueInt)carry>>3)*16777)>>21;
*c=(Unit)(carry-est*(DECDPUNMAX+1));
- carry=est-(DECDPUNMAX+1); /* correctly negative */
+ carry=est-(DECDPUNMAX+1); /* correctly negative */
if (*c<DECDPUNMAX+1) continue; /* was OK */
carry++;
*c-=DECDPUNMAX+1;
@@ -6498,7 +6520,7 @@ static Int decUnitAddSub(const Unit *a, Int alength,
carry=carry+(eInt)(DECDPUNMAX+1)*(DECDPUNMAX+1); /* make positive */
est=QUOT10(carry, DECDPUN);
*c=(Unit)(carry-est*(DECDPUNMAX+1));
- carry=est-(DECDPUNMAX+1); /* correctly negative */
+ carry=est-(DECDPUNMAX+1); /* correctly negative */
#else
if ((ueInt)carry<(DECDPUNMAX+1)*2){ /* fastpath carry 1 */
*c=(Unit)(carry-(DECDPUNMAX+1));
@@ -6556,8 +6578,9 @@ static Int decUnitAddSub(const Unit *a, Int alength,
/* dn is the number to trim or normalize */
/* set is the context to use to check for clamp */
/* all is 1 to remove all trailing zeros, 0 for just fraction ones */
+/* noclamp is 1 to unconditional (unclamped) trim */
/* dropped returns the number of discarded trailing zeros */
-/* returns dn */
+/* returns dn */
/* */
/* If clamp is set in the context then the number of zeros trimmed */
/* may be limited if the exponent is high. */
@@ -6565,8 +6588,8 @@ static Int decUnitAddSub(const Unit *a, Int alength,
/* so special values are unchanged and no error is possible. */
/* ------------------------------------------------------------------ */
static decNumber * decTrim(decNumber *dn, decContext *set, Flag all,
- Int *dropped) {
- Int d, exp; /* work */
+ Flag noclamp, Int *dropped) {
+ Int d, exp; /* work */
uInt cut; /* .. */
Unit *up; /* -> current Unit */
@@ -6595,7 +6618,7 @@ static decNumber * decTrim(decNumber *dn, decContext *set, Flag all,
if (*up%powers[cut]!=0) break; /* found non-0 digit */
#endif
/* have a trailing 0 */
- if (!all) { /* trimming */
+ if (!all) { /* trimming */
/* [if exp>0 then all trailing 0s are significant for trim] */
if (exp<=0) { /* if digit might be significant */
if (exp==0) break; /* then quit */
@@ -6611,7 +6634,7 @@ static decNumber * decTrim(decNumber *dn, decContext *set, Flag all,
if (d==0) return dn; /* none to drop */
/* may need to limit drop if clamping */
- if (set->clamp) {
+ if (set->clamp && !noclamp) {
Int maxd=set->emax-set->digits+1-dn->exponent;
if (maxd<=0) return dn; /* nothing possible */
if (d>maxd) d=maxd;
@@ -6656,7 +6679,7 @@ static void decReverse(Unit *ulo, Unit *uhi) {
/* returns the new length of the integer in the array, in digits */
/* */
/* No overflow is permitted (that is, the uar array must be known to */
-/* be large enough to hold the result, after shifting). */
+/* be large enough to hold the result, after shifting). */
/* ------------------------------------------------------------------ */
static Int decShiftToMost(Unit *uar, Int digits, Int shift) {
Unit *target, *source, *first; /* work */
@@ -6672,8 +6695,8 @@ static Int decShiftToMost(Unit *uar, Int digits, Int shift) {
next=0; /* all paths */
source=uar+D2U(digits)-1; /* where msu comes from */
target=source+D2U(shift); /* where upper part of first cut goes */
- cut=DECDPUN-MSUDIGITS(shift); /* where to slice */
- if (cut==0) { /* unit-boundary case */
+ cut=DECDPUN-MSUDIGITS(shift); /* where to slice */
+ if (cut==0) { /* unit-boundary case */
for (; source>=uar; source--, target--) *target=*source;
}
else {
@@ -6704,14 +6727,14 @@ static Int decShiftToMost(Unit *uar, Int digits, Int shift) {
/* ------------------------------------------------------------------ */
/* decShiftToLeast -- shift digits in array towards least significant */
/* */
-/* uar is the array */
+/* uar is the array */
/* units is length of the array, in units */
/* shift is the number of digits to remove from the lsu end; it */
/* must be zero or positive and <= than units*DECDPUN. */
/* */
/* returns the new length of the integer in the array, in units */
/* */
-/* Removed digits are discarded (lost). Units not required to hold */
+/* Removed digits are discarded (lost). Units not required to hold */
/* the final result are unchanged. */
/* ------------------------------------------------------------------ */
static Int decShiftToLeast(Unit *uar, Int units, Int shift) {
@@ -6774,11 +6797,11 @@ static Int decShiftToLeast(Unit *uar, Int units, Int shift) {
/* lostDigits and other status may be set by this. */
/* */
/* Since the input is an operand, it must not be modified. */
-/* Instead, return an allocated decNumber, rounded as required. */
+/* Instead, return an allocated decNumber, rounded as required. */
/* It is the caller's responsibility to free the allocated storage. */
/* */
/* If no storage is available then the result cannot be used, so NULL */
-/* is returned. */
+/* is returned. */
/* ------------------------------------------------------------------ */
static decNumber *decRoundOperand(const decNumber *dn, decContext *set,
uInt *status) {
@@ -6810,7 +6833,7 @@ static decNumber *decRoundOperand(const decNumber *dn, decContext *set,
/* dest is the target decNumber */
/* src is the source decNumber */
/* set is the context [used for length (digits) and rounding mode] */
-/* residue is the residue accumulator */
+/* residue is the residue accumulator */
/* status contains the current status to be updated */
/* */
/* (dest==src is allowed and will be a no-op if fits) */
@@ -6826,20 +6849,20 @@ static void decCopyFit(decNumber *dest, const decNumber *src,
/* ------------------------------------------------------------------ */
/* decSetCoeff -- set the coefficient of a number */
/* */
-/* dn is the number whose coefficient array is to be set. */
+/* dn is the number whose coefficient array is to be set. */
/* It must have space for set->digits digits */
/* set is the context [for size] */
/* lsu -> lsu of the source coefficient [may be dn->lsu] */
/* len is digits in the source coefficient [may be dn->digits] */
-/* residue is the residue accumulator. This has values as in */
+/* residue is the residue accumulator. This has values as in */
/* decApplyRound, and will be unchanged unless the */
/* target size is less than len. In this case, the */
/* coefficient is truncated and the residue is updated to */
-/* reflect the previous residue and the dropped digits. */
-/* status is the status accumulator, as usual */
+/* reflect the previous residue and the dropped digits. */
+/* status is the status accumulator, as usual */
/* */
/* The coefficient may already be in the number, or it can be an */
-/* external intermediate array. If it is in the number, lsu must == */
+/* external intermediate array. If it is in the number, lsu must == */
/* dn->lsu and len must == dn->digits. */
/* */
/* Note that the coefficient length (len) may be < set->digits, and */
@@ -6860,7 +6883,7 @@ static void decCopyFit(decNumber *dest, const decNumber *src,
/* ------------------------------------------------------------------ */
/* mapping array: maps 0-9 to canonical residues, so that a residue */
/* can be adjusted in the range [-1, +1] and achieve correct rounding */
-/* 0 1 2 3 4 5 6 7 8 9 */
+/* 0 1 2 3 4 5 6 7 8 9 */
static const uByte resmap[10]={0, 3, 3, 3, 3, 5, 7, 7, 7, 7};
static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu,
Int len, Int *residue, uInt *status) {
@@ -6875,7 +6898,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu,
discard=len-set->digits; /* digits to discard */
if (discard<=0) { /* no digits are being discarded */
- if (dn->lsu!=lsu) { /* copy needed */
+ if (dn->lsu!=lsu) { /* copy needed */
/* copy the coefficient array to the result number; no shift needed */
count=len; /* avoids D2U */
up=lsu;
@@ -6890,7 +6913,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu,
/* some digits must be discarded ... */
dn->exponent+=discard; /* maintain numerical value */
- *status|=DEC_Rounded; /* accumulate Rounded status */
+ *status|=DEC_Rounded; /* accumulate Rounded status */
if (*residue>1) *residue=1; /* previous residue now to right, so reduce */
if (discard>len) { /* everything, +1, is being discarded */
@@ -6904,7 +6927,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu,
}
}
if (*residue!=0) *status|=DEC_Inexact; /* record inexactitude */
- *dn->lsu=0; /* coefficient will now be 0 */
+ *dn->lsu=0; /* coefficient will now be 0 */
dn->digits=1; /* .. */
return;
} /* total discard */
@@ -6924,12 +6947,12 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu,
/* here up -> Unit with first discarded digit */
cut=discard-(count-DECDPUN)-1;
- if (cut==DECDPUN-1) { /* unit-boundary case (fast) */
+ if (cut==DECDPUN-1) { /* unit-boundary case (fast) */
Unit half=(Unit)powers[DECDPUN]>>1;
/* set residue directly */
if (*up>=half) {
if (*up>half) *residue=7;
- else *residue+=5; /* add sticky bit */
+ else *residue+=5; /* add sticky bit */
}
else { /* <half */
if (*up!=0) *residue=3; /* [else is 0, leave as sticky bit] */
@@ -6940,7 +6963,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu,
}
else { /* shift to least */
count=set->digits; /* now digits to end up with */
- dn->digits=count; /* set the new length */
+ dn->digits=count; /* set the new length */
up++; /* move to next */
/* on unit boundary, so shift-down copy loop is simple */
for (target=dn->lsu; count>0; target++, up++, count-=DECDPUN)
@@ -6952,7 +6975,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu,
uInt discard1; /* first discarded digit */
uInt quot, rem; /* for divisions */
if (cut==0) quot=*up; /* is at bottom of unit */
- else /* cut>0 */ { /* it's not at bottom of unit */
+ else /* cut>0 */ { /* it's not at bottom of unit */
#if DECDPUN<=4
quot=QUOT10(*up, cut);
rem=*up-quot*powers[cut];
@@ -6985,7 +7008,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu,
}
else { /* shift to least needed */
count=set->digits; /* now digits to end up with */
- dn->digits=count; /* set the new length */
+ dn->digits=count; /* set the new length */
/* shift-copy the coefficient array to the result number */
for (target=dn->lsu; ; target++) {
*target=(Unit)quot;
@@ -7014,7 +7037,7 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu,
/* ------------------------------------------------------------------ */
/* decApplyRound -- apply pending rounding to a number */
/* */
-/* dn is the number, with space for set->digits digits */
+/* dn is the number, with space for set->digits digits */
/* set is the context [for size and rounding mode] */
/* residue indicates pending rounding, being any accumulated */
/* guard and sticky information. It may be: */
@@ -7023,14 +7046,14 @@ static void decSetCoeff(decNumber *dn, decContext *set, const Unit *lsu,
/* 1-4: rounding digit is <5 and >0 */
/* 0: the coefficient is exact */
/* -1: as 1, but the hidden digits are subtractive, that */
-/* is, of the opposite sign to dn. In this case the */
+/* is, of the opposite sign to dn. In this case the */
/* coefficient must be non-0. This case occurs when */
/* subtracting a small number (which can be reduced to */
/* a sticky bit); see decAddOp. */
-/* status is the status accumulator, as usual */
+/* status is the status accumulator, as usual */
/* */
/* This routine applies rounding while keeping the length of the */
-/* coefficient constant. The exponent and status are unchanged */
+/* coefficient constant. The exponent and status are unchanged */
/* except if: */
/* */
/* -- the coefficient was increased and is all nines (in which */
@@ -7125,7 +7148,7 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue,
if (bump==0) return; /* no action required */
/* Simply use decUnitAddSub unless bumping up and the number is */
- /* all nines. In this special case set to 100... explicitly */
+ /* all nines. In this special case set to 100... explicitly */
/* and adjust the exponent by one (as otherwise could overflow */
/* the array) */
/* Similarly handle all-nines result if bumping down. */
@@ -7139,12 +7162,12 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue,
/* here if it, too, is all nines */
*up=(Unit)powers[count-1]; /* here 999 -> 100 etc. */
for (up=up-1; up>=dn->lsu; up--) *up=0; /* others all to 0 */
- dn->exponent++; /* and bump exponent */
+ dn->exponent++; /* and bump exponent */
/* [which, very rarely, could cause Overflow...] */
if ((dn->exponent+dn->digits)>set->emax+1) {
decSetOverflow(dn, set, status);
}
- return; /* done */
+ return; /* done */
}
/* a full unit to check, with more to come */
if (*up!=DECDPUNMAX) break; /* not still 9s */
@@ -7161,11 +7184,11 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue,
/* this is the last Unit (the msu) */
if (*up!=powers[count-1]) break; /* not 100.. */
/* here if have the 1000... case */
- sup=up; /* save msu pointer */
+ sup=up; /* save msu pointer */
*up=(Unit)powers[count]-1; /* here 100 in msu -> 999 */
/* others all to all-nines, too */
for (up=up-1; up>=dn->lsu; up--) *up=(Unit)powers[DECDPUN]-1;
- dn->exponent--; /* and bump exponent */
+ dn->exponent--; /* and bump exponent */
/* iff the number was at the subnormal boundary (exponent=etiny) */
/* then the exponent is now out of range, so it will in fact get */
@@ -7181,7 +7204,7 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue,
dn->exponent++;
*status|=DEC_Underflow | DEC_Subnormal | DEC_Inexact | DEC_Rounded;
}
- return; /* done */
+ return; /* done */
}
/* a full unit to check, with more to come */
@@ -7200,7 +7223,7 @@ static void decApplyRound(decNumber *dn, decContext *set, Int residue,
/* decFinish -- finish processing a number */
/* */
/* dn is the number */
-/* set is the context */
+/* set is the context */
/* residue is the rounding accumulator (as in decApplyRound) */
/* status is the accumulator */
/* */
@@ -7237,14 +7260,14 @@ static void decFinish(decNumber *dn, decContext *set, Int *residue,
/* decFinalize -- final check, clamp, and round of a number */
/* */
/* dn is the number */
-/* set is the context */
+/* set is the context */
/* residue is the rounding accumulator (as in decApplyRound) */
/* status is the status accumulator */
/* */
/* This finishes off the current number by checking for subnormal */
/* results, applying any pending rounding, checking for overflow, */
/* and applying any clamping. */
-/* Underflow and overflow conditions are raised as appropriate. */
+/* Underflow and overflow conditions are raised as appropriate. */
/* All fields are updated as required. */
/* ------------------------------------------------------------------ */
static void decFinalize(decNumber *dn, decContext *set, Int *residue,
@@ -7272,12 +7295,12 @@ static void decFinalize(decNumber *dn, decContext *set, Int *residue,
nmin.lsu[0]=1;
nmin.exponent=set->emin;
comp=decCompare(dn, &nmin, 1); /* (signless compare) */
- if (comp==BADINT) { /* oops */
+ if (comp==BADINT) { /* oops */
*status|=DEC_Insufficient_storage; /* abandon... */
return;
}
if (*residue<0 && comp==0) { /* neg residue and dn==Nmin */
- decApplyRound(dn, set, *residue, status); /* might force down */
+ decApplyRound(dn, set, *residue, status); /* might force down */
decSetSubnormal(dn, set, residue, status);
return;
}
@@ -7306,27 +7329,27 @@ static void decFinalize(decNumber *dn, decContext *set, Int *residue,
dn->digits=decShiftToMost(dn->lsu, dn->digits, shift);
}
dn->exponent-=shift; /* adjust the exponent to match */
- *status|=DEC_Clamped; /* and record the dirty deed */
+ *status|=DEC_Clamped; /* and record the dirty deed */
return;
} /* decFinalize */
/* ------------------------------------------------------------------ */
/* decSetOverflow -- set number to proper overflow value */
/* */
-/* dn is the number (used for sign [only] and result) */
+/* dn is the number (used for sign [only] and result) */
/* set is the context [used for the rounding mode, etc.] */
/* status contains the current status to be updated */
/* */
/* This sets the sign of a number and sets its value to either */
/* Infinity or the maximum finite value, depending on the sign of */
-/* dn and the rounding mode, following IEEE 854 rules. */
+/* dn and the rounding mode, following IEEE 754 rules. */
/* ------------------------------------------------------------------ */
static void decSetOverflow(decNumber *dn, decContext *set, uInt *status) {
Flag needmax=0; /* result is maximum finite value */
uByte sign=dn->bits&DECNEG; /* clean and save sign bit */
if (ISZERO(dn)) { /* zero does not overflow magnitude */
- Int emax=set->emax; /* limit value */
+ Int emax=set->emax; /* limit value */
if (set->clamp) emax-=set->digits-1; /* lower if clamping */
if (dn->exponent>emax) { /* clamp required */
dn->exponent=emax;
@@ -7360,7 +7383,7 @@ static void decSetOverflow(decNumber *dn, decContext *set, uInt *status) {
} /* decSetOverflow */
/* ------------------------------------------------------------------ */
-/* decSetMaxValue -- set number to +Nmax (maximum normal value) */
+/* decSetMaxValue -- set number to +Nmax (maximum normal value) */
/* */
/* dn is the number to set */
/* set is the context [used for digits and emax] */
@@ -7403,7 +7426,6 @@ static void decSetMaxValue(decNumber *dn, decContext *set) {
/* ------------------------------------------------------------------ */
static void decSetSubnormal(decNumber *dn, decContext *set, Int *residue,
uInt *status) {
- Int dnexp; /* saves original exponent */
decContext workset; /* work */
Int etiny, adjust; /* .. */
@@ -7448,15 +7470,14 @@ static void decSetSubnormal(decNumber *dn, decContext *set, Int *residue,
/* adjust>0, so need to rescale the result so exponent becomes Etiny */
/* [this code is similar to that in rescale] */
- dnexp=dn->exponent; /* save exponent */
- workset=*set; /* clone rounding, etc. */
+ workset=*set; /* clone rounding, etc. */
workset.digits=dn->digits-adjust; /* set requested length */
- workset.emin-=adjust; /* and adjust emin to match */
+ workset.emin-=adjust; /* and adjust emin to match */
/* [note that the latter can be <1, here, similar to Rescale case] */
decSetCoeff(dn, &workset, dn->lsu, dn->digits, residue, status);
decApplyRound(dn, &workset, *residue, status);
- /* Use 754R/854 default rule: Underflow is set iff Inexact */
+ /* Use 754 default rule: Underflow is set iff Inexact */
/* [independent of whether trapped] */
if (*status&DEC_Inexact) *status|=DEC_Underflow;
@@ -7597,14 +7618,14 @@ static Int decGetInt(const decNumber *dn) {
/* ------------------------------------------------------------------ */
/* decDecap -- decapitate the coefficient of a number */
/* */
-/* dn is the number to be decapitated */
+/* dn is the number to be decapitated */
/* drop is the number of digits to be removed from the left of dn; */
-/* this must be <= dn->digits (if equal, the coefficient is */
+/* this must be <= dn->digits (if equal, the coefficient is */
/* set to 0) */
/* */
/* Returns dn; dn->digits will be <= the initial digits less drop */
-/* (after removing drop digits there may be leading zero digits */
-/* which will also be removed). Only dn->lsu and dn->digits change. */
+/* (after removing drop digits there may be leading zero digits */
+/* which will also be removed). Only dn->lsu and dn->digits change. */
/* ------------------------------------------------------------------ */
static decNumber *decDecap(decNumber *dn, Int drop) {
Unit *msu; /* -> target cut point */
@@ -7704,13 +7725,13 @@ static decNumber * decNaNs(decNumber *res, const decNumber *lhs,
/* ------------------------------------------------------------------ */
/* decStatus -- apply non-zero status */
/* */
-/* dn is the number to set if error */
+/* dn is the number to set if error */
/* status contains the current status (not yet in context) */
/* set is the context */
/* */
/* If the status is an error status, the number is set to a NaN, */
/* unless the error was an overflow, divide-by-zero, or underflow, */
-/* in which case the number will have already been set. */
+/* in which case the number will have already been set. */
/* */
/* The context status is then updated with the new status. Note that */
/* this may raise a signal, so control may never return from this */
@@ -7732,7 +7753,7 @@ static void decStatus(decNumber *dn, uInt status, decContext *set) {
/* ------------------------------------------------------------------ */
/* decGetDigits -- count digits in a Units array */
/* */
-/* uar is the Unit array holding the number (this is often an */
+/* uar is the Unit array holding the number (this is often an */
/* accumulator of some sort) */
/* len is the length of the array in units [>=1] */
/* */
@@ -7743,7 +7764,7 @@ static void decStatus(decNumber *dn, uInt status, decContext *set) {
/* ------------------------------------------------------------------ */
/* This may be called twice during some operations. */
static Int decGetDigits(Unit *uar, Int len) {
- Unit *up=uar+(len-1); /* -> msu */
+ Unit *up=uar+(len-1); /* -> msu */
Int digits=(len-1)*DECDPUN+1; /* possible digits excluding msu */
#if DECDPUN>4
uInt const *pow; /* work */
@@ -7763,7 +7784,7 @@ static Int decGetDigits(Unit *uar, Int len) {
if (*up<10) break; /* is 1-9 */
digits++;
#if DECDPUN>2 /* not done yet */
- if (*up<100) break; /* is 10-99 */
+ if (*up<100) break; /* is 10-99 */
digits++;
#if DECDPUN>3 /* not done yet */
if (*up<1000) break; /* is 100-999 */
@@ -7813,7 +7834,7 @@ void decNumberShow(const decNumber *dn) {
}
/* now carefully display the coefficient */
- up=dn->lsu+D2U(dn->digits)-1; /* msu */
+ up=dn->lsu+D2U(dn->digits)-1; /* msu */
printf("%ld", (LI)*up);
for (up=up-1; up>=dn->lsu; up--) {
u=*up;
@@ -7837,7 +7858,7 @@ void decNumberShow(const decNumber *dn) {
/* ------------------------------------------------------------------ */
/* decDumpAr -- display a unit array [debug/check aid] */
/* name is a single-character tag name */
-/* ar is the array to display */
+/* ar is the array to display */
/* len is the length of the array in Units */
/* ------------------------------------------------------------------ */
static void decDumpAr(char name, const Unit *ar, Int len) {
@@ -7880,7 +7901,7 @@ static void decDumpAr(char name, const Unit *ar, Int len) {
/* rhs is the second (may be DECUNUSED) */
/* set is the context (may be DECUNCONT) */
/* returns 0 if both operands, and the context are clean, or 1 */
-/* otherwise (in which case the context will show an error, */
+/* otherwise (in which case the context will show an error, */
/* unless NULL). Note that res is not cleaned; caller should */
/* handle this so res=NULL case is safe. */
/* The caller is expected to abandon immediately if 1 is returned. */
@@ -7917,7 +7938,7 @@ static Flag decCheckOperands(decNumber *res, const decNumber *lhs,
if (set!=DECUNCONT) decContextSetStatus(set, DEC_Invalid_operation);
if (res!=DECUNRESU && res!=NULL) {
decNumberZero(res);
- res->bits=DECNAN; /* qNaN */
+ res->bits=DECNAN; /* qNaN */
}
}
return bad;
@@ -7933,7 +7954,7 @@ static Flag decCheckOperands(decNumber *res, const decNumber *lhs,
/* ------------------------------------------------------------------ */
static Flag decCheckNumber(const decNumber *dn) {
const Unit *up; /* work */
- uInt maxuint; /* .. */
+ uInt maxuint; /* .. */
Int ae, d, digits; /* .. */
Int emin, emax; /* .. */
@@ -8004,7 +8025,7 @@ static Flag decCheckNumber(const decNumber *dn) {
/* check the exponent. Note that input operands can have exponents */
/* which are out of the set->emin/set->emax and set->digits range */
/* (just as they can have more digits than set->digits). */
- ae=dn->exponent+dn->digits-1; /* adjusted exponent */
+ ae=dn->exponent+dn->digits-1; /* adjusted exponent */
emax=DECNUMMAXE;
emin=DECNUMMINE;
digits=DECNUMMAXP;
@@ -8060,7 +8081,7 @@ static void decCheckInexact(const decNumber *dn, decContext *set) {
/* */
/* Semantics is the same as the stdlib malloc routine, but bytes */
/* allocated are accounted for globally, and corruption fences are */
-/* added before and after the 'actual' storage. */
+/* added before and after the 'actual' storage. */
/* ------------------------------------------------------------------ */
/* This routine allocates storage with an extra twelve bytes; 8 are */
/* at the start and hold: */
@@ -8070,17 +8091,16 @@ static void decCheckInexact(const decNumber *dn, decContext *set) {
/* ------------------------------------------------------------------ */
static void *decMalloc(size_t n) {
uInt size=n+12; /* true size */
- void *alloc; /* -> allocated storage */
- uInt *j; /* work */
- uByte *b, *b0; /* .. */
+ void *alloc; /* -> allocated storage */
+ uByte *b, *b0; /* work */
+ uInt uiwork; /* for macros */
alloc=malloc(size); /* -> allocated storage */
- if (alloc==NULL) return NULL; /* out of strorage */
+ if (alloc==NULL) return NULL; /* out of strorage */
b0=(uByte *)alloc; /* as bytes */
decAllocBytes+=n; /* account for storage */
- j=(uInt *)alloc; /* -> first four bytes */
- *j=n; /* save n */
- /* printf(" alloc ++ dAB: %ld (%d)\n", decAllocBytes, n); */
+ UBFROMUI(alloc, n); /* save n */
+ /* printf(" alloc ++ dAB: %ld (%ld)\n", (LI)decAllocBytes, (LI)n); */
for (b=b0+4; b<b0+8; b++) *b=DECFENCE;
for (b=b0+n+8; b<b0+n+12; b++) *b=DECFENCE;
return b0+8; /* -> play area */
@@ -8099,20 +8119,20 @@ static void *decMalloc(size_t n) {
/* is, offset by 8). */
/* ------------------------------------------------------------------ */
static void decFree(void *alloc) {
- uInt *j, n; /* pointer, original length */
+ uInt n; /* original length */
uByte *b, *b0; /* work */
+ uInt uiwork; /* for macros */
if (alloc==NULL) return; /* allowed; it's a nop */
b0=(uByte *)alloc; /* as bytes */
b0-=8; /* -> true start of storage */
- j=(uInt *)b0; /* -> first four bytes */
- n=*j; /* lift */
+ n=UBTOUI(b0); /* lift length */
for (b=b0+4; b<b0+8; b++) if (*b!=DECFENCE)
printf("=== Corrupt byte [%02x] at offset %d from %ld ===\n", *b,
- b-b0-8, (Int)b0);
+ b-b0-8, (LI)b0);
for (b=b0+n+8; b<b0+n+12; b++) if (*b!=DECFENCE)
printf("=== Corrupt byte [%02x] at offset +%d from %ld, n=%ld ===\n", *b,
- b-b0-8, (Int)b0, n);
+ b-b0-8, (LI)b0, (LI)n);
free(b0); /* drop the storage */
decAllocBytes-=n; /* account for storage */
/* printf(" free -- dAB: %d (%d)\n", decAllocBytes, -n); */
diff --git a/libdecnumber/decNumber.h b/libdecnumber/decNumber.h
index 0a9fdced8b3..72dbdaf46b3 100644
--- a/libdecnumber/decNumber.h
+++ b/libdecnumber/decNumber.h
@@ -46,7 +46,7 @@
#define DECNEG 0x80 /* Sign; 1=negative, 0=positive or zero */
#define DECINF 0x40 /* 1=Infinity */
#define DECNAN 0x20 /* 1=NaN */
- #define DECSNAN 0x10 /* 1=sNaN */
+ #define DECSNAN 0x10 /* 1=sNaN */
/* The remaining bits are reserved; they must be 0 */
#define DECSPECIAL (DECINF|DECNAN|DECSNAN) /* any special value */
@@ -124,7 +124,7 @@
uint8_t * decNumberGetBCD(const decNumber *, uint8_t *);
decNumber * decNumberSetBCD(decNumber *, const uint8_t *, uint32_t);
- /* Operators and elementary functions */
+ /* Operators and elementary functions */
decNumber * decNumberAbs(decNumber *, const decNumber *, decContext *);
decNumber * decNumberAdd(decNumber *, const decNumber *, const decNumber *, decContext *);
decNumber * decNumberAnd(decNumber *, const decNumber *, const decNumber *, decContext *);
@@ -185,7 +185,7 @@
/* Macros for testing decNumber *dn */
#define decNumberIsCanonical(dn) (1) /* All decNumbers are saintly */
- #define decNumberIsFinite(dn) (((dn)->bits&DECSPECIAL)==0)
+ #define decNumberIsFinite(dn) (((dn)->bits&DECSPECIAL)==0)
#define decNumberIsInfinite(dn) (((dn)->bits&DECINF)!=0)
#define decNumberIsNaN(dn) (((dn)->bits&(DECNAN|DECSNAN))!=0)
#define decNumberIsNegative(dn) (((dn)->bits&DECNEG)!=0)
diff --git a/libdecnumber/decNumberLocal.h b/libdecnumber/decNumberLocal.h
index f1568f725e1..8beb8b12a00 100644
--- a/libdecnumber/decNumberLocal.h
+++ b/libdecnumber/decNumberLocal.h
@@ -31,42 +31,56 @@
/* ------------------------------------------------------------------ */
/* decNumber package local type, tuning, and macro definitions */
/* ------------------------------------------------------------------ */
-/* This header file is included by all modules in the decNumber */
+/* This header file is included by all modules in the decNumber */
/* library, and contains local type definitions, tuning parameters, */
-/* etc. It should not need to be used by application programs. */
+/* etc. It should not need to be used by application programs. */
/* decNumber.h or one of decDouble (etc.) must be included first. */
/* ------------------------------------------------------------------ */
#if !defined(DECNUMBERLOC)
#define DECNUMBERLOC
- #define DECVERSION "decNumber 3.53" /* Package Version [16 max.] */
+ #define DECVERSION "decNumber 3.61" /* Package Version [16 max.] */
#define DECNLAUTHOR "Mike Cowlishaw" /* Who to blame */
#include <stdlib.h> /* for abs */
#include <string.h> /* for memset, strcpy */
- #include "dconfig.h" /* for WORDS_BIGENDIAN */
+ #include "dconfig.h" /* for WORDS_BIGENDIAN */
/* Conditional code flag -- set this to match hardware platform */
- /* 1=little-endian, 0=big-endian */
+ /* 1=little-endian, 0=big-endian */
#if WORDS_BIGENDIAN
#define DECLITEND 0
#else
#define DECLITEND 1
#endif
+ #if !defined(DECLITEND)
+ #define DECLITEND 1 /* 1=little-endian, 0=big-endian */
+ #endif
+
/* Conditional code flag -- set this to 1 for best performance */
+ #if !defined(DECUSE64)
#define DECUSE64 1 /* 1=use int64s, 0=int32 & smaller only */
+ #endif
/* Conditional check flags -- set these to 0 for best performance */
+ #if !defined(DECCHECK)
#define DECCHECK 0 /* 1 to enable robust checking */
+ #endif
+ #if !defined(DECALLOC)
#define DECALLOC 0 /* 1 to enable memory accounting */
+ #endif
+ #if !defined(DECTRACE)
#define DECTRACE 0 /* 1 to trace certain internals, etc. */
+ #endif
/* Tuning parameter for decNumber (arbitrary precision) module */
+ #if !defined(DECBUFFER)
#define DECBUFFER 36 /* Size basis for local buffers. This */
/* should be a common maximum precision */
/* rounded up to a multiple of 4; must */
/* be zero or positive. */
+ #endif
/* ---------------------------------------------------------------- */
/* Definitions for all modules (general-purpose) */
@@ -76,33 +90,34 @@
/* not use int or long directly. */
#define Flag uint8_t
#define Byte int8_t
- #define uByte uint8_t
- #define Short int16_t
+ #define uByte uint8_t
+ #define Short int16_t
#define uShort uint16_t
#define Int int32_t
#define uInt uint32_t
#define Unit decNumberUnit
#if DECUSE64
#define Long int64_t
- #define uLong uint64_t
+ #define uLong uint64_t
#endif
/* Development-use definitions */
typedef long int LI; /* for printf arguments only */
#define DECNOINT 0 /* 1 to check no internal use of 'int' */
+ /* or stdint types */
#if DECNOINT
/* if these interfere with your C includes, do not set DECNOINT */
- #define int ? /* enable to ensure that plain C 'int' */
- #define long ?? /* .. or 'long' types are not used */
+ #define int ? /* enable to ensure that plain C 'int' */
+ #define long ?? /* .. or 'long' types are not used */
#endif
/* Shared lookup tables */
extern const uByte DECSTICKYTAB[10]; /* re-round digits if sticky */
extern const uInt DECPOWERS[10]; /* powers of ten table */
/* The following are included from decDPD.h */
-#include "decDPDSymbols.h"
- extern const uShort DPD2BIN[1024]; /* DPD -> 0-999 */
- extern const uShort BIN2DPD[1000]; /* 0-999 -> DPD */
+ #include "decDPDSymbols.h"
+ extern const uShort DPD2BIN[1024]; /* DPD -> 0-999 */
+ extern const uShort BIN2DPD[1000]; /* 0-999 -> DPD */
extern const uInt DPD2BINK[1024]; /* DPD -> 0-999000 */
extern const uInt DPD2BINM[1024]; /* DPD -> 0-999000000 */
extern const uByte DPD2BCD8[4096]; /* DPD -> ddd + len */
@@ -111,32 +126,42 @@
/* LONGMUL32HI -- set w=(u*v)>>32, where w, u, and v are uInts */
/* (that is, sets w to be the high-order word of the 64-bit result; */
- /* the low-order word is simply u*v.) */
+ /* the low-order word is simply u*v.) */
/* This version is derived from Knuth via Hacker's Delight; */
- /* it seems to optimize better than some others tried */
+ /* it seems to optimize better than some others tried */
#define LONGMUL32HI(w, u, v) { \
- uInt u0, u1, v0, v1, w0, w1, w2, t; \
+ uInt u0, u1, v0, v1, w0, w1, w2, t; \
u0=u & 0xffff; u1=u>>16; \
v0=v & 0xffff; v1=v>>16; \
w0=u0*v0; \
- t=u1*v0 + (w0>>16); \
+ t=u1*v0 + (w0>>16); \
w1=t & 0xffff; w2=t>>16; \
w1=u0*v1 + w1; \
(w)=u1*v1 + w2 + (w1>>16);}
/* ROUNDUP -- round an integer up to a multiple of n */
#define ROUNDUP(i, n) ((((i)+(n)-1)/n)*n)
+ #define ROUNDUP4(i) (((i)+3)&~3) /* special for n=4 */
/* ROUNDDOWN -- round an integer down to a multiple of n */
#define ROUNDDOWN(i, n) (((i)/n)*n)
- #define ROUNDDOWN4(i) ((i)&~3) /* special for n=4 */
+ #define ROUNDDOWN4(i) ((i)&~3) /* special for n=4 */
- /* References to multi-byte sequences under different sizes */
- /* Refer to a uInt from four bytes starting at a char* or uByte*, */
- /* etc. */
- #define UINTAT(b) (*((uInt *)(b)))
- #define USHORTAT(b) (*((uShort *)(b)))
- #define UBYTEAT(b) (*((uByte *)(b)))
+ /* References to multi-byte sequences under different sizes; these */
+ /* require locally declared variables, but do not violate strict */
+ /* aliasing or alignment (as did the UINTAT simple cast to uInt). */
+ /* Variables needed are uswork, uiwork, etc. [so do not use at same */
+ /* level in an expression, e.g., UBTOUI(x)==UBTOUI(y) may fail]. */
+
+ /* Return a uInt, etc., from bytes starting at a char* or uByte* */
+ #define UBTOUS(b) (memcpy((void *)&uswork, b, 2), uswork)
+ #define UBTOUI(b) (memcpy((void *)&uiwork, b, 4), uiwork)
+
+ /* Store a uInt, etc., into bytes starting at a char* or uByte*. */
+ /* Returns i, evaluated, for convenience; has to use uiwork because */
+ /* i may be an expression. */
+ #define UBFROMUS(b, i) (uswork=(i), memcpy(b, (void *)&uswork, 2), uswork)
+ #define UBFROMUI(b, i) (uiwork=(i), memcpy(b, (void *)&uiwork, 4), uiwork)
/* X10 and X100 -- multiply integer i by 10 or 100 */
/* [shifts are usually faster than multiply; could be conditional] */
@@ -149,7 +174,7 @@
/* Useful constants */
#define BILLION 1000000000 /* 10**9 */
- /* CHARMASK: 0x30303030 for ASCII/UTF8; 0xF0F0F0F0 for EBCDIC */
+ /* CHARMASK: 0x30303030 for ASCII/UTF8; 0xF0F0F0F0 for EBCDIC */
#define CHARMASK ((((((((uInt)'0')<<8)+'0')<<8)+'0')<<8)+'0')
@@ -172,7 +197,7 @@
#error Minimum exponent mismatch
#endif
- /* Set DECDPUNMAX -- the maximum integer that fits in DECDPUN */
+ /* Set DECDPUNMAX -- the maximum integer that fits in DECDPUN */
/* digits, and D2UTABLE -- the initializer for the D2U table */
#if DECDPUN==1
#define DECDPUNMAX 9
@@ -253,7 +278,7 @@
/* D2N -- return the number of decNumber structs that would be */
/* needed to contain that number of digits (and the initial */
/* decNumber struct) safely. Note that one Unit is included in the */
- /* initial structure. Used for allocating space that is aligned on */
+ /* initial structure. Used for allocating space that is aligned on */
/* a decNumber struct boundary. */
#define D2N(d) \
((((SD2U(d)-1)*sizeof(Unit))+sizeof(decNumber)*2-1)/sizeof(decNumber))
@@ -261,7 +286,7 @@
/* TODIGIT -- macro to remove the leading digit from the unsigned */
/* integer u at column cut (counting from the right, LSD=0) and */
/* place it as an ASCII character into the character pointed to by */
- /* c. Note that cut must be <= 9, and the maximum value for u is */
+ /* c. Note that cut must be <= 9, and the maximum value for u is */
/* 2,000,000,000 (as is needed for negative exponents of */
/* subnormals). The unsigned integer pow is used as a temporary */
/* variable. */
@@ -274,7 +299,7 @@
pow/=2; \
if ((u)>=pow) {(u)-=pow; *(c)+=4;} \
pow/=2; \
- } \
+ } \
if ((u)>=pow) {(u)-=pow; *(c)+=2;} \
pow/=2; \
if ((u)>=pow) {(u)-=pow; *(c)+=1;} \
@@ -289,9 +314,9 @@
/* number, whose coefficient is a string of bcd8 uBytes */
typedef struct {
uByte *msd; /* -> most significant digit */
- uByte *lsd; /* -> least ditto */
+ uByte *lsd; /* -> least ditto */
uInt sign; /* 0=positive, DECFLOAT_Sign=negative */
- Int exponent; /* Unadjusted signed exponent (q), or */
+ Int exponent; /* Unadjusted signed exponent (q), or */
/* DECFLOAT_NaN etc. for a special */
} bcdnum;
@@ -308,12 +333,12 @@
#define DECWORDS (DECBYTES/4)
#define DECWWORDS (DECWBYTES/4)
#if DECLITEND
- #define DFWORD(df, off) ((df)->words[DECWORDS-1-(off)])
- #define DFBYTE(df, off) ((df)->bytes[DECBYTES-1-(off)])
+ #define DFBYTE(df, off) ((df)->bytes[DECBYTES-1-(off)])
+ #define DFWORD(df, off) ((df)->words[DECWORDS-1-(off)])
#define DFWWORD(dfw, off) ((dfw)->words[DECWWORDS-1-(off)])
#else
- #define DFWORD(df, off) ((df)->words[off])
- #define DFBYTE(df, off) ((df)->bytes[off])
+ #define DFBYTE(df, off) ((df)->bytes[off])
+ #define DFWORD(df, off) ((df)->words[off])
#define DFWWORD(dfw, off) ((dfw)->words[off])
#endif
@@ -338,7 +363,7 @@
/* Format-dependent macros and constants */
#if defined(DECPMAX)
- /* Useful constants */
+ /* Useful constants */
#define DECPMAX9 (ROUNDUP(DECPMAX, 9)/9) /* 'Pmax' in 10**9s */
/* Top words for a zero */
#define SINGLEZERO 0x22500000
@@ -350,10 +375,10 @@
/* DFISZERO -- test for (any) zero */
/* DFISCCZERO -- test for coefficient continuation being zero */
/* DFISCC01 -- test for coefficient contains only 0s and 1s */
- /* DFISINT -- test for finite and exponent q=0 */
+ /* DFISINT -- test for finite and exponent q=0 */
/* DFISUINT01 -- test for sign=0, finite, exponent q=0, and */
/* MSD=0 or 1 */
- /* ZEROWORD is also defined here. */
+ /* ZEROWORD is also defined here. */
/* In DFISZERO the first test checks the least-significant word */
/* (most likely to be non-zero); the penultimate tests MSD and */
/* DPDs in the signword, and the final test excludes specials and */
@@ -407,26 +432,36 @@
|| ((dpd)&(((uInt)0x6e)<<(k)))!=(((uInt)0x6e)<<(k)))
/* declet is at offset k (a multiple of 2) in a pair of uInts: */
/* [the top 2 bits will always be in the more-significant uInt] */
- #define CANONDPDTWO(hi, lo, k) (((hi)&(0x300>>(32-(k))))==0 \
+ #define CANONDPDTWO(hi, lo, k) (((hi)&(0x300>>(32-(k))))==0 \
|| ((hi)&(0x6e>>(32-(k))))!=(0x6e>>(32-(k))) \
|| ((lo)&(((uInt)0x6e)<<(k)))!=(((uInt)0x6e)<<(k)))
/* Macro to test whether a full-length (length DECPMAX) BCD8 */
- /* coefficient is zero */
- /* test just the LSWord first, then the remainder */
+ /* coefficient, starting at uByte u, is all zeros */
+ /* Test just the LSWord first, then the remainder as a sequence */
+ /* of tests in order to avoid same-level use of UBTOUI */
#if DECPMAX==7
- #define ISCOEFFZERO(u) (UINTAT((u)+DECPMAX-4)==0 \
- && UINTAT((u)+DECPMAX-7)==0)
+ #define ISCOEFFZERO(u) ( \
+ UBTOUI((u)+DECPMAX-4)==0 \
+ && UBTOUS((u)+DECPMAX-6)==0 \
+ && *(u)==0)
#elif DECPMAX==16
- #define ISCOEFFZERO(u) (UINTAT((u)+DECPMAX-4)==0 \
- && (UINTAT((u)+DECPMAX-8)+UINTAT((u)+DECPMAX-12) \
- +UINTAT((u)+DECPMAX-16))==0)
+ #define ISCOEFFZERO(u) ( \
+ UBTOUI((u)+DECPMAX-4)==0 \
+ && UBTOUI((u)+DECPMAX-8)==0 \
+ && UBTOUI((u)+DECPMAX-12)==0 \
+ && UBTOUI(u)==0)
#elif DECPMAX==34
- #define ISCOEFFZERO(u) (UINTAT((u)+DECPMAX-4)==0 \
- && (UINTAT((u)+DECPMAX-8) +UINTAT((u)+DECPMAX-12) \
- +UINTAT((u)+DECPMAX-16)+UINTAT((u)+DECPMAX-20) \
- +UINTAT((u)+DECPMAX-24)+UINTAT((u)+DECPMAX-28) \
- +UINTAT((u)+DECPMAX-32)+USHORTAT((u)+DECPMAX-34))==0)
+ #define ISCOEFFZERO(u) ( \
+ UBTOUI((u)+DECPMAX-4)==0 \
+ && UBTOUI((u)+DECPMAX-8)==0 \
+ && UBTOUI((u)+DECPMAX-12)==0 \
+ && UBTOUI((u)+DECPMAX-16)==0 \
+ && UBTOUI((u)+DECPMAX-20)==0 \
+ && UBTOUI((u)+DECPMAX-24)==0 \
+ && UBTOUI((u)+DECPMAX-28)==0 \
+ && UBTOUI((u)+DECPMAX-32)==0 \
+ && UBTOUS(u)==0)
#endif
/* Macros and masks for the exponent continuation field and MSD */
@@ -448,29 +483,24 @@
#define ECONNANMASK ((0x01ffffff>>(32-6-DECECONL))<<(32-6-DECECONL))
/* Macros to decode the coefficient in a finite decFloat *df into */
- /* a BCD string (uByte *bcdin) of length DECPMAX uBytes */
+ /* a BCD string (uByte *bcdin) of length DECPMAX uBytes. */
- /* In-line sequence to convert 10 bits at right end of uInt dpd */
- /* to three BCD8 digits starting at uByte u. Note that an extra */
- /* byte is written to the right of the three digits because this */
- /* moves four at a time for speed; the alternative macro moves */
- /* exactly three bytes */
- #define dpd2bcd8(u, dpd) { \
- UINTAT(u)=UINTAT(&DPD2BCD8[((dpd)&0x3ff)*4]);}
-
- #define dpd2bcd83(u, dpd) { \
- *(u)=DPD2BCD8[((dpd)&0x3ff)*4]; \
- *(u+1)=DPD2BCD8[((dpd)&0x3ff)*4+1]; \
- *(u+2)=DPD2BCD8[((dpd)&0x3ff)*4+2];}
+ /* In-line sequence to convert least significant 10 bits of uInt */
+ /* dpd to three BCD8 digits starting at uByte u. Note that an */
+ /* extra byte is written to the right of the three digits because */
+ /* four bytes are moved at a time for speed; the alternative */
+ /* macro moves exactly three bytes (usually slower). */
+ #define dpd2bcd8(u, dpd) memcpy(u, &DPD2BCD8[((dpd)&0x3ff)*4], 4)
+ #define dpd2bcd83(u, dpd) memcpy(u, &DPD2BCD8[((dpd)&0x3ff)*4], 3)
/* Decode the declets. After extracting each one, it is decoded */
/* to BCD8 using a table lookup (also used for variable-length */
- /* decode). Each DPD decode is 3 bytes BCD8 plus a one-byte */
- /* length which is not used, here). Fixed-length 4-byte moves */
+ /* decode). Each DPD decode is 3 bytes BCD8 plus a one-byte */
+ /* length which is not used, here). Fixed-length 4-byte moves */
/* are fast, however, almost everywhere, and so are used except */
/* for the final three bytes (to avoid overrun). The code below */
/* is 36 instructions for Doubles and about 70 for Quads, even */
- /* on IA32. */
+ /* on IA32. */
/* Two macros are defined for each format: */
/* GETCOEFF extracts the coefficient of the current format */
@@ -478,7 +508,7 @@
/* The latter is a copy of the next-wider GETCOEFF using DFWWORD. */
#if DECPMAX==7
- #define GETCOEFF(df, bcd) { \
+ #define GETCOEFF(df, bcd) { \
uInt sourhi=DFWORD(df, 0); \
*(bcd)=(uByte)DECCOMBMSD[sourhi>>26]; \
dpd2bcd8(bcd+1, sourhi>>10); \
@@ -494,7 +524,7 @@
dpd2bcd83(bcd+13, sourlo);}
#elif DECPMAX==16
- #define GETCOEFF(df, bcd) { \
+ #define GETCOEFF(df, bcd) { \
uInt sourhi=DFWORD(df, 0); \
uInt sourlo=DFWORD(df, 1); \
*(bcd)=(uByte)DECCOMBMSD[sourhi>>26]; \
@@ -522,7 +552,7 @@
dpd2bcd83(bcd+31, sourlo);}
#elif DECPMAX==34
- #define GETCOEFF(df, bcd) { \
+ #define GETCOEFF(df, bcd) { \
uInt sourhi=DFWORD(df, 0); \
uInt sourmh=DFWORD(df, 1); \
uInt sourml=DFWORD(df, 2); \
@@ -540,12 +570,12 @@
dpd2bcd8(bcd+28, sourlo>>10); \
dpd2bcd83(bcd+31, sourlo);}
- #define GETWCOEFF(df, bcd) {??} /* [should never be used] */
+ #define GETWCOEFF(df, bcd) {??} /* [should never be used] */
#endif
/* Macros to decode the coefficient in a finite decFloat *df into */
/* a base-billion uInt array, with the least-significant */
- /* 0-999999999 'digit' at offset 0. */
+ /* 0-999999999 'digit' at offset 0. */
/* Decode the declets. After extracting each one, it is decoded */
/* to binary using a table lookup. Three tables are used; one */
@@ -597,8 +627,8 @@
#endif
/* Macros to decode the coefficient in a finite decFloat *df into */
- /* a base-thousand uInt array, with the least-significant 0-999 */
- /* 'digit' at offset 0. */
+ /* a base-thousand uInt array (of size DECLETS+1, to allow for */
+ /* the MSD), with the least-significant 0-999 'digit' at offset 0.*/
/* Decode the declets. After extracting each one, it is decoded */
/* to binary using a table lookup. */
@@ -640,9 +670,72 @@
(buf)[9]=DPD2BIN[((sourhi<<6) | (sourmh>>26))&0x3ff]; \
(buf)[10]=DPD2BIN[(sourhi>>4)&0x3ff]; \
(buf)[11]=DECCOMBMSD[sourhi>>26];}
+ #endif
+
+ /* Macros to decode the coefficient in a finite decFloat *df and */
+ /* add to a base-thousand uInt array (as for GETCOEFFTHOU). */
+ /* After the addition then most significant 'digit' in the array */
+ /* might have a value larger then 10 (with a maximum of 19). */
+ #if DECPMAX==7
+ #define ADDCOEFFTHOU(df, buf) { \
+ uInt sourhi=DFWORD(df, 0); \
+ (buf)[0]+=DPD2BIN[sourhi&0x3ff]; \
+ if (buf[0]>999) {buf[0]-=1000; buf[1]++;} \
+ (buf)[1]+=DPD2BIN[(sourhi>>10)&0x3ff]; \
+ if (buf[1]>999) {buf[1]-=1000; buf[2]++;} \
+ (buf)[2]+=DECCOMBMSD[sourhi>>26];}
+
+ #elif DECPMAX==16
+ #define ADDCOEFFTHOU(df, buf) { \
+ uInt sourhi, sourlo; \
+ sourlo=DFWORD(df, 1); \
+ (buf)[0]+=DPD2BIN[sourlo&0x3ff]; \
+ if (buf[0]>999) {buf[0]-=1000; buf[1]++;} \
+ (buf)[1]+=DPD2BIN[(sourlo>>10)&0x3ff]; \
+ if (buf[1]>999) {buf[1]-=1000; buf[2]++;} \
+ (buf)[2]+=DPD2BIN[(sourlo>>20)&0x3ff]; \
+ if (buf[2]>999) {buf[2]-=1000; buf[3]++;} \
+ sourhi=DFWORD(df, 0); \
+ (buf)[3]+=DPD2BIN[((sourhi<<2) | (sourlo>>30))&0x3ff]; \
+ if (buf[3]>999) {buf[3]-=1000; buf[4]++;} \
+ (buf)[4]+=DPD2BIN[(sourhi>>8)&0x3ff]; \
+ if (buf[4]>999) {buf[4]-=1000; buf[5]++;} \
+ (buf)[5]+=DECCOMBMSD[sourhi>>26];}
+
+ #elif DECPMAX==34
+ #define ADDCOEFFTHOU(df, buf) { \
+ uInt sourhi, sourmh, sourml, sourlo; \
+ sourlo=DFWORD(df, 3); \
+ (buf)[0]+=DPD2BIN[sourlo&0x3ff]; \
+ if (buf[0]>999) {buf[0]-=1000; buf[1]++;} \
+ (buf)[1]+=DPD2BIN[(sourlo>>10)&0x3ff]; \
+ if (buf[1]>999) {buf[1]-=1000; buf[2]++;} \
+ (buf)[2]+=DPD2BIN[(sourlo>>20)&0x3ff]; \
+ if (buf[2]>999) {buf[2]-=1000; buf[3]++;} \
+ sourml=DFWORD(df, 2); \
+ (buf)[3]+=DPD2BIN[((sourml<<2) | (sourlo>>30))&0x3ff]; \
+ if (buf[3]>999) {buf[3]-=1000; buf[4]++;} \
+ (buf)[4]+=DPD2BIN[(sourml>>8)&0x3ff]; \
+ if (buf[4]>999) {buf[4]-=1000; buf[5]++;} \
+ (buf)[5]+=DPD2BIN[(sourml>>18)&0x3ff]; \
+ if (buf[5]>999) {buf[5]-=1000; buf[6]++;} \
+ sourmh=DFWORD(df, 1); \
+ (buf)[6]+=DPD2BIN[((sourmh<<4) | (sourml>>28))&0x3ff]; \
+ if (buf[6]>999) {buf[6]-=1000; buf[7]++;} \
+ (buf)[7]+=DPD2BIN[(sourmh>>6)&0x3ff]; \
+ if (buf[7]>999) {buf[7]-=1000; buf[8]++;} \
+ (buf)[8]+=DPD2BIN[(sourmh>>16)&0x3ff]; \
+ if (buf[8]>999) {buf[8]-=1000; buf[9]++;} \
+ sourhi=DFWORD(df, 0); \
+ (buf)[9]+=DPD2BIN[((sourhi<<6) | (sourmh>>26))&0x3ff]; \
+ if (buf[9]>999) {buf[9]-=1000; buf[10]++;} \
+ (buf)[10]+=DPD2BIN[(sourhi>>4)&0x3ff]; \
+ if (buf[10]>999) {buf[10]-=1000; buf[11]++;} \
+ (buf)[11]+=DECCOMBMSD[sourhi>>26];}
#endif
+
/* Set a decFloat to the maximum positive finite number (Nmax) */
#if DECPMAX==7
#define DFSETNMAX(df) \
diff --git a/libdecnumber/decPacked.c b/libdecnumber/decPacked.c
index 2b912fe13bc..2297d7d6e7d 100644
--- a/libdecnumber/decPacked.c
+++ b/libdecnumber/decPacked.c
@@ -31,12 +31,12 @@
/* ------------------------------------------------------------------ */
/* Packed Decimal conversion module */
/* ------------------------------------------------------------------ */
-/* This module comprises the routines for Packed Decimal format */
+/* This module comprises the routines for Packed Decimal format */
/* numbers. Conversions are supplied to and from decNumber, which in */
/* turn supports: */
/* conversions to and from string */
/* arithmetic routines */
-/* utilities. */
+/* utilities. */
/* Conversions from decNumber to and from densely packed decimal */
/* formats are provided by the decimal32 through decimal128 modules. */
/* ------------------------------------------------------------------ */
@@ -51,8 +51,8 @@
/* */
/* bcd is the BCD bytes */
/* length is the length of the BCD array */
-/* scale is the scale result */
-/* dn is the decNumber */
+/* scale is the scale result */
+/* dn is the decNumber */
/* returns bcd, or NULL if error */
/* */
/* The number is converted to a BCD packed decimal byte array, */
@@ -67,7 +67,7 @@
/* as necessary. */
/* */
/* If there is an error (that is, the decNumber has too many digits */
-/* to fit in length bytes, or it is a NaN or Infinity), NULL is */
+/* to fit in length bytes, or it is a NaN or Infinity), NULL is */
/* returned and the bcd and scale results are unchanged. Otherwise */
/* bcd is returned. */
/* ------------------------------------------------------------------ */
@@ -86,9 +86,9 @@ uByte * decPackedFromNumber(uByte *bcd, Int length, Int *scale,
if (dn->digits>length*2-1 /* too long .. */
||(dn->bits & DECSPECIAL)) return NULL; /* .. or special -- hopeless */
- if (dn->bits&DECNEG) obyte=DECPMINUS; /* set the sign .. */
- else obyte=DECPPLUS;
- *scale=-dn->exponent; /* .. and scale */
+ if (dn->bits&DECNEG) obyte=DECPMINUS; /* set the sign .. */
+ else obyte=DECPPLUS;
+ *scale=-dn->exponent; /* .. and scale */
/* loop from lowest (rightmost) byte */
out=bcd+length-1; /* -> final byte */
@@ -141,7 +141,7 @@ uByte * decPackedFromNumber(uByte *bcd, Int length, Int *scale,
/* bcd is the BCD bytes */
/* length is the length of the BCD array */
/* scale is the scale associated with the BCD integer */
-/* dn is the decNumber [with space for length*2 digits] */
+/* dn is the decNumber [with space for length*2 digits] */
/* returns dn, or NULL if error */
/* */
/* The BCD packed decimal byte array, together with an associated */
@@ -157,7 +157,7 @@ uByte * decPackedFromNumber(uByte *bcd, Int length, Int *scale,
/* no error is possible unless the adjusted exponent is out of range, */
/* no sign nibble was found, or a sign nibble was found before the */
/* final nibble. In these error cases, NULL is returned and the */
-/* decNumber will be 0. */
+/* decNumber will be 0. */
/* ------------------------------------------------------------------ */
decNumber * decPackedToNumber(const uByte *bcd, Int length,
const Int *scale, decNumber *dn) {
@@ -165,7 +165,7 @@ decNumber * decPackedToNumber(const uByte *bcd, Int length,
const uByte *first; /* -> first non-zero byte */
uInt nib; /* work nibble */
Unit *up=dn->lsu; /* output pointer */
- Int digits; /* digits count */
+ Int digits; /* digits count */
Int cut=0; /* phase of output */
decNumberZero(dn); /* default result */
@@ -182,7 +182,7 @@ decNumber * decPackedToNumber(const uByte *bcd, Int length,
/* leave as 1] */
/* check the adjusted exponent; note that scale could be unbounded */
- dn->exponent=-*scale; /* set the exponent */
+ dn->exponent=-*scale; /* set the exponent */
if (*scale>=0) { /* usual case */
if ((dn->digits-*scale-1)<-DECNUMMAXE) { /* underflow */
decNumberZero(dn);
diff --git a/libdecnumber/decPacked.h b/libdecnumber/decPacked.h
index c76aa09631e..04fcf53dfc5 100644
--- a/libdecnumber/decPacked.h
+++ b/libdecnumber/decPacked.h
@@ -36,7 +36,7 @@
#define DECPACKED
#define DECPNAME "decPacked" /* Short name */
#define DECPFULLNAME "Packed Decimal conversions" /* Verbose name */
- #define DECPAUTHOR "Mike Cowlishaw" /* Who to blame */
+ #define DECPAUTHOR "Mike Cowlishaw" /* Who to blame */
#define DECPACKED_DefP 32 /* default precision */
@@ -47,12 +47,12 @@
/* Sign nibble constants */
#if !defined(DECPPLUSALT)
- #define DECPPLUSALT 0x0A /* alternate plus nibble */
- #define DECPMINUSALT 0x0B /* alternate minus nibble */
- #define DECPPLUS 0x0C /* preferred plus nibble */
- #define DECPMINUS 0x0D /* preferred minus nibble */
- #define DECPPLUSALT2 0x0E /* alternate plus nibble */
- #define DECPUNSIGNED 0x0F /* alternate plus nibble (unsigned) */
+ #define DECPPLUSALT 0x0A /* alternate plus nibble */
+ #define DECPMINUSALT 0x0B /* alternate minus nibble */
+ #define DECPPLUS 0x0C /* preferred plus nibble */
+ #define DECPMINUS 0x0D /* preferred minus nibble */
+ #define DECPPLUSALT2 0x0E /* alternate plus nibble */
+ #define DECPUNSIGNED 0x0F /* alternate plus nibble (unsigned) */
#endif
/* ---------------------------------------------------------------- */
diff --git a/libdecnumber/decQuad.c b/libdecnumber/decQuad.c
index 6ec9b7f735f..a8eb9050ddc 100644
--- a/libdecnumber/decQuad.c
+++ b/libdecnumber/decQuad.c
@@ -34,111 +34,111 @@
/* This module comprises decQuad operations (including conversions) */
/* ------------------------------------------------------------------ */
-#include "decContext.h" /* public includes */
+#include "decContext.h" /* public includes */
#include "decQuad.h" /* .. */
/* Constant mappings for shared code */
-#define DECPMAX DECQUAD_Pmax
-#define DECEMIN DECQUAD_Emin
-#define DECEMAX DECQUAD_Emax
+#define DECPMAX DECQUAD_Pmax
+#define DECEMIN DECQUAD_Emin
+#define DECEMAX DECQUAD_Emax
#define DECEMAXD DECQUAD_EmaxD
#define DECBYTES DECQUAD_Bytes
#define DECSTRING DECQUAD_String
#define DECECONL DECQUAD_EconL
-#define DECBIAS DECQUAD_Bias
-#define DECLETS DECQUAD_Declets
+#define DECBIAS DECQUAD_Bias
+#define DECLETS DECQUAD_Declets
#define DECQTINY (-DECQUAD_Bias)
/* Type and function mappings for shared code */
-#define decFloat decQuad /* Type name */
+#define decFloat decQuad /* Type name */
/* Utilities and conversions (binary results, extractors, etc.) */
-#define decFloatFromBCD decQuadFromBCD
-#define decFloatFromInt32 decQuadFromInt32
-#define decFloatFromPacked decQuadFromPacked
-#define decFloatFromString decQuadFromString
-#define decFloatFromUInt32 decQuadFromUInt32
-#define decFloatFromWider decQuadFromWider
-#define decFloatGetCoefficient decQuadGetCoefficient
-#define decFloatGetExponent decQuadGetExponent
-#define decFloatSetCoefficient decQuadSetCoefficient
-#define decFloatSetExponent decQuadSetExponent
-#define decFloatShow decQuadShow
-#define decFloatToBCD decQuadToBCD
-#define decFloatToEngString decQuadToEngString
-#define decFloatToInt32 decQuadToInt32
-#define decFloatToInt32Exact decQuadToInt32Exact
-#define decFloatToPacked decQuadToPacked
-#define decFloatToString decQuadToString
-#define decFloatToUInt32 decQuadToUInt32
-#define decFloatToUInt32Exact decQuadToUInt32Exact
-#define decFloatToWider decQuadToWider
-#define decFloatZero decQuadZero
+#define decFloatFromBCD decQuadFromBCD
+#define decFloatFromInt32 decQuadFromInt32
+#define decFloatFromPacked decQuadFromPacked
+#define decFloatFromPackedChecked decQuadFromPackedChecked
+#define decFloatFromString decQuadFromString
+#define decFloatFromUInt32 decQuadFromUInt32
+#define decFloatFromWider decQuadFromWider
+#define decFloatGetCoefficient decQuadGetCoefficient
+#define decFloatGetExponent decQuadGetExponent
+#define decFloatSetCoefficient decQuadSetCoefficient
+#define decFloatSetExponent decQuadSetExponent
+#define decFloatShow decQuadShow
+#define decFloatToBCD decQuadToBCD
+#define decFloatToEngString decQuadToEngString
+#define decFloatToInt32 decQuadToInt32
+#define decFloatToInt32Exact decQuadToInt32Exact
+#define decFloatToPacked decQuadToPacked
+#define decFloatToString decQuadToString
+#define decFloatToUInt32 decQuadToUInt32
+#define decFloatToUInt32Exact decQuadToUInt32Exact
+#define decFloatToWider decQuadToWider
+#define decFloatZero decQuadZero
/* Computational (result is a decFloat) */
-#define decFloatAbs decQuadAbs
-#define decFloatAdd decQuadAdd
-#define decFloatAnd decQuadAnd
-#define decFloatDivide decQuadDivide
-#define decFloatDivideInteger decQuadDivideInteger
-#define decFloatFMA decQuadFMA
-#define decFloatInvert decQuadInvert
-#define decFloatLogB decQuadLogB
-#define decFloatMax decQuadMax
-#define decFloatMaxMag decQuadMaxMag
-#define decFloatMin decQuadMin
-#define decFloatMinMag decQuadMinMag
-#define decFloatMinus decQuadMinus
-#define decFloatMultiply decQuadMultiply
-#define decFloatNextMinus decQuadNextMinus
-#define decFloatNextPlus decQuadNextPlus
-#define decFloatNextToward decQuadNextToward
-#define decFloatOr decQuadOr
-#define decFloatPlus decQuadPlus
-#define decFloatQuantize decQuadQuantize
-#define decFloatReduce decQuadReduce
-#define decFloatRemainder decQuadRemainder
-#define decFloatRemainderNear decQuadRemainderNear
-#define decFloatRotate decQuadRotate
-#define decFloatScaleB decQuadScaleB
-#define decFloatShift decQuadShift
-#define decFloatSubtract decQuadSubtract
-#define decFloatToIntegralValue decQuadToIntegralValue
-#define decFloatToIntegralExact decQuadToIntegralExact
-#define decFloatXor decQuadXor
+#define decFloatAbs decQuadAbs
+#define decFloatAdd decQuadAdd
+#define decFloatAnd decQuadAnd
+#define decFloatDivide decQuadDivide
+#define decFloatDivideInteger decQuadDivideInteger
+#define decFloatFMA decQuadFMA
+#define decFloatInvert decQuadInvert
+#define decFloatLogB decQuadLogB
+#define decFloatMax decQuadMax
+#define decFloatMaxMag decQuadMaxMag
+#define decFloatMin decQuadMin
+#define decFloatMinMag decQuadMinMag
+#define decFloatMinus decQuadMinus
+#define decFloatMultiply decQuadMultiply
+#define decFloatNextMinus decQuadNextMinus
+#define decFloatNextPlus decQuadNextPlus
+#define decFloatNextToward decQuadNextToward
+#define decFloatOr decQuadOr
+#define decFloatPlus decQuadPlus
+#define decFloatQuantize decQuadQuantize
+#define decFloatReduce decQuadReduce
+#define decFloatRemainder decQuadRemainder
+#define decFloatRemainderNear decQuadRemainderNear
+#define decFloatRotate decQuadRotate
+#define decFloatScaleB decQuadScaleB
+#define decFloatShift decQuadShift
+#define decFloatSubtract decQuadSubtract
+#define decFloatToIntegralValue decQuadToIntegralValue
+#define decFloatToIntegralExact decQuadToIntegralExact
+#define decFloatXor decQuadXor
/* Comparisons */
-#define decFloatCompare decQuadCompare
-#define decFloatCompareSignal decQuadCompareSignal
-#define decFloatCompareTotal decQuadCompareTotal
-#define decFloatCompareTotalMag decQuadCompareTotalMag
+#define decFloatCompare decQuadCompare
+#define decFloatCompareSignal decQuadCompareSignal
+#define decFloatCompareTotal decQuadCompareTotal
+#define decFloatCompareTotalMag decQuadCompareTotalMag
/* Copies */
-#define decFloatCanonical decQuadCanonical
-#define decFloatCopy decQuadCopy
-#define decFloatCopyAbs decQuadCopyAbs
-#define decFloatCopyNegate decQuadCopyNegate
-#define decFloatCopySign decQuadCopySign
+#define decFloatCanonical decQuadCanonical
+#define decFloatCopy decQuadCopy
+#define decFloatCopyAbs decQuadCopyAbs
+#define decFloatCopyNegate decQuadCopyNegate
+#define decFloatCopySign decQuadCopySign
/* Non-computational */
-#define decFloatClass decQuadClass
-#define decFloatClassString decQuadClassString
-#define decFloatDigits decQuadDigits
-#define decFloatIsCanonical decQuadIsCanonical
-#define decFloatIsFinite decQuadIsFinite
-#define decFloatIsInfinite decQuadIsInfinite
-#define decFloatIsInteger decQuadIsInteger
-#define decFloatIsNaN decQuadIsNaN
-#define decFloatIsNormal decQuadIsNormal
-#define decFloatIsSignaling decQuadIsSignaling
-#define decFloatIsSignalling decQuadIsSignalling
-#define decFloatIsSigned decQuadIsSigned
-#define decFloatIsSubnormal decQuadIsSubnormal
-#define decFloatIsZero decQuadIsZero
-#define decFloatRadix decQuadRadix
-#define decFloatSameQuantum decQuadSameQuantum
-#define decFloatVersion decQuadVersion
-
+#define decFloatClass decQuadClass
+#define decFloatClassString decQuadClassString
+#define decFloatDigits decQuadDigits
+#define decFloatIsCanonical decQuadIsCanonical
+#define decFloatIsFinite decQuadIsFinite
+#define decFloatIsInfinite decQuadIsInfinite
+#define decFloatIsInteger decQuadIsInteger
+#define decFloatIsNaN decQuadIsNaN
+#define decFloatIsNormal decQuadIsNormal
+#define decFloatIsSignaling decQuadIsSignaling
+#define decFloatIsSignalling decQuadIsSignalling
+#define decFloatIsSigned decQuadIsSigned
+#define decFloatIsSubnormal decQuadIsSubnormal
+#define decFloatIsZero decQuadIsZero
+#define decFloatRadix decQuadRadix
+#define decFloatSameQuantum decQuadSameQuantum
+#define decFloatVersion decQuadVersion
#include "decNumberLocal.h" /* local includes (need DECPMAX) */
#include "decCommon.c" /* non-arithmetic decFloat routines */
diff --git a/libdecnumber/decQuad.h b/libdecnumber/decQuad.h
index af9bc24e265..80f5eef4958 100644
--- a/libdecnumber/decQuad.h
+++ b/libdecnumber/decQuad.h
@@ -31,27 +31,25 @@
/* ------------------------------------------------------------------ */
/* decQuad.h -- Decimal 128-bit format module header */
/* ------------------------------------------------------------------ */
-/* Please see decFloats.h for an overview and documentation details. */
-/* ------------------------------------------------------------------ */
/* This include file is always included by decSingle and decDouble, */
-/* and therefore also holds useful constants used by all three. */
+/* and therefore also holds useful constants used by all three. */
#if !defined(DECQUAD)
#define DECQUAD
#define DECQUADNAME "decimalQuad" /* Short name */
#define DECQUADTITLE "Decimal 128-bit datum" /* Verbose name */
- #define DECQUADAUTHOR "Mike Cowlishaw" /* Who to blame */
+ #define DECQUADAUTHOR "Mike Cowlishaw" /* Who to blame */
/* parameters for decQuads */
- #define DECQUAD_Bytes 16 /* length */
+ #define DECQUAD_Bytes 16 /* length */
#define DECQUAD_Pmax 34 /* maximum precision (digits) */
- #define DECQUAD_Emin -6143 /* minimum adjusted exponent */
- #define DECQUAD_Emax 6144 /* maximum adjusted exponent */
- #define DECQUAD_EmaxD 4 /* maximum exponent digits */
+ #define DECQUAD_Emin -6143 /* minimum adjusted exponent */
+ #define DECQUAD_Emax 6144 /* maximum adjusted exponent */
+ #define DECQUAD_EmaxD 4 /* maximum exponent digits */
#define DECQUAD_Bias 6176 /* bias for the exponent */
- #define DECQUAD_String 43 /* maximum string length, +1 */
- #define DECQUAD_EconL 12 /* exponent continuation length */
+ #define DECQUAD_String 43 /* maximum string length, +1 */
+ #define DECQUAD_EconL 12 /* exponent continuation length */
#define DECQUAD_Declets 11 /* count of declets */
/* highest biased exponent (Elimit-1) */
#define DECQUAD_Ehigh (DECQUAD_Emax + DECQUAD_Bias - (DECQUAD_Pmax-1))
@@ -59,11 +57,14 @@
/* Required include */
#include "decContext.h"
- /* The decQuad decimal 128-bit type, accessible by various types */
+ /* The decQuad decimal 128-bit type, accessible by all sizes */
typedef union {
- uint8_t bytes[DECQUAD_Bytes]; /* fields: 1, 5, 12, 110 bits */
+ uint8_t bytes[DECQUAD_Bytes]; /* fields: 1, 5, 12, 110 bits */
uint16_t shorts[DECQUAD_Bytes/2];
- uint32_t words[DECQUAD_Bytes/4];
+ uint32_t words[DECQUAD_Bytes/4];
+ #if DECUSE64
+ uint64_t longs[DECQUAD_Bytes/8];
+ #endif
} decQuad;
/* ---------------------------------------------------------------- */
@@ -72,21 +73,21 @@
/* sign and special values [top 32-bits; last two bits are don't-care
for Infinity on input, last bit don't-care for NaNs] */
- #define DECFLOAT_Sign 0x80000000 /* 1 00000 00 Sign */
+ #define DECFLOAT_Sign 0x80000000 /* 1 00000 00 Sign */
#define DECFLOAT_NaN 0x7c000000 /* 0 11111 00 NaN generic */
- #define DECFLOAT_qNaN 0x7c000000 /* 0 11111 00 qNaN */
- #define DECFLOAT_sNaN 0x7e000000 /* 0 11111 10 sNaN */
+ #define DECFLOAT_qNaN 0x7c000000 /* 0 11111 00 qNaN */
+ #define DECFLOAT_sNaN 0x7e000000 /* 0 11111 10 sNaN */
#define DECFLOAT_Inf 0x78000000 /* 0 11110 00 Infinity */
#define DECFLOAT_MinSp 0x78000000 /* minimum special value */
/* [specials are all >=MinSp] */
/* Sign nibble constants */
#if !defined(DECPPLUSALT)
- #define DECPPLUSALT 0x0A /* alternate plus nibble */
- #define DECPMINUSALT 0x0B /* alternate minus nibble */
- #define DECPPLUS 0x0C /* preferred plus nibble */
- #define DECPMINUS 0x0D /* preferred minus nibble */
- #define DECPPLUSALT2 0x0E /* alternate plus nibble */
- #define DECPUNSIGNED 0x0F /* alternate plus nibble (unsigned) */
+ #define DECPPLUSALT 0x0A /* alternate plus nibble */
+ #define DECPMINUSALT 0x0B /* alternate minus nibble */
+ #define DECPPLUS 0x0C /* preferred plus nibble */
+ #define DECPMINUS 0x0D /* preferred minus nibble */
+ #define DECPPLUSALT2 0x0E /* alternate plus nibble */
+ #define DECPUNSIGNED 0x0F /* alternate plus nibble (unsigned) */
#endif
/* ---------------------------------------------------------------- */
@@ -99,6 +100,7 @@
extern decQuad * decQuadFromBCD(decQuad *, int32_t, const uint8_t *, int32_t);
extern decQuad * decQuadFromInt32(decQuad *, int32_t);
extern decQuad * decQuadFromPacked(decQuad *, int32_t, const uint8_t *);
+ extern decQuad * decQuadFromPackedChecked(decQuad *, int32_t, const uint8_t *);
extern decQuad * decQuadFromString(decQuad *, const char *, decContext *);
extern decQuad * decQuadFromUInt32(decQuad *, uint32_t);
extern int32_t decQuadGetCoefficient(const decQuad *, uint8_t *);
@@ -182,7 +184,8 @@
/* decNumber conversions; these are implemented as macros so as not */
/* to force a dependency on decimal128 and decNumber in decQuad. */
+ /* decQuadFromNumber returns a decimal128 * to avoid warnings. */
#define decQuadToNumber(dq, dn) decimal128ToNumber((decimal128 *)(dq), dn)
- #define decQuadFromNumber(dq, dn, set) (decQuad *)decimal128FromNumber((decimal128 *)(dq), dn, set)
+ #define decQuadFromNumber(dq, dn, set) decimal128FromNumber((decimal128 *)(dq), dn, set)
#endif
diff --git a/libdecnumber/decSingle.c b/libdecnumber/decSingle.c
index 112395970fe..1c56c65806e 100644
--- a/libdecnumber/decSingle.c
+++ b/libdecnumber/decSingle.c
@@ -31,22 +31,20 @@
/* ------------------------------------------------------------------ */
/* decSingle.c -- decSingle operations module */
/* ------------------------------------------------------------------ */
-/* This module comprises decSingle operations (including conversions) */
-/* ------------------------------------------------------------------ */
-#include "decContext.h" /* public includes */
+#include "decContext.h" /* public includes */
#include "decSingle.h" /* public includes */
/* Constant mappings for shared code */
-#define DECPMAX DECSINGLE_Pmax
-#define DECEMIN DECSINGLE_Emin
-#define DECEMAX DECSINGLE_Emax
+#define DECPMAX DECSINGLE_Pmax
+#define DECEMIN DECSINGLE_Emin
+#define DECEMAX DECSINGLE_Emax
#define DECEMAXD DECSINGLE_EmaxD
#define DECBYTES DECSINGLE_Bytes
#define DECSTRING DECSINGLE_String
#define DECECONL DECSINGLE_EconL
-#define DECBIAS DECSINGLE_Bias
-#define DECLETS DECSINGLE_Declets
+#define DECBIAS DECSINGLE_Bias
+#define DECLETS DECSINGLE_Declets
#define DECQTINY (-DECSINGLE_Bias)
/* parameters of next-wider format */
#define DECWBYTES DECDOUBLE_Bytes
@@ -55,29 +53,30 @@
#define DECWBIAS DECDOUBLE_Bias
/* Type and function mappings for shared code */
-#define decFloat decSingle /* Type name */
-#define decFloatWider decDouble /* Type name */
+#define decFloat decSingle /* Type name */
+#define decFloatWider decDouble /* Type name */
/* Utility (binary results, extractors, etc.) */
-#define decFloatFromBCD decSingleFromBCD
-#define decFloatFromPacked decSingleFromPacked
-#define decFloatFromString decSingleFromString
-#define decFloatFromWider decSingleFromWider
-#define decFloatGetCoefficient decSingleGetCoefficient
-#define decFloatGetExponent decSingleGetExponent
-#define decFloatSetCoefficient decSingleSetCoefficient
-#define decFloatSetExponent decSingleSetExponent
-#define decFloatShow decSingleShow
-#define decFloatToBCD decSingleToBCD
-#define decFloatToEngString decSingleToEngString
-#define decFloatToPacked decSingleToPacked
-#define decFloatToString decSingleToString
-#define decFloatToWider decSingleToWider
-#define decFloatZero decSingleZero
+#define decFloatFromBCD decSingleFromBCD
+#define decFloatFromPacked decSingleFromPacked
+#define decFloatFromPackedChecked decSingleFromPackedChecked
+#define decFloatFromString decSingleFromString
+#define decFloatFromWider decSingleFromWider
+#define decFloatGetCoefficient decSingleGetCoefficient
+#define decFloatGetExponent decSingleGetExponent
+#define decFloatSetCoefficient decSingleSetCoefficient
+#define decFloatSetExponent decSingleSetExponent
+#define decFloatShow decSingleShow
+#define decFloatToBCD decSingleToBCD
+#define decFloatToEngString decSingleToEngString
+#define decFloatToPacked decSingleToPacked
+#define decFloatToString decSingleToString
+#define decFloatToWider decSingleToWider
+#define decFloatZero decSingleZero
/* Non-computational */
-#define decFloatRadix decSingleRadix
-#define decFloatVersion decSingleVersion
+#define decFloatRadix decSingleRadix
+#define decFloatVersion decSingleVersion
#include "decNumberLocal.h" /* local includes (need DECPMAX) */
#include "decCommon.c" /* non-basic decFloat routines */
diff --git a/libdecnumber/decSingle.h b/libdecnumber/decSingle.h
index bae39848eed..29efe438e9b 100644
--- a/libdecnumber/decSingle.h
+++ b/libdecnumber/decSingle.h
@@ -31,24 +31,22 @@
/* ------------------------------------------------------------------ */
/* decSingle.h -- Decimal 32-bit format module header */
/* ------------------------------------------------------------------ */
-/* Please see decFloats.h for an overview and documentation details. */
-/* ------------------------------------------------------------------ */
#if !defined(DECSINGLE)
#define DECSINGLE
- #define DECSINGLENAME "decSingle" /* Short name */
+ #define DECSINGLENAME "decSingle" /* Short name */
#define DECSINGLETITLE "Decimal 32-bit datum" /* Verbose name */
#define DECSINGLEAUTHOR "Mike Cowlishaw" /* Who to blame */
/* parameters for decSingles */
#define DECSINGLE_Bytes 4 /* length */
#define DECSINGLE_Pmax 7 /* maximum precision (digits) */
- #define DECSINGLE_Emin -95 /* minimum adjusted exponent */
- #define DECSINGLE_Emax 96 /* maximum adjusted exponent */
+ #define DECSINGLE_Emin -95 /* minimum adjusted exponent */
+ #define DECSINGLE_Emax 96 /* maximum adjusted exponent */
#define DECSINGLE_EmaxD 3 /* maximum exponent digits */
#define DECSINGLE_Bias 101 /* bias for the exponent */
- #define DECSINGLE_String 16 /* maximum string length, +1 */
+ #define DECSINGLE_String 16 /* maximum string length, +1 */
#define DECSINGLE_EconL 6 /* exponent continuation length */
#define DECSINGLE_Declets 2 /* count of declets */
/* highest biased exponent (Elimit-1) */
@@ -59,11 +57,11 @@
#include "decQuad.h"
#include "decDouble.h"
- /* The decSingle decimal 32-bit type, accessible by various types */
+ /* The decSingle decimal 32-bit type, accessible by all sizes */
typedef union {
- uint8_t bytes[DECSINGLE_Bytes]; /* fields: 1, 5, 6, 20 bits */
+ uint8_t bytes[DECSINGLE_Bytes]; /* fields: 1, 5, 6, 20 bits */
uint16_t shorts[DECSINGLE_Bytes/2];
- uint32_t words[DECSINGLE_Bytes/4];
+ uint32_t words[DECSINGLE_Bytes/4];
} decSingle;
/* ---------------------------------------------------------------- */
@@ -75,6 +73,7 @@
/* Utilities (binary argument(s) or result, extractors, etc.) */
extern decSingle * decSingleFromBCD(decSingle *, int32_t, const uint8_t *, int32_t);
extern decSingle * decSingleFromPacked(decSingle *, int32_t, const uint8_t *);
+ extern decSingle * decSingleFromPackedChecked(decSingle *, int32_t, const uint8_t *);
extern decSingle * decSingleFromString(decSingle *, const char *, decContext *);
extern decSingle * decSingleFromWider(decSingle *, const decDouble *, decContext *);
extern int32_t decSingleGetCoefficient(const decSingle *, uint8_t *);
@@ -97,7 +96,8 @@
/* decNumber conversions; these are implemented as macros so as not */
/* to force a dependency on decimal32 and decNumber in decSingle. */
+ /* decSingleFromNumber returns a decimal32 * to avoid warnings. */
#define decSingleToNumber(dq, dn) decimal32ToNumber((decimal32 *)(dq), dn)
- #define decSingleFromNumber(dq, dn, set) (decSingle *)decimal32FromNumber((decimal32 *)(dq), dn, set)
+ #define decSingleFromNumber(dq, dn, set) decimal32FromNumber((decimal32 *)(dq), dn, set)
#endif
diff --git a/libdecnumber/dpd/decimal128.c b/libdecnumber/dpd/decimal128.c
index 54191aab5c0..edf22e1c8d5 100644
--- a/libdecnumber/dpd/decimal128.c
+++ b/libdecnumber/dpd/decimal128.c
@@ -42,11 +42,11 @@
#include <string.h> /* [for memset/memcpy] */
#include <stdio.h> /* [for printf] */
-#include "dconfig.h" /* GCC definitions */
-#define DECNUMDIGITS 34 /* make decNumbers with space for 34 */
+#include "dconfig.h" /* GCC definitions */
+#define DECNUMDIGITS 34 /* make decNumbers with space for 34 */
#include "decNumber.h" /* base number library */
#include "decNumberLocal.h" /* decNumber local types, etc. */
-#include "decimal128.h" /* our primary include */
+#include "decimal128.h" /* our primary include */
/* Utility routines and tables [in decimal64.c] */
extern const uInt COMBEXP[32], COMBMSD[32];
@@ -71,7 +71,7 @@ extern void decNumberShow(const decNumber *); /* .. */
/* */
/* ds is the target decimal128 */
/* dn is the source number (assumed valid) */
-/* set is the context, used only for reporting errors */
+/* set is the context, used only for reporting errors */
/* */
/* The set argument is used only for status reporting and for the */
/* rounding mode (used if the coefficient is more than DECIMAL128_Pmax*/
@@ -89,8 +89,8 @@ decimal128 * decimal128FromNumber(decimal128 *d128, const decNumber *dn,
Int ae; /* adjusted exponent */
decNumber dw; /* work */
decContext dc; /* .. */
- uInt *pu; /* .. */
uInt comb, exp; /* .. */
+ uInt uiwork; /* for macros */
uInt targar[4]={0,0,0,0}; /* target 128-bit */
#define targhi targar[3] /* name the word with the sign */
#define targmh targar[2] /* name the words */
@@ -102,7 +102,7 @@ decimal128 * decimal128FromNumber(decimal128 *d128, const decNumber *dn,
/* constraints. This could push the number to Infinity or zero, */
/* so this check and rounding must be done before generating the */
/* decimal128] */
- ae=dn->exponent+dn->digits-1; /* [0 if special] */
+ ae=dn->exponent+dn->digits-1; /* [0 if special] */
if (dn->digits>DECIMAL128_Pmax /* too many digits */
|| ae>DECIMAL128_Emax /* likely overflow */
|| ae<DECIMAL128_Emin) { /* likely underflow */
@@ -118,7 +118,7 @@ decimal128 * decimal128FromNumber(decimal128 *d128, const decNumber *dn,
if (dn->bits&DECSPECIAL) { /* a special value */
if (dn->bits&DECINF) targhi=DECIMAL_Inf<<24;
else { /* sNaN or qNaN */
- if ((*dn->lsu!=0 || dn->digits>1) /* non-zero coefficient */
+ if ((*dn->lsu!=0 || dn->digits>1) /* non-zero coefficient */
&& (dn->digits<DECIMAL128_Pmax)) { /* coefficient fits */
decDigitsToDPD(dn, targar, 0);
}
@@ -144,11 +144,11 @@ decimal128 * decimal128FromNumber(decimal128 *d128, const decNumber *dn,
comb=(exp>>9) & 0x18; /* msd=0, exp top 2 bits .. */
}
else { /* non-zero finite number */
- uInt msd; /* work */
+ uInt msd; /* work */
Int pad=0; /* coefficient pad digits */
/* the dn is known to fit, but it may need to be padded */
- exp=(uInt)(dn->exponent+DECIMAL128_Bias); /* bias exponent */
+ exp=(uInt)(dn->exponent+DECIMAL128_Bias); /* bias exponent */
if (exp>DECIMAL128_Ehigh) { /* fold-down case */
pad=exp-DECIMAL128_Ehigh;
exp=DECIMAL128_Ehigh; /* [to maximum] */
@@ -172,18 +172,19 @@ decimal128 * decimal128FromNumber(decimal128 *d128, const decNumber *dn,
if (dn->bits&DECNEG) targhi|=0x80000000; /* add sign bit */
/* now write to storage; this is endian */
- pu=(uInt *)d128->bytes; /* overlay */
if (DECLITEND) {
- pu[0]=targlo; /* directly store the low int */
- pu[1]=targml; /* then the mid-low */
- pu[2]=targmh; /* then the mid-high */
- pu[3]=targhi; /* then the high int */
+ /* lo -> hi */
+ UBFROMUI(d128->bytes, targlo);
+ UBFROMUI(d128->bytes+4, targml);
+ UBFROMUI(d128->bytes+8, targmh);
+ UBFROMUI(d128->bytes+12, targhi);
}
else {
- pu[0]=targhi; /* directly store the high int */
- pu[1]=targmh; /* then the mid-high */
- pu[2]=targml; /* then the mid-low */
- pu[3]=targlo; /* then the low int */
+ /* hi -> lo */
+ UBFROMUI(d128->bytes, targhi);
+ UBFROMUI(d128->bytes+4, targmh);
+ UBFROMUI(d128->bytes+8, targml);
+ UBFROMUI(d128->bytes+12, targlo);
}
if (status!=0) decContextSetStatus(set, status); /* pass on status */
@@ -201,8 +202,8 @@ decNumber * decimal128ToNumber(const decimal128 *d128, decNumber *dn) {
uInt msd; /* coefficient MSD */
uInt exp; /* exponent top two bits */
uInt comb; /* combination field */
- const uInt *pu; /* work */
- Int need; /* .. */
+ Int need; /* work */
+ uInt uiwork; /* for macros */
uInt sourar[4]; /* source 128-bit */
#define sourhi sourar[3] /* name the word with the sign */
#define sourmh sourar[2] /* and the mid-high word */
@@ -210,18 +211,17 @@ decNumber * decimal128ToNumber(const decimal128 *d128, decNumber *dn) {
#define sourlo sourar[0] /* and the lowest word */
/* load source from storage; this is endian */
- pu=(const uInt *)d128->bytes; /* overlay */
if (DECLITEND) {
- sourlo=pu[0]; /* directly load the low int */
- sourml=pu[1]; /* then the mid-low */
- sourmh=pu[2]; /* then the mid-high */
- sourhi=pu[3]; /* then the high int */
+ sourlo=UBTOUI(d128->bytes ); /* directly load the low int */
+ sourml=UBTOUI(d128->bytes+4 ); /* then the mid-low */
+ sourmh=UBTOUI(d128->bytes+8 ); /* then the mid-high */
+ sourhi=UBTOUI(d128->bytes+12); /* then the high int */
}
else {
- sourhi=pu[0]; /* directly load the high int */
- sourmh=pu[1]; /* then the mid-high */
- sourml=pu[2]; /* then the mid-low */
- sourlo=pu[3]; /* then the low int */
+ sourhi=UBTOUI(d128->bytes ); /* directly load the high int */
+ sourmh=UBTOUI(d128->bytes+4 ); /* then the mid-high */
+ sourml=UBTOUI(d128->bytes+8 ); /* then the mid-low */
+ sourlo=UBTOUI(d128->bytes+12); /* then the low int */
}
comb=(sourhi>>26)&0x1f; /* combination field */
@@ -232,7 +232,7 @@ decNumber * decimal128ToNumber(const decimal128 *d128, decNumber *dn) {
msd=COMBMSD[comb]; /* decode the combination field */
exp=COMBEXP[comb]; /* .. */
- if (exp==3) { /* is a special */
+ if (exp==3) { /* is a special */
if (msd==0) {
dn->bits|=DECINF;
return dn; /* no coefficient needed */
@@ -265,7 +265,7 @@ decNumber * decimal128ToNumber(const decimal128 *d128, decNumber *dn) {
} /* decimal128ToNumber */
/* ------------------------------------------------------------------ */
-/* to-scientific-string -- conversion to numeric string */
+/* to-scientific-string -- conversion to numeric string */
/* to-engineering-string -- conversion to numeric string */
/* */
/* decimal128ToString(d128, string); */
@@ -279,7 +279,7 @@ decNumber * decimal128ToNumber(const decimal128 *d128, decNumber *dn) {
/* No error is possible, and no status can be set. */
/* ------------------------------------------------------------------ */
char * decimal128ToEngString(const decimal128 *d128, char *string){
- decNumber dn; /* work */
+ decNumber dn; /* work */
decimal128ToNumber(d128, &dn);
decNumberToEngString(&dn, string);
return string;
@@ -289,13 +289,13 @@ char * decimal128ToString(const decimal128 *d128, char *string){
uInt msd; /* coefficient MSD */
Int exp; /* exponent top two bits or full */
uInt comb; /* combination field */
- char *cstart; /* coefficient start */
+ char *cstart; /* coefficient start */
char *c; /* output pointer in string */
- const uInt *pu; /* work */
+ const uByte *u; /* work */
char *s, *t; /* .. (source, target) */
Int dpd; /* .. */
Int pre, e; /* .. */
- const uByte *u; /* .. */
+ uInt uiwork; /* for macros */
uInt sourar[4]; /* source 128-bit */
#define sourhi sourar[3] /* name the word with the sign */
@@ -304,18 +304,17 @@ char * decimal128ToString(const decimal128 *d128, char *string){
#define sourlo sourar[0] /* and the lowest word */
/* load source from storage; this is endian */
- pu=(const uInt *)d128->bytes; /* overlay */
if (DECLITEND) {
- sourlo=pu[0]; /* directly load the low int */
- sourml=pu[1]; /* then the mid-low */
- sourmh=pu[2]; /* then the mid-high */
- sourhi=pu[3]; /* then the high int */
+ sourlo=UBTOUI(d128->bytes ); /* directly load the low int */
+ sourml=UBTOUI(d128->bytes+4 ); /* then the mid-low */
+ sourmh=UBTOUI(d128->bytes+8 ); /* then the mid-high */
+ sourhi=UBTOUI(d128->bytes+12); /* then the high int */
}
else {
- sourhi=pu[0]; /* directly load the high int */
- sourmh=pu[1]; /* then the mid-high */
- sourml=pu[2]; /* then the mid-low */
- sourlo=pu[3]; /* then the low int */
+ sourhi=UBTOUI(d128->bytes ); /* directly load the high int */
+ sourmh=UBTOUI(d128->bytes+4 ); /* then the mid-high */
+ sourml=UBTOUI(d128->bytes+8 ); /* then the mid-low */
+ sourlo=UBTOUI(d128->bytes+12); /* then the low int */
}
c=string; /* where result will go */
@@ -327,7 +326,7 @@ char * decimal128ToString(const decimal128 *d128, char *string){
if (exp==3) {
if (msd==0) { /* infinity */
- strcpy(c, "Inf");
+ strcpy(c, "Inf");
strcpy(c+3, "inity");
return string; /* easy */
}
@@ -353,12 +352,12 @@ char * decimal128ToString(const decimal128 *d128, char *string){
/* length. We use fixed-length memcpys because variable-length */
/* causes a subroutine call in GCC. (These are length 4 for speed */
/* and are safe because the array has an extra terminator byte.) */
- #define dpd2char u=&BIN2CHAR[DPD2BIN[dpd]*4]; \
+ #define dpd2char u=&BIN2CHAR[DPD2BIN[dpd]*4]; \
if (c!=cstart) {memcpy(c, u+1, 4); c+=3;} \
else if (*u) {memcpy(c, u+4-*u, 4); c+=*u;}
dpd=(sourhi>>4)&0x3ff; /* declet 1 */
dpd2char;
- dpd=((sourhi&0xf)<<6) | (sourmh>>26); /* declet 2 */
+ dpd=((sourhi&0xf)<<6) | (sourmh>>26); /* declet 2 */
dpd2char;
dpd=(sourmh>>16)&0x3ff; /* declet 3 */
dpd2char;
@@ -381,7 +380,7 @@ char * decimal128ToString(const decimal128 *d128, char *string){
if (c==cstart) *c++='0'; /* all zeros -- make 0 */
- if (exp==0) { /* integer or NaN case -- easy */
+ if (exp==0) { /* integer or NaN case -- easy */
*c='\0'; /* terminate */
return string;
}
@@ -409,8 +408,8 @@ char * decimal128ToString(const decimal128 *d128, char *string){
/* finally add the E-part, if needed; it will never be 0, and has */
/* a maximum length of 4 digits */
if (e!=0) {
- *c++='E'; /* starts with E */
- *c++='+'; /* assume positive */
+ *c++='E'; /* starts with E */
+ *c++='+'; /* assume positive */
if (e<0) {
*(c-1)='-'; /* oops, need '-' */
e=-e; /* uInt, please */
@@ -449,13 +448,13 @@ char * decimal128ToString(const decimal128 *d128, char *string){
/* ------------------------------------------------------------------ */
/* to-number -- conversion from numeric string */
/* */
-/* decimal128FromString(result, string, set); */
+/* decimal128FromString(result, string, set); */
/* */
/* result is the decimal128 format number which gets the result of */
/* the conversion */
/* *string is the character string which should contain a valid */
/* number (which may be a special value) */
-/* set is the context */
+/* set is the context */
/* */
/* The context is supplied to this routine is used for error handling */
/* (setting of status and traps) and for the rounding mode, only. */
@@ -464,7 +463,7 @@ char * decimal128ToString(const decimal128 *d128, char *string){
decimal128 * decimal128FromString(decimal128 *result, const char *string,
decContext *set) {
decContext dc; /* work */
- decNumber dn; /* .. */
+ decNumber dn; /* .. */
decContextDefault(&dc, DEC_INIT_DECIMAL128); /* no traps, please */
dc.round=set->round; /* use supplied rounding */
@@ -483,8 +482,8 @@ decimal128 * decimal128FromString(decimal128 *result, const char *string,
/* returns 1 if the encoding of d128 is canonical, 0 otherwise */
/* No error is possible. */
/* ------------------------------------------------------------------ */
-uint32_t decimal128IsCanonical(const decimal128 *d128) {
- decNumber dn; /* work */
+uInt decimal128IsCanonical(const decimal128 *d128) {
+ decNumber dn; /* work */
decimal128 canon; /* .. */
decContext dc; /* .. */
decContextDefault(&dc, DEC_INIT_DECIMAL128);
@@ -501,7 +500,7 @@ uint32_t decimal128IsCanonical(const decimal128 *d128) {
/* No error is possible. */
/* ------------------------------------------------------------------ */
decimal128 * decimal128Canonical(decimal128 *result, const decimal128 *d128) {
- decNumber dn; /* work */
+ decNumber dn; /* work */
decContext dc; /* .. */
decContextDefault(&dc, DEC_INIT_DECIMAL128);
decimal128ToNumber(d128, &dn);
@@ -532,13 +531,13 @@ decimal128 * decimal128Canonical(decimal128 *result, const decimal128 *d128) {
/* This assumes range has been checked and exponent previously 0; */
/* type of exponent must be unsigned */
#define decimal128SetExpCon(d, e) { \
- (d)->bytes[0]|=(uint8_t)((e)>>10); \
- (d)->bytes[1] =(uint8_t)(((e)&0x3fc)>>2); \
- (d)->bytes[2]|=(uint8_t)(((e)&0x03)<<6);}
+ (d)->bytes[0]|=(uByte)((e)>>10); \
+ (d)->bytes[1] =(uByte)(((e)&0x3fc)>>2); \
+ (d)->bytes[2]|=(uByte)(((e)&0x03)<<6);}
/* ------------------------------------------------------------------ */
/* decimal128Show -- display a decimal128 in hexadecimal [debug aid] */
-/* d128 -- the number to show */
+/* d128 -- the number to show */
/* ------------------------------------------------------------------ */
/* Also shows sign/cob/expconfields extracted */
void decimal128Show(const decimal128 *d128) {
diff --git a/libdecnumber/dpd/decimal128.h b/libdecnumber/dpd/decimal128.h
index f8f5b5a8ff2..95f73f4bbf4 100644
--- a/libdecnumber/dpd/decimal128.h
+++ b/libdecnumber/dpd/decimal128.h
@@ -29,7 +29,7 @@
02110-1301, USA. */
/* ------------------------------------------------------------------ */
-/* Decimal 128-bit format module header */
+/* Decimal 128-bit format module header */
/* ------------------------------------------------------------------ */
#if !defined(DECIMAL128)
@@ -46,7 +46,7 @@
#define DECIMAL128_Bias 6176 /* bias for the exponent */
#define DECIMAL128_String 43 /* maximum string length, +1 */
#define DECIMAL128_EconL 12 /* exp. continuation length */
- /* highest biased exponent (Elimit-1) */
+ /* highest biased exponent (Elimit-1) */
#define DECIMAL128_Ehigh (DECIMAL128_Emax+DECIMAL128_Bias-DECIMAL128_Pmax+1)
/* check enough digits, if pre-defined */
@@ -71,20 +71,20 @@
/* special values [top byte excluding sign bit; last two bits are */
/* don't-care for Infinity on input, last bit don't-care for NaN] */
#if !defined(DECIMAL_NaN)
- #define DECIMAL_NaN 0x7c /* 0 11111 00 NaN */
+ #define DECIMAL_NaN 0x7c /* 0 11111 00 NaN */
#define DECIMAL_sNaN 0x7e /* 0 11111 10 sNaN */
- #define DECIMAL_Inf 0x78 /* 0 11110 00 Infinity */
+ #define DECIMAL_Inf 0x78 /* 0 11110 00 Infinity */
#endif
- #include "decimal128Local.h"
+#include "decimal128Local.h"
/* ---------------------------------------------------------------- */
/* Routines */
/* ---------------------------------------------------------------- */
- #include "decimal128Symbols.h"
+#include "decimal128Symbols.h"
- /* String conversions */
+ /* String conversions */
decimal128 * decimal128FromString(decimal128 *, const char *, decContext *);
char * decimal128ToString(const decimal128 *, char *);
char * decimal128ToEngString(const decimal128 *, char *);
@@ -94,7 +94,7 @@
decContext *);
decNumber * decimal128ToNumber(const decimal128 *, decNumber *);
- /* Format-dependent utilities */
+ /* Format-dependent utilities */
uint32_t decimal128IsCanonical(const decimal128 *);
decimal128 * decimal128Canonical(decimal128 *, const decimal128 *);
diff --git a/libdecnumber/dpd/decimal32.c b/libdecnumber/dpd/decimal32.c
index d8e3f597811..eefd71c2a3c 100644
--- a/libdecnumber/dpd/decimal32.c
+++ b/libdecnumber/dpd/decimal32.c
@@ -29,7 +29,7 @@
02110-1301, USA. */
/* ------------------------------------------------------------------ */
-/* Decimal 32-bit format module */
+/* Decimal 32-bit format module */
/* ------------------------------------------------------------------ */
/* This module comprises the routines for decimal32 format numbers. */
/* Conversions are supplied to and from decNumber and String. */
@@ -42,8 +42,8 @@
#include <string.h> /* [for memset/memcpy] */
#include <stdio.h> /* [for printf] */
-#include "dconfig.h" /* GCC definitions */
-#define DECNUMDIGITS 7 /* make decNumbers with space for 7 */
+#include "dconfig.h" /* GCC definitions */
+#define DECNUMDIGITS 7 /* make decNumbers with space for 7 */
#include "decNumber.h" /* base number library */
#include "decNumberLocal.h" /* decNumber local types, etc. */
#include "decimal32.h" /* our primary include */
@@ -69,9 +69,9 @@ extern void decNumberShow(const decNumber *); /* .. */
/* ------------------------------------------------------------------ */
/* decimal32FromNumber -- convert decNumber to decimal32 */
/* */
-/* ds is the target decimal32 */
+/* ds is the target decimal32 */
/* dn is the source number (assumed valid) */
-/* set is the context, used only for reporting errors */
+/* set is the context, used only for reporting errors */
/* */
/* The set argument is used only for status reporting and for the */
/* rounding mode (used if the coefficient is more than DECIMAL32_Pmax */
@@ -89,8 +89,8 @@ decimal32 * decimal32FromNumber(decimal32 *d32, const decNumber *dn,
Int ae; /* adjusted exponent */
decNumber dw; /* work */
decContext dc; /* .. */
- uInt *pu; /* .. */
uInt comb, exp; /* .. */
+ uInt uiwork; /* for macros */
uInt targ=0; /* target 32-bit */
/* If the number has too many digits, or the exponent could be */
@@ -98,9 +98,9 @@ decimal32 * decimal32FromNumber(decimal32 *d32, const decNumber *dn,
/* constraints. This could push the number to Infinity or zero, */
/* so this check and rounding must be done before generating the */
/* decimal32] */
- ae=dn->exponent+dn->digits-1; /* [0 if special] */
- if (dn->digits>DECIMAL32_Pmax /* too many digits */
- || ae>DECIMAL32_Emax /* likely overflow */
+ ae=dn->exponent+dn->digits-1; /* [0 if special] */
+ if (dn->digits>DECIMAL32_Pmax /* too many digits */
+ || ae>DECIMAL32_Emax /* likely overflow */
|| ae<DECIMAL32_Emin) { /* likely underflow */
decContextDefault(&dc, DEC_INIT_DECIMAL32); /* [no traps] */
dc.round=set->round; /* use supplied rounding */
@@ -114,7 +114,7 @@ decimal32 * decimal32FromNumber(decimal32 *d32, const decNumber *dn,
if (dn->bits&DECSPECIAL) { /* a special value */
if (dn->bits&DECINF) targ=DECIMAL_Inf<<24;
else { /* sNaN or qNaN */
- if ((*dn->lsu!=0 || dn->digits>1) /* non-zero coefficient */
+ if ((*dn->lsu!=0 || dn->digits>1) /* non-zero coefficient */
&& (dn->digits<DECIMAL32_Pmax)) { /* coefficient fits */
decDigitsToDPD(dn, &targ, 0);
}
@@ -140,7 +140,7 @@ decimal32 * decimal32FromNumber(decimal32 *d32, const decNumber *dn,
comb=(exp>>3) & 0x18; /* msd=0, exp top 2 bits .. */
}
else { /* non-zero finite number */
- uInt msd; /* work */
+ uInt msd; /* work */
Int pad=0; /* coefficient pad digits */
/* the dn is known to fit, but it may need to be padded */
@@ -175,8 +175,7 @@ decimal32 * decimal32FromNumber(decimal32 *d32, const decNumber *dn,
if (dn->bits&DECNEG) targ|=0x80000000; /* add sign bit */
/* now write to storage; this is endian */
- pu=(uInt *)d32->bytes; /* overlay */
- *pu=targ; /* directly store the int */
+ UBFROMUI(d32->bytes, targ); /* directly store the int */
if (status!=0) decContextSetStatus(set, status); /* pass on status */
/* decimal32Show(d32); */
@@ -194,13 +193,12 @@ decNumber * decimal32ToNumber(const decimal32 *d32, decNumber *dn) {
uInt exp; /* exponent top two bits */
uInt comb; /* combination field */
uInt sour; /* source 32-bit */
- const uInt *pu; /* work */
+ uInt uiwork; /* for macros */
/* load source from storage; this is endian */
- pu=(const uInt *)d32->bytes; /* overlay */
- sour=*pu; /* directly load the int */
+ sour=UBTOUI(d32->bytes); /* directly load the int */
- comb=(sour>>26)&0x1f; /* combination field */
+ comb=(sour>>26)&0x1f; /* combination field */
decNumberZero(dn); /* clean number */
if (sour&0x80000000) dn->bits=DECNEG; /* set sign if negative */
@@ -208,7 +206,7 @@ decNumber * decimal32ToNumber(const decimal32 *d32, decNumber *dn) {
msd=COMBMSD[comb]; /* decode the combination field */
exp=COMBEXP[comb]; /* .. */
- if (exp==3) { /* is a special */
+ if (exp==3) { /* is a special */
if (msd==0) {
dn->bits|=DECINF;
return dn; /* no coefficient needed */
@@ -229,7 +227,7 @@ decNumber * decimal32ToNumber(const decimal32 *d32, decNumber *dn) {
return dn;
}
/* msd=0 */
- if (!sour) return dn; /* easy: coefficient is 0 */
+ if (!sour) return dn; /* easy: coefficient is 0 */
if (sour&0x000ffc00) /* need 2 declets? */
decDigitsFromDPD(dn, &sour, 2); /* process 2 declets */
else
@@ -238,11 +236,11 @@ decNumber * decimal32ToNumber(const decimal32 *d32, decNumber *dn) {
} /* decimal32ToNumber */
/* ------------------------------------------------------------------ */
-/* to-scientific-string -- conversion to numeric string */
+/* to-scientific-string -- conversion to numeric string */
/* to-engineering-string -- conversion to numeric string */
/* */
/* decimal32ToString(d32, string); */
-/* decimal32ToEngString(d32, string); */
+/* decimal32ToEngString(d32, string); */
/* */
/* d32 is the decimal32 format number to convert */
/* string is the string where the result will be laid out */
@@ -252,7 +250,7 @@ decNumber * decimal32ToNumber(const decimal32 *d32, decNumber *dn) {
/* No error is possible, and no status can be set. */
/* ------------------------------------------------------------------ */
char * decimal32ToEngString(const decimal32 *d32, char *string){
- decNumber dn; /* work */
+ decNumber dn; /* work */
decimal32ToNumber(d32, &dn);
decNumberToEngString(&dn, string);
return string;
@@ -262,29 +260,28 @@ char * decimal32ToString(const decimal32 *d32, char *string){
uInt msd; /* coefficient MSD */
Int exp; /* exponent top two bits or full */
uInt comb; /* combination field */
- char *cstart; /* coefficient start */
+ char *cstart; /* coefficient start */
char *c; /* output pointer in string */
- const uInt *pu; /* work */
- const uByte *u; /* .. */
+ const uByte *u; /* work */
char *s, *t; /* .. (source, target) */
Int dpd; /* .. */
Int pre, e; /* .. */
+ uInt uiwork; /* for macros */
uInt sour; /* source 32-bit */
/* load source from storage; this is endian */
- pu=(const uInt *)d32->bytes; /* overlay */
- sour=*pu; /* directly load the int */
+ sour=UBTOUI(d32->bytes); /* directly load the int */
c=string; /* where result will go */
if (((Int)sour)<0) *c++='-'; /* handle sign */
- comb=(sour>>26)&0x1f; /* combination field */
+ comb=(sour>>26)&0x1f; /* combination field */
msd=COMBMSD[comb]; /* decode the combination field */
exp=COMBEXP[comb]; /* .. */
if (exp==3) {
if (msd==0) { /* infinity */
- strcpy(c, "Inf");
+ strcpy(c, "Inf");
strcpy(c+3, "inity");
return string; /* easy */
}
@@ -309,18 +306,18 @@ char * decimal32ToString(const decimal32 *d32, char *string){
/* length. We use fixed-length memcpys because variable-length */
/* causes a subroutine call in GCC. (These are length 4 for speed */
/* and are safe because the array has an extra terminator byte.) */
- #define dpd2char u=&BIN2CHAR[DPD2BIN[dpd]*4]; \
+ #define dpd2char u=&BIN2CHAR[DPD2BIN[dpd]*4]; \
if (c!=cstart) {memcpy(c, u+1, 4); c+=3;} \
else if (*u) {memcpy(c, u+4-*u, 4); c+=*u;}
- dpd=(sour>>10)&0x3ff; /* declet 1 */
+ dpd=(sour>>10)&0x3ff; /* declet 1 */
dpd2char;
dpd=(sour)&0x3ff; /* declet 2 */
dpd2char;
if (c==cstart) *c++='0'; /* all zeros -- make 0 */
- if (exp==0) { /* integer or NaN case -- easy */
+ if (exp==0) { /* integer or NaN case -- easy */
*c='\0'; /* terminate */
return string;
}
@@ -348,13 +345,13 @@ char * decimal32ToString(const decimal32 *d32, char *string){
/* finally add the E-part, if needed; it will never be 0, and has */
/* a maximum length of 3 digits (E-101 case) */
if (e!=0) {
- *c++='E'; /* starts with E */
- *c++='+'; /* assume positive */
+ *c++='E'; /* starts with E */
+ *c++='+'; /* assume positive */
if (e<0) {
*(c-1)='-'; /* oops, need '-' */
e=-e; /* uInt, please */
}
- u=&BIN2CHAR[e*4]; /* -> length byte */
+ u=&BIN2CHAR[e*4]; /* -> length byte */
memcpy(c, u+4-*u, 4); /* copy fixed 4 characters [is safe] */
c+=*u; /* bump pointer appropriately */
}
@@ -384,7 +381,7 @@ char * decimal32ToString(const decimal32 *d32, char *string){
/* the conversion */
/* *string is the character string which should contain a valid */
/* number (which may be a special value) */
-/* set is the context */
+/* set is the context */
/* */
/* The context is supplied to this routine is used for error handling */
/* (setting of status and traps) and for the rounding mode, only. */
@@ -393,7 +390,7 @@ char * decimal32ToString(const decimal32 *d32, char *string){
decimal32 * decimal32FromString(decimal32 *result, const char *string,
decContext *set) {
decContext dc; /* work */
- decNumber dn; /* .. */
+ decNumber dn; /* .. */
decContextDefault(&dc, DEC_INIT_DECIMAL32); /* no traps, please */
dc.round=set->round; /* use supplied rounding */
@@ -409,11 +406,11 @@ decimal32 * decimal32FromString(decimal32 *result, const char *string,
/* ------------------------------------------------------------------ */
/* decimal32IsCanonical -- test whether encoding is canonical */
/* d32 is the source decimal32 */
-/* returns 1 if the encoding of d32 is canonical, 0 otherwise */
+/* returns 1 if the encoding of d32 is canonical, 0 otherwise */
/* No error is possible. */
/* ------------------------------------------------------------------ */
-uint32_t decimal32IsCanonical(const decimal32 *d32) {
- decNumber dn; /* work */
+uInt decimal32IsCanonical(const decimal32 *d32) {
+ decNumber dn; /* work */
decimal32 canon; /* .. */
decContext dc; /* .. */
decContextDefault(&dc, DEC_INIT_DECIMAL32);
@@ -430,7 +427,7 @@ uint32_t decimal32IsCanonical(const decimal32 *d32) {
/* No error is possible. */
/* ------------------------------------------------------------------ */
decimal32 * decimal32Canonical(decimal32 *result, const decimal32 *d32) {
- decNumber dn; /* work */
+ decNumber dn; /* work */
decContext dc; /* .. */
decContextDefault(&dc, DEC_INIT_DECIMAL32);
decimal32ToNumber(d32, &dn);
@@ -460,8 +457,8 @@ decimal32 * decimal32Canonical(decimal32 *result, const decimal32 *d32) {
/* This assumes range has been checked and exponent previously 0; */
/* type of exponent must be unsigned */
#define decimal32SetExpCon(d, e) { \
- (d)->bytes[0]|=(uint8_t)((e)>>4); \
- (d)->bytes[1]|=(uint8_t)(((e)&0x0F)<<4);}
+ (d)->bytes[0]|=(uByte)((e)>>4); \
+ (d)->bytes[1]|=(uByte)(((e)&0x0F)<<4);}
/* ------------------------------------------------------------------ */
/* decimal32Show -- display a decimal32 in hexadecimal [debug aid] */
diff --git a/libdecnumber/dpd/decimal32.h b/libdecnumber/dpd/decimal32.h
index 0d530464172..222ba973f4c 100644
--- a/libdecnumber/dpd/decimal32.h
+++ b/libdecnumber/dpd/decimal32.h
@@ -35,7 +35,7 @@
#if !defined(DECIMAL32)
#define DECIMAL32
#define DEC32NAME "decimal32" /* Short name */
- #define DEC32FULLNAME "Decimal 32-bit Number" /* Verbose name */
+ #define DEC32FULLNAME "Decimal 32-bit Number" /* Verbose name */
#define DEC32AUTHOR "Mike Cowlishaw" /* Who to blame */
/* parameters for decimal32s */
@@ -46,7 +46,7 @@
#define DECIMAL32_Bias 101 /* bias for the exponent */
#define DECIMAL32_String 15 /* maximum string length, +1 */
#define DECIMAL32_EconL 6 /* exp. continuation length */
- /* highest biased exponent (Elimit-1) */
+ /* highest biased exponent (Elimit-1) */
#define DECIMAL32_Ehigh (DECIMAL32_Emax+DECIMAL32_Bias-DECIMAL32_Pmax+1)
/* check enough digits, if pre-defined */
@@ -71,18 +71,18 @@
/* special values [top byte excluding sign bit; last two bits are */
/* don't-care for Infinity on input, last bit don't-care for NaN] */
#if !defined(DECIMAL_NaN)
- #define DECIMAL_NaN 0x7c /* 0 11111 00 NaN */
+ #define DECIMAL_NaN 0x7c /* 0 11111 00 NaN */
#define DECIMAL_sNaN 0x7e /* 0 11111 10 sNaN */
- #define DECIMAL_Inf 0x78 /* 0 11110 00 Infinity */
+ #define DECIMAL_Inf 0x78 /* 0 11110 00 Infinity */
#endif
/* ---------------------------------------------------------------- */
/* Routines */
/* ---------------------------------------------------------------- */
- #include "decimal32Symbols.h"
+#include "decimal32Symbols.h"
- /* String conversions */
+ /* String conversions */
decimal32 * decimal32FromString(decimal32 *, const char *, decContext *);
char * decimal32ToString(const decimal32 *, char *);
char * decimal32ToEngString(const decimal32 *, char *);
@@ -92,7 +92,7 @@
decContext *);
decNumber * decimal32ToNumber(const decimal32 *, decNumber *);
- /* Format-dependent utilities */
+ /* Format-dependent utilities */
uint32_t decimal32IsCanonical(const decimal32 *);
decimal32 * decimal32Canonical(decimal32 *, const decimal32 *);
diff --git a/libdecnumber/dpd/decimal64.c b/libdecnumber/dpd/decimal64.c
index 474eb7cf8a0..77684d82fcc 100644
--- a/libdecnumber/dpd/decimal64.c
+++ b/libdecnumber/dpd/decimal64.c
@@ -29,7 +29,7 @@
02110-1301, USA. */
/* ------------------------------------------------------------------ */
-/* Decimal 64-bit format module */
+/* Decimal 64-bit format module */
/* ------------------------------------------------------------------ */
/* This module comprises the routines for decimal64 format numbers. */
/* Conversions are supplied to and from decNumber and String. */
@@ -42,8 +42,8 @@
#include <string.h> /* [for memset/memcpy] */
#include <stdio.h> /* [for printf] */
-#include "dconfig.h" /* GCC definitions */
-#define DECNUMDIGITS 16 /* make decNumbers with space for 16 */
+#include "dconfig.h" /* GCC definitions */
+#define DECNUMDIGITS 16 /* make decNumbers with space for 16 */
#include "decNumber.h" /* base number library */
#include "decNumberLocal.h" /* decNumber local types, etc. */
#include "decimal64.h" /* our primary include */
@@ -75,9 +75,9 @@ extern void decNumberShow(const decNumber *); /* .. */
/* ------------------------------------------------------------------ */
/* decimal64FromNumber -- convert decNumber to decimal64 */
/* */
-/* ds is the target decimal64 */
+/* ds is the target decimal64 */
/* dn is the source number (assumed valid) */
-/* set is the context, used only for reporting errors */
+/* set is the context, used only for reporting errors */
/* */
/* The set argument is used only for status reporting and for the */
/* rounding mode (used if the coefficient is more than DECIMAL64_Pmax */
@@ -95,8 +95,8 @@ decimal64 * decimal64FromNumber(decimal64 *d64, const decNumber *dn,
Int ae; /* adjusted exponent */
decNumber dw; /* work */
decContext dc; /* .. */
- uInt *pu; /* .. */
uInt comb, exp; /* .. */
+ uInt uiwork; /* for macros */
uInt targar[2]={0, 0}; /* target 64-bit */
#define targhi targar[1] /* name the word with the sign */
#define targlo targar[0] /* and the other */
@@ -106,9 +106,9 @@ decimal64 * decimal64FromNumber(decimal64 *d64, const decNumber *dn,
/* constraints. This could push the number to Infinity or zero, */
/* so this check and rounding must be done before generating the */
/* decimal64] */
- ae=dn->exponent+dn->digits-1; /* [0 if special] */
- if (dn->digits>DECIMAL64_Pmax /* too many digits */
- || ae>DECIMAL64_Emax /* likely overflow */
+ ae=dn->exponent+dn->digits-1; /* [0 if special] */
+ if (dn->digits>DECIMAL64_Pmax /* too many digits */
+ || ae>DECIMAL64_Emax /* likely overflow */
|| ae<DECIMAL64_Emin) { /* likely underflow */
decContextDefault(&dc, DEC_INIT_DECIMAL64); /* [no traps] */
dc.round=set->round; /* use supplied rounding */
@@ -122,7 +122,7 @@ decimal64 * decimal64FromNumber(decimal64 *d64, const decNumber *dn,
if (dn->bits&DECSPECIAL) { /* a special value */
if (dn->bits&DECINF) targhi=DECIMAL_Inf<<24;
else { /* sNaN or qNaN */
- if ((*dn->lsu!=0 || dn->digits>1) /* non-zero coefficient */
+ if ((*dn->lsu!=0 || dn->digits>1) /* non-zero coefficient */
&& (dn->digits<DECIMAL64_Pmax)) { /* coefficient fits */
decDigitsToDPD(dn, targar, 0);
}
@@ -148,7 +148,7 @@ decimal64 * decimal64FromNumber(decimal64 *d64, const decNumber *dn,
comb=(exp>>5) & 0x18; /* msd=0, exp top 2 bits .. */
}
else { /* non-zero finite number */
- uInt msd; /* work */
+ uInt msd; /* work */
Int pad=0; /* coefficient pad digits */
/* the dn is known to fit, but it may need to be padded */
@@ -193,14 +193,15 @@ decimal64 * decimal64FromNumber(decimal64 *d64, const decNumber *dn,
if (dn->bits&DECNEG) targhi|=0x80000000; /* add sign bit */
/* now write to storage; this is now always endian */
- pu=(uInt *)d64->bytes; /* overlay */
if (DECLITEND) {
- pu[0]=targar[0]; /* directly store the low int */
- pu[1]=targar[1]; /* then the high int */
+ /* lo int then hi */
+ UBFROMUI(d64->bytes, targar[0]);
+ UBFROMUI(d64->bytes+4, targar[1]);
}
else {
- pu[0]=targar[1]; /* directly store the high int */
- pu[1]=targar[0]; /* then the low int */
+ /* hi int then lo */
+ UBFROMUI(d64->bytes, targar[1]);
+ UBFROMUI(d64->bytes+4, targar[0]);
}
if (status!=0) decContextSetStatus(set, status); /* pass on status */
@@ -218,21 +219,20 @@ decNumber * decimal64ToNumber(const decimal64 *d64, decNumber *dn) {
uInt msd; /* coefficient MSD */
uInt exp; /* exponent top two bits */
uInt comb; /* combination field */
- const uInt *pu; /* work */
- Int need; /* .. */
+ Int need; /* work */
+ uInt uiwork; /* for macros */
uInt sourar[2]; /* source 64-bit */
#define sourhi sourar[1] /* name the word with the sign */
#define sourlo sourar[0] /* and the lower word */
/* load source from storage; this is endian */
- pu=(const uInt *)d64->bytes; /* overlay */
if (DECLITEND) {
- sourlo=pu[0]; /* directly load the low int */
- sourhi=pu[1]; /* then the high int */
+ sourlo=UBTOUI(d64->bytes ); /* directly load the low int */
+ sourhi=UBTOUI(d64->bytes+4); /* then the high int */
}
else {
- sourhi=pu[0]; /* directly load the high int */
- sourlo=pu[1]; /* then the low int */
+ sourhi=UBTOUI(d64->bytes ); /* directly load the high int */
+ sourlo=UBTOUI(d64->bytes+4); /* then the low int */
}
comb=(sourhi>>26)&0x1f; /* combination field */
@@ -243,7 +243,7 @@ decNumber * decimal64ToNumber(const decimal64 *d64, decNumber *dn) {
msd=COMBMSD[comb]; /* decode the combination field */
exp=COMBEXP[comb]; /* .. */
- if (exp==3) { /* is a special */
+ if (exp==3) { /* is a special */
if (msd==0) {
dn->bits|=DECINF;
return dn; /* no coefficient needed */
@@ -281,11 +281,11 @@ decNumber * decimal64ToNumber(const decimal64 *d64, decNumber *dn) {
/* ------------------------------------------------------------------ */
-/* to-scientific-string -- conversion to numeric string */
+/* to-scientific-string -- conversion to numeric string */
/* to-engineering-string -- conversion to numeric string */
/* */
/* decimal64ToString(d64, string); */
-/* decimal64ToEngString(d64, string); */
+/* decimal64ToEngString(d64, string); */
/* */
/* d64 is the decimal64 format number to convert */
/* string is the string where the result will be laid out */
@@ -295,7 +295,7 @@ decNumber * decimal64ToNumber(const decimal64 *d64, decNumber *dn) {
/* No error is possible, and no status can be set. */
/* ------------------------------------------------------------------ */
char * decimal64ToEngString(const decimal64 *d64, char *string){
- decNumber dn; /* work */
+ decNumber dn; /* work */
decimal64ToNumber(d64, &dn);
decNumberToEngString(&dn, string);
return string;
@@ -305,27 +305,26 @@ char * decimal64ToString(const decimal64 *d64, char *string){
uInt msd; /* coefficient MSD */
Int exp; /* exponent top two bits or full */
uInt comb; /* combination field */
- char *cstart; /* coefficient start */
+ char *cstart; /* coefficient start */
char *c; /* output pointer in string */
- const uInt *pu; /* work */
+ const uByte *u; /* work */
char *s, *t; /* .. (source, target) */
Int dpd; /* .. */
Int pre, e; /* .. */
- const uByte *u; /* .. */
+ uInt uiwork; /* for macros */
uInt sourar[2]; /* source 64-bit */
#define sourhi sourar[1] /* name the word with the sign */
#define sourlo sourar[0] /* and the lower word */
/* load source from storage; this is endian */
- pu=(const uInt *)d64->bytes; /* overlay */
if (DECLITEND) {
- sourlo=pu[0]; /* directly load the low int */
- sourhi=pu[1]; /* then the high int */
+ sourlo=UBTOUI(d64->bytes ); /* directly load the low int */
+ sourhi=UBTOUI(d64->bytes+4); /* then the high int */
}
else {
- sourhi=pu[0]; /* directly load the high int */
- sourlo=pu[1]; /* then the low int */
+ sourhi=UBTOUI(d64->bytes ); /* directly load the high int */
+ sourlo=UBTOUI(d64->bytes+4); /* then the low int */
}
c=string; /* where result will go */
@@ -337,7 +336,7 @@ char * decimal64ToString(const decimal64 *d64, char *string){
if (exp==3) {
if (msd==0) { /* infinity */
- strcpy(c, "Inf");
+ strcpy(c, "Inf");
strcpy(c+3, "inity");
return string; /* easy */
}
@@ -362,7 +361,7 @@ char * decimal64ToString(const decimal64 *d64, char *string){
/* length. We use fixed-length memcpys because variable-length */
/* causes a subroutine call in GCC. (These are length 4 for speed */
/* and are safe because the array has an extra terminator byte.) */
- #define dpd2char u=&BIN2CHAR[DPD2BIN[dpd]*4]; \
+ #define dpd2char u=&BIN2CHAR[DPD2BIN[dpd]*4]; \
if (c!=cstart) {memcpy(c, u+1, 4); c+=3;} \
else if (*u) {memcpy(c, u+4-*u, 4); c+=*u;}
@@ -379,7 +378,7 @@ char * decimal64ToString(const decimal64 *d64, char *string){
if (c==cstart) *c++='0'; /* all zeros -- make 0 */
- if (exp==0) { /* integer or NaN case -- easy */
+ if (exp==0) { /* integer or NaN case -- easy */
*c='\0'; /* terminate */
return string;
}
@@ -407,13 +406,13 @@ char * decimal64ToString(const decimal64 *d64, char *string){
/* finally add the E-part, if needed; it will never be 0, and has */
/* a maximum length of 3 digits */
if (e!=0) {
- *c++='E'; /* starts with E */
- *c++='+'; /* assume positive */
+ *c++='E'; /* starts with E */
+ *c++='+'; /* assume positive */
if (e<0) {
*(c-1)='-'; /* oops, need '-' */
e=-e; /* uInt, please */
}
- u=&BIN2CHAR[e*4]; /* -> length byte */
+ u=&BIN2CHAR[e*4]; /* -> length byte */
memcpy(c, u+4-*u, 4); /* copy fixed 4 characters [is safe] */
c+=*u; /* bump pointer appropriately */
}
@@ -443,7 +442,7 @@ char * decimal64ToString(const decimal64 *d64, char *string){
/* the conversion */
/* *string is the character string which should contain a valid */
/* number (which may be a special value) */
-/* set is the context */
+/* set is the context */
/* */
/* The context is supplied to this routine is used for error handling */
/* (setting of status and traps) and for the rounding mode, only. */
@@ -452,7 +451,7 @@ char * decimal64ToString(const decimal64 *d64, char *string){
decimal64 * decimal64FromString(decimal64 *result, const char *string,
decContext *set) {
decContext dc; /* work */
- decNumber dn; /* .. */
+ decNumber dn; /* .. */
decContextDefault(&dc, DEC_INIT_DECIMAL64); /* no traps, please */
dc.round=set->round; /* use supplied rounding */
@@ -469,11 +468,11 @@ decimal64 * decimal64FromString(decimal64 *result, const char *string,
/* ------------------------------------------------------------------ */
/* decimal64IsCanonical -- test whether encoding is canonical */
/* d64 is the source decimal64 */
-/* returns 1 if the encoding of d64 is canonical, 0 otherwise */
+/* returns 1 if the encoding of d64 is canonical, 0 otherwise */
/* No error is possible. */
/* ------------------------------------------------------------------ */
-uint32_t decimal64IsCanonical(const decimal64 *d64) {
- decNumber dn; /* work */
+uInt decimal64IsCanonical(const decimal64 *d64) {
+ decNumber dn; /* work */
decimal64 canon; /* .. */
decContext dc; /* .. */
decContextDefault(&dc, DEC_INIT_DECIMAL64);
@@ -490,7 +489,7 @@ uint32_t decimal64IsCanonical(const decimal64 *d64) {
/* No error is possible. */
/* ------------------------------------------------------------------ */
decimal64 * decimal64Canonical(decimal64 *result, const decimal64 *d64) {
- decNumber dn; /* work */
+ decNumber dn; /* work */
decContext dc; /* .. */
decContextDefault(&dc, DEC_INIT_DECIMAL64);
decimal64ToNumber(d64, &dn);
@@ -520,8 +519,8 @@ decimal64 * decimal64Canonical(decimal64 *result, const decimal64 *d64) {
/* This assumes range has been checked and exponent previously 0; */
/* type of exponent must be unsigned */
#define decimal64SetExpCon(d, e) { \
- (d)->bytes[0]|=(uint8_t)((e)>>6); \
- (d)->bytes[1]|=(uint8_t)(((e)&0x3F)<<2);}
+ (d)->bytes[0]|=(uByte)((e)>>6); \
+ (d)->bytes[1]|=(uByte)(((e)&0x3F)<<2);}
/* ------------------------------------------------------------------ */
/* decimal64Show -- display a decimal64 in hexadecimal [debug aid] */
@@ -591,12 +590,12 @@ const uInt COMBMSD[32]={0, 1, 2, 3, 4, 5, 6, 7,
/* ------------------------------------------------------------------ */
/* decDigitsToDPD -- pack coefficient into DPD form */
/* */
-/* dn is the source number (assumed valid, max DECMAX754 digits) */
+/* dn is the source number (assumed valid, max DECMAX754 digits) */
/* targ is 1, 2, or 4-element uInt array, which the caller must */
-/* have cleared to zeros */
+/* have cleared to zeros */
/* shift is the number of 0 digits to add on the right (normally 0) */
/* */
-/* The coefficient must be known small enough to fit. The full */
+/* The coefficient must be known small enough to fit. The full */
/* coefficient is copied, including the leading 'odd' digit. This */
/* digit is retrieved and packed into the combination field by the */
/* caller. */
@@ -625,7 +624,7 @@ void decDigitsToDPD(const decNumber *dn, uInt *targ, Int shift) {
uInt dpd; /* densely packed decimal value */
uInt bin; /* binary value 0-999 */
uInt *uout=targ; /* -> current output uInt */
- uInt uoff=0; /* -> current output offset [from right] */
+ uInt uoff=0; /* -> current output offset [from right] */
const Unit *inu=dn->lsu; /* -> current input unit */
Unit uar[DECMAXUNITS]; /* working copy of units, iff shifted */
#if DECDPUN!=3 /* not fast path */
@@ -636,7 +635,7 @@ void decDigitsToDPD(const decNumber *dn, uInt *targ, Int shift) {
/* shift the units array to the left by pad digits and copy */
/* [this code is a special case of decShiftToMost, which could */
/* be used instead if exposed and the array were copied first] */
- const Unit *source; /* .. */
+ const Unit *source; /* .. */
Unit *target, *first; /* .. */
uInt next=0; /* work */
@@ -681,12 +680,12 @@ void decDigitsToDPD(const decNumber *dn, uInt *targ, Int shift) {
for(n=0; digits>0; n++) { /* each output bunch */
#if DECDPUN==3 /* fast path, 3-at-a-time */
- bin=*inu; /* 3 digits ready for convert */
+ bin=*inu; /* 3 digits ready for convert */
digits-=3; /* [may go negative] */
inu++; /* may need another */
#else /* must collect digit-by-digit */
- Unit dig; /* current digit */
+ Unit dig; /* current digit */
Int j; /* digit-in-declet count */
for (j=0; j<3; j++) {
#if DECDPUN<=4
@@ -698,7 +697,7 @@ void decDigitsToDPD(const decNumber *dn, uInt *targ, Int shift) {
in=in/10;
#endif
if (j==0) bin=dig;
- else if (j==1) bin+=X10(dig);
+ else if (j==1) bin+=X10(dig);
else /* j==2 */ bin+=X100(dig);
digits--;
if (digits==0) break; /* [also protects *inu below] */
@@ -750,12 +749,12 @@ void decDigitsFromDPD(decNumber *dn, const uInt *sour, Int declets) {
Int n; /* counter */
Unit *uout=dn->lsu; /* -> current output unit */
Unit *last=uout; /* will be unit containing msd */
- const uInt *uin=sour; /* -> current input uInt */
- uInt uoff=0; /* -> current input offset [from right] */
+ const uInt *uin=sour; /* -> current input uInt */
+ uInt uoff=0; /* -> current input offset [from right] */
#if DECDPUN!=3
uInt bcd; /* BCD result */
- uInt nibble; /* work */
+ uInt nibble; /* work */
Unit out=0; /* accumulator */
Int cut=0; /* power of ten in current unit */
#endif
@@ -772,7 +771,7 @@ void decDigitsFromDPD(decNumber *dn, const uInt *sour, Int declets) {
uoff-=32;
dpd|=*uin<<(10-uoff); /* get waiting bits */
}
- dpd&=0x3ff; /* clear uninteresting bits */
+ dpd&=0x3ff; /* clear uninteresting bits */
#if DECDPUN==3
if (dpd==0) *uout=0;
@@ -822,9 +821,9 @@ void decDigitsFromDPD(decNumber *dn, const uInt *sour, Int declets) {
cut++;
if (cut==DECDPUN) {*uout=out; if (out) {last=uout; out=0;} uout++; cut=0;}
} /* n */
- if (cut!=0) { /* some more left over */
+ if (cut!=0) { /* some more left over */
*uout=out; /* write out final unit */
- if (out) last=uout; /* and note if non-zero */
+ if (out) last=uout; /* and note if non-zero */
}
#endif
@@ -834,14 +833,14 @@ void decDigitsFromDPD(decNumber *dn, const uInt *sour, Int declets) {
dn->digits=(last-dn->lsu)*DECDPUN+1; /* floor of digits, plus */
/* must be at least 1 digit */
#if DECDPUN>1
- if (*last<10) return; /* common odd digit or 0 */
- dn->digits++; /* must be 2 at least */
+ if (*last<10) return; /* common odd digit or 0 */
+ dn->digits++; /* must be 2 at least */
#if DECDPUN>2
if (*last<100) return; /* 10-99 */
- dn->digits++; /* must be 3 at least */
+ dn->digits++; /* must be 3 at least */
#if DECDPUN>3
if (*last<1000) return; /* 100-999 */
- dn->digits++; /* must be 4 at least */
+ dn->digits++; /* must be 4 at least */
#if DECDPUN>4
for (pow=&DECPOWERS[4]; *last>=*pow; pow++) dn->digits++;
#endif
diff --git a/libdecnumber/dpd/decimal64.h b/libdecnumber/dpd/decimal64.h
index 549b626536c..95ae15f2b0f 100644
--- a/libdecnumber/dpd/decimal64.h
+++ b/libdecnumber/dpd/decimal64.h
@@ -35,7 +35,7 @@
#if !defined(DECIMAL64)
#define DECIMAL64
#define DEC64NAME "decimal64" /* Short name */
- #define DEC64FULLNAME "Decimal 64-bit Number" /* Verbose name */
+ #define DEC64FULLNAME "Decimal 64-bit Number" /* Verbose name */
#define DEC64AUTHOR "Mike Cowlishaw" /* Who to blame */
@@ -47,7 +47,7 @@
#define DECIMAL64_Bias 398 /* bias for the exponent */
#define DECIMAL64_String 24 /* maximum string length, +1 */
#define DECIMAL64_EconL 8 /* exp. continuation length */
- /* highest biased exponent (Elimit-1) */
+ /* highest biased exponent (Elimit-1) */
#define DECIMAL64_Ehigh (DECIMAL64_Emax+DECIMAL64_Bias-DECIMAL64_Pmax+1)
/* check enough digits, if pre-defined */
@@ -73,18 +73,18 @@
/* special values [top byte excluding sign bit; last two bits are */
/* don't-care for Infinity on input, last bit don't-care for NaN] */
#if !defined(DECIMAL_NaN)
- #define DECIMAL_NaN 0x7c /* 0 11111 00 NaN */
+ #define DECIMAL_NaN 0x7c /* 0 11111 00 NaN */
#define DECIMAL_sNaN 0x7e /* 0 11111 10 sNaN */
- #define DECIMAL_Inf 0x78 /* 0 11110 00 Infinity */
+ #define DECIMAL_Inf 0x78 /* 0 11110 00 Infinity */
#endif
/* ---------------------------------------------------------------- */
/* Routines */
/* ---------------------------------------------------------------- */
- #include "decimal64Symbols.h"
+#include "decimal64Symbols.h"
- /* String conversions */
+ /* String conversions */
decimal64 * decimal64FromString(decimal64 *, const char *, decContext *);
char * decimal64ToString(const decimal64 *, char *);
char * decimal64ToEngString(const decimal64 *, char *);
@@ -94,7 +94,7 @@
decContext *);
decNumber * decimal64ToNumber(const decimal64 *, decNumber *);
- /* Format-dependent utilities */
+ /* Format-dependent utilities */
uint32_t decimal64IsCanonical(const decimal64 *);
decimal64 * decimal64Canonical(decimal64 *, const decimal64 *);
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 52ab411bda7..2f44895e282 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
2008-12-18 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
PR libffi/26048
diff --git a/libffi/configure b/libffi/configure
index c40a859ddd5..a1ec40bfe72 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -4192,7 +4192,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -6846,7 +6846,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -7407,7 +7407,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -8956,7 +8956,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index b845937b30b..d9d2b3d9834 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,10 @@
+2009-03-28 Joseph Myers <joseph@codesourcery.com>
+
+ * config.host (arm-*-coff*, armel-*-coff*, arm-semi-aof,
+ armel-semi-aof, h8300-*-*, i[34567]86-*-aout*, i[34567]86-*-coff*,
+ m68k-*-aout*, m68k-*-coff*, pdp11-*-bsd, rs6000-ibm-aix4.[12]*,
+ powerpc-ibm-aix4.[12]*, sh-*-*): Remove.
+
2009-02-12 Uros Bizjak <ubizjak@gmail.com>
* config.host (ia64*-*-linux*): Add t-softfp to tmake_file.
diff --git a/libgcc/config.host b/libgcc/config.host
index 5352363fc72..ad2ca4194e6 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -1,6 +1,6 @@
# libgcc host-specific configuration file.
# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-# 2008 Free Software Foundation, Inc.
+# 2008, 2009 Free Software Foundation, Inc.
#This file is part of GCC.
@@ -191,10 +191,6 @@ alpha*-dec-*vms*)
;;
arc-*-elf*)
;;
-arm-*-coff* | armel-*-coff*)
- ;;
-arm-semi-aof | armel-semi-aof)
- ;;
arm-wrs-vxworks)
;;
arm*-*-freebsd*)
@@ -255,8 +251,6 @@ h8300-*-rtems*)
;;
h8300-*-elf*)
;;
-h8300-*-*)
- ;;
hppa*64*-*-linux*)
;;
hppa*-*-linux*)
@@ -276,8 +270,6 @@ i[34567]86-*-elf*)
;;
x86_64-*-elf*)
;;
-i[34567]86-*-aout*)
- ;;
i[34567]86-*-freebsd*)
;;
x86_64-*-freebsd*)
@@ -292,8 +284,6 @@ i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
;;
i[34567]86-*-openbsd*)
;;
-i[34567]86-*-coff*)
- ;;
i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu*)
extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
@@ -368,10 +358,6 @@ m68hc11-*-*|m6811-*-*)
;;
m68hc12-*-*|m6812-*-*)
;;
-m68k-*-aout*)
- ;;
-m68k-*-coff*)
- ;;
m68k-*-elf*)
;;
m68k*-*-netbsdelf*)
@@ -430,8 +416,6 @@ mmix-knuth-mmixware)
;;
mn10300-*-*)
;;
-pdp11-*-bsd)
- ;;
pdp11-*-*)
;;
picochip-*-*)
@@ -489,8 +473,6 @@ powerpcle-*-eabisim*)
;;
powerpcle-*-eabi*)
;;
-rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
- ;;
rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
;;
rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
@@ -520,8 +502,6 @@ sh-*-rtems*)
;;
sh-wrs-vxworks)
;;
-sh-*-*)
- ;;
sparc-*-netbsdelf*)
;;
sparc64-*-openbsd*)
diff --git a/libgcc/config/i386/t-cygming b/libgcc/config/i386/t-cygming
index 048cadbd5a1..048cadbd5a1 100755..100644
--- a/libgcc/config/i386/t-cygming
+++ b/libgcc/config/i386/t-cygming
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 96fd675bf0e..e0ec2507052 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,33 @@
+2009-03-29 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR fortran/33595
+ * intrinsics/c99_functions.c (round): Use floor instead of ceil.
+ Revise checks to round up.
+ (roundf): Likewise.
+
+2009-03-28 Daniel Kraft <d@domob.eu>
+
+ * intrinsics/string_intrinsics.c: #include <assert.h>
+ * intrinsics/string_intrinsics_inc.c (string_trim): Use string_len_trim
+ instead of calculating the length directly.
+ (string_len_trim): For KIND=1, speed search up.
+
+2009-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/39528
+ * io/list_read.c (list_formatted_read_scalar): Move check for read
+ completion to just after the check for a repeated value.
+
+2009-03-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/39402
+ * io/write_float.def (output_float): Handle F0.d formatting correctly
+ for any d when value is 0.0.
+
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
2009-01-21 Daniel Kraft <d@domob.eu>
PR fortran/38887
diff --git a/libgfortran/configure b/libgfortran/configure
index 2d12f9661af..caa7e59fd9c 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
@@ -4747,7 +4747,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -7408,7 +7408,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -7969,7 +7969,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -9533,7 +9533,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -11836,7 +11836,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_FC='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -12382,7 +12382,7 @@ _LT_EOF
archive_expsym_cmds_FC='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -13772,7 +13772,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
diff --git a/libgfortran/intrinsics/c99_functions.c b/libgfortran/intrinsics/c99_functions.c
index ce96c8cb54b..66f06b323c8 100644
--- a/libgfortran/intrinsics/c99_functions.c
+++ b/libgfortran/intrinsics/c99_functions.c
@@ -571,16 +571,16 @@ round(double x)
if (x >= 0.0)
{
- t = ceil(x);
- if (t - x > 0.5)
- t -= 1.0;
+ t = floor(x);
+ if (t - x <= -0.5)
+ t += 1.0;
return (t);
}
else
{
- t = ceil(-x);
- if (t + x > 0.5)
- t -= 1.0;
+ t = floor(-x);
+ if (t + x <= -0.5)
+ t += 1.0;
return (-t);
}
}
@@ -600,16 +600,16 @@ roundf(float x)
if (x >= 0.0)
{
- t = ceilf(x);
- if (t - x > 0.5)
- t -= 1.0;
+ t = floorf(x);
+ if (t - x <= -0.5)
+ t += 1.0;
return (t);
}
else
{
- t = ceilf(-x);
- if (t + x > 0.5)
- t -= 1.0;
+ t = floorf(-x);
+ if (t + x <= -0.5)
+ t += 1.0;
return (-t);
}
}
diff --git a/libgfortran/intrinsics/string_intrinsics.c b/libgfortran/intrinsics/string_intrinsics.c
index f6d9663f0ba..491b45e21df 100644
--- a/libgfortran/intrinsics/string_intrinsics.c
+++ b/libgfortran/intrinsics/string_intrinsics.c
@@ -39,6 +39,7 @@ Boston, MA 02110-1301, USA. */
#include <stdlib.h>
#include <string.h>
+#include <assert.h>
/* Helper function to set parts of wide strings to a constant (usually
diff --git a/libgfortran/intrinsics/string_intrinsics_inc.c b/libgfortran/intrinsics/string_intrinsics_inc.c
index 0008db5b2fc..5497991c76b 100644
--- a/libgfortran/intrinsics/string_intrinsics_inc.c
+++ b/libgfortran/intrinsics/string_intrinsics_inc.c
@@ -165,15 +165,7 @@ void
string_trim (gfc_charlen_type *len, CHARTYPE **dest, gfc_charlen_type slen,
const CHARTYPE *src)
{
- gfc_charlen_type i;
-
- /* Determine length of result string. */
- for (i = slen - 1; i >= 0; i--)
- {
- if (src[i] != ' ')
- break;
- }
- *len = i + 1;
+ *len = string_len_trim (slen, src);
if (*len == 0)
*dest = &zero_length_string;
@@ -193,13 +185,57 @@ string_trim (gfc_charlen_type *len, CHARTYPE **dest, gfc_charlen_type slen,
gfc_charlen_type
string_len_trim (gfc_charlen_type len, const CHARTYPE *s)
{
+ const gfc_charlen_type long_len = (gfc_charlen_type) sizeof (unsigned long);
gfc_charlen_type i;
- for (i = len - 1; i >= 0; i--)
+ i = len - 1;
+
+ /* If we've got the standard (KIND=1) character type, we scan the string in
+ long word chunks to speed it up (until a long word is hit that does not
+ consist of ' 's). */
+ if (sizeof (CHARTYPE) == 1 && i >= long_len)
{
- if (s[i] != ' ')
- break;
+ int starting;
+ unsigned long blank_longword;
+
+ /* Handle the first characters until we're aligned on a long word
+ boundary. Actually, s + i + 1 must be properly aligned, because
+ s + i will be the last byte of a long word read. */
+ starting = ((unsigned long) (s + i + 1)) % long_len;
+ i -= starting;
+ for (; starting > 0; --starting)
+ if (s[i + starting] != ' ')
+ return i + starting + 1;
+
+ /* Handle the others in a batch until first non-blank long word is
+ found. Here again, s + i is the last byte of the current chunk,
+ to it starts at s + i - sizeof (long) + 1. */
+
+#if __SIZEOF_LONG__ == 4
+ blank_longword = 0x20202020L;
+#elif __SIZEOF_LONG__ == 8
+ blank_longword = 0x2020202020202020L;
+#else
+ #error Invalid size of long!
+#endif
+
+ while (i >= long_len)
+ {
+ i -= long_len;
+ if (*((unsigned long*) (s + i + 1)) != blank_longword)
+ {
+ i += long_len;
+ break;
+ }
+ }
+
+ /* Now continue for the last characters with naive approach below. */
+ assert (i >= 0);
}
+
+ /* Simply look for the first non-blank character. */
+ while (i >= 0 && s[i] == ' ')
+ --i;
return i + 1;
}
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 1f1023c10d2..6b22d34a0b6 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008
+/* Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Andy Vaught
Namelist input contributed by Paul Thomas
@@ -1720,9 +1720,6 @@ list_formatted_read_scalar (st_parameter_dt *dtp, volatile bt type, void *p,
}
else
{
- if (dtp->u.p.input_complete)
- goto cleanup;
-
if (dtp->u.p.repeat_count > 0)
{
if (check_type (dtp, type, kind))
@@ -1730,6 +1727,9 @@ list_formatted_read_scalar (st_parameter_dt *dtp, volatile bt type, void *p,
goto set_value;
}
+ if (dtp->u.p.input_complete)
+ goto cleanup;
+
if (dtp->u.p.at_eol)
finish_separator (dtp);
else
diff --git a/libgfortran/io/write_float.def b/libgfortran/io/write_float.def
index f94fde30b70..17bd7844560 100644
--- a/libgfortran/io/write_float.def
+++ b/libgfortran/io/write_float.def
@@ -122,7 +122,7 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size,
/* Handle special cases. */
if (w == 0)
- w = 2;
+ w = d + 2;
/* For this one we choose to not output a decimal point.
F95 10.5.1.2.1 */
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index eb0cd31ef18..a77fdde70e9 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,21 @@
+2009-03-25 Uros Bizjak <ubizjak@gmail.com>
+
+ * testsuite/libgomp.c/atomic-5.c: Cleanup cpuid usage.
+ * testsuite/libgomp.c/atomic-6.c: Ditto.
+
+2009-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/39495
+ * testsuite/libgomp.c/loop-12.c: New test.
+ * testsuite/libgomp.c/loop-11.c: New test.
+ * testsuite/libgomp.c++/loop-11.C: New test.
+ * testsuite/libgomp.c++/loop-12.C: New test.
+ * testsuite/libgomp.c++/for-8.C: New test.
+
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
2009-02-11 Jakub Jelinek <jakub@redhat.com>
PR middle-end/39154
@@ -12,7 +30,7 @@
2009-01-19 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
- * testsuite/lib/libgomp.exp: Add -B option for targets that
+ * testsuite/lib/libgomp.exp: Add -B option for targets that
use libgfortran.a%s in their specs.
2009-01-07 Jakub Jelinek <jakub@redhat.com>
diff --git a/libgomp/configure b/libgomp/configure
index 948fd3e4105..deef6733405 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -4616,7 +4616,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -7270,7 +7270,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -7831,7 +7831,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -9380,7 +9380,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -11668,7 +11668,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_FC='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -12214,7 +12214,7 @@ _LT_EOF
archive_expsym_cmds_FC='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -13589,7 +13589,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
diff --git a/libgomp/testsuite/libgomp.c++/for-8.C b/libgomp/testsuite/libgomp.c++/for-8.C
new file mode 100644
index 00000000000..918de7cc851
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/for-8.C
@@ -0,0 +1,291 @@
+// { dg-do run }
+
+typedef __PTRDIFF_TYPE__ ptrdiff_t;
+extern "C" void abort ();
+
+template <typename T>
+class I
+{
+public:
+ typedef ptrdiff_t difference_type;
+ I ();
+ ~I ();
+ I (T *);
+ I (const I &);
+ T &operator * ();
+ T *operator -> ();
+ T &operator [] (const difference_type &) const;
+ I &operator = (const I &);
+ I &operator ++ ();
+ I operator ++ (int);
+ I &operator -- ();
+ I operator -- (int);
+ I &operator += (const difference_type &);
+ I &operator -= (const difference_type &);
+ I operator + (const difference_type &) const;
+ I operator - (const difference_type &) const;
+ template <typename S> friend bool operator == (I<S> &, I<S> &);
+ template <typename S> friend bool operator == (const I<S> &, const I<S> &);
+ template <typename S> friend bool operator < (I<S> &, I<S> &);
+ template <typename S> friend bool operator < (const I<S> &, const I<S> &);
+ template <typename S> friend bool operator <= (I<S> &, I<S> &);
+ template <typename S> friend bool operator <= (const I<S> &, const I<S> &);
+ template <typename S> friend bool operator > (I<S> &, I<S> &);
+ template <typename S> friend bool operator > (const I<S> &, const I<S> &);
+ template <typename S> friend bool operator >= (I<S> &, I<S> &);
+ template <typename S> friend bool operator >= (const I<S> &, const I<S> &);
+ template <typename S> friend typename I<S>::difference_type operator - (I<S> &, I<S> &);
+ template <typename S> friend typename I<S>::difference_type operator - (const I<S> &, const I<S> &);
+ template <typename S> friend I<S> operator + (typename I<S>::difference_type , const I<S> &);
+private:
+ T *p;
+};
+template <typename T> I<T>::I () : p (0) {}
+template <typename T> I<T>::~I () {}
+template <typename T> I<T>::I (T *x) : p (x) {}
+template <typename T> I<T>::I (const I &x) : p (x.p) {}
+template <typename T> T &I<T>::operator * () { return *p; }
+template <typename T> T *I<T>::operator -> () { return p; }
+template <typename T> T &I<T>::operator [] (const difference_type &x) const { return p[x]; }
+template <typename T> I<T> &I<T>::operator = (const I &x) { p = x.p; return *this; }
+template <typename T> I<T> &I<T>::operator ++ () { ++p; return *this; }
+template <typename T> I<T> I<T>::operator ++ (int) { return I (p++); }
+template <typename T> I<T> &I<T>::operator -- () { --p; return *this; }
+template <typename T> I<T> I<T>::operator -- (int) { return I (p--); }
+template <typename T> I<T> &I<T>::operator += (const difference_type &x) { p += x; return *this; }
+template <typename T> I<T> &I<T>::operator -= (const difference_type &x) { p -= x; return *this; }
+template <typename T> I<T> I<T>::operator + (const difference_type &x) const { return I (p + x); }
+template <typename T> I<T> I<T>::operator - (const difference_type &x) const { return I (p - x); }
+template <typename T> bool operator == (I<T> &x, I<T> &y) { return x.p == y.p; }
+template <typename T> bool operator == (const I<T> &x, const I<T> &y) { return x.p == y.p; }
+template <typename T> bool operator != (I<T> &x, I<T> &y) { return !(x == y); }
+template <typename T> bool operator != (const I<T> &x, const I<T> &y) { return !(x == y); }
+template <typename T> bool operator < (I<T> &x, I<T> &y) { return x.p < y.p; }
+template <typename T> bool operator < (const I<T> &x, const I<T> &y) { return x.p < y.p; }
+template <typename T> bool operator <= (I<T> &x, I<T> &y) { return x.p <= y.p; }
+template <typename T> bool operator <= (const I<T> &x, const I<T> &y) { return x.p <= y.p; }
+template <typename T> bool operator > (I<T> &x, I<T> &y) { return x.p > y.p; }
+template <typename T> bool operator > (const I<T> &x, const I<T> &y) { return x.p > y.p; }
+template <typename T> bool operator >= (I<T> &x, I<T> &y) { return x.p >= y.p; }
+template <typename T> bool operator >= (const I<T> &x, const I<T> &y) { return x.p >= y.p; }
+template <typename T> typename I<T>::difference_type operator - (I<T> &x, I<T> &y) { return x.p - y.p; }
+template <typename T> typename I<T>::difference_type operator - (const I<T> &x, const I<T> &y) { return x.p - y.p; }
+template <typename T> I<T> operator + (typename I<T>::difference_type x, const I<T> &y) { return I<T> (x + y.p); }
+
+template <typename T>
+class J
+{
+public:
+ J(const I<T> &x, const I<T> &y) : b (x), e (y) {}
+ const I<T> &begin ();
+ const I<T> &end ();
+private:
+ I<T> b, e;
+};
+
+template <typename T> const I<T> &J<T>::begin () { return b; }
+template <typename T> const I<T> &J<T>::end () { return e; }
+
+int results[2000];
+
+template <typename T>
+void
+baz (I<T> &i)
+{
+ if (*i < 0 || *i >= 2000)
+ abort ();
+ results[*i]++;
+}
+
+void
+f1 (const I<int> &x, const I<int> &y)
+{
+#pragma omp parallel for
+ for (I<int> i = x; y >= i; i += 6)
+ baz (i);
+}
+
+void
+f2 (const I<int> &x, const I<int> &y)
+{
+ I<int> i;
+#pragma omp parallel for private(i)
+ for (i = x; y - 1 > i; i = 1 - 6 + 7 + i)
+ baz (i);
+}
+
+template <typename T>
+void
+f3 (const I<int> &x, const I<int> &y)
+{
+#pragma omp parallel for
+ for (I<int> i = x; y >= i; i = i + 9 - 8)
+ baz (i);
+}
+
+template <typename T>
+void
+f4 (const I<int> &x, const I<int> &y)
+{
+ I<int> i;
+#pragma omp parallel for lastprivate(i)
+ for (i = x + 2000 - 64; y + 10 < i; --i)
+ baz (i);
+}
+
+void
+f5 (const I<int> &x, const I<int> &y)
+{
+#pragma omp parallel for
+ for (I<int> i = x + 2000 - 64; y + 10 < i; i -= 10)
+ baz (i);
+}
+
+template <int N>
+void
+f6 (const I<int> &x, const I<int> &y)
+{
+#pragma omp parallel for
+ for (I<int> i = x + 2000 - 64; y + 10 < i; i = i - 12 + 2)
+ {
+ I<int> j = i + N;
+ baz (j);
+ }
+}
+
+template <int N>
+void
+f7 (I<int> i, const I<int> &x, const I<int> &y)
+{
+#pragma omp parallel for
+ for (i = x - 10; y + 10 >= i; i += N)
+ baz (i);
+}
+
+template <int N>
+void
+f8 (J<int> j)
+{
+ I<int> i;
+#pragma omp parallel for
+ for (i = j.begin (); j.end () + N >= i; i += 2)
+ baz (i);
+}
+
+template <typename T, int N>
+void
+f9 (const I<T> &x, const I<T> &y)
+{
+#pragma omp parallel for
+ for (I<T> i = x; y >= i; i = i + N)
+ baz (i);
+}
+
+template <typename T, int N>
+void
+f10 (const I<T> &x, const I<T> &y)
+{
+ I<T> i;
+#pragma omp parallel for
+ for (i = x; y < i; i = i + N)
+ baz (i);
+}
+
+template <typename T>
+void
+f11 (const T &x, const T &y)
+{
+#pragma omp parallel
+ {
+#pragma omp for nowait
+ for (T i = x; y >= i; i += 3)
+ baz (i);
+#pragma omp single
+ {
+ T j = y + 3;
+ baz (j);
+ }
+ }
+}
+
+template <typename T>
+void
+f12 (const T &x, const T &y)
+{
+ T i;
+#pragma omp parallel for
+ for (i = x; y < i; --i)
+ baz (i);
+}
+
+template <int N>
+struct K
+{
+ template <typename T>
+ static void
+ f13 (const T &x, const T &y)
+ {
+#pragma omp parallel for
+ for (T i = x; y + N >= i; i += N)
+ baz (i);
+ }
+};
+
+#define check(expr) \
+ for (int i = 0; i < 2000; i++) \
+ if (expr) \
+ { \
+ if (results[i] != 1) \
+ abort (); \
+ results[i] = 0; \
+ } \
+ else if (results[i]) \
+ abort ()
+
+int
+main ()
+{
+ int a[2000];
+ long b[2000];
+ for (int i = 0; i < 2000; i++)
+ {
+ a[i] = i;
+ b[i] = i;
+ }
+ f1 (&a[10], &a[1990]);
+ check (i >= 10 && i <= 1990 && (i - 10) % 6 == 0);
+ f2 (&a[0], &a[1999]);
+ check (i < 1998 && (i & 1) == 0);
+ f3<char> (&a[20], &a[1837]);
+ check (i >= 20 && i <= 1837);
+ f4<int> (&a[0], &a[30]);
+ check (i > 40 && i <= 2000 - 64);
+ f5 (&a[0], &a[100]);
+ check (i >= 116 && i <= 2000 - 64 && (i - 116) % 10 == 0);
+ f6<-10> (&a[10], &a[110]);
+ check (i >= 116 && i <= 2000 - 64 && (i - 116) % 10 == 0);
+ f7<6> (I<int> (), &a[12], &a[1800]);
+ check (i >= 2 && i <= 1808 && (i - 2) % 6 == 0);
+ f8<121> (J<int> (&a[14], &a[1803]));
+ check (i >= 14 && i <= 1924 && (i & 1) == 0);
+ f9<int, 7> (&a[33], &a[1967]);
+ check (i >= 33 && i <= 1967 && (i - 33) % 7 == 0);
+ f10<int, -7> (&a[1939], &a[17]);
+ check (i >= 21 && i <= 1939 && (i - 21) % 7 == 0);
+ f11<I<int> > (&a[16], &a[1981]);
+ check (i >= 16 && i <= 1984 && (i - 16) % 3 == 0);
+ f12<I<int> > (&a[1761], &a[37]);
+ check (i > 37 && i <= 1761);
+ K<5>::f13<I<int> > (&a[1], &a[1935]);
+ check (i >= 1 && i <= 1936 && (i - 1) % 5 == 0);
+ f9<long, 7> (&b[33], &b[1967]);
+ check (i >= 33 && i <= 1967 && (i - 33) % 7 == 0);
+ f10<long, -7> (&b[1939], &b[17]);
+ check (i >= 21 && i <= 1939 && (i - 21) % 7 == 0);
+ f11<I<long> > (&b[16], &b[1981]);
+ check (i >= 16 && i <= 1984 && (i - 16) % 3 == 0);
+ f12<I<long> > (&b[1761], &b[37]);
+ check (i > 37 && i <= 1761);
+ K<5>::f13<I<long> > (&b[1], &b[1935]);
+ check (i >= 1 && i <= 1936 && (i - 1) % 5 == 0);
+}
diff --git a/libgomp/testsuite/libgomp.c++/loop-11.C b/libgomp/testsuite/libgomp.c++/loop-11.C
new file mode 100644
index 00000000000..7775b86b818
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/loop-11.C
@@ -0,0 +1,276 @@
+#include <omp.h>
+#include <stdlib.h>
+#include <string.h>
+
+int
+test1 ()
+{
+ short int buf[64], *p;
+ int i;
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[10]; &buf[54] > p; p++)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[3]; &buf[63] >= p; p += 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[16]; &buf[51] > p; p = 4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[16]; &buf[40] >= p; p = p + 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[53]; &buf[9] < p; --p)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[63]; &buf[3] <= p; p -= 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[48]; &buf[15] < p; p = -4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[40]; &buf[16] <= p; p = p - 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ return 0;
+}
+
+int
+test2 ()
+{
+ int buf[64], *p;
+ int i;
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[10]; &buf[54] > p; p++)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[3]; &buf[63] >= p; p += 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[16]; &buf[51] > p; p = 4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[16]; &buf[40] >= p; p = p + 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[53]; &buf[9] < p; --p)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[63]; &buf[3] <= p; p -= 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[48]; &buf[15] < p; p = -4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[40]; &buf[16] <= p; p = p - 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ return 0;
+}
+
+int
+test3 ()
+{
+ int buf[64], *p;
+ int i;
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[10]; &buf[54] > p; p++)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[3]; &buf[63] >= p; p += 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[16]; &buf[51] > p; p = 4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[16]; &buf[40] >= p; p = p + 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[53]; &buf[9] < p; --p)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[63]; &buf[3] <= p; p -= 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[48]; &buf[15] < p; p = -4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[40]; &buf[16] <= p; p = p - 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ return 0;
+}
+
+int
+test4 ()
+{
+ int buf[64], *p;
+ int i;
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[10]; &buf[54] > p; p++)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[3]; &buf[63] >= p; p += 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[16]; &buf[51] > p; p = 4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[16]; &buf[40] >= p; p = p + 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[53]; &buf[9] < p; --p)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[63]; &buf[3] <= p; p -= 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[48]; &buf[15] < p; p = -4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[40]; &buf[16] <= p; p = p - 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ return 0;
+}
+
+int
+main ()
+{
+ test1 ();
+ test2 ();
+ test3 ();
+ omp_set_schedule (omp_sched_static, 0);
+ test4 ();
+ omp_set_schedule (omp_sched_static, 3);
+ test4 ();
+ omp_set_schedule (omp_sched_dynamic, 5);
+ test4 ();
+ omp_set_schedule (omp_sched_guided, 2);
+ test4 ();
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.c++/loop-12.C b/libgomp/testsuite/libgomp.c++/loop-12.C
new file mode 100644
index 00000000000..f8aca92b8ae
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/loop-12.C
@@ -0,0 +1,387 @@
+// { dg-do run }
+
+#include <omp.h>
+
+extern "C" void abort ();
+
+#define LLONG_MAX __LONG_LONG_MAX__
+#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
+#define INT_MAX __INT_MAX__
+
+int arr[6 * 5];
+
+void
+set (int loopidx, int idx)
+{
+#pragma omp atomic
+ arr[loopidx * 5 + idx]++;
+}
+
+#define check(var, val, loopidx, idx) \
+ if (var == (val)) set (loopidx, idx); else
+#define test(loopidx, count) \
+ for (idx = 0; idx < 5; idx++) \
+ if (arr[loopidx * 5 + idx] != idx < count) \
+ abort (); \
+ else \
+ arr[loopidx * 5 + idx] = 0
+
+int
+test1 ()
+{
+ int e = 0, idx;
+
+#pragma omp parallel reduction(+:e)
+ {
+ long long i;
+ unsigned long long j;
+ #pragma omp for schedule(dynamic,1) nowait
+ for (i = LLONG_MAX - 30001; LLONG_MAX - 10001 >= i; i += 10000)
+ {
+ check (i, LLONG_MAX - 30001, 0, 0)
+ check (i, LLONG_MAX - 20001, 0, 1)
+ check (i, LLONG_MAX - 10001, 0, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(dynamic,1) nowait
+ for (i = -LLONG_MAX + 30000; -LLONG_MAX + 10000 <= i; i -= 10000)
+ {
+ check (i, -LLONG_MAX + 30000, 1, 0)
+ check (i, -LLONG_MAX + 20000, 1, 1)
+ check (i, -LLONG_MAX + 10000, 1, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(dynamic,1) nowait
+ for (j = 20; LLONG_MAX - 70 >= j; j += LLONG_MAX + 50ULL)
+ {
+ check (j, 20, 2, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(dynamic,1) nowait
+ for (j = ULLONG_MAX - 3; LLONG_MAX + 70ULL <= j; j -= LLONG_MAX + 50ULL)
+ {
+ check (j, ULLONG_MAX - 3, 3, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(dynamic,1) nowait
+ for (j = LLONG_MAX - 20000ULL; LLONG_MAX + 10000ULL >= j; j += 10000ULL)
+ {
+ check (j, LLONG_MAX - 20000ULL, 4, 0)
+ check (j, LLONG_MAX - 10000ULL, 4, 1)
+ check (j, LLONG_MAX, 4, 2)
+ check (j, LLONG_MAX + 10000ULL, 4, 3)
+ e = 1;
+ }
+ #pragma omp for schedule(dynamic,1) nowait
+ for (i = -3LL * INT_MAX - 20000LL; INT_MAX + 10000LL >= i; i += INT_MAX + 200LL)
+ {
+ check (i, -3LL * INT_MAX - 20000LL, 5, 0)
+ check (i, -2LL * INT_MAX - 20000LL + 200LL, 5, 1)
+ check (i, -INT_MAX - 20000LL + 400LL, 5, 2)
+ check (i, -20000LL + 600LL, 5, 3)
+ check (i, INT_MAX - 20000LL + 800LL, 5, 4)
+ e = 1;
+ }
+ }
+ if (e)
+ abort ();
+ test (0, 3);
+ test (1, 3);
+ test (2, 1);
+ test (3, 1);
+ test (4, 4);
+ test (5, 5);
+ return 0;
+}
+
+int
+test2 ()
+{
+ int e = 0, idx;
+
+#pragma omp parallel reduction(+:e)
+ {
+ long long i;
+ unsigned long long j;
+ #pragma omp for schedule(guided,1) nowait
+ for (i = LLONG_MAX - 30001; LLONG_MAX - 10001 >= i; i += 10000)
+ {
+ check (i, LLONG_MAX - 30001, 0, 0)
+ check (i, LLONG_MAX - 20001, 0, 1)
+ check (i, LLONG_MAX - 10001, 0, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(guided,1) nowait
+ for (i = -LLONG_MAX + 30000; -LLONG_MAX + 10000 <= i; i -= 10000)
+ {
+ check (i, -LLONG_MAX + 30000, 1, 0)
+ check (i, -LLONG_MAX + 20000, 1, 1)
+ check (i, -LLONG_MAX + 10000, 1, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(guided,1) nowait
+ for (j = 20; LLONG_MAX - 70 >= j; j += LLONG_MAX + 50ULL)
+ {
+ check (j, 20, 2, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(guided,1) nowait
+ for (j = ULLONG_MAX - 3; LLONG_MAX + 70ULL <= j; j -= LLONG_MAX + 50ULL)
+ {
+ check (j, ULLONG_MAX - 3, 3, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(guided,1) nowait
+ for (j = LLONG_MAX - 20000ULL; LLONG_MAX + 10000ULL >= j; j += 10000ULL)
+ {
+ check (j, LLONG_MAX - 20000ULL, 4, 0)
+ check (j, LLONG_MAX - 10000ULL, 4, 1)
+ check (j, LLONG_MAX, 4, 2)
+ check (j, LLONG_MAX + 10000ULL, 4, 3)
+ e = 1;
+ }
+ #pragma omp for schedule(guided,1) nowait
+ for (i = -3LL * INT_MAX - 20000LL; INT_MAX + 10000LL >= i; i += INT_MAX + 200LL)
+ {
+ check (i, -3LL * INT_MAX - 20000LL, 5, 0)
+ check (i, -2LL * INT_MAX - 20000LL + 200LL, 5, 1)
+ check (i, -INT_MAX - 20000LL + 400LL, 5, 2)
+ check (i, -20000LL + 600LL, 5, 3)
+ check (i, INT_MAX - 20000LL + 800LL, 5, 4)
+ e = 1;
+ }
+ }
+ if (e)
+ abort ();
+ test (0, 3);
+ test (1, 3);
+ test (2, 1);
+ test (3, 1);
+ test (4, 4);
+ test (5, 5);
+ return 0;
+}
+
+int
+test3 ()
+{
+ int e = 0, idx;
+
+#pragma omp parallel reduction(+:e)
+ {
+ long long i;
+ unsigned long long j;
+ #pragma omp for schedule(static) nowait
+ for (i = LLONG_MAX - 30001; LLONG_MAX - 10001 >= i; i += 10000)
+ {
+ check (i, LLONG_MAX - 30001, 0, 0)
+ check (i, LLONG_MAX - 20001, 0, 1)
+ check (i, LLONG_MAX - 10001, 0, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(static) nowait
+ for (i = -LLONG_MAX + 30000; -LLONG_MAX + 10000 <= i; i -= 10000)
+ {
+ check (i, -LLONG_MAX + 30000, 1, 0)
+ check (i, -LLONG_MAX + 20000, 1, 1)
+ check (i, -LLONG_MAX + 10000, 1, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(static) nowait
+ for (j = 20; LLONG_MAX - 70 >= j; j += LLONG_MAX + 50ULL)
+ {
+ check (j, 20, 2, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(static) nowait
+ for (j = ULLONG_MAX - 3; LLONG_MAX + 70ULL <= j; j -= LLONG_MAX + 50ULL)
+ {
+ check (j, ULLONG_MAX - 3, 3, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(static) nowait
+ for (j = LLONG_MAX - 20000ULL; LLONG_MAX + 10000ULL >= j; j += 10000ULL)
+ {
+ check (j, LLONG_MAX - 20000ULL, 4, 0)
+ check (j, LLONG_MAX - 10000ULL, 4, 1)
+ check (j, LLONG_MAX, 4, 2)
+ check (j, LLONG_MAX + 10000ULL, 4, 3)
+ e = 1;
+ }
+ #pragma omp for schedule(static) nowait
+ for (i = -3LL * INT_MAX - 20000LL; INT_MAX + 10000LL >= i; i += INT_MAX + 200LL)
+ {
+ check (i, -3LL * INT_MAX - 20000LL, 5, 0)
+ check (i, -2LL * INT_MAX - 20000LL + 200LL, 5, 1)
+ check (i, -INT_MAX - 20000LL + 400LL, 5, 2)
+ check (i, -20000LL + 600LL, 5, 3)
+ check (i, INT_MAX - 20000LL + 800LL, 5, 4)
+ e = 1;
+ }
+ }
+ if (e)
+ abort ();
+ test (0, 3);
+ test (1, 3);
+ test (2, 1);
+ test (3, 1);
+ test (4, 4);
+ test (5, 5);
+ return 0;
+}
+
+int
+test4 ()
+{
+ int e = 0, idx;
+
+#pragma omp parallel reduction(+:e)
+ {
+ long long i;
+ unsigned long long j;
+ #pragma omp for schedule(static,1) nowait
+ for (i = LLONG_MAX - 30001; LLONG_MAX - 10001 >= i; i += 10000)
+ {
+ check (i, LLONG_MAX - 30001, 0, 0)
+ check (i, LLONG_MAX - 20001, 0, 1)
+ check (i, LLONG_MAX - 10001, 0, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(static,1) nowait
+ for (i = -LLONG_MAX + 30000; -LLONG_MAX + 10000 <= i; i -= 10000)
+ {
+ check (i, -LLONG_MAX + 30000, 1, 0)
+ check (i, -LLONG_MAX + 20000, 1, 1)
+ check (i, -LLONG_MAX + 10000, 1, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(static,1) nowait
+ for (j = 20; LLONG_MAX - 70 >= j; j += LLONG_MAX + 50ULL)
+ {
+ check (j, 20, 2, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(static,1) nowait
+ for (j = ULLONG_MAX - 3; LLONG_MAX + 70ULL <= j; j -= LLONG_MAX + 50ULL)
+ {
+ check (j, ULLONG_MAX - 3, 3, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(static,1) nowait
+ for (j = LLONG_MAX - 20000ULL; LLONG_MAX + 10000ULL >= j; j += 10000ULL)
+ {
+ check (j, LLONG_MAX - 20000ULL, 4, 0)
+ check (j, LLONG_MAX - 10000ULL, 4, 1)
+ check (j, LLONG_MAX, 4, 2)
+ check (j, LLONG_MAX + 10000ULL, 4, 3)
+ e = 1;
+ }
+ #pragma omp for schedule(static,1) nowait
+ for (i = -3LL * INT_MAX - 20000LL; INT_MAX + 10000LL >= i; i += INT_MAX + 200LL)
+ {
+ check (i, -3LL * INT_MAX - 20000LL, 5, 0)
+ check (i, -2LL * INT_MAX - 20000LL + 200LL, 5, 1)
+ check (i, -INT_MAX - 20000LL + 400LL, 5, 2)
+ check (i, -20000LL + 600LL, 5, 3)
+ check (i, INT_MAX - 20000LL + 800LL, 5, 4)
+ e = 1;
+ }
+ }
+ if (e)
+ abort ();
+ test (0, 3);
+ test (1, 3);
+ test (2, 1);
+ test (3, 1);
+ test (4, 4);
+ test (5, 5);
+ return 0;
+}
+
+int
+test5 ()
+{
+ int e = 0, idx;
+
+#pragma omp parallel reduction(+:e)
+ {
+ long long i;
+ unsigned long long j;
+ #pragma omp for schedule(runtime) nowait
+ for (i = LLONG_MAX - 30001; LLONG_MAX - 10001 >= i; i += 10000)
+ {
+ check (i, LLONG_MAX - 30001, 0, 0)
+ check (i, LLONG_MAX - 20001, 0, 1)
+ check (i, LLONG_MAX - 10001, 0, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(runtime) nowait
+ for (i = -LLONG_MAX + 30000; -LLONG_MAX + 10000 <= i; i -= 10000)
+ {
+ check (i, -LLONG_MAX + 30000, 1, 0)
+ check (i, -LLONG_MAX + 20000, 1, 1)
+ check (i, -LLONG_MAX + 10000, 1, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(runtime) nowait
+ for (j = 20; LLONG_MAX - 70 >= j; j += LLONG_MAX + 50ULL)
+ {
+ check (j, 20, 2, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(runtime) nowait
+ for (j = ULLONG_MAX - 3; LLONG_MAX + 70ULL <= j; j -= LLONG_MAX + 50ULL)
+ {
+ check (j, ULLONG_MAX - 3, 3, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(runtime) nowait
+ for (j = LLONG_MAX - 20000ULL; LLONG_MAX + 10000ULL >= j; j += 10000ULL)
+ {
+ check (j, LLONG_MAX - 20000ULL, 4, 0)
+ check (j, LLONG_MAX - 10000ULL, 4, 1)
+ check (j, LLONG_MAX, 4, 2)
+ check (j, LLONG_MAX + 10000ULL, 4, 3)
+ e = 1;
+ }
+ #pragma omp for schedule(runtime) nowait
+ for (i = -3LL * INT_MAX - 20000LL; INT_MAX + 10000LL >= i; i += INT_MAX + 200LL)
+ {
+ check (i, -3LL * INT_MAX - 20000LL, 5, 0)
+ check (i, -2LL * INT_MAX - 20000LL + 200LL, 5, 1)
+ check (i, -INT_MAX - 20000LL + 400LL, 5, 2)
+ check (i, -20000LL + 600LL, 5, 3)
+ check (i, INT_MAX - 20000LL + 800LL, 5, 4)
+ e = 1;
+ }
+ }
+ if (e)
+ abort ();
+ test (0, 3);
+ test (1, 3);
+ test (2, 1);
+ test (3, 1);
+ test (4, 4);
+ test (5, 5);
+ return 0;
+}
+
+int
+main ()
+{
+ if (2 * sizeof (int) != sizeof (long long))
+ return 0;
+ test1 ();
+ test2 ();
+ test3 ();
+ test4 ();
+ omp_set_schedule (omp_sched_static, 0);
+ test5 ();
+ omp_set_schedule (omp_sched_static, 3);
+ test5 ();
+ omp_set_schedule (omp_sched_dynamic, 5);
+ test5 ();
+ omp_set_schedule (omp_sched_guided, 2);
+ test5 ();
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.c/atomic-5.c b/libgomp/testsuite/libgomp.c/atomic-5.c
index 3b4b0f11d64..168f68dd6a7 100644
--- a/libgomp/testsuite/libgomp.c/atomic-5.c
+++ b/libgomp/testsuite/libgomp.c/atomic-5.c
@@ -3,7 +3,7 @@
/* { dg-options "-O2 -mcx16" { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
#ifdef __x86_64__
-# include "../../../gcc/config/i386/cpuid.h"
+# include "cpuid.h"
#endif
extern void abort (void);
@@ -31,10 +31,11 @@ main (void)
if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
return 0;
- if (ecx & bit_CMPXCHG16B)
- do_test ();
-#else
- do_test ();
+ if (!(ecx & bit_CMPXCHG16B))
+ return 0;
#endif
+
+ do_test ();
+
return 0;
}
diff --git a/libgomp/testsuite/libgomp.c/atomic-6.c b/libgomp/testsuite/libgomp.c/atomic-6.c
index 8e7fca59600..59baf7dd3e2 100644
--- a/libgomp/testsuite/libgomp.c/atomic-6.c
+++ b/libgomp/testsuite/libgomp.c/atomic-6.c
@@ -4,7 +4,7 @@
/* { dg-options "-O2 -march=i586" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
#ifdef __i386__
-# include "../../../gcc/config/i386/cpuid.h"
+# include "cpuid.h"
#endif
extern void abort (void);
@@ -28,10 +28,11 @@ main (void)
if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
return 0;
- if (edx & bit_CMPXCHG8B)
- do_test ();
-#else
- do_test ();
+ if (!(edx & bit_CMPXCHG8B))
+ return 0;
#endif
+
+ do_test ();
+
return 0;
}
diff --git a/libgomp/testsuite/libgomp.c/loop-11.c b/libgomp/testsuite/libgomp.c/loop-11.c
new file mode 100644
index 00000000000..c5ac3c4348a
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/loop-11.c
@@ -0,0 +1,276 @@
+#include <omp.h>
+#include <stdlib.h>
+#include <string.h>
+
+int
+test1 (void)
+{
+ short int buf[64], *p;
+ int i;
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[10]; &buf[54] > p; p++)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[3]; &buf[63] >= p; p += 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[16]; &buf[51] > p; p = 4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[16]; &buf[40] >= p; p = p + 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[53]; &buf[9] < p; --p)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[63]; &buf[3] <= p; p -= 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[48]; &buf[15] < p; p = -4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for
+ for (p = &buf[40]; &buf[16] <= p; p = p - 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ return 0;
+}
+
+int
+test2 (void)
+{
+ int buf[64], *p;
+ int i;
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[10]; &buf[54] > p; p++)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[3]; &buf[63] >= p; p += 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[16]; &buf[51] > p; p = 4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[16]; &buf[40] >= p; p = p + 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[53]; &buf[9] < p; --p)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[63]; &buf[3] <= p; p -= 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[48]; &buf[15] < p; p = -4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (static, 3)
+ for (p = &buf[40]; &buf[16] <= p; p = p - 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ return 0;
+}
+
+int
+test3 (void)
+{
+ int buf[64], *p;
+ int i;
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[10]; &buf[54] > p; p++)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[3]; &buf[63] >= p; p += 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[16]; &buf[51] > p; p = 4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[16]; &buf[40] >= p; p = p + 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[53]; &buf[9] < p; --p)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[63]; &buf[3] <= p; p -= 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[48]; &buf[15] < p; p = -4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (dynamic, 3)
+ for (p = &buf[40]; &buf[16] <= p; p = p - 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ return 0;
+}
+
+int
+test4 (void)
+{
+ int buf[64], *p;
+ int i;
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[10]; &buf[54] > p; p++)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[3]; &buf[63] >= p; p += 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[16]; &buf[51] > p; p = 4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[16]; &buf[40] >= p; p = p + 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[53]; &buf[9] < p; --p)
+ *p = 5;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 5 * (i >= 10 && i < 54))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[63]; &buf[3] <= p; p -= 2)
+ p[-2] = 6;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 6 * ((i & 1) && i <= 61))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[48]; &buf[15] < p; p = -4 + p)
+ p[2] = 7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != 7 * ((i & 3) == 2 && i >= 18 && i < 53))
+ abort ();
+ memset (buf, '\0', sizeof (buf));
+#pragma omp parallel for schedule (runtime)
+ for (p = &buf[40]; &buf[16] <= p; p = p - 4ULL)
+ p[2] = -7;
+ for (i = 0; i < 64; i++)
+ if (buf[i] != -7 * ((i & 3) == 2 && i >= 18 && i <= 42))
+ abort ();
+ return 0;
+}
+
+int
+main (void)
+{
+ test1 ();
+ test2 ();
+ test3 ();
+ omp_set_schedule (omp_sched_static, 0);
+ test4 ();
+ omp_set_schedule (omp_sched_static, 3);
+ test4 ();
+ omp_set_schedule (omp_sched_dynamic, 5);
+ test4 ();
+ omp_set_schedule (omp_sched_guided, 2);
+ test4 ();
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.c/loop-12.c b/libgomp/testsuite/libgomp.c/loop-12.c
new file mode 100644
index 00000000000..395da363e48
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/loop-12.c
@@ -0,0 +1,387 @@
+/* { dg-do run } */
+
+#include <omp.h>
+
+extern void abort (void);
+
+#define LLONG_MAX __LONG_LONG_MAX__
+#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
+#define INT_MAX __INT_MAX__
+
+int arr[6 * 5];
+
+void
+set (int loopidx, int idx)
+{
+#pragma omp atomic
+ arr[loopidx * 5 + idx]++;
+}
+
+#define check(var, val, loopidx, idx) \
+ if (var == (val)) set (loopidx, idx); else
+#define test(loopidx, count) \
+ for (idx = 0; idx < 5; idx++) \
+ if (arr[loopidx * 5 + idx] != idx < count) \
+ abort (); \
+ else \
+ arr[loopidx * 5 + idx] = 0
+
+int
+test1 (void)
+{
+ int e = 0, idx;
+
+#pragma omp parallel reduction(+:e)
+ {
+ long long i;
+ unsigned long long j;
+ #pragma omp for schedule(dynamic,1) nowait
+ for (i = LLONG_MAX - 30001; LLONG_MAX - 10001 >= i; i += 10000)
+ {
+ check (i, LLONG_MAX - 30001, 0, 0)
+ check (i, LLONG_MAX - 20001, 0, 1)
+ check (i, LLONG_MAX - 10001, 0, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(dynamic,1) nowait
+ for (i = -LLONG_MAX + 30000; -LLONG_MAX + 10000 <= i; i -= 10000)
+ {
+ check (i, -LLONG_MAX + 30000, 1, 0)
+ check (i, -LLONG_MAX + 20000, 1, 1)
+ check (i, -LLONG_MAX + 10000, 1, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(dynamic,1) nowait
+ for (j = 20; LLONG_MAX - 70 >= j; j += LLONG_MAX + 50ULL)
+ {
+ check (j, 20, 2, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(dynamic,1) nowait
+ for (j = ULLONG_MAX - 3; LLONG_MAX + 70ULL <= j; j -= LLONG_MAX + 50ULL)
+ {
+ check (j, ULLONG_MAX - 3, 3, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(dynamic,1) nowait
+ for (j = LLONG_MAX - 20000ULL; LLONG_MAX + 10000ULL >= j; j += 10000ULL)
+ {
+ check (j, LLONG_MAX - 20000ULL, 4, 0)
+ check (j, LLONG_MAX - 10000ULL, 4, 1)
+ check (j, LLONG_MAX, 4, 2)
+ check (j, LLONG_MAX + 10000ULL, 4, 3)
+ e = 1;
+ }
+ #pragma omp for schedule(dynamic,1) nowait
+ for (i = -3LL * INT_MAX - 20000LL; INT_MAX + 10000LL >= i; i += INT_MAX + 200LL)
+ {
+ check (i, -3LL * INT_MAX - 20000LL, 5, 0)
+ check (i, -2LL * INT_MAX - 20000LL + 200LL, 5, 1)
+ check (i, -INT_MAX - 20000LL + 400LL, 5, 2)
+ check (i, -20000LL + 600LL, 5, 3)
+ check (i, INT_MAX - 20000LL + 800LL, 5, 4)
+ e = 1;
+ }
+ }
+ if (e)
+ abort ();
+ test (0, 3);
+ test (1, 3);
+ test (2, 1);
+ test (3, 1);
+ test (4, 4);
+ test (5, 5);
+ return 0;
+}
+
+int
+test2 (void)
+{
+ int e = 0, idx;
+
+#pragma omp parallel reduction(+:e)
+ {
+ long long i;
+ unsigned long long j;
+ #pragma omp for schedule(guided,1) nowait
+ for (i = LLONG_MAX - 30001; LLONG_MAX - 10001 >= i; i += 10000)
+ {
+ check (i, LLONG_MAX - 30001, 0, 0)
+ check (i, LLONG_MAX - 20001, 0, 1)
+ check (i, LLONG_MAX - 10001, 0, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(guided,1) nowait
+ for (i = -LLONG_MAX + 30000; -LLONG_MAX + 10000 <= i; i -= 10000)
+ {
+ check (i, -LLONG_MAX + 30000, 1, 0)
+ check (i, -LLONG_MAX + 20000, 1, 1)
+ check (i, -LLONG_MAX + 10000, 1, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(guided,1) nowait
+ for (j = 20; LLONG_MAX - 70 >= j; j += LLONG_MAX + 50ULL)
+ {
+ check (j, 20, 2, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(guided,1) nowait
+ for (j = ULLONG_MAX - 3; LLONG_MAX + 70ULL <= j; j -= LLONG_MAX + 50ULL)
+ {
+ check (j, ULLONG_MAX - 3, 3, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(guided,1) nowait
+ for (j = LLONG_MAX - 20000ULL; LLONG_MAX + 10000ULL >= j; j += 10000ULL)
+ {
+ check (j, LLONG_MAX - 20000ULL, 4, 0)
+ check (j, LLONG_MAX - 10000ULL, 4, 1)
+ check (j, LLONG_MAX, 4, 2)
+ check (j, LLONG_MAX + 10000ULL, 4, 3)
+ e = 1;
+ }
+ #pragma omp for schedule(guided,1) nowait
+ for (i = -3LL * INT_MAX - 20000LL; INT_MAX + 10000LL >= i; i += INT_MAX + 200LL)
+ {
+ check (i, -3LL * INT_MAX - 20000LL, 5, 0)
+ check (i, -2LL * INT_MAX - 20000LL + 200LL, 5, 1)
+ check (i, -INT_MAX - 20000LL + 400LL, 5, 2)
+ check (i, -20000LL + 600LL, 5, 3)
+ check (i, INT_MAX - 20000LL + 800LL, 5, 4)
+ e = 1;
+ }
+ }
+ if (e)
+ abort ();
+ test (0, 3);
+ test (1, 3);
+ test (2, 1);
+ test (3, 1);
+ test (4, 4);
+ test (5, 5);
+ return 0;
+}
+
+int
+test3 (void)
+{
+ int e = 0, idx;
+
+#pragma omp parallel reduction(+:e)
+ {
+ long long i;
+ unsigned long long j;
+ #pragma omp for schedule(static) nowait
+ for (i = LLONG_MAX - 30001; LLONG_MAX - 10001 >= i; i += 10000)
+ {
+ check (i, LLONG_MAX - 30001, 0, 0)
+ check (i, LLONG_MAX - 20001, 0, 1)
+ check (i, LLONG_MAX - 10001, 0, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(static) nowait
+ for (i = -LLONG_MAX + 30000; -LLONG_MAX + 10000 <= i; i -= 10000)
+ {
+ check (i, -LLONG_MAX + 30000, 1, 0)
+ check (i, -LLONG_MAX + 20000, 1, 1)
+ check (i, -LLONG_MAX + 10000, 1, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(static) nowait
+ for (j = 20; LLONG_MAX - 70 >= j; j += LLONG_MAX + 50ULL)
+ {
+ check (j, 20, 2, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(static) nowait
+ for (j = ULLONG_MAX - 3; LLONG_MAX + 70ULL <= j; j -= LLONG_MAX + 50ULL)
+ {
+ check (j, ULLONG_MAX - 3, 3, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(static) nowait
+ for (j = LLONG_MAX - 20000ULL; LLONG_MAX + 10000ULL >= j; j += 10000ULL)
+ {
+ check (j, LLONG_MAX - 20000ULL, 4, 0)
+ check (j, LLONG_MAX - 10000ULL, 4, 1)
+ check (j, LLONG_MAX, 4, 2)
+ check (j, LLONG_MAX + 10000ULL, 4, 3)
+ e = 1;
+ }
+ #pragma omp for schedule(static) nowait
+ for (i = -3LL * INT_MAX - 20000LL; INT_MAX + 10000LL >= i; i += INT_MAX + 200LL)
+ {
+ check (i, -3LL * INT_MAX - 20000LL, 5, 0)
+ check (i, -2LL * INT_MAX - 20000LL + 200LL, 5, 1)
+ check (i, -INT_MAX - 20000LL + 400LL, 5, 2)
+ check (i, -20000LL + 600LL, 5, 3)
+ check (i, INT_MAX - 20000LL + 800LL, 5, 4)
+ e = 1;
+ }
+ }
+ if (e)
+ abort ();
+ test (0, 3);
+ test (1, 3);
+ test (2, 1);
+ test (3, 1);
+ test (4, 4);
+ test (5, 5);
+ return 0;
+}
+
+int
+test4 (void)
+{
+ int e = 0, idx;
+
+#pragma omp parallel reduction(+:e)
+ {
+ long long i;
+ unsigned long long j;
+ #pragma omp for schedule(static,1) nowait
+ for (i = LLONG_MAX - 30001; LLONG_MAX - 10001 >= i; i += 10000)
+ {
+ check (i, LLONG_MAX - 30001, 0, 0)
+ check (i, LLONG_MAX - 20001, 0, 1)
+ check (i, LLONG_MAX - 10001, 0, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(static,1) nowait
+ for (i = -LLONG_MAX + 30000; -LLONG_MAX + 10000 <= i; i -= 10000)
+ {
+ check (i, -LLONG_MAX + 30000, 1, 0)
+ check (i, -LLONG_MAX + 20000, 1, 1)
+ check (i, -LLONG_MAX + 10000, 1, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(static,1) nowait
+ for (j = 20; LLONG_MAX - 70 >= j; j += LLONG_MAX + 50ULL)
+ {
+ check (j, 20, 2, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(static,1) nowait
+ for (j = ULLONG_MAX - 3; LLONG_MAX + 70ULL <= j; j -= LLONG_MAX + 50ULL)
+ {
+ check (j, ULLONG_MAX - 3, 3, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(static,1) nowait
+ for (j = LLONG_MAX - 20000ULL; LLONG_MAX + 10000ULL >= j; j += 10000ULL)
+ {
+ check (j, LLONG_MAX - 20000ULL, 4, 0)
+ check (j, LLONG_MAX - 10000ULL, 4, 1)
+ check (j, LLONG_MAX, 4, 2)
+ check (j, LLONG_MAX + 10000ULL, 4, 3)
+ e = 1;
+ }
+ #pragma omp for schedule(static,1) nowait
+ for (i = -3LL * INT_MAX - 20000LL; INT_MAX + 10000LL >= i; i += INT_MAX + 200LL)
+ {
+ check (i, -3LL * INT_MAX - 20000LL, 5, 0)
+ check (i, -2LL * INT_MAX - 20000LL + 200LL, 5, 1)
+ check (i, -INT_MAX - 20000LL + 400LL, 5, 2)
+ check (i, -20000LL + 600LL, 5, 3)
+ check (i, INT_MAX - 20000LL + 800LL, 5, 4)
+ e = 1;
+ }
+ }
+ if (e)
+ abort ();
+ test (0, 3);
+ test (1, 3);
+ test (2, 1);
+ test (3, 1);
+ test (4, 4);
+ test (5, 5);
+ return 0;
+}
+
+int
+test5 (void)
+{
+ int e = 0, idx;
+
+#pragma omp parallel reduction(+:e)
+ {
+ long long i;
+ unsigned long long j;
+ #pragma omp for schedule(runtime) nowait
+ for (i = LLONG_MAX - 30001; LLONG_MAX - 10001 >= i; i += 10000)
+ {
+ check (i, LLONG_MAX - 30001, 0, 0)
+ check (i, LLONG_MAX - 20001, 0, 1)
+ check (i, LLONG_MAX - 10001, 0, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(runtime) nowait
+ for (i = -LLONG_MAX + 30000; -LLONG_MAX + 10000 <= i; i -= 10000)
+ {
+ check (i, -LLONG_MAX + 30000, 1, 0)
+ check (i, -LLONG_MAX + 20000, 1, 1)
+ check (i, -LLONG_MAX + 10000, 1, 2)
+ e = 1;
+ }
+ #pragma omp for schedule(runtime) nowait
+ for (j = 20; LLONG_MAX - 70 >= j; j += LLONG_MAX + 50ULL)
+ {
+ check (j, 20, 2, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(runtime) nowait
+ for (j = ULLONG_MAX - 3; LLONG_MAX + 70ULL <= j; j -= LLONG_MAX + 50ULL)
+ {
+ check (j, ULLONG_MAX - 3, 3, 0)
+ e = 1;
+ }
+ #pragma omp for schedule(runtime) nowait
+ for (j = LLONG_MAX - 20000ULL; LLONG_MAX + 10000ULL >= j; j += 10000ULL)
+ {
+ check (j, LLONG_MAX - 20000ULL, 4, 0)
+ check (j, LLONG_MAX - 10000ULL, 4, 1)
+ check (j, LLONG_MAX, 4, 2)
+ check (j, LLONG_MAX + 10000ULL, 4, 3)
+ e = 1;
+ }
+ #pragma omp for schedule(runtime) nowait
+ for (i = -3LL * INT_MAX - 20000LL; INT_MAX + 10000LL >= i; i += INT_MAX + 200LL)
+ {
+ check (i, -3LL * INT_MAX - 20000LL, 5, 0)
+ check (i, -2LL * INT_MAX - 20000LL + 200LL, 5, 1)
+ check (i, -INT_MAX - 20000LL + 400LL, 5, 2)
+ check (i, -20000LL + 600LL, 5, 3)
+ check (i, INT_MAX - 20000LL + 800LL, 5, 4)
+ e = 1;
+ }
+ }
+ if (e)
+ abort ();
+ test (0, 3);
+ test (1, 3);
+ test (2, 1);
+ test (3, 1);
+ test (4, 4);
+ test (5, 5);
+ return 0;
+}
+
+int
+main (void)
+{
+ if (2 * sizeof (int) != sizeof (long long))
+ return 0;
+ test1 ();
+ test2 ();
+ test3 ();
+ test4 ();
+ omp_set_schedule (omp_sched_static, 0);
+ test5 ();
+ omp_set_schedule (omp_sched_static, 3);
+ test5 ();
+ omp_set_schedule (omp_sched_dynamic, 5);
+ test5 ();
+ omp_set_schedule (omp_sched_guided, 2);
+ test5 ();
+ return 0;
+}
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index db7d2878bc0..141246a1248 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,33 @@
+2008-03-27 Ian Lance Taylor <iant@google.com>
+
+ * memmem.c: New file, from gnulib.
+ * configure.ac: Add memmem to list of functions provided if they
+ are not available on the host.
+ * Makefile.in: Rebuild dependencies.
+ (CFILES): Add memmem.c.
+ (CONFIGURED_OFILES): Add memmem.o.
+ * configure, config.in, functions.texi: Rebuild.
+
+2009-03-23 Jason Merrill <jason@redhat.com>
+
+ * cp-demangle.c (d_expression): Handle pack expansion.
+ (d_find_pack): Handle DEMANGLE_COMPONENT_FUNCTION_PARAM.
+ (d_print_subexpr): Don't wrap function parms in ().
+ (d_print_comp) [DEMANGLE_COMPONENT_PACK_EXPANSION]: Handle
+ not finding a pack.
+
+2009-03-17 Jason Merrill <jason@redhat.com>
+
+ * cp-demangle.c (d_make_function_param): new fn.
+ (cplus_demangle_mangled_name): Work around abi v2 bug.
+ (d_expr_primary): Likewise.
+ (cplus_demangle_operators): Add alignof ops.
+ (d_expression): Handle function parameters and conversions
+ with other than 1 operand.
+ (d_print_comp): Handle function parameters. Fix bug with
+ function used in type of function.
+ * testsuite/demangle-expected: Upate tests.
+
2009-02-21 Mark Mitchell <mark@codesourcery.com>
* make-temp-file.c (<windows.h>): Include on Windows.
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 41a71f5ea32..29068ea8763 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -135,8 +135,8 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
lbasename.c \
lrealpath.c \
make-relative-prefix.c \
- make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmove.c \
- mempcpy.c memset.c mkstemps.c \
+ make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmem.c \
+ memmove.c mempcpy.c memset.c mkstemps.c \
objalloc.c obstack.c \
partition.c pexecute.c \
pex-common.c pex-djgpp.c pex-msdos.c pex-one.c \
@@ -187,8 +187,8 @@ CONFIGURED_OFILES = ./asprintf.o ./atexit.o \
./ffs.o \
./getcwd.o ./getpagesize.o ./gettimeofday.o \
./index.o ./insque.o \
- ./memchr.o ./memcmp.o ./memcpy.o ./memmove.o ./mempcpy.o \
- ./memset.o ./mkstemps.o \
+ ./memchr.o ./memcmp.o ./memcpy.o ./memmem.o ./memmove.o \
+ ./mempcpy.o ./memset.o ./mkstemps.o \
./pex-djgpp.o ./pex-msdos.o \
./pex-unix.o ./pex-win32.o \
./putenv.o \
@@ -798,6 +798,12 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/memcpy.c $(OUTPUT_OPTION)
+./memmem.o: $(srcdir)/memmem.c config.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/memmem.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/memmem.c $(OUTPUT_OPTION)
+
./memmove.o: $(srcdir)/memmove.c $(INCDIR)/ansidecl.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/memmove.c -o pic/$@; \
diff --git a/libiberty/config.in b/libiberty/config.in
index 9260d560a6e..d34320c717d 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -139,6 +139,9 @@
/* Define to 1 if you have the `memcpy' function. */
#undef HAVE_MEMCPY
+/* Define to 1 if you have the `memmem' function. */
+#undef HAVE_MEMMEM
+
/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE
diff --git a/libiberty/configure b/libiberty/configure
index 4469808cdec..4d0aeae4e5c 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -5420,6 +5420,7 @@ funcs="$funcs insque"
funcs="$funcs memchr"
funcs="$funcs memcmp"
funcs="$funcs memcpy"
+funcs="$funcs memmem"
funcs="$funcs memmove"
funcs="$funcs mempcpy"
funcs="$funcs memset"
@@ -5532,9 +5533,10 @@ if test "x" = "y"; then
+
for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \
- memmove mempcpy memset putenv random rename rindex sigsetmask \
+ memmem memmove mempcpy memset putenv random rename rindex sigsetmask \
strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \
strtod strtol strtoul strverscmp tmpnam vasprintf vfprintf vprintf \
vsprintf waitpid getrusage on_exit psignal strerror strsignal \
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index 00fce384818..7d167c35a8a 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -317,6 +317,7 @@ funcs="$funcs insque"
funcs="$funcs memchr"
funcs="$funcs memcmp"
funcs="$funcs memcpy"
+funcs="$funcs memmem"
funcs="$funcs memmove"
funcs="$funcs mempcpy"
funcs="$funcs memset"
@@ -362,7 +363,7 @@ checkfuncs="$checkfuncs getsysinfo table sysctl wait3 wait4 __fsetlocking"
if test "x" = "y"; then
AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \
- memmove mempcpy memset putenv random rename rindex sigsetmask \
+ memmem memmove mempcpy memset putenv random rename rindex sigsetmask \
strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \
strtod strtol strtoul strverscmp tmpnam vasprintf vfprintf vprintf \
vsprintf waitpid getrusage on_exit psignal strerror strsignal \
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 0b4e05c6e5c..b02f9bbf97e 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -964,6 +964,22 @@ d_make_template_param (struct d_info *di, long i)
return p;
}
+/* Add a new function parameter. */
+
+static struct demangle_component *
+d_make_function_param (struct d_info *di, long i)
+{
+ struct demangle_component *p;
+
+ p = d_make_empty (di);
+ if (p != NULL)
+ {
+ p->type = DEMANGLE_COMPONENT_FUNCTION_PARAM;
+ p->u.s_number.number = i;
+ }
+ return p;
+}
+
/* Add a new standard substitution component. */
static struct demangle_component *
@@ -989,7 +1005,11 @@ CP_STATIC_IF_GLIBCPP_V3
struct demangle_component *
cplus_demangle_mangled_name (struct d_info *di, int top_level)
{
- if (! d_check_char (di, '_'))
+ if (! d_check_char (di, '_')
+ /* Allow missing _ if not at toplevel to work around a
+ bug in G++ abi-version=2 mangling; see the comment in
+ write_template_arg. */
+ && top_level)
return NULL;
if (! d_check_char (di, 'Z'))
return NULL;
@@ -1481,6 +1501,8 @@ const struct demangle_operator_info cplus_demangle_operators[] =
{ "rs", NL (">>"), 2 },
{ "st", NL ("sizeof "), 1 },
{ "sz", NL ("sizeof "), 1 },
+ { "at", NL ("alignof "), 1 },
+ { "az", NL ("alignof "), 1 },
{ NULL, NULL, 0, 0 }
};
@@ -2564,12 +2586,31 @@ d_expression (struct d_info *di)
d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, name,
d_template_args (di)));
}
- else if (peek == 's'
- && (d_peek_next_char (di) == 'T' || d_peek_next_char (di) == 'R'))
+ else if (peek == 's' && d_peek_next_char (di) == 'p')
{
- /* Just demangle a parameter placeholder as its type. */
d_advance (di, 2);
- return cplus_demangle_type (di);
+ return d_make_comp (di, DEMANGLE_COMPONENT_PACK_EXPANSION,
+ d_expression (di), NULL);
+ }
+ else if (peek == 'f' && d_peek_next_char (di) == 'p')
+ {
+ /* Function parameter used in a late-specified return type. */
+ int index;
+ d_advance (di, 2);
+ if (d_peek_char (di) == '_')
+ index = 1;
+ else
+ {
+ index = d_number (di);
+ if (index < 0)
+ return NULL;
+ index += 2;
+ }
+
+ if (! d_check_char (di, '_'))
+ return NULL;
+
+ return d_make_function_param (di, index);
}
else if (IS_DIGIT (peek))
{
@@ -2619,8 +2660,16 @@ d_expression (struct d_info *di)
switch (args)
{
case 1:
- return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op,
- d_expression (di));
+ {
+ struct demangle_component *operand;
+ if (op->type == DEMANGLE_COMPONENT_CAST
+ && d_check_char (di, '_'))
+ operand = d_exprlist (di);
+ else
+ operand = d_expression (di);
+ return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op,
+ operand);
+ }
case 2:
{
struct demangle_component *left;
@@ -2671,7 +2720,9 @@ d_expr_primary (struct d_info *di)
if (! d_check_char (di, 'L'))
return NULL;
- if (d_peek_char (di) == '_')
+ if (d_peek_char (di) == '_'
+ /* Workaround for G++ bug; see comment in write_template_arg. */
+ || d_peek_char (di) == 'Z')
ret = cplus_demangle_mangled_name (di, 0);
else
{
@@ -3199,6 +3250,7 @@ d_find_pack (struct d_print_info *dpi,
case DEMANGLE_COMPONENT_BUILTIN_TYPE:
case DEMANGLE_COMPONENT_SUB_STD:
case DEMANGLE_COMPONENT_CHARACTER:
+ case DEMANGLE_COMPONENT_FUNCTION_PARAM:
return NULL;
case DEMANGLE_COMPONENT_EXTENDED_OPERATOR:
@@ -3239,7 +3291,8 @@ d_print_subexpr (struct d_print_info *dpi,
const struct demangle_component *dc)
{
int simple = 0;
- if (dc->type == DEMANGLE_COMPONENT_NAME)
+ if (dc->type == DEMANGLE_COMPONENT_NAME
+ || dc->type == DEMANGLE_COMPONENT_FUNCTION_PARAM)
simple = 1;
if (!simple)
d_append_char (dpi, '(');
@@ -3293,6 +3346,7 @@ d_print_comp (struct d_print_info *dpi,
the right place for the type. We also have to pass down
any CV-qualifiers, which apply to the this parameter. */
hold_modifiers = dpi->modifiers;
+ dpi->modifiers = 0;
i = 0;
typed_name = d_left (dc);
while (typed_name != NULL)
@@ -3966,10 +4020,20 @@ d_print_comp (struct d_print_info *dpi,
case DEMANGLE_COMPONENT_PACK_EXPANSION:
{
- struct demangle_component *a = d_find_pack (dpi, d_left (dc));
- int len = d_pack_length (a);
+ int len;
int i;
+ struct demangle_component *a = d_find_pack (dpi, d_left (dc));
+ if (a == NULL)
+ {
+ /* d_find_pack won't find anything if the only packs involved
+ in this expansion are function parameter packs; in that
+ case, just print the pattern and "...". */
+ d_print_subexpr (dpi, d_left (dc));
+ d_append_string (dpi, "...");
+ return;
+ }
+ len = d_pack_length (a);
dc = d_left (dc);
for (i = 0; i < len; ++i)
{
@@ -3981,6 +4045,15 @@ d_print_comp (struct d_print_info *dpi,
}
return;
+ case DEMANGLE_COMPONENT_FUNCTION_PARAM:
+ {
+ char buf[25];
+ d_append_string (dpi, "parm#");
+ sprintf(buf,"%ld", dc->u.s_number.number);
+ d_append_string (dpi, buf);
+ return;
+ }
+
default:
d_print_error (dpi);
return;
diff --git a/libiberty/functions.texi b/libiberty/functions.texi
index 34566d8f17a..da9a3202235 100644
--- a/libiberty/functions.texi
+++ b/libiberty/functions.texi
@@ -158,7 +158,7 @@ not recommended.
@end deftypefn
-@c make-temp-file.c:87
+@c make-temp-file.c:95
@deftypefn Replacement char* choose_tmpdir ()
Returns a pointer to a directory path suitable for creating temporary
@@ -602,7 +602,7 @@ relative prefix can be found, return @code{NULL}.
@end deftypefn
-@c make-temp-file.c:137
+@c make-temp-file.c:163
@deftypefn Replacement char* make_temp_file (const char *@var{suffix})
Return a temporary file name (as a string) or @code{NULL} if unable to
@@ -643,6 +643,15 @@ Copies @var{length} bytes from memory region @var{in} to region
@end deftypefn
+@c memmem.c:20
+@deftypefn Supplemental void* memmem (const void *@var{haystack}, size_t @var{haystack_len} const void *@var{needle}, size_t @var{needle_len})
+
+Returns a pointer to the first occurrence of @var{needle} (length
+@var{needle_len}) in @var{haystack} (length @var{haystack_len}).
+Returns @code{NULL} if not found.
+
+@end deftypefn
+
@c memmove.c:6
@deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, size_t @var{count})
diff --git a/libiberty/memmem.c b/libiberty/memmem.c
new file mode 100644
index 00000000000..5d755992b76
--- /dev/null
+++ b/libiberty/memmem.c
@@ -0,0 +1,70 @@
+/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004,2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/*
+
+@deftypefn Supplemental void* memmem (const void *@var{haystack}, size_t @var{haystack_len} const void *@var{needle}, size_t @var{needle_len})
+
+Returns a pointer to the first occurrence of @var{needle} (length
+@var{needle_len}) in @var{haystack} (length @var{haystack_len}).
+Returns @code{NULL} if not found.
+
+@end deftypefn
+
+*/
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <string.h>
+
+#ifndef _LIBC
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+#undef memmem
+
+/* Return the first occurrence of NEEDLE in HAYSTACK. */
+void *
+memmem (const void *haystack, size_t haystack_len, const void *needle,
+ size_t needle_len)
+{
+ const char *begin;
+ const char *const last_possible
+ = (const char *) haystack + haystack_len - needle_len;
+
+ if (needle_len == 0)
+ /* The first occurrence of the empty string is deemed to occur at
+ the beginning of the string. */
+ return (void *) haystack;
+
+ /* Sanity check, otherwise the loop might search through the whole
+ memory. */
+ if (__builtin_expect (haystack_len < needle_len, 0))
+ return NULL;
+
+ for (begin = (const char *) haystack; begin <= last_possible; ++begin)
+ if (begin[0] == ((const char *) needle)[0] &&
+ !memcmp ((const void *) &begin[1],
+ (const void *) ((const char *) needle + 1),
+ needle_len - 1))
+ return (void *) begin;
+
+ return NULL;
+}
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index d9efbc0d24e..0c451184fc4 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -3723,7 +3723,7 @@ foo<int (*) [3]>
# This used to crash the demangler--PR 16240
--format=gnu-v3 --no-params
_ZN13PatternDriver23StringScalarDeleteValueC1ERKNS_25ConflateStringScalarValueERKNS_25AbstractStringScalarValueERKNS_12TemplateEnumINS_12pdcomplementELZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE
-_ZN13PatternDriver23StringScalarDeleteValueC1ERKNS_25ConflateStringScalarValueERKNS_25AbstractStringScalarValueERKNS_12TemplateEnumINS_12pdcomplementELZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE
+PatternDriver::StringScalarDeleteValue::StringScalarDeleteValue(PatternDriver::ConflateStringScalarValue const&, PatternDriver::AbstractStringScalarValue const&, PatternDriver::TemplateEnum<PatternDriver::pdcomplement, PatternDriver::complement_names, PatternDriver::COMPLEMENTENUM> const&)
PatternDriver::StringScalarDeleteValue::StringScalarDeleteValue
#
# This used to cause the demangler to walk into undefined memory--PR 22268
@@ -3884,12 +3884,12 @@ _ZGr32_java$Sutil$Siso4217$_properties
java resource java/util/iso4217.properties
# decltype/param placeholder test
--format=gnu-v3
-_Z3addIidEDTplsTT_sTT0_ES0_S1_
-decltype ((int)+(double)) add<int, double>(int, double)
+_Z3addIidEDTplfp_fp0_ET_T0_
+decltype (parm#1+parm#2) add<int, double>(int, double)
# decltype/fn call test
--format=gnu-v3
-_Z4add3IidEDTclL_Z1gEsTT_sTT0_EES0_S1_
-decltype (g(int, double)) add3<int, double>(int, double)
+_Z4add3IidEDTclL_Z1gEfp_fp0_EET_T0_
+decltype (g(parm#1, parm#2)) add3<int, double>(int, double)
# new (2008) built in types test
--format=gnu-v3
_Z1fDfDdDeDhDsDi
@@ -3900,5 +3900,13 @@ _Z1fIIPiPfPdEEvDpT_
void f<int*, float*, double*>(int*, float*, double*)
# '.' test
--format=gnu-v3
-_Z1hI1AIiEdEDTcldtsTT_1gIT0_EEES2_S3_
-decltype (((A<int>).(g<double>))()) h<A<int>, double>(A<int>, double)
+_Z1hI1AIiEdEDTcldtfp_1gIT0_EEET_S2_
+decltype ((parm#1.(g<double>))()) h<A<int>, double>(A<int>, double)
+# test for typed function in decltype
+--format=gnu-v3
+_ZN1AIiE1jIiEEDTplfp_clL_Z1xvEEET_
+decltype (parm#1+((x())())) A<int>::j<int>(int)
+# test for expansion of function parameter pack
+--format=gnu-v3
+_Z1gIIidEEDTclL_Z1fEspplfp_Li1EEEDpT_
+decltype (f((parm#1+(1))...)) g<int, double>(int, double)
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 4eab8c23820..6d33fdda55f 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,33 @@
+2009-03-11 Andrew Haley <aph@redhat.com>
+
+ * java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault): Clear
+ INTERPRETED access modifier.
+
+2009-03-11 Tom Tromey <tromey@redhat.com>
+
+ * link.cc (_Jv_Linker::find_field): Pass the field_type to
+ _Jv_CheckOrCreateLoadingConstraint, not the class that is
+ requesting the field.
+
+2009-03-03 Andrew John Hughes <ahughes@redhat.com>
+
+ * Makefile.am:
+ Remove dangling src.zip and javac symlinks.
+ Fix java.security symlink to use toolexeclibdir
+ as classpath/resource/Makefile.am does.
+ * Makefile.in,
+ * configure: Regenerated.
+ * configure.ac: Drop hard-coded prefix,
+ thus removing sdk_dir and making jre_dir="jre".
+ Map x86_64 to amd64 as used by OpenJDK.
+ * gcj/Makefile.in,
+ * include/Makefile.in,
+ * testsuite/Makefile.in: Regenerated.
+
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
2009-02-13 Andrew John Hughes <ahughes@redhat.com>
Import GNU Classpath (classpath-0_98-release).
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index 49685896878..c4746bfd854 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -586,7 +586,6 @@ if CREATE_JAVA_HOME
$(DESTDIR)$(SDK_BIN_DIR)/rmic; \
ln -sf $$RELATIVE/`echo gjavah | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
$(DESTDIR)$(SDK_BIN_DIR)/javah; \
- ln -sf $$RELATIVE/ecj $(DESTDIR)$(SDK_BIN_DIR)/javac; \
ln -sf $$RELATIVE/`echo gappletviewer | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
$(DESTDIR)$(SDK_BIN_DIR)/appletviewer; \
ln -sf $$RELATIVE/`echo gjarsigner | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
@@ -638,7 +637,7 @@ if CREATE_JAVA_HOME
done; \
cd $$working_dir; \
$(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/security; \
- RELATIVE=$$(relative $(DESTDIR)$(libdir)/security \
+ RELATIVE=$$(relative $(DESTDIR)$(toolexeclibdir)/security \
$(DESTDIR)$(JRE_LIB_DIR)/security); \
cd $(DESTDIR)$(JRE_LIB_DIR)/security; \
ln -sf $$RELATIVE/classpath.security java.security; \
@@ -684,9 +683,7 @@ if CREATE_JAVA_HOME
$(DESTDIR)$(SDK_INCLUDE_DIR)/linux/$$headername.h; \
done; \
RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
- $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR)); \
- ln -sf $$RELATIVE/src-$(gcc_version).zip \
- $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR)/src.zip;
+ $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR));
endif
## ################################################################
diff --git a/libjava/Makefile.in b/libjava/Makefile.in
index c7b22721c7f..4de0b3142c0 100644
--- a/libjava/Makefile.in
+++ b/libjava/Makefile.in
@@ -743,7 +743,6 @@ PKG_CONFIG = @PKG_CONFIG@
PLATFORM = @PLATFORM@
RANLIB = @RANLIB@
SDK_BIN_DIR = @SDK_BIN_DIR@
-SDK_DIR = @SDK_DIR@
SDK_INCLUDE_DIR = @SDK_INCLUDE_DIR@
SDK_LIB_DIR = @SDK_LIB_DIR@
SDK_LNK = @SDK_LNK@
@@ -12434,7 +12433,6 @@ install-data-local:
@CREATE_JAVA_HOME_TRUE@ $(DESTDIR)$(SDK_BIN_DIR)/rmic; \
@CREATE_JAVA_HOME_TRUE@ ln -sf $$RELATIVE/`echo gjavah | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
@CREATE_JAVA_HOME_TRUE@ $(DESTDIR)$(SDK_BIN_DIR)/javah; \
-@CREATE_JAVA_HOME_TRUE@ ln -sf $$RELATIVE/ecj $(DESTDIR)$(SDK_BIN_DIR)/javac; \
@CREATE_JAVA_HOME_TRUE@ ln -sf $$RELATIVE/`echo gappletviewer | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
@CREATE_JAVA_HOME_TRUE@ $(DESTDIR)$(SDK_BIN_DIR)/appletviewer; \
@CREATE_JAVA_HOME_TRUE@ ln -sf $$RELATIVE/`echo gjarsigner | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
@@ -12486,7 +12484,7 @@ install-data-local:
@CREATE_JAVA_HOME_TRUE@ done; \
@CREATE_JAVA_HOME_TRUE@ cd $$working_dir; \
@CREATE_JAVA_HOME_TRUE@ $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/security; \
-@CREATE_JAVA_HOME_TRUE@ RELATIVE=$$(relative $(DESTDIR)$(libdir)/security \
+@CREATE_JAVA_HOME_TRUE@ RELATIVE=$$(relative $(DESTDIR)$(toolexeclibdir)/security \
@CREATE_JAVA_HOME_TRUE@ $(DESTDIR)$(JRE_LIB_DIR)/security); \
@CREATE_JAVA_HOME_TRUE@ cd $(DESTDIR)$(JRE_LIB_DIR)/security; \
@CREATE_JAVA_HOME_TRUE@ ln -sf $$RELATIVE/classpath.security java.security; \
@@ -12532,9 +12530,7 @@ install-data-local:
@CREATE_JAVA_HOME_TRUE@ $(DESTDIR)$(SDK_INCLUDE_DIR)/linux/$$headername.h; \
@CREATE_JAVA_HOME_TRUE@ done; \
@CREATE_JAVA_HOME_TRUE@ RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
-@CREATE_JAVA_HOME_TRUE@ $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR)); \
-@CREATE_JAVA_HOME_TRUE@ ln -sf $$RELATIVE/src-$(gcc_version).zip \
-@CREATE_JAVA_HOME_TRUE@ $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR)/src.zip;
+@CREATE_JAVA_HOME_TRUE@ $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR));
maintainer-check: libgcj.la
$(NM) .libs/libgcj.a | grep ' T ' \
diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog
index 169c2f64c7b..c6ec810e0e8 100644
--- a/libjava/classpath/ChangeLog
+++ b/libjava/classpath/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
2009-02-05 Andrew John Hughes <ahughes@redhat.com>
* NEWS: Add VM updates.
diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj
index 8a813baac12..e4d7c2fae3c 100644
--- a/libjava/classpath/ChangeLog.gcj
+++ b/libjava/classpath/ChangeLog.gcj
@@ -1,3 +1,8 @@
+2009-03-16 Matthias Klose <doko@ubuntu.com>
+
+ * configure.ac: Detect xulrunner-1.9.
+ * configure: Regenerate.
+
2009-02-03 Jakub Jelinek <jakub@redhat.com>
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
diff --git a/libjava/classpath/configure b/libjava/classpath/configure
index 8f520cdcf53..466fa46bdba 100755
--- a/libjava/classpath/configure
+++ b/libjava/classpath/configure
@@ -6202,7 +6202,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -8360,7 +8360,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -8921,7 +8921,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -10485,7 +10485,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -15068,7 +15068,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
inherit_rpath_CXX=yes
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -15896,7 +15896,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
esac
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -16816,7 +16816,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -23996,6 +23996,103 @@ fi
else
PKG_CONFIG_MIN_VERSION=0.9.0
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+ echo "$as_me:$LINENO: checking for mozilla-plugin libxul-unstable" >&5
+echo $ECHO_N "checking for mozilla-plugin libxul-unstable... $ECHO_C" >&6
+
+ if $PKG_CONFIG --exists "mozilla-plugin libxul-unstable" ; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ succeeded=yes
+
+ echo "$as_me:$LINENO: checking MOZILLA_CFLAGS" >&5
+echo $ECHO_N "checking MOZILLA_CFLAGS... $ECHO_C" >&6
+ MOZILLA_CFLAGS=`$PKG_CONFIG --cflags "mozilla-plugin libxul-unstable"`
+ echo "$as_me:$LINENO: result: $MOZILLA_CFLAGS" >&5
+echo "${ECHO_T}$MOZILLA_CFLAGS" >&6
+
+ echo "$as_me:$LINENO: checking MOZILLA_LIBS" >&5
+echo $ECHO_N "checking MOZILLA_LIBS... $ECHO_C" >&6
+ MOZILLA_LIBS=`$PKG_CONFIG --libs "mozilla-plugin libxul-unstable"`
+ echo "$as_me:$LINENO: result: $MOZILLA_LIBS" >&5
+echo "${ECHO_T}$MOZILLA_LIBS" >&6
+ else
+ MOZILLA_CFLAGS=""
+ MOZILLA_LIBS=""
+ ## If we have a custom action on failure, don't print errors, but
+ ## do set a variable so people can do so.
+ MOZILLA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "mozilla-plugin libxul-unstable"`
+
+ fi
+
+
+
+ else
+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig"
+ fi
+ fi
+
+ if test $succeeded = yes; then
+ MOZILLA_FOUND=yes
+ else
+ MOZILLA_FOUND=no
+ fi
+
+ if test "x${MOZILLA_FOUND}" = xno; then
+
+ succeeded=no
+
+ if test -z "$PKG_CONFIG"; then
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+ echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ fi
+
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** The pkg-config script could not be found. Make sure it is"
+ echo "*** in your path, or set the PKG_CONFIG environment variable"
+ echo "*** to the full path to pkg-config."
+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+ else
+ PKG_CONFIG_MIN_VERSION=0.9.0
+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
echo "$as_me:$LINENO: checking for mozilla-plugin" >&5
echo $ECHO_N "checking for mozilla-plugin... $ECHO_C" >&6
@@ -24038,6 +24135,7 @@ echo "${ECHO_T}$MOZILLA_LIBS" >&6
MOZILLA_FOUND=no
fi
+ fi
if test "x${MOZILLA_FOUND}" = xno; then
succeeded=no
@@ -29172,7 +29270,7 @@ EOF
if uudecode$EXEEXT Test.uue; then
ac_cv_prog_uudecode_base64=yes
else
- echo "configure: 29175: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
+ echo "configure: 29273: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
echo "configure: failed file was:" >&5
cat Test.uue >&5
ac_cv_prog_uudecode_base64=no
@@ -29319,7 +29417,7 @@ else
JAVA_TEST=Object.java
CLASS_TEST=Object.class
cat << \EOF > $JAVA_TEST
-/* #line 29322 "configure" */
+/* #line 29420 "configure" */
package java.lang;
public class Object
@@ -29368,7 +29466,7 @@ JAVA_TEST=Test.java
CLASS_TEST=Test.class
TEST=Test
cat << \EOF > $JAVA_TEST
-/* [#]line 29371 "configure" */
+/* [#]line 29469 "configure" */
public class Test {
public static void main (String args[]) {
System.exit (0);
@@ -29688,7 +29786,7 @@ else
JAVA_TEST=Object.java
CLASS_TEST=Object.class
cat << \EOF > $JAVA_TEST
-/* #line 29691 "configure" */
+/* #line 29789 "configure" */
package java.lang;
public class Object
@@ -29729,7 +29827,7 @@ fi
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
- /* #line 29732 "configure" */
+ /* #line 29830 "configure" */
public class Test
{
public static void main(String args)
diff --git a/libjava/classpath/configure.ac b/libjava/classpath/configure.ac
index faf3ab7ce36..53a56fa5e0f 100644
--- a/libjava/classpath/configure.ac
+++ b/libjava/classpath/configure.ac
@@ -771,7 +771,10 @@ if test "x${COMPILE_JNI}" = xyes; then
dnl Check for plugin support headers and libraries.
if test "x${COMPILE_PLUGIN}" = xyes; then
- PKG_CHECK_MODULES(MOZILLA, mozilla-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
+ PKG_CHECK_MODULES(MOZILLA, mozilla-plugin libxul-unstable, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
+ if test "x${MOZILLA_FOUND}" = xno; then
+ PKG_CHECK_MODULES(MOZILLA, mozilla-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
+ fi
if test "x${MOZILLA_FOUND}" = xno; then
PKG_CHECK_MODULES(MOZILLA, firefox-plugin firefox-xpcom, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
fi
diff --git a/libjava/configure b/libjava/configure
index 7d1baad8a05..5a7ed17943c 100755
--- a/libjava/configure
+++ b/libjava/configure
@@ -459,7 +459,7 @@ ac_includes_default="\
#endif"
ac_subdirs_all="$ac_subdirs_all classpath libltdl"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_libsubdir build_subdir host_subdir target_subdir multi_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs ANTLR_JAR CREATE_GJDOC_TRUE CREATE_GJDOC_FALSE JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJ_LD_SYMBOLIC_FUNCTIONS LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE X_AWT_TRUE X_AWT_FALSE GCJ_FOR_ECJX GCJH host_exeext INCLTDL LIBLTDL DIRLTDL LIBTOOL SED EGREP FGREP GREP DUMPBIN ac_ct_DUMPBIN NM OBJDUMP ac_ct_OBJDUMP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CPP CPPFLAGS CXXCPP GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE ECJ_BUILD_JAR ECJ_JAR BUILD_ECJ1_TRUE BUILD_ECJ1_FALSE INSTALL_ECJ_JAR_TRUE INSTALL_ECJ_JAR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME SUPPRESS_LIBGCJ_BC_TRUE SUPPRESS_LIBGCJ_BC_FALSE BUILD_LIBGCJ_REDUCED_REFLECTION_TRUE BUILD_LIBGCJ_REDUCED_REFLECTION_FALSE INTERPRETER INTERPRETER_TRUE INTERPRETER_FALSE LIBFFI LIBFFIINCS PLATFORM USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava extra_gij_ldflags extra_ldflags LIBSTDCXXSPEC LIBGCJTESTSPEC GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE ENABLE_SHARED_TRUE ENABLE_SHARED_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE INSTALL_BINARIES_TRUE INSTALL_BINARIES_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir GCJVERSION dbexecdir gcjsubdir gxx_include_dir libstdcxx_incdir PERL SYSDEP_SOURCES ANONVERSCRIPT_TRUE ANONVERSCRIPT_FALSE LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here python_mod_dir python_mod_dir_expanded MAKE INSTALL_AOT_RPM_TRUE INSTALL_AOT_RPM_FALSE CREATE_JAVA_HOME_TRUE CREATE_JAVA_HOME_FALSE gcc_suffix JAVA_VERSION BUILD_VERSION JVM_ROOT_DIR JVM_JAR_ROOT_DIR JVM_JAR_DIR JRE_DIR SDK_DIR JRE_LNK SDK_LNK SDK_BIN_DIR SDK_LIB_DIR SDK_INCLUDE_DIR JRE_BIN_DIR JRE_LIB_DIR GCJ_BIN_DIR CPU OS LIBDIR LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_libsubdir build_subdir host_subdir target_subdir multi_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs ANTLR_JAR CREATE_GJDOC_TRUE CREATE_GJDOC_FALSE JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJ_LD_SYMBOLIC_FUNCTIONS LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE X_AWT_TRUE X_AWT_FALSE GCJ_FOR_ECJX GCJH host_exeext INCLTDL LIBLTDL DIRLTDL LIBTOOL SED EGREP FGREP GREP DUMPBIN ac_ct_DUMPBIN NM OBJDUMP ac_ct_OBJDUMP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CPP CPPFLAGS CXXCPP GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE ECJ_BUILD_JAR ECJ_JAR BUILD_ECJ1_TRUE BUILD_ECJ1_FALSE INSTALL_ECJ_JAR_TRUE INSTALL_ECJ_JAR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME SUPPRESS_LIBGCJ_BC_TRUE SUPPRESS_LIBGCJ_BC_FALSE BUILD_LIBGCJ_REDUCED_REFLECTION_TRUE BUILD_LIBGCJ_REDUCED_REFLECTION_FALSE INTERPRETER INTERPRETER_TRUE INTERPRETER_FALSE LIBFFI LIBFFIINCS PLATFORM USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava extra_gij_ldflags extra_ldflags LIBSTDCXXSPEC LIBGCJTESTSPEC GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE ENABLE_SHARED_TRUE ENABLE_SHARED_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE INSTALL_BINARIES_TRUE INSTALL_BINARIES_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir GCJVERSION dbexecdir gcjsubdir gxx_include_dir libstdcxx_incdir PERL SYSDEP_SOURCES ANONVERSCRIPT_TRUE ANONVERSCRIPT_FALSE LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here python_mod_dir python_mod_dir_expanded MAKE INSTALL_AOT_RPM_TRUE INSTALL_AOT_RPM_FALSE CREATE_JAVA_HOME_TRUE CREATE_JAVA_HOME_FALSE gcc_suffix JAVA_VERSION BUILD_VERSION JVM_ROOT_DIR JVM_JAR_ROOT_DIR JVM_JAR_DIR JRE_DIR JRE_LNK SDK_LNK SDK_BIN_DIR SDK_LIB_DIR SDK_INCLUDE_DIR JRE_BIN_DIR JRE_LIB_DIR GCJ_BIN_DIR CPU OS LIBDIR LIBOBJS LTLIBOBJS'
ac_subst_files=''
ac_pwd=`pwd`
@@ -6452,7 +6452,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -9708,7 +9708,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -10269,7 +10269,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -11833,7 +11833,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -14011,7 +14011,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
inherit_rpath_CXX=yes
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -14839,7 +14839,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
esac
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -15759,7 +15759,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -16761,7 +16761,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static_GCJ='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -17307,7 +17307,7 @@ _LT_EOF
archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -28198,8 +28198,7 @@ echo "${ECHO_T}JAR root installation directory: ${jvm_jar_dir}" >&6
echo "$as_me:$LINENO: result: Java version: ${JAVA_VERSION}" >&5
echo "${ECHO_T}Java version: ${JAVA_VERSION}" >&6
- jre_dir=java-${JAVA_VERSION}-${origin_name}-${JAVA_VERSION}.${BUILD_VERSION}${arch_suffix}/jre
- sdk_dir=java-${JAVA_VERSION}-${origin_name}-${JAVA_VERSION}.${BUILD_VERSION}${arch_suffix}
+ jre_dir=jre
jre_lnk=jre-${JAVA_VERSION}-${origin_name}
sdk_lnk=java-${JAVA_VERSION}-${origin_name}
@@ -28213,7 +28212,7 @@ echo "${ECHO_T}JVM ROOT directory: ${JVM_ROOT_DIR}" >&6
echo "$as_me:$LINENO: result: JVM JAR ROOT directory: ${JVM_JAR_ROOT_DIR}" >&5
echo "${ECHO_T}JVM JAR ROOT directory: ${JVM_JAR_ROOT_DIR}" >&6
- JVM_JAR_DIR=${jvm_jar_dir}/${sdk_dir}
+ JVM_JAR_DIR=${jvm_jar_dir}
echo "$as_me:$LINENO: result: JVM JAR directory: ${JVM_JAR_DIR}" >&5
echo "${ECHO_T}JVM JAR directory: ${JVM_JAR_DIR}" >&6
@@ -28221,26 +28220,23 @@ echo "${ECHO_T}JVM JAR directory: ${JVM_JAR_DIR}" >&6
JRE_DIR=${jre_dir}
- SDK_DIR=${sdk_dir}
-
-
JRE_LNK=${jre_lnk}
SDK_LNK=${sdk_lnk}
- SDK_BIN_DIR=${jvm_root_dir}/${sdk_dir}/bin
+ SDK_BIN_DIR=${jvm_root_dir}/bin
echo "$as_me:$LINENO: result: SDK tools directory: ${SDK_BIN_DIR}" >&5
echo "${ECHO_T}SDK tools directory: ${SDK_BIN_DIR}" >&6
- SDK_LIB_DIR=${jvm_root_dir}/${sdk_dir}/lib
+ SDK_LIB_DIR=${jvm_root_dir}/lib
echo "$as_me:$LINENO: result: SDK jar directory: ${SDK_LIB_DIR}" >&5
echo "${ECHO_T}SDK jar directory: ${SDK_LIB_DIR}" >&6
- SDK_INCLUDE_DIR=${jvm_root_dir}/${sdk_dir}/include
+ SDK_INCLUDE_DIR=${jvm_root_dir}/include
echo "$as_me:$LINENO: result: SDK include directory: ${SDK_INCLUDE_DIR}" >&5
echo "${ECHO_T}SDK include directory: ${SDK_INCLUDE_DIR}" >&6
@@ -28266,7 +28262,8 @@ echo "${ECHO_T}JRE lib directory: ${JRE_LIB_DIR}" >&6
echo "$as_me:$LINENO: result: GCJ tools directory: ${GCJ_BIN_DIR}" >&5
echo "${ECHO_T}GCJ tools directory: ${GCJ_BIN_DIR}" >&6
- echo host is ${host}
+ echo "$as_me:$LINENO: result: host is ${host}" >&5
+echo "${ECHO_T}host is ${host}" >&6
if test "x${host_cpu}" = "x"
then
case ${host} in
@@ -28274,6 +28271,8 @@ echo "${ECHO_T}GCJ tools directory: ${GCJ_BIN_DIR}" >&6
host_cpu=x86;;
i486-* | i586-* | i686-*)
host_cpu=i386;;
+ x86_64-*)
+ host_cpu=amd64;;
*)
host_cpu=${host_cpu};;
esac
@@ -29925,7 +29924,6 @@ s,@JVM_ROOT_DIR@,$JVM_ROOT_DIR,;t t
s,@JVM_JAR_ROOT_DIR@,$JVM_JAR_ROOT_DIR,;t t
s,@JVM_JAR_DIR@,$JVM_JAR_DIR,;t t
s,@JRE_DIR@,$JRE_DIR,;t t
-s,@SDK_DIR@,$SDK_DIR,;t t
s,@JRE_LNK@,$JRE_LNK,;t t
s,@SDK_LNK@,$SDK_LNK,;t t
s,@SDK_BIN_DIR@,$SDK_BIN_DIR,;t t
diff --git a/libjava/configure.ac b/libjava/configure.ac
index 5d9fd1e849d..2a6b78276fa 100644
--- a/libjava/configure.ac
+++ b/libjava/configure.ac
@@ -1809,8 +1809,7 @@ then
AC_SUBST(BUILD_VERSION)
AC_MSG_RESULT(Java version: ${JAVA_VERSION})
- jre_dir=java-${JAVA_VERSION}-${origin_name}-${JAVA_VERSION}.${BUILD_VERSION}${arch_suffix}/jre
- sdk_dir=java-${JAVA_VERSION}-${origin_name}-${JAVA_VERSION}.${BUILD_VERSION}${arch_suffix}
+ jre_dir=jre
jre_lnk=jre-${JAVA_VERSION}-${origin_name}
sdk_lnk=java-${JAVA_VERSION}-${origin_name}
@@ -1822,31 +1821,28 @@ then
AC_SUBST(JVM_JAR_ROOT_DIR)
AC_MSG_RESULT(JVM JAR ROOT directory: ${JVM_JAR_ROOT_DIR})
- JVM_JAR_DIR=${jvm_jar_dir}/${sdk_dir}
+ JVM_JAR_DIR=${jvm_jar_dir}
AC_SUBST(JVM_JAR_DIR)
AC_MSG_RESULT(JVM JAR directory: ${JVM_JAR_DIR})
JRE_DIR=${jre_dir}
AC_SUBST(JRE_DIR)
- SDK_DIR=${sdk_dir}
- AC_SUBST(SDK_DIR)
-
JRE_LNK=${jre_lnk}
AC_SUBST(JRE_LNK)
SDK_LNK=${sdk_lnk}
AC_SUBST(SDK_LNK)
- SDK_BIN_DIR=${jvm_root_dir}/${sdk_dir}/bin
+ SDK_BIN_DIR=${jvm_root_dir}/bin
AC_SUBST(SDK_BIN_DIR)
AC_MSG_RESULT(SDK tools directory: ${SDK_BIN_DIR})
- SDK_LIB_DIR=${jvm_root_dir}/${sdk_dir}/lib
+ SDK_LIB_DIR=${jvm_root_dir}/lib
AC_SUBST(SDK_LIB_DIR)
AC_MSG_RESULT(SDK jar directory: ${SDK_LIB_DIR})
- SDK_INCLUDE_DIR=${jvm_root_dir}/${sdk_dir}/include
+ SDK_INCLUDE_DIR=${jvm_root_dir}/include
AC_SUBST(SDK_INCLUDE_DIR)
AC_MSG_RESULT(SDK include directory: ${SDK_INCLUDE_DIR})
@@ -1868,7 +1864,7 @@ then
AC_SUBST(GCJ_BIN_DIR)
AC_MSG_RESULT(GCJ tools directory: ${GCJ_BIN_DIR})
- echo host is ${host}
+ AC_MSG_RESULT(host is ${host})
if test "x${host_cpu}" = "x"
then
case ${host} in
@@ -1876,6 +1872,8 @@ then
host_cpu=x86;;
i486-* | i586-* | i686-*)
host_cpu=i386;;
+ x86_64-*)
+ host_cpu=amd64;;
*)
host_cpu=${host_cpu};;
esac
diff --git a/libjava/gcj/Makefile.in b/libjava/gcj/Makefile.in
index e31f3f1d6e3..220f9b056c9 100644
--- a/libjava/gcj/Makefile.in
+++ b/libjava/gcj/Makefile.in
@@ -241,7 +241,6 @@ PKG_CONFIG = @PKG_CONFIG@
PLATFORM = @PLATFORM@
RANLIB = @RANLIB@
SDK_BIN_DIR = @SDK_BIN_DIR@
-SDK_DIR = @SDK_DIR@
SDK_INCLUDE_DIR = @SDK_INCLUDE_DIR@
SDK_LIB_DIR = @SDK_LIB_DIR@
SDK_LNK = @SDK_LNK@
diff --git a/libjava/include/Makefile.in b/libjava/include/Makefile.in
index 1b94fcfc571..e262cdab997 100644
--- a/libjava/include/Makefile.in
+++ b/libjava/include/Makefile.in
@@ -240,7 +240,6 @@ PKG_CONFIG = @PKG_CONFIG@
PLATFORM = @PLATFORM@
RANLIB = @RANLIB@
SDK_BIN_DIR = @SDK_BIN_DIR@
-SDK_DIR = @SDK_DIR@
SDK_INCLUDE_DIR = @SDK_INCLUDE_DIR@
SDK_LIB_DIR = @SDK_LIB_DIR@
SDK_LNK = @SDK_LNK@
diff --git a/libjava/java/lang/natClassLoader.cc b/libjava/java/lang/natClassLoader.cc
index fac1e4dede0..237e038d1e7 100644
--- a/libjava/java/lang/natClassLoader.cc
+++ b/libjava/java/lang/natClassLoader.cc
@@ -380,6 +380,15 @@ _Jv_RegisterClassHookDefault (jclass klass)
if (! klass->engine)
klass->engine = &_Jv_soleCompiledEngine;
+ /* FIXME: Way back before the dawn of time, we overloaded the
+ SYNTHETIC class access modifier to mean INTERPRETED. This was a
+ Bad Thing, but it didn't matter then because classes were never
+ marked synthetic. However, it is possible to redeem the
+ situation: _Jv_RegisterClassHookDefault is only called from
+ compiled classes, so we clear the INTERPRETED flag. This is a
+ kludge! */
+ klass->accflags &= ~java::lang::reflect::Modifier::INTERPRETED;
+
if (system_class_list != SYSTEM_LOADER_INITIALIZED)
{
unsigned long abi = (unsigned long) klass->next_or_version;
diff --git a/libjava/link.cc b/libjava/link.cc
index c07b6e15c1c..25114085bfc 100644
--- a/libjava/link.cc
+++ b/libjava/link.cc
@@ -248,7 +248,7 @@ _Jv_Linker::find_field (jclass klass, jclass owner,
// Note that the field returned by find_field_helper is always
// resolved. However, we still use the constraint mechanism
// because this may affect other lookups.
- _Jv_CheckOrCreateLoadingConstraint (klass, (*found_class)->loader);
+ _Jv_CheckOrCreateLoadingConstraint (field_type, (*found_class)->loader);
}
else
{
diff --git a/libjava/testsuite/Makefile.in b/libjava/testsuite/Makefile.in
index 4c3e86c03e1..22a726e5de7 100644
--- a/libjava/testsuite/Makefile.in
+++ b/libjava/testsuite/Makefile.in
@@ -229,7 +229,6 @@ PKG_CONFIG = @PKG_CONFIG@
PLATFORM = @PLATFORM@
RANLIB = @RANLIB@
SDK_BIN_DIR = @SDK_BIN_DIR@
-SDK_DIR = @SDK_DIR@
SDK_INCLUDE_DIR = @SDK_INCLUDE_DIR@
SDK_LIB_DIR = @SDK_LIB_DIR@
SDK_LNK = @SDK_LNK@
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog
index d291462db3c..1afd85642c6 100644
--- a/libmudflap/ChangeLog
+++ b/libmudflap/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
2009-02-03 Jakub Jelinek <jakub@redhat.com>
* mf-runtime.c (__mf_usage): Update copyright notice dates.
diff --git a/libmudflap/configure b/libmudflap/configure
index 758ac8f0a30..ae1be92e207 100755
--- a/libmudflap/configure
+++ b/libmudflap/configure
@@ -6225,7 +6225,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -8401,7 +8401,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -8962,7 +8962,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -10511,7 +10511,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index 3187a4945f0..1dc81be7a84 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,3 +1,18 @@
+2009-03-12 Richard Frith-Macdonald <rfm@gnu.org>
+ David Ayers <ayers@fsfe.org>
+
+ PR libobjc/27466
+ * objc/objc-api.h (_objc_unexpected_exception): Declare
+ new hook. Update copyright dates.
+ * exception.c (objc_exception_throw): Use hook. Update
+ copyright dates.
+ * libobjc.def (_objc_unexpected_exception): Export hook.
+ Update copyright dates.
+
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
2008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/libobjc/configure b/libobjc/configure
index ee538a5b48f..5f75083bd74 100755
--- a/libobjc/configure
+++ b/libobjc/configure
@@ -4309,7 +4309,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -6971,7 +6971,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -7532,7 +7532,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -9096,7 +9096,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
diff --git a/libobjc/exception.c b/libobjc/exception.c
index bc59aa743cb..5af63103762 100644
--- a/libobjc/exception.c
+++ b/libobjc/exception.c
@@ -1,5 +1,5 @@
/* The implementation of exception handling primitives for Objective-C.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -86,6 +86,11 @@ struct lsda_header_info
unsigned char call_site_encoding;
};
+/* This hook allows libraries to sepecify special actions when an
+ exception is thrown without a handler in place.
+ */
+void (*_objc_unexpected_exception) (id exception); /* !T:SAFE */
+
static const unsigned char *
parse_lsda_header (struct _Unwind_Context *context, const unsigned char *p,
struct lsda_header_info *info)
@@ -486,5 +491,9 @@ objc_exception_throw (id value)
#endif
/* Some sort of unwinding error. */
+ if (_objc_unexpected_exception != 0)
+ {
+ (*_objc_unexpected_exception) (value);
+ }
abort ();
}
diff --git a/libobjc/libobjc.def b/libobjc/libobjc.def
index a80fb615589..9aca6d8f77c 100644
--- a/libobjc/libobjc.def
+++ b/libobjc/libobjc.def
@@ -1,5 +1,5 @@
; GNU Objective C Runtime DLL Export Definitions
-; Copyright (C) 1997 Free Software Foundation, Inc.
+; Copyright (C) 1997, 2001, 2003, 2005, 2009 Free Software Foundation, Inc.
; Contributed by Scott Christley <scottc@net-community.com>
;
; This file is part of GCC.
@@ -38,6 +38,7 @@ objc_mutex_deallocate
objc_mutex_lock
objc_mutex_trylock
objc_mutex_unlock
+_objc_unexpected_exception
objc_thread_detach
objc_thread_exit
objc_thread_get_data
diff --git a/libobjc/objc/objc-api.h b/libobjc/objc/objc-api.h
index 8100c6cfa27..02a8c7afa3d 100644
--- a/libobjc/objc/objc-api.h
+++ b/libobjc/objc/objc-api.h
@@ -1,5 +1,6 @@
/* GNU Objective-C Runtime API.
- Copyright (C) 1993, 1995, 1996, 1997, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 1996, 1997, 2001, 2002, 2003, 2004, 2005,
+ 2007, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -430,6 +431,15 @@ objc_EXPORT void (*_objc_free)(void *);
objc_EXPORT IMP (*__objc_msg_forward)(SEL);
objc_EXPORT IMP (*__objc_msg_forward2)(id, SEL);
+/*
+** Hook for uncaught exceptions. This hook is called when an exception
+** is thrown and no valid exception handler is in place. The function
+** is expected never to return. If the function returns the result is
+** currently undefined.
+*/
+objc_EXPORT void (*_objc_unexpected_exception)(id);
+
+
Method_t class_get_class_method(MetaClass _class, SEL aSel);
Method_t class_get_instance_method(Class _class, SEL aSel);
diff --git a/libssp/ChangeLog b/libssp/ChangeLog
index 241f9e88065..92fa4d32fe8 100644
--- a/libssp/ChangeLog
+++ b/libssp/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
2009-02-02 Danny Smith <dannysmith@users.sourcforge.net>
* ssp.c (_PATH_TTY): Define as "CONOUT$" for _WIN32.
diff --git a/libssp/configure b/libssp/configure
index 01089b7d011..ee2a41fd495 100755
--- a/libssp/configure
+++ b/libssp/configure
@@ -5199,7 +5199,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -7387,7 +7387,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -7948,7 +7948,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -9512,7 +9512,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index dbdcaf6f2ba..0c51edb7aaf 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,167 @@
+2009-03-27 Ian Lance Taylor <iant@google.com>
+
+ * include/backward/hashtable.h (_S_num_primes): Change to 29.
+ (__stl_prime_list): Add 5 at the start of the list.
+
+2009-03-25 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ * include/std/fstream (basic_filebuf<>::open(const std::string&,
+ ios_base::openmode), basic_ifstream<>::basic_ifstream(const
+ std::string&, ios_base::openmode), basic_ifstream<>::
+ open(const std::string&, ios_base::openmode), basic_ofstream<>::
+ basic_ofstream(const std::string&, ios_base::openmode),
+ basic_ofstream<>::open(const std::string&, ios_base::openmode),
+ basic_fstream<>::basic_fstream(const std::string&, ios_base::openmode),
+ basic_fstream<>::open(const std::string&, ios_base::openmode)):
+ Add in C++0x mode.
+ * testsuite/27_io/basic_ofstream/open/char/2.cc: New.
+ * testsuite/27_io/basic_ofstream/cons/char/2.cc: Likewise.
+ * testsuite/27_io/basic_fstream/open/char/1.cc: Likewise.
+ * testsuite/27_io/basic_fstream/cons/char/1.cc: Likewise.
+ * testsuite/27_io/basic_ifstream/open/char/2.cc: Likewise.
+ * testsuite/27_io/basic_ifstream/cons/char/2.cc: Likewise.
+ * testsuite/27_io/basic_filebuf/open/char/5.cc: Likewise.
+
+2009-03-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * testsuite/27_io/basic_ofstream/cons/char/2.cc: Rename to...
+ * testsuite/27_io/basic_ofstream/cons/char/1.cc: ... this.
+ * testsuite/27_io/basic_fstream/cons/3.cc: Rename to...
+ * testsuite/27_io/basic_fstream/cons/1.cc: ... this.
+
+2009-03-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/bits/forward_list.h (_Fwd_list_node_base<>::
+ _M_transfer_after, _M_reverse_after): Move out of line...
+ * include/bits/forward_list.tcc: ... here.
+ (forward_list<>::reverse): Move inline...
+ * include/bits/forward_list.h: ... here; minor cosmetic changes.
+
+2009-03-22 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/
+ 28277.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc:
+ Likewise.
+ * testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc:
+ Likewise.
+
+2009-03-22 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/25_algorithms/search_n/iterator.cc: Update copyright
+ year(s).
+ * testsuite/25_algorithms/heap/moveable.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc:
+ Likewise.
+ * testsuite/ext/vstring/inserters_extractors/char/28277.cc: Likewise.
+
+2009-03-22 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/25_algorithms/search_n/iterator.cc: Condition
+ iterations for simulators.
+ * testsuite/25_algorithms/heap/moveable.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
+ Condition stream width for simulators.
+ * testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc:
+ Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc:
+ Likewise.
+ * testsuite/ext/vstring/inserters_extractors/char/28277.cc: Likewise.
+
+2009-03-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * doc/xml/manual/appendix_contributing.xml: Add docbook style
+ sheet version information. Table-ize docbook element examples.
+ * doc/xml/manual/using.xml: Human-readable header
+ markup. Alphabetized. Add new headers.
+ * doc/html: Regenerate.
+
+2009-03-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * doc/xml/faq.xml: Fix link to setup documentation.
+
+2009-03-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/std/type_traits (__add_lvalue_reference_helper,
+ __add_rvalue_reference_helper): As an optimization, rewrite
+ condition (avoid is_function).
+
+2009-03-13 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/39405
+ * testsuite/20_util/shared_ptr/cons/39405.cc: New.
+ * testsuite/tr1/2_general_utilities/shared_ptr/cons/39405.cc: Likewise.
+
+2009-03-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/30_threads/condition_variable_any/native_handle/
+ typesizes.cc: Include tweaks.
+ * testsuite/30_threads/mutex/native_handle/typesizes.cc: Same.
+ * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Same.
+ * testsuite/30_threads/thread/native_handle/typesizes.cc: Same.
+ * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc: Same.
+ * testsuite/30_threads/condition_variable/native_handle/
+ typesizes.cc: Same.
+
+2009-03-11 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/bits/shared_ptr.h: Add include guards.
+ * include/tr1/shared_ptr.h: Likewise.
+
+2009-03-11 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/std/iostream: Fix doxygen link.
+ * include/bits/forward_list.h: Fix doxygen markup.
+ * include/ext/vstring.h: Escape backslash in doxygen comment.
+ * include/bits/basic_string.h: Likewise.
+
+2009-03-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * doc/xml/faq.xml: Fix links to implementation status pages.
+
+2009-03-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/std/complex (operator+(const complex<>&, const _Tp&),
+ operator+(const _Tp&, const complex<>&),
+ operator-(const complex<>&, const _Tp&),
+ operator-(const _Tp&, const complex<>&)): Do not assume real()
+ returns a reference (against DR 387).
+ * testsuite/26_numerics/complex/dr387_2.cc: New.
+
+2009-03-02 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/thread/pthread4.cc: Move...
+ * testsuite/21_strings/basic_string/pthread4.cc: ...here.
+ * testsuite/thread/pthread5.cc: Move...
+ * testsuite/23_containers/list/pthread5.cc: ...here.
+ * testsuite/thread/pthread6.cc: Move...
+ * testsuite/23_containers/map/pthread6.cc: ...here.
+ * testsuite/thread/pthread7-rope.cc: Move...
+ * testsuite/ext/rope/pthread7-rope.cc: ...here.
+ * testsuite/thread/guard.cc: Move...
+ * testsuite/18_support/pthread_guard.cc: ...here.
+ * testsuite/thread/18185.cc: Move...
+ * testsuite/21_strings/basic_string/pthread18185.cc: ...here.
+ * testsuite/thread/pthread1.cc: Move...
+ * testsuite/23_containers/list/pthread1.cc: ...here.
+ * testsuite/thread/pthread2.cc: Move...
+ * testsuite/27_io/basic_ofstream/pthread2.cc: ...here.
+ * testsuite/thread/pthread3.cc: Move...
+ * testsuite/27_io/basic_ostringstream/pthread3.cc: ...here.
+
+ * testsuite/libstdc++-dg/conformance.exp: Remove thread directory.
+ * testsuite/thread: Remove.
+
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
2009-02-23 Adam Nemet <anemet@caviumnetworks.com>
* testsuite/libstdc++-abi/abi.exp: Add multilib support.
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 3dd646931c8..31678ebf212 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -5027,7 +5027,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -8045,7 +8045,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -8606,7 +8606,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -10170,7 +10170,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -12348,7 +12348,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
inherit_rpath_CXX=yes
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -13176,7 +13176,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
;;
esac
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -14096,7 +14096,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
diff --git a/libstdc++-v3/doc/html/api.html b/libstdc++-v3/doc/html/api.html
index 40d89bd960c..7616cff953c 100644
--- a/libstdc++-v3/doc/html/api.html
+++ b/libstdc++-v3/doc/html/api.html
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>API and Source Level Documentation</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk02.html" title="" /><link rel="prev" href="bk02.html" title="" /><link rel="next" href="bk03.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">API and Source Level Documentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk02.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="bk03.html">Next</a></td></tr></table><hr /></div><div class="article" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="api"></a>API and Source Level Documentation</h2></div><div><p class="copyright">Copyright ©
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>API and Source Level Documentation</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><link rel="home" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk02.html" title="" /><link rel="prev" href="bk02.html" title="" /><link rel="next" href="bk03.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">API and Source Level Documentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk02.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="bk03.html">Next</a></td></tr></table><hr /></div><div class="article" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="api"></a>API and Source Level Documentation</h2></div><div><p class="copyright">Copyright ©
2008
<a class="ulink" href="http://www.fsf.org/" target="_top">FSF
</a>
- </p></div><div><div class="legalnotice"><a id="id379601"></a><p>
+ </p></div><div><div class="legalnotice"><a id="id553756"></a><p>
<a class="ulink" href="17_intro/license.html" target="_top">License
</a>
</p></div></div></div><hr /></div><p>
diff --git a/libstdc++-v3/doc/html/bk02.html b/libstdc++-v3/doc/html/bk02.html
index a93a9ece9fa..e765d9eaee0 100644
--- a/libstdc++-v3/doc/html/bk02.html
+++ b/libstdc++-v3/doc/html/bk02.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="prev" href="manual/backwards.html" title="Backwards Compatibility" /><link rel="next" href="api.html" title="API and Source Level Documentation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="manual/backwards.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr /></div><div class="book" lang="en" xml:lang="en"><div class="titlepage"><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="article"><a href="api.html">API and Source Level Documentation</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="manual/backwards.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Backwards Compatibility </td><td width="20%" align="center"><a accesskey="h" href="spine.html">Home</a></td><td width="40%" align="right" valign="top"> API and Source Level Documentation</td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><link rel="home" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="prev" href="manual/backwards.html" title="Backwards Compatibility" /><link rel="next" href="api.html" title="API and Source Level Documentation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="manual/backwards.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr /></div><div class="book" lang="en" xml:lang="en"><div class="titlepage"><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="article"><a href="api.html">API and Source Level Documentation</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="manual/backwards.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Backwards Compatibility </td><td width="20%" align="center"><a accesskey="h" href="spine.html">Home</a></td><td width="40%" align="right" valign="top"> API and Source Level Documentation</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/bk03.html b/libstdc++-v3/doc/html/bk03.html
index 49c532b5515..1d08fc98ede 100644
--- a/libstdc++-v3/doc/html/bk03.html
+++ b/libstdc++-v3/doc/html/bk03.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="prev" href="api.html" title="API and Source Level Documentation" /><link rel="next" href="faq.html" title="Frequently Asked Questions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="faq.html">Next</a></td></tr></table><hr /></div><div class="book" lang="en" xml:lang="en"><div class="titlepage"><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="faq.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">API and Source Level Documentation </td><td width="20%" align="center"><a accesskey="h" href="spine.html">Home</a></td><td width="40%" align="right" valign="top"> Frequently Asked Questions</td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><link rel="home" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="prev" href="api.html" title="API and Source Level Documentation" /><link rel="next" href="faq.html" title="Frequently Asked Questions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="faq.html">Next</a></td></tr></table><hr /></div><div class="book" lang="en" xml:lang="en"><div class="titlepage"><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="faq.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">API and Source Level Documentation </td><td width="20%" align="center"><a accesskey="h" href="spine.html">Home</a></td><td width="40%" align="right" valign="top"> Frequently Asked Questions</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/faq.html b/libstdc++-v3/doc/html/faq.html
index b4c548309fb..64674007a6c 100644
--- a/libstdc++-v3/doc/html/faq.html
+++ b/libstdc++-v3/doc/html/faq.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Frequently Asked Questions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk03.html" title="" /><link rel="prev" href="bk03.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Frequently Asked Questions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk03.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> </td></tr></table><hr /></div><div class="article" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="faq"></a>Frequently Asked Questions</h2></div><div><p class="copyright">Copyright ©
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Frequently Asked Questions</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><link rel="home" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk03.html" title="" /><link rel="prev" href="bk03.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Frequently Asked Questions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk03.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> </td></tr></table><hr /></div><div class="article" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="faq"></a>Frequently Asked Questions</h2></div><div><p class="copyright">Copyright ©
2008
<a class="ulink" href="http://fsf.org" target="_top">FSF</a>
@@ -243,7 +243,7 @@
the source: please consult your vendor for details.
</p><p>
To build and install from the GNU GCC sources, please consult the
- <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/install.html" target="_top">install
+ <a class="link" href="manual/bk01pt01ch02.html" title="Chapter 2. Setup">setup
documentation</a> for detailed
instructions. You may wish to browse those files ahead
of time to get a feel for what's required.
@@ -506,8 +506,9 @@
long</span> specializations, and details of thread support.
</p><p>
Long answer: See the implementation status pages for
- <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/c++1998_status.html" target="_top">C++98</a>,
- <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/tr1_status.html" target="_top">TR1</a>, and <a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/c++0x_status.html" target="_top">C++0x</a>.
+ <a class="link" href="manual/bk01pt01ch01.html#manual.intro.status.standard.1998" title="C++ 1998">C++98</a>,
+ <a class="link" href="manual/bk01pt01ch01.html#manual.intro.status.standard.tr1" title="C++ TR1">TR1</a>, and
+ <a class="link" href="manual/bk01pt01ch01.html#manual.intro.status.standard.200x" title="C++ 200x">C++0x</a>.
</p></td></tr><tr class="question"><td align="left" valign="top"><a id="faq.standard_bugs"></a><a id="q-standard_bugs"></a><p><b>5.2.</b></p></td><td align="left" valign="top"><p>
Bugs in the ISO C++ language or library specification
</p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-standard_bugs"></a></td><td align="left" valign="top"><p>
diff --git a/libstdc++-v3/doc/html/manual/abi.html b/libstdc++-v3/doc/html/manual/abi.html
index 379397e6ea0..b924bed5d68 100644
--- a/libstdc++-v3/doc/html/manual/abi.html
+++ b/libstdc++-v3/doc/html/manual/abi.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ABI Policy and Guidelines</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; ABI&#10; , &#10; version&#10; , &#10; dynamic&#10; , &#10; shared&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="prev" href="internals.html" title="Porting to New Hardware or Operating Systems" /><link rel="next" href="api.html" title="API Evolution and Deprecation History" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ABI Policy and Guidelines</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><th width="60%" align="center">Appendix B. Porting and Maintenance</th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.abi"></a>ABI Policy and Guidelines</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ABI Policy and Guidelines</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; C++&#10; , &#10; ABI&#10; , &#10; version&#10; , &#10; dynamic&#10; , &#10; shared&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="prev" href="internals.html" title="Porting to New Hardware or Operating Systems" /><link rel="next" href="api.html" title="API Evolution and Deprecation History" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ABI Policy and Guidelines</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><th width="60%" align="center">Appendix B. Porting and Maintenance</th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.abi"></a>ABI Policy and Guidelines</h2></div></div></div><p>
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="abi.cxx_interface"></a>The C++ Interface</h3></div></div></div><p>
C++ applications often dependent on specific language support
routines, say for throwing exceptions, or catching exceptions, and
@@ -461,54 +461,54 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.
<a class="ulink" href="http://gcc.gnu.org/PR24660" target="_top">24660: versioning weak symbols in libstdc++</a>
</p><p>
<a class="ulink" href="http://gcc.gnu.org/PR19664" target="_top">19664: libstdc++ headers should have pop/push of the visibility around the declarations</a>
-</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id408983"></a><p><span class="title"><i>
+</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id571553"></a><p><span class="title"><i>
ABIcheck, a vague idea of checking ABI compatibility
</i>. </span><span class="biblioid">
<a class="ulink" href="http://abicheck.sourceforge.net/" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id409000"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id571570"></a><p><span class="title"><i>
C++ ABI Reference
</i>. </span><span class="biblioid">
<a class="ulink" href="http://www.codesourcery.com/cxx-abi" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id409018"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id571588"></a><p><span class="title"><i>
Intel® Compilers for Linux* -Compatibility with the GNU Compilers
</i>. </span><span class="biblioid">
<a class="ulink" href="http://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id374004"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id571606"></a><p><span class="title"><i>
Intel® Compilers for Linux* -Compatibility with the GNU Compilers
</i>. </span><span class="biblioid">
<a class="ulink" href="http://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id374022"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id571623"></a><p><span class="title"><i>
Sun Solaris 2.9 : Linker and Libraries Guide (document 816-1386)
</i>. </span><span class="biblioid">
<a class="ulink" href="http://docs.sun.com/?p=/doc/816-1386&amp;a=load" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id374039"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id571640"></a><p><span class="title"><i>
Sun Solaris 2.9 : C++ Migration Guide (document 816-2459)
</i>. </span><span class="biblioid">
<a class="ulink" href="http://docs.sun.com/db/prod/solaris.9" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id374056"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id571658"></a><p><span class="title"><i>
ELF Symbol Versioning
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="biblioid">
<a class="ulink" href="http://people.redhat.com/drepper/symbol-versioning" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id374085"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id571686"></a><p><span class="title"><i>
C++ ABI for the ARM Architecture
</i>. </span><span class="biblioid">
<a class="ulink" href="http://www.arm.com/miscPDFs/8033.pdf" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id374102"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id571703"></a><p><span class="title"><i>
Dynamic Shared Objects: Survey and Issues
</i>. </span><span class="subtitle">
ISO C++ J16/06-0046
. </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span><span class="biblioid">
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1976.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id374134"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id571735"></a><p><span class="title"><i>
Versioning With Namespaces
</i>. </span><span class="subtitle">
ISO C++ J16/06-0083
diff --git a/libstdc++-v3/doc/html/manual/algorithms.html b/libstdc++-v3/doc/html/manual/algorithms.html
index b490fe49ecd..07f9a45b7bb 100644
--- a/libstdc++-v3/doc/html/manual/algorithms.html
+++ b/libstdc++-v3/doc/html/manual/algorithms.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part IX. Algorithms</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; algorithm&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt08ch19s02.html" title="One Past the End" /><link rel="next" href="bk01pt09pr02.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part IX. Algorithms</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt08ch19s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09pr02.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.algorithms"></a>Part IX. Algorithms</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="bk01pt09pr02.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt09ch20.html">20. Mutating</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt09ch20.html#algorithms.mutating.swap"><code class="function">swap</code></a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt08ch19s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt09pr02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">One Past the End </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part IX. Algorithms</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; algorithm&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt08ch19s02.html" title="One Past the End" /><link rel="next" href="bk01pt09pr02.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part IX. Algorithms</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt08ch19s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09pr02.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.algorithms"></a>Part IX. Algorithms</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="bk01pt09pr02.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt09ch20.html">20. Mutating</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt09ch20.html#algorithms.mutating.swap">swap</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt08ch19s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt09pr02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">One Past the End </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html
index eab1a12c398..b475cadcfb3 100644
--- a/libstdc++-v3/doc/html/manual/api.html
+++ b/libstdc++-v3/doc/html/manual/api.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>API Evolution and Deprecation History</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="ISO C++, api, evolution, deprecation, history" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="prev" href="abi.html" title="ABI Policy and Guidelines" /><link rel="next" href="backwards.html" title="Backwards Compatibility" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">API Evolution and Deprecation History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="abi.html">Prev</a> </td><th width="60%" align="center">Appendix B. Porting and Maintenance</th><td width="20%" align="right"> <a accesskey="n" href="backwards.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.api"></a>API Evolution and Deprecation History</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>API Evolution and Deprecation History</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="ISO C++, api, evolution, deprecation, history" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="prev" href="abi.html" title="ABI Policy and Guidelines" /><link rel="next" href="backwards.html" title="Backwards Compatibility" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">API Evolution and Deprecation History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="abi.html">Prev</a> </td><th width="60%" align="center">Appendix B. Porting and Maintenance</th><td width="20%" align="right"> <a accesskey="n" href="backwards.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.api"></a>API Evolution and Deprecation History</h2></div></div></div><p>
A list of user-visible changes, in chronological order
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_300"></a><code class="constant">3.0</code></h3></div></div></div><p>
Extensions moved to <code class="filename">include/ext</code>.
@@ -72,11 +72,11 @@ _Alloc_traits</code> have been removed.
<span class="type">__alloc</span> to select an underlying allocator that
satisfied memory allocation requests. The selection of this
underlying allocator was not user-configurable.
- </p><div class="table"><a id="id395095"></a><p class="title"><b>Table B.1. Extension Allocators</b></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator (3.4)</th><th align="left">Header (3.4)</th><th align="left">Allocator (3.[0-3])</th><th align="left">Header (3.[0-3])</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::new_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="classname">std::__new_alloc</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::malloc_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="classname">std::__malloc_alloc_template&lt;int&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="classname">std::debug_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="classname">std::__default_alloc_template&lt;bool,int&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><code class="classname">__gnu_cxx::bitmap_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> Releases after gcc-3.4 have continued to add to the collection
+ </p><div class="table"><a id="id549268"></a><p class="title"><b>Table B.1. Extension Allocators</b></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator (3.4)</th><th align="left">Header (3.4)</th><th align="left">Allocator (3.[0-3])</th><th align="left">Header (3.[0-3])</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::new_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="classname">std::__new_alloc</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::malloc_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="classname">std::__malloc_alloc_template&lt;int&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="classname">std::debug_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="classname">std::__default_alloc_template&lt;bool,int&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><code class="classname">__gnu_cxx::bitmap_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> Releases after gcc-3.4 have continued to add to the collection
of available allocators. All of these new allocators are
standard-style. The following table includes details, along with
the first released version of GCC that included the extension allocator.
- </p><div class="table"><a id="id487362"></a><p class="title"><b>Table B.2. Extension Allocators Continued</b></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator</th><th align="left">Include</th><th align="left">Version</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::array_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left">4.0.0</td></tr><tr><td align="left"><code class="classname">__gnu_cxx::throw_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left">4.2.0</td></tr></tbody></table></div></div><br class="table-break" /><p>
+ </p><div class="table"><a id="id502386"></a><p class="title"><b>Table B.2. Extension Allocators Continued</b></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Allocator</th><th align="left">Include</th><th align="left">Version</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::array_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left">4.0.0</td></tr><tr><td align="left"><code class="classname">__gnu_cxx::throw_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left">4.2.0</td></tr></tbody></table></div></div><br class="table-break" /><p>
Debug mode first appears.
</p><p>
Precompiled header support <acronym class="acronym">PCH</acronym> support.
diff --git a/libstdc++-v3/doc/html/manual/appendix_contributing.html b/libstdc++-v3/doc/html/manual/appendix_contributing.html
index 08032d04056..7268e9bec37 100644
--- a/libstdc++-v3/doc/html/manual/appendix_contributing.html
+++ b/libstdc++-v3/doc/html/manual/appendix_contributing.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix A. Contributing</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt12ch40s03.html" title="Use" /><link rel="next" href="bk01apas02.html" title="Directory Layout and Source Conventions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix A. Contributing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch40s03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01apas02.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.contrib"></a>Appendix A. Contributing</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas02.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="bk01apas03.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas03.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="sect2"><a href="bk01apas03.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas04.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas04.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="bk01apas04.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas05.html">Design Notes</a></span></dt></dl></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix A. Contributing</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt12ch40s03.html" title="Use" /><link rel="next" href="bk01apas02.html" title="Directory Layout and Source Conventions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix A. Contributing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch40s03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01apas02.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.contrib"></a>Appendix A. Contributing</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas02.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="bk01apas03.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas03.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="sect2"><a href="bk01apas03.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas04.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas04.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="bk01apas04.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas05.html">Design Notes</a></span></dt></dl></div><p>
The GNU C++ Library follows an open development model. Active
contributors are assigned maintainer-ship responsibility, and given
write access to the source repository. First time contributors
diff --git a/libstdc++-v3/doc/html/manual/appendix_free.html b/libstdc++-v3/doc/html/manual/appendix_free.html
index 5f86c98fd71..46a3c244c81 100644
--- a/libstdc++-v3/doc/html/manual/appendix_free.html
+++ b/libstdc++-v3/doc/html/manual/appendix_free.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix C. Free Software Needs Free Documentation</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="backwards.html" title="Backwards Compatibility" /><link rel="next" href="bk01apd.html" title="Appendix D. GNU General Public License" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix C. Free Software Needs Free Documentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="backwards.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01apd.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.free"></a>Appendix C. Free Software Needs Free Documentation</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix C. Free Software Needs Free Documentation</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="backwards.html" title="Backwards Compatibility" /><link rel="next" href="bk01apd.html" title="Appendix D. GNU General Public License" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix C. Free Software Needs Free Documentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="backwards.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01apd.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.free"></a>Appendix C. Free Software Needs Free Documentation</h2></div></div></div><p>
The biggest deficiency in free operating systems is not in the
software--it is the lack of good free manuals that we can include in
these systems. Many of our most important programs do not come with
diff --git a/libstdc++-v3/doc/html/manual/appendix_porting.html b/libstdc++-v3/doc/html/manual/appendix_porting.html
index 9cd2ebf224e..3a5fd11ed93 100644
--- a/libstdc++-v3/doc/html/manual/appendix_porting.html
+++ b/libstdc++-v3/doc/html/manual/appendix_porting.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix B. Porting and Maintenance</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01apas05.html" title="Design Notes" /><link rel="next" href="internals.html" title="Porting to New Hardware or Operating Systems" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix B. Porting and Maintenance</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apas05.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.porting"></a>Appendix B. Porting and Maintenance</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.enable"><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="sect1"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="sect2"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.testing">Testing</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="sect1"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="sect2"><a href="api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="sect2"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.build_hacking"></a>Configure and Build Hacking</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.prereq"></a>Prerequisites</h3></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix B. Porting and Maintenance</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01apas05.html" title="Design Notes" /><link rel="next" href="internals.html" title="Porting to New Hardware or Operating Systems" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix B. Porting and Maintenance</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apas05.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.porting"></a>Appendix B. Porting and Maintenance</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.enable">GLIBCXX_ENABLE, the --enable maker</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="sect1"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="sect2"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.testing">Testing</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="sect1"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="sect2"><a href="api.html#api.rel_300">3.0</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_310">3.1</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_320">3.2</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_330">3.3</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_340">3.4</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_400">4.0</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_410">4.1</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_420">4.2</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_430">4.3</a></span></dt></dl></dd><dt><span class="sect1"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="sect2"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.build_hacking"></a>Configure and Build Hacking</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.prereq"></a>Prerequisites</h3></div></div></div><p>
As noted <a class="ulink" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">previously</a>,
certain other tools are necessary for hacking on files that
control configure (<code class="code">configure.ac</code>,
diff --git a/libstdc++-v3/doc/html/manual/auto_ptr.html b/libstdc++-v3/doc/html/manual/auto_ptr.html
index 31e35af3fb2..372e9c4b471 100644
--- a/libstdc++-v3/doc/html/manual/auto_ptr.html
+++ b/libstdc++-v3/doc/html/manual/auto_ptr.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>auto_ptr</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; auto_ptr&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt04ch11.html" title="Chapter 11. Memory" /><link rel="prev" href="bk01pt04ch11.html" title="Chapter 11. Memory" /><link rel="next" href="shared_ptr.html" title="shared_ptr" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">auto_ptr</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt04ch11.html">Prev</a> </td><th width="60%" align="center">Chapter 11. Memory</th><td width="20%" align="right"> <a accesskey="n" href="shared_ptr.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.util.memory.auto_ptr"></a>auto_ptr</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="auto_ptr.limitations"></a>Limitations</h3></div></div></div><p>Explaining all of the fun and delicious things that can
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>auto_ptr</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; auto_ptr&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt04ch11.html" title="Chapter 11. Memory" /><link rel="prev" href="bk01pt04ch11.html" title="Chapter 11. Memory" /><link rel="next" href="shared_ptr.html" title="shared_ptr" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">auto_ptr</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt04ch11.html">Prev</a> </td><th width="60%" align="center">Chapter 11. Memory</th><td width="20%" align="right"> <a accesskey="n" href="shared_ptr.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.util.memory.auto_ptr"></a>auto_ptr</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="auto_ptr.limitations"></a>Limitations</h3></div></div></div><p>Explaining all of the fun and delicious things that can
happen with misuse of the <code class="classname">auto_ptr</code> class
template (called <acronym class="acronym">AP</acronym> here) would take some
time. Suffice it to say that the use of <acronym class="acronym">AP</acronym>
diff --git a/libstdc++-v3/doc/html/manual/backwards.html b/libstdc++-v3/doc/html/manual/backwards.html
index 40511603955..7c4996efe06 100644
--- a/libstdc++-v3/doc/html/manual/backwards.html
+++ b/libstdc++-v3/doc/html/manual/backwards.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Backwards Compatibility</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; backwards&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="prev" href="api.html" title="API Evolution and Deprecation History" /><link rel="next" href="appendix_free.html" title="Appendix C. Free Software Needs Free Documentation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Backwards Compatibility</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center">Appendix B. Porting and Maintenance</th><td width="20%" align="right"> <a accesskey="n" href="appendix_free.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.appendix.porting.backwards"></a>Backwards Compatibility</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.first"></a>First</h3></div></div></div><p>The first generation GNU C++ library was called libg++. It was a
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Backwards Compatibility</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; backwards&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="prev" href="api.html" title="API Evolution and Deprecation History" /><link rel="next" href="appendix_free.html" title="Appendix C. Free Software Needs Free Documentation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Backwards Compatibility</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center">Appendix B. Porting and Maintenance</th><td width="20%" align="right"> <a accesskey="n" href="appendix_free.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.appendix.porting.backwards"></a>Backwards Compatibility</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.first"></a>First</h3></div></div></div><p>The first generation GNU C++ library was called libg++. It was a
separate GNU project, although reliably paired with GCC. Rumors imply
that it had a working relationship with at least two kinds of
dinosaur.
@@ -14,8 +14,8 @@ ISO Standard (e.g., statistical analysis). While there are a lot of
really useful things that are used by a lot of people, the Standards
Committee couldn't include everything, and so a lot of those
“<span class="quote">obvious</span>†classes didn't get included.
-</p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id476508"></a>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id476540"></a>No <code class="code">cout</code> in <code class="code">ostream.h</code>, no <code class="code">cin</code> in <code class="code">istream.h</code></h4></div></div></div><p>
+</p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id486428"></a>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>.
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id486460"></a>No <code class="code">cout</code> in <code class="code">ostream.h</code>, no <code class="code">cin</code> in <code class="code">istream.h</code></h4></div></div></div><p>
In earlier versions of the standard,
<code class="filename">fstream.h</code>,
<code class="filename">ostream.h</code>
@@ -41,7 +41,7 @@ considered replaced and rewritten.
archived. The code is considered replaced and rewritten.
</p><p>
Portability notes and known implementation limitations are as follows.
-</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474567"></a>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p>
+</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id572029"></a>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p>
Some care is required to support C++ compiler and or library
implementation that do not have the standard library in
<code class="code">namespace std</code>.
@@ -105,7 +105,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [
AC_DEFINE(HAVE_NAMESPACE_STD,,[Define if g++ supports namespace std. ])
fi
])
-</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474690"></a>Illegal iterator usage</h4></div></div></div><p>
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id572152"></a>Illegal iterator usage</h4></div></div></div><p>
The following illustrate implementation-allowed illegal iterator
use, and then correct use.
</p><div class="itemizedlist"><ul type="disc"><li><p>
@@ -118,7 +118,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [
</p></li><li><p>
<code class="code">if (iterator)</code> won't work any more =&gt; use
<code class="code">if (iterator != iterator_type())</code>
- </p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474751"></a><code class="code">isspace</code> from <code class="filename">cctype</code> is a macro
+ </p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id572213"></a><code class="code">isspace</code> from <code class="filename">cctype</code> is a macro
</h4></div></div></div><p>
Glibc 2.0.x and 2.1.x define <code class="filename">ctype.h</code> functionality as macros
(isspace, isalpha etc.).
@@ -151,7 +151,7 @@ std:: (__ctype_b[(int) ( ( 'X' ) )] &amp; (unsigned short int) _ISspace ) ;
(<code class="filename">ctype.h</code>) and the
definitions in namespace <code class="code">std::</code>
(<code class="code">&lt;cctype&gt;</code>).
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474845"></a>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id572307"></a>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p>
One solution is to add an autoconf-test for this:
</p><pre class="programlisting">
AC_MSG_CHECKING(for container::at)
@@ -177,7 +177,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
</pre><p>
If you are using other (non-GNU) compilers it might be a good idea
to check for <code class="code">string::at</code> separately.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id415929"></a>No <code class="code">std::char_traits&lt;char&gt;::eof</code></h4></div></div></div><p>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id572345"></a>No <code class="code">std::char_traits&lt;char&gt;::eof</code></h4></div></div></div><p>
Use some kind of autoconf test, plus this:
</p><pre class="programlisting">
#ifdef HAVE_CHAR_TRAITS
@@ -185,7 +185,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
#else
#define CPP_EOF EOF
#endif
-</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id415947"></a>No <code class="code">string::clear</code></h4></div></div></div><p>
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id572363"></a>No <code class="code">string::clear</code></h4></div></div></div><p>
There are two functions for deleting the contents of a string:
<code class="code">clear</code> and <code class="code">erase</code> (the latter returns the
string).
@@ -203,12 +203,12 @@ erase(size_type __pos = 0, size_type __n = npos)
Unfortunately, <code class="code">clear</code> is not implemented in this
version, so you should use <code class="code">erase</code> (which is probably
faster than <code class="code">operator=(charT*)</code>).
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id415993"></a>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id572408"></a>
Removal of <code class="code">ostream::form</code> and <code class="code">istream::scan</code>
extensions
</h4></div></div></div><p>
These are no longer supported. Please use stringstreams instead.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id416012"></a>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id572427"></a>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p>
Although the ISO standard <code class="code">i/ostringstream</code>-classes are
provided, (<code class="filename">sstream</code>), for
compatibility with older implementations the pre-ISO
@@ -296,14 +296,14 @@ any = temp;
Another example of using stringstreams is in <a class="link" href="bk01pt05ch13s05.html" title="Shrink to Fit">this howto</a>.
</p><p> There is additional information in the libstdc++-v2 info files, in
particular “<span class="quote">info iostream</span>â€.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id416164"></a>Little or no wide character support</h4></div></div></div><p>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id445586"></a>Little or no wide character support</h4></div></div></div><p>
Classes <code class="classname">wstring</code> and
<code class="classname">char_traits&lt;wchar_t&gt;</code> are
not supported.
- </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id416183"></a>No templatized iostreams</h4></div></div></div><p>
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id445605"></a>No templatized iostreams</h4></div></div></div><p>
Classes <code class="classname">wfilebuf</code> and
<code class="classname">wstringstream</code> are not supported.
- </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id416202"></a>Thread safety issues</h4></div></div></div><p>
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id445624"></a>Thread safety issues</h4></div></div></div><p>
Earlier GCC releases had a somewhat different approach to
threading configuration and proper compilation. Before GCC 3.0,
configuration of the threading model was dictated by compiler
@@ -361,7 +361,7 @@ libstdc++-v3.
of the SGI STL (version 3.3), with extensive changes.
</p><p>A more formal description of the V3 goals can be found in the
official <a class="ulink" href="../17_intro/DESIGN" target="_top">design document</a>.
- </p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id418744"></a>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers
+ </p><p>Portability notes and known implementation limitations are as follows.</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id445743"></a>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers
(<code class="code">iostream.h</code>, <code class="code">defalloc.h</code> etc.) are
available, unlike previous libstdc++ versions, but inclusion
generates a warning that you are using deprecated headers.
@@ -433,7 +433,7 @@ like <code class="filename">vector.h</code> can be replaced with <code class="fi
directive <code class="code">using namespace std;</code> can be put at the global
scope. This should be enough to get this code compiling, assuming the
other usage is correct.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id418827"></a>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>At this time most of the features of the SGI STL extension have been
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id445826"></a>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>At this time most of the features of the SGI STL extension have been
replaced by standardized libraries.
In particular, the unordered_map and unordered_set containers of TR1
are suitable replacement for the non-standard hash_map and hash_set
@@ -505,7 +505,7 @@ AC_DEFUN([AC_HEADER_EXT_HASH_SET], [
AC_DEFINE(HAVE_EXT_HASH_SET,,[Define if ext/hash_set is present. ])
fi
])
-</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id418929"></a>No <code class="code">ios::nocreate/ios::noreplace</code>.
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id445928"></a>No <code class="code">ios::nocreate/ios::noreplace</code>.
</h4></div></div></div><p> The existence of <code class="code">ios::nocreate</code> being used for
input-streams has been confirmed, most probably because the author
thought it would be more correct to specify nocreate explicitly. So
@@ -516,7 +516,7 @@ open the file for reading, check if it has been opened, and then
decide whether you want to create/replace or not. To my knowledge,
even older implementations support <code class="code">app</code>, <code class="code">ate</code>
and <code class="code">trunc</code> (except for <code class="code">app</code> ?).
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id418977"></a>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id562922"></a>
No <code class="code">stream::attach(int fd)</code>
</h4></div></div></div><p>
Phil Edwards writes: It was considered and rejected for the ISO
@@ -539,7 +539,7 @@ No <code class="code">stream::attach(int fd)</code>
For another example of this, refer to
<a class="ulink" href="http://www.josuttis.com/cppcode/fdstream.html" target="_top">fdstream example</a>
by Nicolai Josuttis.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474129"></a>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id562986"></a>
Support for C++98 dialect.
</h4></div></div></div><p>Check for complete library coverage of the C++1998/2003 standard.
</p><pre class="programlisting">
@@ -607,7 +607,7 @@ AC_DEFUN([AC_HEADER_STDCXX_98], [
AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
fi
])
-</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474157"></a>
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id563013"></a>
Support for C++TR1 dialect.
</h4></div></div></div><p>Check for library coverage of the TR1 standard.
</p><pre class="programlisting">
@@ -684,7 +684,7 @@ AC_DEFUN([AC_HEADER_TR1_UNORDERED_SET], [
AC_DEFINE(HAVE_TR1_UNORDERED_SET,,[Define if tr1/unordered_set is present. ])
fi
])
-</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474201"></a>
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id563057"></a>
Support for C++0x dialect.
</h4></div></div></div><p>Check for baseline language coverage in the compiler for the C++0xstandard.
</p><pre class="programlisting">
@@ -896,27 +896,27 @@ AC_DEFUN([AC_HEADER_UNORDERED_SET], [
AC_DEFINE(HAVE_UNORDERED_SET,,[Define if unordered_set is present. ])
fi
])
-</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474278"></a>
+</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id563134"></a>
Container::iterator_type is not necessarily Container::value_type*
</h4></div></div></div><p>
This is a change in behavior from the previous version. Now, most
<span class="type">iterator_type</span> typedefs in container classes are POD
objects, not <span class="type">value_type</span> pointers.
-</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id474310"></a><p>[<abbr class="abbrev">
+</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id563166"></a><p>[<abbr class="abbrev">
kegel41
</abbr>] <span class="title"><i>
Migrating to GCC 4.1
</i>. </span><span class="author"><span class="firstname">Dan</span> <span class="surname">Kegel</span>. </span><span class="biblioid">
<a class="ulink" href="http://www.kegel.com/gcc/gcc4.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id474342"></a><p>[<abbr class="abbrev">
+ . </span></p></div><div class="biblioentry"><a id="id563198"></a><p>[<abbr class="abbrev">
kegel41
</abbr>] <span class="title"><i>
Building the Whole Debian Archive with GCC 4.1: A Summary
</i>. </span><span class="author"><span class="firstname">Martin</span> <span class="surname">Michlmayr</span>. </span><span class="biblioid">
<a class="ulink" href="http://lists.debian.org/debian-gcc/2006/03/msg00405.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id474375"></a><p>[<abbr class="abbrev">
+ . </span></p></div><div class="biblioentry"><a id="id563231"></a><p>[<abbr class="abbrev">
lbl32
</abbr>] <span class="title"><i>
Migration guide for GCC-3.2
diff --git a/libstdc++-v3/doc/html/manual/bitmap_allocator.html b/libstdc++-v3/doc/html/manual/bitmap_allocator.html
index 7288f8a4335..6c4d12575b1 100644
--- a/libstdc++-v3/doc/html/manual/bitmap_allocator.html
+++ b/libstdc++-v3/doc/html/manual/bitmap_allocator.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>bitmap_allocator</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; allocator&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt12ch32.html" title="Chapter 32. Allocators" /><link rel="prev" href="bk01pt12ch32.html" title="Chapter 32. Allocators" /><link rel="next" href="bk01pt12ch33.html" title="Chapter 33. Containers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">bitmap_allocator</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch32.html">Prev</a> </td><th width="60%" align="center">Chapter 32. Allocators</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch33.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.allocator.bitmap"></a>bitmap_allocator</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>bitmap_allocator</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; allocator&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt12ch32.html" title="Chapter 32. Allocators" /><link rel="prev" href="bk01pt12ch32.html" title="Chapter 32. Allocators" /><link rel="next" href="bk01pt12ch33.html" title="Chapter 33. Containers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">bitmap_allocator</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch32.html">Prev</a> </td><th width="60%" align="center">Chapter 32. Allocators</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch33.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.allocator.bitmap"></a>bitmap_allocator</h2></div></div></div><p>
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.bitmap.design"></a>Design</h3></div></div></div><p>
As this name suggests, this allocator uses a bit-map to keep track
of the used and unused memory locations for it's book-keeping
@@ -103,7 +103,7 @@ else return false.</p></li></ol></div><p>
</p><p>
Consider a block of size 64 ints. In memory, it would look like this:
(assume a 32-bit system where, size_t is a 32-bit entity).
- </p><div class="table"><a id="id403407"></a><p class="title"><b>Table 32.1. Bitmap Allocator Memory Map</b></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left">268</td><td align="left">0</td><td align="left">4294967295</td><td align="left">4294967295</td><td align="left">Data -&gt; Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break" /><p>
+ </p><div class="table"><a id="id461252"></a><p class="title"><b>Table 32.1. Bitmap Allocator Memory Map</b></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left">268</td><td align="left">0</td><td align="left">4294967295</td><td align="left">4294967295</td><td align="left">Data -&gt; Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break" /><p>
The first Column(268) represents the size of the Block in bytes as
seen by the Bitmap Allocator. Internally, a global free list is
used to keep track of the free blocks used and given back by the
diff --git a/libstdc++-v3/doc/html/manual/bk01apas02.html b/libstdc++-v3/doc/html/manual/bk01apas02.html
index 82562a65c37..26f6eb72479 100644
--- a/libstdc++-v3/doc/html/manual/bk01apas02.html
+++ b/libstdc++-v3/doc/html/manual/bk01apas02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Directory Layout and Source Conventions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="prev" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="next" href="bk01apas03.html" title="Coding Style" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Directory Layout and Source Conventions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_contributing.html">Prev</a> </td><th width="60%" align="center">Appendix A. Contributing</th><td width="20%" align="right"> <a accesskey="n" href="bk01apas03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="contrib.organization"></a>Directory Layout and Source Conventions</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Directory Layout and Source Conventions</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="prev" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="next" href="bk01apas03.html" title="Coding Style" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Directory Layout and Source Conventions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_contributing.html">Prev</a> </td><th width="60%" align="center">Appendix A. Contributing</th><td width="20%" align="right"> <a accesskey="n" href="bk01apas03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="contrib.organization"></a>Directory Layout and Source Conventions</h2></div></div></div><p>
The unpacked source directory of libstdc++ contains the files
needed to create the GNU C++ Library.
</p><div class="literallayout"><p><br />
@@ -74,12 +74,7 @@ Currently these are:<br />
  config/locale<br />
  config/os<br />
<br />
-In addition, two subdirectories are convenience libraries:<br />
-<br />
-  libmath<br />
-    Support routines needed for C++ math. Only needed if the<br />
-    underlying "C" implementation is non-existent, in particular<br />
-    required or optimal long double, long long, and C99 functionality.<br />
+In addition, a subdirectory holds the convenience library libsupc++.<br />
<br />
  libsupc++<br />
    Contains the runtime library for C++, including exception<br />
diff --git a/libstdc++-v3/doc/html/manual/bk01apas03.html b/libstdc++-v3/doc/html/manual/bk01apas03.html
index 1f5e5f7b3c3..947c9648912 100644
--- a/libstdc++-v3/doc/html/manual/bk01apas03.html
+++ b/libstdc++-v3/doc/html/manual/bk01apas03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Coding Style</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="prev" href="bk01apas02.html" title="Directory Layout and Source Conventions" /><link rel="next" href="bk01apas04.html" title="Documentation Style" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Coding Style</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apas02.html">Prev</a> </td><th width="60%" align="center">Appendix A. Contributing</th><td width="20%" align="right"> <a accesskey="n" href="bk01apas04.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="contrib.coding_style"></a>Coding Style</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Coding Style</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="prev" href="bk01apas02.html" title="Directory Layout and Source Conventions" /><link rel="next" href="bk01apas04.html" title="Documentation Style" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Coding Style</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apas02.html">Prev</a> </td><th width="60%" align="center">Appendix A. Contributing</th><td width="20%" align="right"> <a accesskey="n" href="bk01apas04.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="contrib.coding_style"></a>Coding Style</h2></div></div></div><p>
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="coding_style.bad_identifiers"></a>Bad Identifiers</h3></div></div></div><p>
Identifiers that conflict and should be avoided.
</p><div class="literallayout"><p><br />
@@ -46,6 +46,9 @@
      _res_ext<br />
      __tg_*<br />
<br />
+      SPU adds:<br />
+      __ea<br />
+<br />
      For GCC:<br />
<br />
      [Note that this list is out of date. It applies to the old<br />
diff --git a/libstdc++-v3/doc/html/manual/bk01apas04.html b/libstdc++-v3/doc/html/manual/bk01apas04.html
index 1ca6ed93900..09a6f978d54 100644
--- a/libstdc++-v3/doc/html/manual/bk01apas04.html
+++ b/libstdc++-v3/doc/html/manual/bk01apas04.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Documentation Style</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="prev" href="bk01apas03.html" title="Coding Style" /><link rel="next" href="bk01apas05.html" title="Design Notes" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Documentation Style</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apas03.html">Prev</a> </td><th width="60%" align="center">Appendix A. Contributing</th><td width="20%" align="right"> <a accesskey="n" href="bk01apas05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="contrib.doc_style"></a>Documentation Style</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="doc_style.doxygen"></a>Doxygen</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.prereq"></a>Prerequisites</h4></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Documentation Style</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="prev" href="bk01apas03.html" title="Coding Style" /><link rel="next" href="bk01apas05.html" title="Design Notes" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Documentation Style</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apas03.html">Prev</a> </td><th width="60%" align="center">Appendix A. Contributing</th><td width="20%" align="right"> <a accesskey="n" href="bk01apas05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="contrib.doc_style"></a>Documentation Style</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="doc_style.doxygen"></a>Doxygen</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.prereq"></a>Prerequisites</h4></div></div></div><p>
Prerequisite tools are Bash 2.x,
<a class="ulink" href="http://www.doxygen.org/" target="_top">Doxygen</a>, and
the <a class="ulink" href="http://www.gnu.org/software/coreutils/" target="_top">GNU
@@ -13,14 +13,14 @@
<a class="ulink" href="http://www.research.att.com/sw/tools/graphviz/download.html" target="_top">Graphviz</a>
package will need to be installed.
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.rules"></a>Generating the Doxygen Files</h4></div></div></div><p>
- The Makefile rules
+ The following Makefile rules run Doxygen to generate HTML
+ docs, XML docs, and the man pages.
+ </p><p>
</p><pre class="screen"><strong class="userinput"><code>make doc-html-doxygen</code></strong></pre><p>
- and
+ </p><p>
</p><pre class="screen"><strong class="userinput"><code>make doc-xml-doxygen</code></strong></pre><p>
- and
+ </p><p>
</p><pre class="screen"><strong class="userinput"><code>make doc-man-doxygen</code></strong></pre><p>
- in the libstdc++ build directory generate the HTML docs, the
- XML docs, and the man pages.
</p><p>
Careful observers will see that the Makefile rules simply call
a script from the source tree, <code class="filename">run_doxygen</code>, which
@@ -97,8 +97,11 @@
</p><p>
Access to the DocBook stylesheets and DTD is required. The
stylesheets are usually packaged by vendor, in something
- like <code class="filename">docbook-style-xsl</code>. The installation
- directory for this package corresponds to
+ like <code class="filename">docbook-style-xsl</code>. To exactly match
+ generated output, please use a version of the stylesheets
+ equivalent
+ to <code class="filename">docbook-style-xsl-1.74.0-5</code>. The
+ installation directory for this package corresponds to
the <code class="literal">XSL_STYLE_DIR</code>
in <code class="filename">doc/Makefile.am</code> and defaults
to <code class="filename">/usr/share/sgml/docbook/xsl-stylesheets</code>.
@@ -128,18 +131,18 @@
xmllint --noout --valid <code class="filename">xml/index.xml</code>
</code></strong>
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.rules"></a>Generating the DocBook Files</h4></div></div></div><p>
- The Makefile rules
+ The following Makefile rules generate (in order): an HTML
+ version of all the documentation, a PDF version of the same, a
+ single XML document, and the result of validating the entire XML
+ document.
+ </p><p>
</p><pre class="screen"><strong class="userinput"><code>make doc-html</code></strong></pre><p>
- and
+ </p><p>
</p><pre class="screen"><strong class="userinput"><code>make doc-pdf</code></strong></pre><p>
- and
+ </p><p>
</p><pre class="screen"><strong class="userinput"><code>make doc-xml-single</code></strong></pre><p>
- and
+ </p><p>
</p><pre class="screen"><strong class="userinput"><code>make doc-xml-validate</code></strong></pre><p>
- in the libstdc++ build directory result respectively in the
- following: the generation of an HTML version of all the
- documentation, a PDF version of the same, a single XML
- document, and the results of validating the XML document.
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.examples"></a>File Organization and Basics</h4></div></div></div><div class="literallayout"><p><br />
      <span class="emphasis"><em>Which files are important</em></span><br />
<br />
@@ -200,64 +203,25 @@ xmllint --noout --valid <code class="filename">xml/index.xml</code>
      &lt;/book&gt;<br />
<br />
      &lt;/set&gt;<br />
-    </p></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.markup"></a>Markup By Example</h4></div></div></div><div class="literallayout"><p><br />
-      HTML to XML rough equivalents<br />
-<br />
-      &lt;p&gt; &lt;para&gt;<br />
-<br />
-      &lt;pre&gt; &lt;computeroutput&gt;<br />
-      &lt;pre&gt; &lt;programlisting&gt;<br />
-      &lt;pre&gt; &lt;literallayout&gt;<br />
-<br />
-      &lt;ul&gt; &lt;itemizedlist&gt;<br />
-      &lt;ol&gt; &lt;orderedlist&gt;<br />
-      &lt;il&gt; &lt;listitem&gt;<br />
-<br />
-      &lt;dl&gt; &lt;variablelist&gt;<br />
-<br />
-      &lt;varlistentry&gt;<br />
-      &lt;dt&gt;    &lt;term&gt;<br />
-      &lt;/dt&gt;   &lt;/term&gt;<br />
-      &lt;dd&gt;     &lt;listitem&gt;<br />
-      &lt;/dt&gt;   &lt;/listitem&gt;<br />
-      &lt;/varlistentry&gt;<br />
-<br />
-      &lt;a href &lt;ulink url<br />
-      &lt;code&gt; &lt;literal&gt;<br />
-      &lt;code&gt; &lt;programlisting&gt;<br />
-<br />
-      &lt;strong&gt; &lt;emphasis&gt;<br />
-      &lt;em&gt; &lt;emphasis&gt;<br />
-      " &lt;quote&gt;<br />
-<br />
-      ctype.h &lt;filename class="headerfile"&gt;&lt;/filename&gt;<br />
-<br />
-      <br />
-      build_dir    &lt;filename class="directory"&gt;path_to_build_dir&lt;/filename&gt;<br />
-<br />
-      Finer gradations of &lt;code&gt;<br />
-<br />
-      &lt;classname&gt; &lt;classname&gt;string&lt;/classname&gt;<br />
-      &lt;classname&gt;vector&lt;&gt;&lt;/classname&gt; <br />
-      &lt;function&gt;fs.clear()&lt;/function&gt;<br />
-<br />
-      &lt;structname&gt;<br />
-<br />
-      &lt;function&gt; &lt;function&gt;clear()&lt;/function&gt;<br />
-<br />
-      &lt;type&gt; &lt;type&gt;long long&lt;/type&gt;<br />
-<br />
-      &lt;varname&gt; &lt;varname&gt;fs&lt;/varname&gt;<br />
-<br />
-      &lt;literal&gt; &lt;literal&gt;-Weffc++&lt;/literal&gt; <br />
-      &lt;literal&gt;rel_ops&lt;/literal&gt;<br />
-<br />
-      &lt;constant&gt; &lt;constant&gt;_GNU_SOURCE&lt;/constant&gt;<br />
-      &lt;constant&gt;3.0&lt;/constant&gt;<br />
-<br />
-      &lt;filename&gt;<br />
-<br />
-      &lt;command&gt; &lt;command&gt;g++&lt;/command&gt;<br />
-<br />
-      &lt;errortext&gt; &lt;errortext&gt;foo Concept &lt;/errortext&gt;<br />
-</p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01apas03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_contributing.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01apas05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Coding Style </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design Notes</td></tr></table></div></body></html>
+    </p></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.markup"></a>Markup By Example</h4></div></div></div><p>
+Complete details on Docbook markup can be found in the DocBook Element
+Reference, <a class="ulink" href="http://www.docbook.org/tdg/en/html/part2.html" target="_top">online</a>. An
+incomplete reference for HTML to Docbook conversion is detailed in the
+table below.
+</p><div class="table"><a id="id552441"></a><p class="title"><b>Table A.1. HTML to Docbook XML markup comparison</b></p><div class="table-contents"><table summary="HTML to Docbook XML markup comparison" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">HTML</th><th align="left">XML</th></tr></thead><tbody><tr><td align="left">&lt;p&gt;</td><td align="left">&lt;para&gt;</td></tr><tr><td align="left">&lt;pre&gt;</td><td align="left">&lt;computeroutput&gt;, &lt;programlisting&gt;,
+ &lt;literallayout&gt;</td></tr><tr><td align="left">&lt;ul&gt;</td><td align="left">&lt;itemizedlist&gt;</td></tr><tr><td align="left">&lt;ol&gt;</td><td align="left">&lt;orderedlist&gt;</td></tr><tr><td align="left">&lt;il&gt;</td><td align="left">&lt;listitem&gt;</td></tr><tr><td align="left">&lt;dl&gt;</td><td align="left">&lt;variablelist&gt;</td></tr><tr><td align="left">&lt;dt&gt;</td><td align="left">&lt;term&gt;</td></tr><tr><td align="left">&lt;dd&gt;</td><td align="left">&lt;listitem&gt;</td></tr><tr><td align="left">&lt;a href=""&gt;</td><td align="left">&lt;ulink url=""&gt;</td></tr><tr><td align="left">&lt;code&gt;</td><td align="left">&lt;literal&gt;, &lt;programlisting&gt;</td></tr><tr><td align="left">&lt;strong&gt;</td><td align="left">&lt;emphasis&gt;</td></tr><tr><td align="left">&lt;em&gt;</td><td align="left">&lt;emphasis&gt;</td></tr><tr><td align="left">"</td><td align="left">&lt;quote&gt;</td></tr></tbody></table></div></div><br class="table-break" /><p>
+ And examples of detailed markup for which there are no real HTML
+ equivalents are listed in the table below.
+</p><div class="table"><a id="id554436"></a><p class="title"><b>Table A.2. Docbook XML Element Use</b></p><div class="table-contents"><table summary="Docbook XML Element Use" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Element</th><th align="left">Use</th></tr></thead><tbody><tr><td align="left">&lt;structname&gt;</td><td align="left">&lt;structname&gt;char_traits&lt;/structname&gt;</td></tr><tr><td align="left">&lt;classname&gt;</td><td align="left">&lt;classname&gt;string&lt;/classname&gt;</td></tr><tr><td align="left">&lt;function&gt;</td><td align="left">
+ <p>&lt;function&gt;clear()&lt;/function&gt;</p>
+ <p>&lt;function&gt;fs.clear()&lt;/function&gt;</p>
+ </td></tr><tr><td align="left">&lt;type&gt;</td><td align="left">&lt;type&gt;long long&lt;/type&gt;</td></tr><tr><td align="left">&lt;varname&gt;</td><td align="left">&lt;varname&gt;fs&lt;/varname&gt;</td></tr><tr><td align="left">&lt;literal&gt;</td><td align="left">
+ <p>&lt;literal&gt;-Weffc++&lt;/literal&gt;</p>
+ <p>&lt;literal&gt;rel_ops&lt;/literal&gt;</p>
+ </td></tr><tr><td align="left">&lt;constant&gt;</td><td align="left">
+ <p>&lt;constant&gt;_GNU_SOURCE&lt;/constant&gt;</p>
+ <p>&lt;constant&gt;3.0&lt;/constant&gt;</p>
+ </td></tr><tr><td align="left">&lt;command&gt;</td><td align="left">&lt;command&gt;g++&lt;/command&gt;</td></tr><tr><td align="left">&lt;errortext&gt;</td><td align="left">&lt;errortext&gt;In instantiation of&lt;/errortext&gt;</td></tr><tr><td align="left">&lt;filename&gt;</td><td align="left">
+ <p>&lt;filename class="headerfile"&gt;ctype.h&lt;/filename&gt;</p>
+ <p>&lt;filename class="directory"&gt;/home/gcc/build&lt;/filename&gt;</p>
+ </td></tr></tbody></table></div></div><br class="table-break" /></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01apas03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_contributing.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01apas05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Coding Style </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design Notes</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01apas05.html b/libstdc++-v3/doc/html/manual/bk01apas05.html
index 79d6f217bc0..635b39cde7c 100644
--- a/libstdc++-v3/doc/html/manual/bk01apas05.html
+++ b/libstdc++-v3/doc/html/manual/bk01apas05.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Design Notes</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="prev" href="bk01apas04.html" title="Documentation Style" /><link rel="next" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design Notes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apas04.html">Prev</a> </td><th width="60%" align="center">Appendix A. Contributing</th><td width="20%" align="right"> <a accesskey="n" href="appendix_porting.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="contrib.design_notes"></a>Design Notes</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Design Notes</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_contributing.html" title="Appendix A. Contributing" /><link rel="prev" href="bk01apas04.html" title="Documentation Style" /><link rel="next" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design Notes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apas04.html">Prev</a> </td><th width="60%" align="center">Appendix A. Contributing</th><td width="20%" align="right"> <a accesskey="n" href="appendix_porting.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="contrib.design_notes"></a>Design Notes</h2></div></div></div><p>
</p><div class="literallayout"><p><br />
<br />
    The Library<br />
diff --git a/libstdc++-v3/doc/html/manual/bk01apd.html b/libstdc++-v3/doc/html/manual/bk01apd.html
index edcb2dc610f..72f1d7e8d4b 100644
--- a/libstdc++-v3/doc/html/manual/bk01apd.html
+++ b/libstdc++-v3/doc/html/manual/bk01apd.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix D. GNU General Public License</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="appendix_free.html" title="Appendix C. Free Software Needs Free Documentation" /><link rel="next" href="bk01apds02.html" title="TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix D. GNU General Public License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_free.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01apds02.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.gpl-2.0"></a>GNU General Public License</h1></div><div><p class="releaseinfo">Version 2, June 1991</p></div><div><p class="copyright">Copyright © 1989, 1991 Free Software Foundation, Inc.</p></div><div><div class="legalnotice"><a id="gpl-legalnotice"></a><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix D. GNU General Public License</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="appendix_free.html" title="Appendix C. Free Software Needs Free Documentation" /><link rel="next" href="bk01apds02.html" title="TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix D. GNU General Public License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_free.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01apds02.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.gpl-2.0"></a>Appendix D. GNU General Public License</h2></div><div><p class="releaseinfo">Version 2, June 1991</p></div><div><p class="copyright">Copyright © 1989, 1991 Free Software Foundation, Inc.</p></div><div><div class="legalnotice"><a id="gpl-legalnotice"></a><p>
</p><div class="address"><p>Free Software Foundation, Inc. <br />
  <span class="street">51 Franklin Street, Fifth Floor</span>, <br />
  <span class="city">Boston</span>, <span class="state">MA</span> <span class="postcode">02110-1301</span><br />
diff --git a/libstdc++-v3/doc/html/manual/bk01apds02.html b/libstdc++-v3/doc/html/manual/bk01apds02.html
index 5fb34dcbf66..2a0af92067c 100644
--- a/libstdc++-v3/doc/html/manual/bk01apds02.html
+++ b/libstdc++-v3/doc/html/manual/bk01apds02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01apd.html" title="Appendix D. GNU General Public License" /><link rel="prev" href="bk01apd.html" title="Appendix D. GNU General Public License" /><link rel="next" href="bk01apds03.html" title="How to Apply These Terms to Your New Programs" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apd.html">Prev</a> </td><th width="60%" align="center">Appendix D. GNU General Public License</th><td width="20%" align="right"> <a accesskey="n" href="bk01apds03.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="gpl-2"></a>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</h2></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-0"></a>Section 0</h3></div></div></div><p>This License applies to any program or other work which contains a notice
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01apd.html" title="Appendix D. GNU General Public License" /><link rel="prev" href="bk01apd.html" title="Appendix D. GNU General Public License" /><link rel="next" href="bk01apds03.html" title="How to Apply These Terms to Your New Programs" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apd.html">Prev</a> </td><th width="60%" align="center">Appendix D. GNU General Public License</th><td width="20%" align="right"> <a accesskey="n" href="bk01apds03.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="gpl-2"></a>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</h2></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="gpl-2-0"></a>Section 0</h3></div></div></div><p>This License applies to any program or other work which contains a notice
placed by the copyright holder saying it may be distributed under the terms
of this General Public License. The “<span class="quote">Program</span>â€, below, refers to any such
program or work, and a
diff --git a/libstdc++-v3/doc/html/manual/bk01apds03.html b/libstdc++-v3/doc/html/manual/bk01apds03.html
index 87b5df25ef0..d95dfd7a686 100644
--- a/libstdc++-v3/doc/html/manual/bk01apds03.html
+++ b/libstdc++-v3/doc/html/manual/bk01apds03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>How to Apply These Terms to Your New Programs</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01apd.html" title="Appendix D. GNU General Public License" /><link rel="prev" href="bk01apds02.html" title="TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION" /><link rel="next" href="bk01ape.html" title="Appendix E. GNU Free Documentation License" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">How to Apply These Terms to Your New Programs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apds02.html">Prev</a> </td><th width="60%" align="center">Appendix D. GNU General Public License</th><td width="20%" align="right"> <a accesskey="n" href="bk01ape.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="gpl-3"></a>How to Apply These Terms to Your New Programs</h2></div></div></div><p>If you develop a new program, and you want it to be of the greatest
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>How to Apply These Terms to Your New Programs</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01apd.html" title="Appendix D. GNU General Public License" /><link rel="prev" href="bk01apds02.html" title="TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION" /><link rel="next" href="bk01ape.html" title="Appendix E. GNU Free Documentation License" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">How to Apply These Terms to Your New Programs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apds02.html">Prev</a> </td><th width="60%" align="center">Appendix D. GNU General Public License</th><td width="20%" align="right"> <a accesskey="n" href="bk01ape.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="gpl-3"></a>How to Apply These Terms to Your New Programs</h2></div></div></div><p>If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.</p><p>To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
diff --git a/libstdc++-v3/doc/html/manual/bk01ape.html b/libstdc++-v3/doc/html/manual/bk01ape.html
index c5a021fe152..6b3403b9bb8 100644
--- a/libstdc++-v3/doc/html/manual/bk01ape.html
+++ b/libstdc++-v3/doc/html/manual/bk01ape.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix E. GNU Free Documentation License</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01apds03.html" title="How to Apply These Terms to Your New Programs" /><link rel="next" href="../bk02.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix E. GNU Free Documentation License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apds03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="../bk02.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.gfdl-1.2"></a>Appendix E. GNU Free Documentation License</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix E. GNU Free Documentation License</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01apds03.html" title="How to Apply These Terms to Your New Programs" /><link rel="next" href="../bk02.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix E. GNU Free Documentation License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01apds03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="../bk02.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.gfdl-1.2"></a>Appendix E. GNU Free Documentation License</h2></div></div></div><p>
Copyright (C) 2000, 2001, 2002 Free Software Foundation,
<abbr class="abbrev">Inc.</abbr> 51 Franklin <abbr class="abbrev">St</abbr>, Fifth Floor,
Boston, <abbr class="abbrev">MA</abbr> 02110-1301 <abbr class="abbrev">USA</abbr>. Everyone is permitted to copy and
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch01.html b/libstdc++-v3/doc/html/manual/bk01pt01ch01.html
index d32f5be7bd0..60abfa4a793 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt01ch01.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch01.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 1. Status</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I. Introduction" /><link rel="prev" href="intro.html" title="Part I. Introduction" /><link rel="next" href="bk01pt01ch01s02.html" title="License" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 1. Status</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="intro.html">Prev</a> </td><th width="60%" align="center">Part I. Introduction</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch01s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.status"></a>Chapter 1. Status</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.status.standard"></a>Implementation Status</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.standard.1998"></a>C++ 1998</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="standard.1998"></a>Checklist</h4></div></div></div><div class="literallayout"><p><br />
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 1. Status</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I. Introduction" /><link rel="prev" href="intro.html" title="Part I. Introduction" /><link rel="next" href="bk01pt01ch01s02.html" title="License" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 1. Status</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="intro.html">Prev</a> </td><th width="60%" align="center">Part I. Introduction</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch01s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.status"></a>Chapter 1. Status</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.status.standard"></a>Implementation Status</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.standard.1998"></a>C++ 1998</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="standard.1998"></a>Checklist</h4></div></div></div><div class="literallayout"><p><br />
   Completion Checklist for the Standard C++ Library<br />
   Updated: 2003-04-25<br />
<br />
@@ -6101,7 +6101,7 @@ In this implementation the header names are prefixed by
</p><p>
This page describes the TR1 support in mainline GCC SVN, not in any particular
release.
-</p><div class="table"><a id="id438055"></a><p class="title"><b>Table 1.1. C++ TR1 Implementation Status</b></p><div class="table-contents"><table summary="C++ TR1 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Done</th><th align="left">Broken</th><th align="left">Missing</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>2</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">2.1</td><td align="left">Reference wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.1</td><td align="left">Additions to header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2</td><td align="left">Smart pointers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.1</td><td align="left">Additions to header <code class="code">&lt;memory&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.2</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">See Footnotes</td></tr><tr><td align="left">2.2.3.1</td><td align="left"><code class="code">shared_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.2</td><td align="left"><code class="code">shared_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.3</td><td align="left"><code class="code">shared_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.4</td><td align="left"><code class="code">shared_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.5</td><td align="left"><code class="code">shared_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.6</td><td align="left"><code class="code">shared_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.7</td><td align="left"><code class="code">shared_ptr</code> I/O</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.8</td><td align="left"><code class="code">shared_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.9</td><td align="left"><code class="code">shared_ptr</code> casts</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.10</td><td align="left"><code class="code">get_deleter</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4</td><td align="left">Class template <code class="code">weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.1</td><td align="left"><code class="code">weak_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.2</td><td align="left"><code class="code">weak_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.3</td><td align="left"><code class="code">weak_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.4</td><td align="left"><code class="code">weak_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.5</td><td align="left"><code class="code">weak_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.6</td><td align="left"><code class="code">weak_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.7</td><td align="left"><code class="code">weak_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.5</td><td align="left">Class template <code class="code">enable_shared_from_this</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>3</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Function Objects</em></span></td></tr><tr><td align="left">3.1</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.2</td><td align="left">Additions to <code class="code">&lt;functional&gt; synopsis</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.3</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.4</td><td align="left">Function return types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.5</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6</td><td align="left">Function object binders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.1</td><td align="left">Class template <code class="code">is_bind_expression</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.2</td><td align="left">Class template <code class="code">is_placeholder</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.3</td><td align="left">Function template <code class="code">bind</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.4</td><td align="left">Placeholders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7</td><td align="left">Polymorphic function wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.1</td><td align="left">Class <code class="code">bad_function_call<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.1.1</td><td align="left"><code class="code">bad_function_call</code> constructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2</td><td align="left">Class template <code class="code">function</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.1</td><td align="left"><code class="code">function</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.2</td><td align="left"><code class="code">function</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.3</td><td align="left"><code class="code">function</code> capacity</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.4</td><td align="left"><code class="code">function</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.5</td><td align="left"><code class="code">function</code> target access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.6</td><td align="left">undefined operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.7</td><td align="left">null pointer comparison operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.8</td><td align="left">specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>4</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Metaprogramming and type traits</em></span></td></tr><tr><td align="left">4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.2</td><td align="left">Header <code class="code">&lt;type_traits&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.3</td><td align="left">Helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.4</td><td align="left">General Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5</td><td align="left">Unary Type Traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.1</td><td align="left">Primary Type Categories</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.2</td><td align="left">Composite type traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.3</td><td align="left">Type properties</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.6</td><td align="left">Relationships between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7</td><td align="left">Transformations between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.1</td><td align="left">Const-volatile modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.2</td><td align="left">Reference modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.3</td><td align="left">Array modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.4</td><td align="left">Pointer modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.8</td><td align="left">Other transformations</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.9</td><td align="left">Implementation requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>5</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Numerical Facilities</em></span></td></tr><tr><td align="left">5.1</td><td align="left">Random number generation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.2</td><td align="left">Header <code class="code">&lt;random&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.3</td><td align="left">Class template <code class="code">variate_generator</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4</td><td align="left">Random number engine class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.1</td><td align="left">Class template <code class="code">linear_congruential</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.2</td><td align="left">Class template <code class="code">mersenne_twister</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.3</td><td align="left">Class template <code class="code">subtract_with_carry</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.4</td><td align="left">Class template <code class="code">subtract_with_carry_01</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.5</td><td align="left">Class template <code class="code">discard_block</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.6</td><td align="left">Class template <code class="code">xor_combine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">operator()() per N2079</td></tr><tr><td align="left">5.1.5</td><td align="left">Engines with predefined parameters</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.6</td><td align="left">Class <code class="code">random_device</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7</td><td align="left">Random distribution class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.1</td><td align="left">Class template <code class="code">uniform_int</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.2</td><td align="left">Class <code class="code">bernoulli_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.3</td><td align="left">Class template <code class="code">geometric_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.4</td><td align="left">Class template <code class="code">poisson_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.5</td><td align="left">Class template <code class="code">binomial_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.6</td><td align="left">Class template <code class="code">uniform_real</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.7</td><td align="left">Class template <code class="code">exponential_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.8</td><td align="left">Class template <code class="code">normal_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.9</td><td align="left">Class template <code class="code">gamma_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2</td><td align="left">Mathematical special functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1</td><td align="left">Additions to header <code class="code">&lt;cmath&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.1</td><td align="left">associated Laguerre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.2</td><td align="left">associated Legendre functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.3</td><td align="left">beta function</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.4</td><td align="left">(complete) elliptic integral of the first kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.5</td><td align="left">(complete) elliptic integral of the second kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.6</td><td align="left">(complete) elliptic integral of the third kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.7</td><td align="left">confluent hypergeometric functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.8</td><td align="left">regular modified cylindrical Bessel functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.9</td><td align="left">cylindrical Bessel functions (of the first kind)</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.10</td><td align="left">irregular modified cylindrical Bessel functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.11</td><td align="left">cylindrical Neumann functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.12</td><td align="left">(incomplete) elliptic integral of the first kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.13</td><td align="left">(incomplete) elliptic integral of the second kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.14</td><td align="left">(incomplete) elliptic integral of the third kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.15</td><td align="left">exponential integral</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.16</td><td align="left">Hermite polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.17</td><td align="left">hypergeometric functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.18</td><td align="left">Laguerre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.19</td><td align="left">Legendre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.20</td><td align="left">Riemann zeta function</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.21</td><td align="left">spherical Bessel functions (of the first kind)</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.22</td><td align="left">spherical associated Legendre functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.23</td><td align="left">spherical Neumann functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.2</td><td align="left">Additions to header <code class="code">&lt;math.h&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>6</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Containers</em></span></td></tr><tr><td align="left">6.1</td><td align="left">Tuple types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.1</td><td align="left">Header <code class="code">&lt;tuple&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.2</td><td align="left">Additions to header <code class="code">&lt;utility&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3</td><td align="left">Class template <code class="code">tuple</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.1</td><td align="left">Construction</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.2</td><td align="left">Tuple creation functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.3</td><td align="left">Tuple helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.4</td><td align="left">Element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.5</td><td align="left">Relational operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.4</td><td align="left">Pairs</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2</td><td align="left">Fixed size array</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.1</td><td align="left">Header <code class="code">&lt;array&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2</td><td align="left">Class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.1</td><td align="left"><code class="code">array</code> constructors, copy, and assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.2</td><td align="left"><code class="code">array</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.3</td><td align="left"><code class="code">array</code> size</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.4</td><td align="left">Zero sized <code class="code">array</code>s</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.5</td><td align="left">Tuple interface to class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3</td><td align="left">Unordered associative containers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.1</td><td align="left">Unordered associative container requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.1.1</td><td align="left">Exception safety guarantees</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.2</td><td align="left">Additions to header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.3</td><td align="left">Class template <code class="code">hash</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4</td><td align="left">Unordered associative container classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.1</td><td align="left">Header <code class="code">&lt;unordered_set&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.2</td><td align="left">Header <code class="code">&lt;unordered_map&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3</td><td align="left">Class template <code class="code">unordered_set</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3.1</td><td align="left"><code class="code">unordered_set</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3.2</td><td align="left"><code class="code">unordered_set</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4</td><td align="left">Class template <code class="code">unordered_map</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.1</td><td align="left"><code class="code">unordered_map</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.2</td><td align="left"><code class="code">unordered_map</code> element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.3</td><td align="left"><code class="code">unordered_map</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5</td><td align="left">Class template <code class="code">unordered_multiset<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5.1</td><td align="left"><code class="code">unordered_multiset</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5.2</td><td align="left"><code class="code">unordered_multiset</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6</td><td align="left">Class template <code class="code">unordered_multimap</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6.1</td><td align="left"><code class="code">unordered_multimap</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6.2</td><td align="left"><code class="code">unordered_multimap</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>7</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Regular Expressions</em></span></td></tr><tr><td align="left">7.1</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.2</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.3</td><td align="left">Regular expressions summary</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.4</td><td align="left">Header <code class="code">&lt;regex&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5</td><td align="left">Namespace <code class="code">tr1::regex_constants</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.1</td><td align="left">Bitmask Type <code class="code">syntax_option_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.2</td><td align="left">Bitmask Type <code class="code">regex_constants::match_flag_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.3</td><td align="left">Implementation defined <code class="code">error_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.6</td><td align="left">Class <code class="code">regex_error</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.7</td><td align="left">Class template <code class="code">regex_traits</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8</td><td align="left">Class template <code class="code">basic_regex</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.1</td><td align="left"><code class="code">basic_regex</code> constants</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.2</td><td align="left"><code class="code">basic_regex</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.3</td><td align="left"><code class="code">basic_regex</code> assign</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.4</td><td align="left"><code class="code">basic_regex</code> constant operations</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.5</td><td align="left"><code class="code">basic_regex</code> locale</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.6</td><td align="left"><code class="code">basic_regex</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.7</td><td align="left"><code class="code">basic_regex</code> non-member functions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.7.1</td><td align="left"><code class="code">basic_regex</code> non-member swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9</td><td align="left">Class template <code class="code">sub_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9.1</td><td align="left"><code class="code">sub_match</code> members</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9.2</td><td align="left"><code class="code">sub_match</code> non-member operators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10</td><td align="left">Class template <code class="code">match_results</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.1</td><td align="left"><code class="code">match_results</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.2</td><td align="left"><code class="code">match_results</code> size</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.3</td><td align="left"><code class="code">match_results</code> element access</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.4</td><td align="left"><code class="code">match_results</code> formatting</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.5</td><td align="left"><code class="code">match_results</code> allocator</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.6</td><td align="left"><code class="code">match_results</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11</td><td align="left">Regular expression algorithms</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.1</td><td align="left">exceptions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.2</td><td align="left"><code class="code">regex_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.3</td><td align="left"><code class="code">regex_search</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.4</td><td align="left"><code class="code">regex_replace</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12</td><td align="left">Regular expression Iterators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1</td><td align="left">Class template <code class="code">regex_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.1</td><td align="left"><code class="code">regex_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.2</td><td align="left"><code class="code">regex_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.3</td><td align="left"><code class="code">regex_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.4</td><td align="left"><code class="code">regex_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2</td><td align="left">Class template <code class="code">regex_token_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.1</td><td align="left"><code class="code">regex_token_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.2</td><td align="left"><code class="code">regex_token_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.3</td><td align="left"><code class="code">regex_token_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.4</td><td align="left"><code class="code">regex_token_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.13</td><td align="left">Modified ECMAScript regular expression grammar</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>8</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>C Compatibility</em></span></td></tr><tr><td align="left">8.1</td><td align="left">Additions to header <code class="code">&lt;complex&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.2</td><td align="left">Function <code class="code">acos</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.3</td><td align="left">Function <code class="code">asin</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.4</td><td align="left">Function <code class="code">atan</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.5</td><td align="left">Function <code class="code">acosh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.6</td><td align="left">Function <code class="code">asinh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.7</td><td align="left">Function <code class="code">atanh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.8</td><td align="left">Function <code class="code">fabs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.9</td><td align="left">Additional Overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.2</td><td align="left">Header <code class="code">&lt;ccomplex&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">8.3</td><td align="left">Header <code class="code">&lt;complex.h&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">8.4</td><td align="left">Additions to header <code class="code">&lt;cctype&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.4.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.4.2</td><td align="left">Function <code class="code">isblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.5</td><td align="left">Additions to header <code class="code">&lt;ctype.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6</td><td align="left">Header <code class="code">&lt;cfenv&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.7</td><td align="left">Header <code class="code">&lt;fenv.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.8</td><td align="left">Additions to header <code class="code">&lt;cfloat&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.9</td><td align="left">Additions to header <code class="code">&lt;float.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.10</td><td align="left">Additions to header <code class="code">&lt;ios&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.10.1</td><td align="left">Synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.10.2</td><td align="left">Function <code class="code">hexfloat</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.11</td><td align="left">Header <code class="code">&lt;cinttypes&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.11.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 557</td></tr><tr><td align="left">8.11.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.12</td><td align="left">Header <code class="code">&lt;inttypes.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.13</td><td align="left">Additions to header <code class="code">&lt;climits&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.14</td><td align="left">Additions to header <code class="code">&lt;limits.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.15</td><td align="left">Additions to header <code class="code">&lt;locale&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.16</td><td align="left">Additions to header <code class="code">&lt;cmath&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.3</td><td align="left">Function template definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.4</td><td align="left">Additional overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 568; DR 550</td></tr><tr><td align="left">8.17</td><td align="left">Additions to header <code class="code">&lt;math.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.18</td><td align="left">Additions to header <code class="code">&lt;cstdarg&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.19</td><td align="left">Additions to header <code class="code">&lt;stdarg.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.20</td><td align="left">The header <code class="code">&lt;cstdbool&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.21</td><td align="left">The header <code class="code">&lt;stdbool.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22</td><td align="left">The header <code class="code">&lt;cstdint&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.23</td><td align="left">The header <code class="code">&lt;stdint.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24</td><td align="left">Additions to header <code class="code">&lt;cstdio&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.3</td><td align="left">Additional format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.24.4</td><td align="left">Additions to header <code class="code">&lt;stdio.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25</td><td align="left">Additions to header <code class="code">&lt;cstdlib&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.3</td><td align="left">Function <code class="code">abs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.4</td><td align="left">Function <code class="code">div</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.26</td><td align="left">Additions to header <code class="code">&lt;stdlib.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.27</td><td align="left">Header <code class="code">&lt;ctgmath&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">8.28</td><td align="left">Header <code class="code">&lt;tgmath.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">8.29</td><td align="left">Additions to header <code class="code">&lt;ctime&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.30</td><td align="left">Additions to header <code class="code">&lt;cwchar&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.3</td><td align="left">Additional wide format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.31</td><td align="left">Additions to header <code class="code">&lt;wchar.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32</td><td align="left">Additions to header <code class="code">&lt;cwctype&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32.2</td><td align="left">Function <code class="code">iswblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.33</td><td align="left">Additions to header <code class="code">&lt;wctype.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p>
+</p><div class="table"><a id="id549759"></a><p class="title"><b>Table 1.1. C++ TR1 Implementation Status</b></p><div class="table-contents"><table summary="C++ TR1 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Done</th><th align="left">Broken</th><th align="left">Missing</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>2</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">2.1</td><td align="left">Reference wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.1</td><td align="left">Additions to header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2</td><td align="left">Smart pointers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.1</td><td align="left">Additions to header <code class="code">&lt;memory&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.2</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">See Footnotes</td></tr><tr><td align="left">2.2.3.1</td><td align="left"><code class="code">shared_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.2</td><td align="left"><code class="code">shared_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.3</td><td align="left"><code class="code">shared_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.4</td><td align="left"><code class="code">shared_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.5</td><td align="left"><code class="code">shared_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.6</td><td align="left"><code class="code">shared_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.7</td><td align="left"><code class="code">shared_ptr</code> I/O</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.8</td><td align="left"><code class="code">shared_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.9</td><td align="left"><code class="code">shared_ptr</code> casts</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.3.10</td><td align="left"><code class="code">get_deleter</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4</td><td align="left">Class template <code class="code">weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.1</td><td align="left"><code class="code">weak_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.2</td><td align="left"><code class="code">weak_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.3</td><td align="left"><code class="code">weak_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.4</td><td align="left"><code class="code">weak_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.5</td><td align="left"><code class="code">weak_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.6</td><td align="left"><code class="code">weak_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.4.7</td><td align="left"><code class="code">weak_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.5</td><td align="left">Class template <code class="code">enable_shared_from_this</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>3</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Function Objects</em></span></td></tr><tr><td align="left">3.1</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.2</td><td align="left">Additions to <code class="code">&lt;functional&gt; synopsis</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.3</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.4</td><td align="left">Function return types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.5</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6</td><td align="left">Function object binders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.1</td><td align="left">Class template <code class="code">is_bind_expression</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.2</td><td align="left">Class template <code class="code">is_placeholder</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.3</td><td align="left">Function template <code class="code">bind</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.6.4</td><td align="left">Placeholders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7</td><td align="left">Polymorphic function wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.1</td><td align="left">Class <code class="code">bad_function_call<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.1.1</td><td align="left"><code class="code">bad_function_call</code> constructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2</td><td align="left">Class template <code class="code">function</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.1</td><td align="left"><code class="code">function</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.2</td><td align="left"><code class="code">function</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.3</td><td align="left"><code class="code">function</code> capacity</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.4</td><td align="left"><code class="code">function</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.5</td><td align="left"><code class="code">function</code> target access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.6</td><td align="left">undefined operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.7</td><td align="left">null pointer comparison operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">3.7.2.8</td><td align="left">specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>4</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Metaprogramming and type traits</em></span></td></tr><tr><td align="left">4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.2</td><td align="left">Header <code class="code">&lt;type_traits&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.3</td><td align="left">Helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.4</td><td align="left">General Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5</td><td align="left">Unary Type Traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.1</td><td align="left">Primary Type Categories</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.2</td><td align="left">Composite type traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.5.3</td><td align="left">Type properties</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.6</td><td align="left">Relationships between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7</td><td align="left">Transformations between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.1</td><td align="left">Const-volatile modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.2</td><td align="left">Reference modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.3</td><td align="left">Array modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.7.4</td><td align="left">Pointer modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.8</td><td align="left">Other transformations</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">4.9</td><td align="left">Implementation requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>5</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Numerical Facilities</em></span></td></tr><tr><td align="left">5.1</td><td align="left">Random number generation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.2</td><td align="left">Header <code class="code">&lt;random&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.3</td><td align="left">Class template <code class="code">variate_generator</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4</td><td align="left">Random number engine class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.1</td><td align="left">Class template <code class="code">linear_congruential</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.2</td><td align="left">Class template <code class="code">mersenne_twister</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.3</td><td align="left">Class template <code class="code">subtract_with_carry</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.4</td><td align="left">Class template <code class="code">subtract_with_carry_01</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.5</td><td align="left">Class template <code class="code">discard_block</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.4.6</td><td align="left">Class template <code class="code">xor_combine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">operator()() per N2079</td></tr><tr><td align="left">5.1.5</td><td align="left">Engines with predefined parameters</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.6</td><td align="left">Class <code class="code">random_device</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7</td><td align="left">Random distribution class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.1</td><td align="left">Class template <code class="code">uniform_int</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.2</td><td align="left">Class <code class="code">bernoulli_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.3</td><td align="left">Class template <code class="code">geometric_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.4</td><td align="left">Class template <code class="code">poisson_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.5</td><td align="left">Class template <code class="code">binomial_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.6</td><td align="left">Class template <code class="code">uniform_real</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.7</td><td align="left">Class template <code class="code">exponential_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.8</td><td align="left">Class template <code class="code">normal_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.1.7.9</td><td align="left">Class template <code class="code">gamma_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2</td><td align="left">Mathematical special functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1</td><td align="left">Additions to header <code class="code">&lt;cmath&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.1</td><td align="left">associated Laguerre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.2</td><td align="left">associated Legendre functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.3</td><td align="left">beta function</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.4</td><td align="left">(complete) elliptic integral of the first kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.5</td><td align="left">(complete) elliptic integral of the second kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.6</td><td align="left">(complete) elliptic integral of the third kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.7</td><td align="left">confluent hypergeometric functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.8</td><td align="left">regular modified cylindrical Bessel functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.9</td><td align="left">cylindrical Bessel functions (of the first kind)</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.10</td><td align="left">irregular modified cylindrical Bessel functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.11</td><td align="left">cylindrical Neumann functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.12</td><td align="left">(incomplete) elliptic integral of the first kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.13</td><td align="left">(incomplete) elliptic integral of the second kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.14</td><td align="left">(incomplete) elliptic integral of the third kind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.15</td><td align="left">exponential integral</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.16</td><td align="left">Hermite polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.17</td><td align="left">hypergeometric functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.18</td><td align="left">Laguerre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.19</td><td align="left">Legendre polynomials</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.20</td><td align="left">Riemann zeta function</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.21</td><td align="left">spherical Bessel functions (of the first kind)</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.22</td><td align="left">spherical associated Legendre functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.1.23</td><td align="left">spherical Neumann functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">5.2.2</td><td align="left">Additions to header <code class="code">&lt;math.h&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>6</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Containers</em></span></td></tr><tr><td align="left">6.1</td><td align="left">Tuple types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.1</td><td align="left">Header <code class="code">&lt;tuple&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.2</td><td align="left">Additions to header <code class="code">&lt;utility&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3</td><td align="left">Class template <code class="code">tuple</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.1</td><td align="left">Construction</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.2</td><td align="left">Tuple creation functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.3</td><td align="left">Tuple helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.4</td><td align="left">Element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.3.5</td><td align="left">Relational operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.1.4</td><td align="left">Pairs</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2</td><td align="left">Fixed size array</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.1</td><td align="left">Header <code class="code">&lt;array&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2</td><td align="left">Class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.1</td><td align="left"><code class="code">array</code> constructors, copy, and assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.2</td><td align="left"><code class="code">array</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.3</td><td align="left"><code class="code">array</code> size</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.4</td><td align="left">Zero sized <code class="code">array</code>s</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.2.2.5</td><td align="left">Tuple interface to class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3</td><td align="left">Unordered associative containers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.1</td><td align="left">Unordered associative container requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.1.1</td><td align="left">Exception safety guarantees</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.2</td><td align="left">Additions to header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.3</td><td align="left">Class template <code class="code">hash</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4</td><td align="left">Unordered associative container classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.1</td><td align="left">Header <code class="code">&lt;unordered_set&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.2</td><td align="left">Header <code class="code">&lt;unordered_map&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3</td><td align="left">Class template <code class="code">unordered_set</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3.1</td><td align="left"><code class="code">unordered_set</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.3.2</td><td align="left"><code class="code">unordered_set</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4</td><td align="left">Class template <code class="code">unordered_map</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.1</td><td align="left"><code class="code">unordered_map</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.2</td><td align="left"><code class="code">unordered_map</code> element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.4.3</td><td align="left"><code class="code">unordered_map</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5</td><td align="left">Class template <code class="code">unordered_multiset<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5.1</td><td align="left"><code class="code">unordered_multiset</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.5.2</td><td align="left"><code class="code">unordered_multiset</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6</td><td align="left">Class template <code class="code">unordered_multimap</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6.1</td><td align="left"><code class="code">unordered_multimap</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">6.3.4.6.2</td><td align="left"><code class="code">unordered_multimap</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>7</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Regular Expressions</em></span></td></tr><tr><td align="left">7.1</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.2</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.3</td><td align="left">Regular expressions summary</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.4</td><td align="left">Header <code class="code">&lt;regex&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5</td><td align="left">Namespace <code class="code">tr1::regex_constants</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.1</td><td align="left">Bitmask Type <code class="code">syntax_option_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.2</td><td align="left">Bitmask Type <code class="code">regex_constants::match_flag_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.5.3</td><td align="left">Implementation defined <code class="code">error_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.6</td><td align="left">Class <code class="code">regex_error</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.7</td><td align="left">Class template <code class="code">regex_traits</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8</td><td align="left">Class template <code class="code">basic_regex</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.1</td><td align="left"><code class="code">basic_regex</code> constants</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.2</td><td align="left"><code class="code">basic_regex</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.3</td><td align="left"><code class="code">basic_regex</code> assign</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.4</td><td align="left"><code class="code">basic_regex</code> constant operations</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.5</td><td align="left"><code class="code">basic_regex</code> locale</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.6</td><td align="left"><code class="code">basic_regex</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.7</td><td align="left"><code class="code">basic_regex</code> non-member functions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.8.7.1</td><td align="left"><code class="code">basic_regex</code> non-member swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9</td><td align="left">Class template <code class="code">sub_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9.1</td><td align="left"><code class="code">sub_match</code> members</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.9.2</td><td align="left"><code class="code">sub_match</code> non-member operators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10</td><td align="left">Class template <code class="code">match_results</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.1</td><td align="left"><code class="code">match_results</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.2</td><td align="left"><code class="code">match_results</code> size</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.3</td><td align="left"><code class="code">match_results</code> element access</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.4</td><td align="left"><code class="code">match_results</code> formatting</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.5</td><td align="left"><code class="code">match_results</code> allocator</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.10.6</td><td align="left"><code class="code">match_results</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11</td><td align="left">Regular expression algorithms</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.1</td><td align="left">exceptions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.2</td><td align="left"><code class="code">regex_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.3</td><td align="left"><code class="code">regex_search</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.11.4</td><td align="left"><code class="code">regex_replace</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12</td><td align="left">Regular expression Iterators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1</td><td align="left">Class template <code class="code">regex_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.1</td><td align="left"><code class="code">regex_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.2</td><td align="left"><code class="code">regex_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.3</td><td align="left"><code class="code">regex_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.1.4</td><td align="left"><code class="code">regex_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2</td><td align="left">Class template <code class="code">regex_token_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.1</td><td align="left"><code class="code">regex_token_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.2</td><td align="left"><code class="code">regex_token_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.3</td><td align="left"><code class="code">regex_token_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.12.2.4</td><td align="left"><code class="code">regex_token_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">7.13</td><td align="left">Modified ECMAScript regular expression grammar</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>8</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>C Compatibility</em></span></td></tr><tr><td align="left">8.1</td><td align="left">Additions to header <code class="code">&lt;complex&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.2</td><td align="left">Function <code class="code">acos</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.3</td><td align="left">Function <code class="code">asin</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.4</td><td align="left">Function <code class="code">atan</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.5</td><td align="left">Function <code class="code">acosh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.6</td><td align="left">Function <code class="code">asinh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.7</td><td align="left">Function <code class="code">atanh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.8</td><td align="left">Function <code class="code">fabs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.1.9</td><td align="left">Additional Overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.2</td><td align="left">Header <code class="code">&lt;ccomplex&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">8.3</td><td align="left">Header <code class="code">&lt;complex.h&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">8.4</td><td align="left">Additions to header <code class="code">&lt;cctype&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.4.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.4.2</td><td align="left">Function <code class="code">isblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.5</td><td align="left">Additions to header <code class="code">&lt;ctype.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6</td><td align="left">Header <code class="code">&lt;cfenv&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.6.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.7</td><td align="left">Header <code class="code">&lt;fenv.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.8</td><td align="left">Additions to header <code class="code">&lt;cfloat&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.9</td><td align="left">Additions to header <code class="code">&lt;float.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.10</td><td align="left">Additions to header <code class="code">&lt;ios&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.10.1</td><td align="left">Synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.10.2</td><td align="left">Function <code class="code">hexfloat</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.11</td><td align="left">Header <code class="code">&lt;cinttypes&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.11.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 557</td></tr><tr><td align="left">8.11.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.12</td><td align="left">Header <code class="code">&lt;inttypes.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.13</td><td align="left">Additions to header <code class="code">&lt;climits&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.14</td><td align="left">Additions to header <code class="code">&lt;limits.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.15</td><td align="left">Additions to header <code class="code">&lt;locale&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">8.16</td><td align="left">Additions to header <code class="code">&lt;cmath&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.3</td><td align="left">Function template definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.16.4</td><td align="left">Additional overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 568; DR 550</td></tr><tr><td align="left">8.17</td><td align="left">Additions to header <code class="code">&lt;math.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.18</td><td align="left">Additions to header <code class="code">&lt;cstdarg&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.19</td><td align="left">Additions to header <code class="code">&lt;stdarg.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.20</td><td align="left">The header <code class="code">&lt;cstdbool&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.21</td><td align="left">The header <code class="code">&lt;stdbool.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22</td><td align="left">The header <code class="code">&lt;cstdint&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.22.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.23</td><td align="left">The header <code class="code">&lt;stdint.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24</td><td align="left">Additions to header <code class="code">&lt;cstdio&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.24.3</td><td align="left">Additional format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.24.4</td><td align="left">Additions to header <code class="code">&lt;stdio.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25</td><td align="left">Additions to header <code class="code">&lt;cstdlib&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.3</td><td align="left">Function <code class="code">abs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.25.4</td><td align="left">Function <code class="code">div</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.26</td><td align="left">Additions to header <code class="code">&lt;stdlib.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.27</td><td align="left">Header <code class="code">&lt;ctgmath&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">8.28</td><td align="left">Header <code class="code">&lt;tgmath.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">8.29</td><td align="left">Additions to header <code class="code">&lt;ctime&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.30</td><td align="left">Additions to header <code class="code">&lt;cwchar&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.30.3</td><td align="left">Additional wide format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">8.31</td><td align="left">Additions to header <code class="code">&lt;wchar.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32</td><td align="left">Additions to header <code class="code">&lt;cwctype&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.32.2</td><td align="left">Function <code class="code">iswblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">8.33</td><td align="left">Additions to header <code class="code">&lt;wctype.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p>
Footnotes
</p><p>
The shared_ptr implementation uses some code from the
@@ -6120,7 +6120,7 @@ presence of the required flag.
</p><p>
This page describes the C++0x support in mainline GCC SVN, not in any
particular release.
-</p><div class="table"><a id="id399554"></a><p class="title"><b>Table 1.2. C++ 200x Implementation Status</b></p><div class="table-contents"><table summary="C++ 200x Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Done</th><th align="left">Broken</th><th align="left">Missing</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>20</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">20.2</td><td align="left">Utility Components</td><td align="left"> </td><td align="left"> </td><td align="left">incomplete</td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left">forward/move helpers</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left">Pairs</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Header <code class="code">&lt;tuple&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1</td><td align="left">Class template <code class="code">tuple</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.1</td><td align="left">Construction</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.2</td><td align="left">Tuple creation functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.3</td><td align="left">Tuple helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.4</td><td align="left">Element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.5</td><td align="left">Relational operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4</td><td colspan="5" align="left"><span class="emphasis"><em>Metaprogramming and type traits</em></span></td></tr><tr><td align="left">20.4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2</td><td align="left">Header <code class="code">&lt;type_traits&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.3</td><td align="left">Helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.4</td><td align="left">General Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5</td><td align="left">Unary Type Traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.1</td><td align="left">Primary Type Categories</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.2</td><td align="left">Composite type traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.3</td><td align="left">Type properties</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.6</td><td align="left">Relationships between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7</td><td align="left">Transformations between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.1</td><td align="left">Const-volatile modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.2</td><td align="left">Reference modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.3</td><td align="left">Array modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.4</td><td align="left">Pointer modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.8</td><td align="left">Other transformations</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.9</td><td align="left">Implementation requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5 </td><td align="left">Function Objects</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Additions to header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.1</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.2</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.3</td><td align="left">Base</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.4</td><td align="left">Function return types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.14</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11</td><td align="left">Template function bind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1</td><td align="left">Function object binders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.1</td><td align="left">Class template <code class="code">is_bind_expression</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.2</td><td align="left">Class template <code class="code">is_placeholder</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.3</td><td align="left">Function template <code class="code">bind</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.4</td><td align="left">Placeholders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15</td><td align="left">Polymorphic function wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.1</td><td align="left">Class <code class="code">bad_function_call<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.1.1</td><td align="left"><code class="code">bad_function_call</code> constructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2</td><td align="left">Class template <code class="code">function</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.1</td><td align="left"><code class="code">function</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.2</td><td align="left"><code class="code">function</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.3</td><td align="left"><code class="code">function</code> capacity</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.4</td><td align="left"><code class="code">function</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.5</td><td align="left"><code class="code">function</code> target access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.7</td><td align="left">null pointer comparison operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.8</td><td align="left">specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.16</td><td align="left">Class template <code class="code">hash</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Additions to header <code class="code">&lt;memory&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left">missing <code class="code">unique_ptr</code></td></tr><tr><td align="left">20.6.5</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">20.6.6</td><td align="left">Smart pointers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.1</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">See Footnotes.</td></tr><tr><td align="left">20.6.6.2.1</td><td align="left"><code class="code">shared_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.2</td><td align="left"><code class="code">shared_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.3</td><td align="left"><code class="code">shared_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.4</td><td align="left"><code class="code">shared_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.5</td><td align="left"><code class="code">shared_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.6</td><td align="left"><code class="code">shared_ptr</code> creation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">
+</p><div class="table"><a id="id466249"></a><p class="title"><b>Table 1.2. C++ 200x Implementation Status</b></p><div class="table-contents"><table summary="C++ 200x Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Done</th><th align="left">Broken</th><th align="left">Missing</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>20</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">20.2</td><td align="left">Utility Components</td><td align="left"> </td><td align="left"> </td><td align="left">incomplete</td><td align="left"> </td></tr><tr><td align="left">20.2.1</td><td align="left">Operators</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">20.2.2</td><td align="left">forward/move helpers</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">20.2.3</td><td align="left">Pairs</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3</td><td align="left">Header <code class="code">&lt;tuple&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1</td><td align="left">Class template <code class="code">tuple</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.1</td><td align="left">Construction</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.2</td><td align="left">Tuple creation functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.3</td><td align="left">Tuple helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.4</td><td align="left">Element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.3.1.5</td><td align="left">Relational operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4</td><td colspan="5" align="left"><span class="emphasis"><em>Metaprogramming and type traits</em></span></td></tr><tr><td align="left">20.4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.2</td><td align="left">Header <code class="code">&lt;type_traits&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.3</td><td align="left">Helper classes</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.4</td><td align="left">General Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5</td><td align="left">Unary Type Traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.1</td><td align="left">Primary Type Categories</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.2</td><td align="left">Composite type traits</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.5.3</td><td align="left">Type properties</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.6</td><td align="left">Relationships between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7</td><td align="left">Transformations between types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.1</td><td align="left">Const-volatile modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.2</td><td align="left">Reference modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.3</td><td align="left">Array modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.7.4</td><td align="left">Pointer modifications</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.8</td><td align="left">Other transformations</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.4.9</td><td align="left">Implementation requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5 </td><td align="left">Function Objects</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5</td><td align="left">Additions to header <code class="code">&lt;functional&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.1</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.2</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.3</td><td align="left">Base</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.4</td><td align="left">Function return types</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.5.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.14</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11</td><td align="left">Template function bind</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1</td><td align="left">Function object binders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.1</td><td align="left">Class template <code class="code">is_bind_expression</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.2</td><td align="left">Class template <code class="code">is_placeholder</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.3</td><td align="left">Function template <code class="code">bind</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.11.1.4</td><td align="left">Placeholders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15</td><td align="left">Polymorphic function wrappers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.1</td><td align="left">Class <code class="code">bad_function_call<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.1.1</td><td align="left"><code class="code">bad_function_call</code> constructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2</td><td align="left">Class template <code class="code">function</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.1</td><td align="left"><code class="code">function</code> construct/copy/destroy</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.2</td><td align="left"><code class="code">function</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.3</td><td align="left"><code class="code">function</code> capacity</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.4</td><td align="left"><code class="code">function</code> invocation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.5</td><td align="left"><code class="code">function</code> target access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.7</td><td align="left">null pointer comparison operators</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.15.2.8</td><td align="left">specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.5.16</td><td align="left">Class template <code class="code">hash</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6</td><td align="left">Additions to header <code class="code">&lt;memory&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left">missing <code class="code">unique_ptr</code></td></tr><tr><td align="left">20.6.5</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">20.6.6</td><td align="left">Smart pointers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.1</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">See Footnotes.</td></tr><tr><td align="left">20.6.6.2.1</td><td align="left"><code class="code">shared_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.2</td><td align="left"><code class="code">shared_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.3</td><td align="left"><code class="code">shared_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.4</td><td align="left"><code class="code">shared_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.5</td><td align="left"><code class="code">shared_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.6</td><td align="left"><code class="code">shared_ptr</code> creation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm" target="_top">N2351</a>
</td></tr><tr><td align="left">20.6.6.2.7</td><td align="left"><code class="code">shared_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.8</td><td align="left"><code class="code">shared_ptr</code> I/O</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.9</td><td align="left"><code class="code">shared_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.10</td><td align="left"><code class="code">shared_ptr</code> casts</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.2.11</td><td align="left"><code class="code">get_deleter</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3</td><td align="left">Class template <code class="code">weak_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.1</td><td align="left"><code class="code">weak_ptr</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.2</td><td align="left"><code class="code">weak_ptr</code> destructor</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.3</td><td align="left"><code class="code">weak_ptr</code> assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.4</td><td align="left"><code class="code">weak_ptr</code> modifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.5</td><td align="left"><code class="code">weak_ptr</code> observers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.6</td><td align="left"><code class="code">weak_ptr</code> comparison</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.3.7</td><td align="left"><code class="code">weak_ptr</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">20.6.6.4</td><td align="left">Class template <code class="code">enable_shared_from_this</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>23</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Containers</em></span></td></tr><tr><td align="left">23.2.1</td><td align="left">Header <code class="code">&lt;array&gt;</code> synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1</td><td align="left">Class template array</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.1</td><td align="left"><code class="code">array</code> constructors, copy, and assignment</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.2</td><td align="left"><code class="code">array</code> specialized algorithms</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.3</td><td align="left"><code class="code">array </code>size</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.4</td><td align="left"><code class="code">array </code>data</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.5</td><td align="left">Zero sized <code class="code">array</code>s</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1.6</td><td align="left">Tuple interface to class template <code class="code">array</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4</td><td align="left">Unordered associative containers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1</td><td align="left">Class template <code class="code">unordered_map</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1.1</td><td align="left"><code class="code">unordered_map</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1.2</td><td align="left"><code class="code">unordered_map</code> element access</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.1.3</td><td align="left"><code class="code">unordered_map</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.2</td><td align="left">Class template <code class="code">unordered_multimap</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.2.1</td><td align="left"><code class="code">unordered_multimap</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.2.2</td><td align="left"><code class="code">unordered_multimap</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.3</td><td align="left">Class template <code class="code">unordered_set</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.3.1</td><td align="left"><code class="code">unordered_set</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.3.2</td><td align="left"><code class="code">unordered_set</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.4</td><td align="left">Class template <code class="code">unordered_multiset<code class="code"></code></code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.4.1</td><td align="left"><code class="code">unordered_multiset</code> constructors</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4.4.2</td><td align="left"><code class="code">unordered_multiset</code> swap</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>26</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Numerics</em></span></td></tr><tr><td align="left">26.4</td><td align="left">Random number generation</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.1</td><td align="left">Requirements</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.2</td><td align="left">Header <code class="code">&lt;random&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.3</td><td align="left">Random number engine class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.3.1</td><td align="left">Class template <code class="code">linear_congruential_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.3.2</td><td align="left">Class template <code class="code">mersenne_twister_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.3.3</td><td align="left">Class template <code class="code">subtract_with_carry_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4</td><td align="left">Random number engine adaptor class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4.1</td><td align="left">Class template <code class="code">discard_block_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4.2</td><td align="left">Class template <code class="code">independent_bits_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4.3</td><td align="left">Class template <code class="code">shuffle_order_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.4.4</td><td align="left">Class template <code class="code">xor_combine_engine</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">operator()() per N2079</td></tr><tr><td align="left">26.4.5</td><td align="left">Engines and engine adaptors with predefined parameters</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.6</td><td align="left">Class <code class="code">random_device</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.7</td><td align="left">Utilities</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.7.1</td><td align="left">Class <code class="code">seed_seq</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.7.2</td><td align="left">Function template <code class="code">generate_canonical</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8</td><td align="left">Random number generation class templates</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.1</td><td align="left">Uniform distributions</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.8.1</td><td align="left">Class template <code class="code">uniform_int_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.1</td><td align="left">Class template <code class="code">uniform_real_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.2</td><td align="left">Bernoulli distributions</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.8.2.1</td><td align="left">Class <code class="code">bernoulli_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.2.2</td><td align="left">Class template <code class="code">binomial_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.2.3</td><td align="left">Class template <code class="code">geometric_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.2.4</td><td align="left">Class template <code class="code">negative_binomial_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.3</td><td align="left">Poisson distributions</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.1</td><td align="left">Class template <code class="code">poisson_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.2</td><td align="left">Class template <code class="code">exponential_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.3</td><td align="left">Class template <code class="code">gamma_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.4</td><td align="left">Class template <code class="code">weibull_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.3.5</td><td align="left">Class template <code class="code">extreme_value_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4</td><td align="left">Normal distributions</td><td align="left"> </td><td align="left"> </td><td align="left">partial</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.1</td><td align="left">Class template <code class="code">normal_distribution</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.2</td><td align="left">Class template <code class="code">lognormal_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.3</td><td align="left">Class template <code class="code">chi_squared_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.4</td><td align="left">Class template <code class="code">cauchy_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.5</td><td align="left">Class template <code class="code">fisher_f_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.4.6</td><td align="left">Class template <code class="code">student_t_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.5</td><td align="left">Sampling distributions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.5.1</td><td align="left">Class template <code class="code">discrete_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.5.1</td><td align="left">Class template <code class="code">piecewise_constant_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">26.4.8.5.1</td><td align="left">Class template <code class="code">general_pdf_distribution</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>28</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Regular Expressions</em></span></td></tr><tr><td align="left">28.1</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.2</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.3</td><td align="left">Regular expressions summary</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.4</td><td align="left">Header <code class="code">&lt;regex&gt;</code> synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.5</td><td align="left">Namespace <code class="code">tr1::regex_constants</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.5.1</td><td align="left">Bitmask Type <code class="code">syntax_option_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.5.2</td><td align="left">Bitmask Type <code class="code">regex_constants::match_flag_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.5.3</td><td align="left">Implementation defined <code class="code">error_type</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.6</td><td align="left">Class <code class="code">regex_error</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.7</td><td align="left">Class template <code class="code">regex_traits</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8</td><td align="left">Class template <code class="code">basic_regex</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.1</td><td align="left"><code class="code">basic_regex</code> constants</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.2</td><td align="left"><code class="code">basic_regex</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.3</td><td align="left"><code class="code">basic_regex</code> assign</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.4</td><td align="left"><code class="code">basic_regex</code> constant operations</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.5</td><td align="left"><code class="code">basic_regex</code> locale</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.6</td><td align="left"><code class="code">basic_regex</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.7</td><td align="left"><code class="code">basic_regex</code> non-member functions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.8.7.1</td><td align="left"><code class="code">basic_regex</code> non-member swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.9</td><td align="left">Class template <code class="code">sub_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.9.1</td><td align="left"><code class="code">sub_match</code> members</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.9.2</td><td align="left"><code class="code">sub_match</code> non-member operators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10</td><td align="left">Class template <code class="code">match_results</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.1</td><td align="left"><code class="code">match_results</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.2</td><td align="left"><code class="code">match_results</code> size</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.3</td><td align="left"><code class="code">match_results</code> element access</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.4</td><td align="left"><code class="code">match_results</code> formatting</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.5</td><td align="left"><code class="code">match_results</code> allocator</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.10.6</td><td align="left"><code class="code">match_results</code> swap</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11</td><td align="left">Regular expression algorithms</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11.1</td><td align="left">exceptions</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11.2</td><td align="left"><code class="code">regex_match</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11.3</td><td align="left"><code class="code">regex_search</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.11.4</td><td align="left"><code class="code">regex_replace</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12</td><td align="left">Regular expression Iterators</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1</td><td align="left">Class template <code class="code">regex_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1.1</td><td align="left"><code class="code">regex_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1.2</td><td align="left"><code class="code">regex_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1.3</td><td align="left"><code class="code">regex_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.1.4</td><td align="left"><code class="code">regex_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2</td><td align="left">Class template <code class="code">regex_token_iterator</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2.1</td><td align="left"><code class="code">regex_token_iterator</code> constructors</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2.2</td><td align="left"><code class="code">regex_token_iterator</code> comparisons</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2.3</td><td align="left"><code class="code">regex_token_iterator</code> dereference</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.12.2.4</td><td align="left"><code class="code">regex_token_iterator</code> increment</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">28.13</td><td align="left">Modified ECMAScript regular expression grammar</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>C</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>C Compatibility</em></span></td></tr><tr><td align="left">C2.1</td><td align="left">Additions to header <code class="code">&lt;complex&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.2</td><td align="left">Function <code class="code">acos</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.3</td><td align="left">Function <code class="code">asin</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.4</td><td align="left">Function <code class="code">atan</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.5</td><td align="left">Function <code class="code">acosh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.6</td><td align="left">Function <code class="code">asinh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.7</td><td align="left">Function <code class="code">atanh</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.8</td><td align="left">Function <code class="code">fabs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.1.9</td><td align="left">Additional Overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.2</td><td align="left">Header <code class="code">&lt;ccomplex&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">C2.3</td><td align="left">Header <code class="code">&lt;complex.h&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left">DR 551</td></tr><tr><td align="left">C2.4</td><td align="left">Additions to header <code class="code">&lt;cctype&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.4.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.4.2</td><td align="left">Function <code class="code">isblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.5</td><td align="left">Additions to header <code class="code">&lt;ctype.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.6</td><td align="left">Header <code class="code">&lt;cfenv&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.6.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.6.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.7</td><td align="left">Header <code class="code">&lt;fenv.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.8</td><td align="left">Additions to header <code class="code">&lt;cfloat&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.9</td><td align="left">Additions to header <code class="code">&lt;float.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.10</td><td align="left">Additions to header <code class="code">&lt;ios&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">C2.10.1</td><td align="left">Synopsis</td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">C2.10.2</td><td align="left">Function <code class="code">hexfloat</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">C2.11</td><td align="left">Header <code class="code">&lt;cinttypes&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.11.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 557</td></tr><tr><td align="left">C2.11.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.12</td><td align="left">Header <code class="code">&lt;inttypes.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.13</td><td align="left">Additions to header <code class="code">&lt;climits&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.14</td><td align="left">Additions to header <code class="code">&lt;limits.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.15</td><td align="left">Additions to header <code class="code">&lt;locale&gt;</code></td><td align="left"> </td><td align="left"> </td><td align="left">missing</td><td align="left"> </td></tr><tr><td align="left">C2.16</td><td align="left">Additions to header <code class="code">&lt;cmath&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.16.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.16.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.16.3</td><td align="left">Function template definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.16.4</td><td align="left">Additional overloads</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 568; DR 550</td></tr><tr><td align="left">C2.17</td><td align="left">Additions to header <code class="code">&lt;math.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.18</td><td align="left">Additions to header <code class="code">&lt;cstdarg&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.19</td><td align="left">Additions to header <code class="code">&lt;stdarg.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.20</td><td align="left">The header <code class="code">&lt;cstdbool&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.21</td><td align="left">The header <code class="code">&lt;stdbool.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.22</td><td align="left">The header <code class="code">&lt;cstdint&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.22.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.22.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.23</td><td align="left">The header <code class="code">&lt;stdint.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.24</td><td align="left">Additions to header <code class="code">&lt;cstdio&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.24.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.24.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.24.3</td><td align="left">Additional format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">C2.24.4</td><td align="left">Additions to header <code class="code">&lt;stdio.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25</td><td align="left">Additions to header <code class="code">&lt;cstdlib&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25.3</td><td align="left">Function <code class="code">abs</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.25.4</td><td align="left">Function <code class="code">div</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.26</td><td align="left">Additions to header <code class="code">&lt;stdlib.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.27</td><td align="left">Header <code class="code">&lt;ctgmath&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">C2.28</td><td align="left">Header <code class="code">&lt;tgmath.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">DR 551</td></tr><tr><td align="left">C2.29</td><td align="left">Additions to header <code class="code">&lt;ctime&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">C2.30</td><td align="left">Additions to header <code class="code">&lt;cwchar&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.30.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.30.2</td><td align="left">Definitions</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.30.3</td><td align="left">Additional wide format specifiers</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left">C library responsibility</td></tr><tr><td align="left">C2.31</td><td align="left">Additions to header <code class="code">&lt;wchar.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.32</td><td align="left">Additions to header <code class="code">&lt;cwctype&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.32.1</td><td align="left">Synopsis</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.32.2</td><td align="left">Function <code class="code">iswblank</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">C2.33</td><td align="left">Additions to header <code class="code">&lt;wctype.h&gt;</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><span class="emphasis"><em>D</em></span></td><td colspan="5" align="left"><span class="emphasis"><em>Compatibility Features</em></span></td></tr><tr><td align="left">D.6</td><td align="left">Old iostream members</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">D.8</td><td align="left">Binders</td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"><a class="ulink" href="http://gcc.gnu.org/PR33911" target="_top">33911</a></td></tr><tr><td align="left">D.9</td><td align="left">Class template <code class="code">auto_ptr</code></td><td align="left">done</td><td align="left"> </td><td align="left"> </td><td align="left"><a class="ulink" href="http://gcc.gnu.org/PR33911" target="_top">33911</a></td></tr></tbody></table></div></div><br class="table-break" /><p>
Footnotes
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch01s02.html b/libstdc++-v3/doc/html/manual/bk01pt01ch01s02.html
index fe9055c8bb1..efdbda2cb17 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt01ch01s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch01s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>License</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch01.html" title="Chapter 1. Status" /><link rel="prev" href="bk01pt01ch01.html" title="Chapter 1. Status" /><link rel="next" href="bk01pt01ch01s03.html" title="Bugs" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch01.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Status</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch01s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.status.license"></a>License</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>License</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch01.html" title="Chapter 1. Status" /><link rel="prev" href="bk01pt01ch01.html" title="Chapter 1. Status" /><link rel="next" href="bk01pt01ch01s03.html" title="Bugs" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch01.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Status</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch01s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.status.license"></a>License</h2></div></div></div><p>
There are two licenses affecting GNU libstdc++: one for the code,
and one for the documentation.
</p><p>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch01s03.html b/libstdc++-v3/doc/html/manual/bk01pt01ch01s03.html
index d9a5a691d1c..d8ecde5fd11 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt01ch01s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch01s03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Bugs</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch01.html" title="Chapter 1. Status" /><link rel="prev" href="bk01pt01ch01s02.html" title="License" /><link rel="next" href="bk01pt01ch02.html" title="Chapter 2. Setup" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Bugs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch01s02.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Status</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch02.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.status.bugs"></a>Bugs</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.bugs.impl"></a>Implementation Bugs</h3></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Bugs</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch01.html" title="Chapter 1. Status" /><link rel="prev" href="bk01pt01ch01s02.html" title="License" /><link rel="next" href="bk01pt01ch02.html" title="Chapter 2. Setup" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Bugs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch01s02.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Status</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch02.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.status.bugs"></a>Bugs</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.bugs.impl"></a>Implementation Bugs</h3></div></div></div><p>
Information on known bugs, details on efforts to fix them, and
fixed bugs are all available as part of the GCC bug tracking
system, <a class="ulink" href="http://gcc.gnu.org/bugzilla" target="_top">bugzilla</a>, with the
@@ -49,6 +49,9 @@
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#22" target="_top">22</a>:
<span class="emphasis"><em>Member open vs flags</em></span>
</span></dt><dd><p>Re-opening a file stream does <span class="emphasis"><em>not</em></span> clear the state flags.
+ </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#23" target="_top">23</a>:
+ <span class="emphasis"><em>Num_get overflow result</em></span>
+ </span></dt><dd><p>Implement the proposed resolution.
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#25" target="_top">25</a>:
<span class="emphasis"><em>String operator&lt;&lt; uses width() value wrong</em></span>
</span></dt><dd><p>Padding issues.
@@ -228,6 +231,9 @@
<span class="emphasis"><em>Const overload of valarray::operator[] returns
by value</em></span>
</span></dt><dd><p>Change it to return a <code class="code">const T&amp;</code>.
+ </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#396" target="_top">396</a>:
+ <span class="emphasis"><em>what are characters zero and one</em></span>
+ </span></dt><dd><p>Implement the proposed resolution.
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#402" target="_top">402</a>:
<span class="emphasis"><em>Wrong new expression in [some_]allocator::construct</em></span>
</span></dt><dd><p>Replace "new" with "::new".
@@ -278,13 +284,13 @@
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#543" target="_top">543</a>:
<span class="emphasis"><em>valarray slice default constructor</em></span>
</span></dt><dd><p>Follow the straightforward proposed resolution.
- </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#550" target="_top">550</a>:
+ </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#550" target="_top">550</a>:
<span class="emphasis"><em>What should the return type of pow(float,int) be?</em></span>
</span></dt><dd><p>In C++0x mode, remove the pow(float,int), etc., signatures.
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#586" target="_top">586</a>:
<span class="emphasis"><em>string inserter not a formatted function</em></span>
</span></dt><dd><p>Change it to be a formatted output function (i.e. catch exceptions).
- </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#596" target="_top">596</a>:
+ </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#596" target="_top">596</a>:
<span class="emphasis"><em>27.8.1.3 Table 112 omits "a+" and "a+b" modes</em></span>
</span></dt><dd><p>Add the missing modes to fopen_mode.
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#660" target="_top">660</a>:
@@ -300,20 +306,16 @@
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#695" target="_top">695</a>:
<span class="emphasis"><em>ctype&lt;char&gt;::classic_table() not accessible</em></span>
</span></dt><dd><p>Make the member functions table and classic_table public.
- </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#761" target="_top">761</a>:
+ </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#761" target="_top">761</a>:
<span class="emphasis"><em>unordered_map needs an at() member function</em></span>
</span></dt><dd><p>In C++0x mode, add at() and at() const.
- </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#775" target="_top">775</a>:
+ </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#775" target="_top">775</a>:
<span class="emphasis"><em>Tuple indexing should be unsigned?</em></span>
</span></dt><dd><p>Implement the int -&gt; size_t replacements.
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#776" target="_top">776</a>:
<span class="emphasis"><em>Undescribed assign function of std::array</em></span>
</span></dt><dd><p>In C++0x mode, remove assign, add fill.
- </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#778" target="_top">778</a>:
- <span class="emphasis"><em>std::bitset does not have any constructor taking a string
- literal</em></span>
- </span></dt><dd><p>Add it.
- </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#781" target="_top">781</a>:
+ </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-defects.html#781" target="_top">781</a>:
<span class="emphasis"><em>std::complex should add missing C99 functions</em></span>
</span></dt><dd><p>In C++0x mode, add std::proj.
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#809" target="_top">809</a>:
@@ -322,4 +324,7 @@
</p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#844" target="_top">844</a>:
<span class="emphasis"><em>complex pow return type is ambiguous</em></span>
</span></dt><dd><p>In C++0x mode, remove the pow(complex&lt;T&gt;, int) signature.
+ </p></dd><dt><span class="term"><a class="ulink" href="../ext/lwg-active.html#853" target="_top">853</a>:
+ <span class="emphasis"><em>to_string needs updating with zero and one</em></span>
+ </span></dt><dd><p>Update / add the signatures.
</p></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch01s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt01ch01.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt01ch02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">License </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 2. Setup</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch02.html b/libstdc++-v3/doc/html/manual/bk01pt01ch02.html
index 90687415529..b6738731ea6 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt01ch02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 2. Setup</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I. Introduction" /><link rel="prev" href="bk01pt01ch01s03.html" title="Bugs" /><link rel="next" href="configure.html" title="Configure" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Setup</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch01s03.html">Prev</a> </td><th width="60%" align="center">Part I. Introduction</th><td width="20%" align="right"> <a accesskey="n" href="configure.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.setup"></a>Chapter 2. Setup</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch02s03.html">Make</a></span></dt><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></div><p>To transform libstdc++ sources into installed include files
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 2. Setup</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I. Introduction" /><link rel="prev" href="bk01pt01ch01s03.html" title="Bugs" /><link rel="next" href="configure.html" title="Configure" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Setup</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch01s03.html">Prev</a> </td><th width="60%" align="center">Part I. Introduction</th><td width="20%" align="right"> <a accesskey="n" href="configure.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.setup"></a>Chapter 2. Setup</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch02s03.html">Make</a></span></dt><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></div><p>To transform libstdc++ sources into installed include files
and properly built binaries useful for linking to other software is
a multi-step process. Steps include getting the sources,
configuring and building the sources, testing, and installation.
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch02s03.html b/libstdc++-v3/doc/html/manual/bk01pt01ch02s03.html
index 8d8e1df527c..51d0c8c99d1 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt01ch02s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch02s03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Make</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="configure.html" title="Configure" /><link rel="next" href="test.html" title="Test" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Make</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="configure.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="test.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.make"></a>Make</h2></div></div></div><p>If you have never done this before, you should read the basic
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Make</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="configure.html" title="Configure" /><link rel="next" href="test.html" title="Test" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Make</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="configure.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="test.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.make"></a>Make</h2></div></div></div><p>If you have never done this before, you should read the basic
<a class="ulink" href="http://gcc.gnu.org/install/" target="_top">GCC Installation
Instructions</a> first. Read <span class="emphasis"><em>all of them</em></span>.
<span class="emphasis"><em>Twice.</em></span>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html b/libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html
index 53854936694..537a34b3171 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch03s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Headers</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="using.html" title="Chapter 3. Using" /><link rel="next" href="bk01pt01ch03s03.html" title="Namespaces" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Headers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="using.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.headers"></a>Headers</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.all"></a>Header Files</h3></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Headers</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="using.html" title="Chapter 3. Using" /><link rel="next" href="bk01pt01ch03s03.html" title="Namespaces" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Headers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="using.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.headers"></a>Headers</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.all"></a>Header Files</h3></div></div></div><p>
The C++ standard specifies the entire set of header files that
must be available to all hosted implementations. Actually, the
word "files" is a misnomer, since the contents of the
@@ -20,14 +20,16 @@
upcoming 200x standard.
</p><p>
C++98/03 include files. These are available in the default compilation mode, i.e. <code class="code">-std=c++98</code> or <code class="code">-std=gnu++98</code>.
- </p><div class="table"><a id="id446051"></a><p class="title"><b>Table 3.1. C++ 1998 Library Headers</b></p><div class="table-contents"><table summary="C++ 1998 Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="filename">iomanip</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">streambuf</code></td></tr><tr><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">string</code></td></tr><tr><td align="left"><code class="filename">complex</code></td><td align="left"><code class="filename">iosfwd</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">typeinfo</code></td></tr><tr><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">utility</code></td></tr><tr><td align="left"><code class="filename">exception</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">new</code></td><td align="left"><code class="filename">stack</code></td><td align="left"><code class="filename">valarray</code></td></tr><tr><td align="left"><code class="filename">fstream</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="filename">stdexcept</code></td><td align="left"><code class="filename">vector</code></td></tr><tr><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">limits</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id382904"></a><p class="title"><b>Table 3.2. C++ 1998 Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ 1998 Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">cassert</code></td><td align="left"><code class="filename">ciso646</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">cstdio</code></td><td align="left"><code class="filename">ctime</code></td></tr><tr><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">csignal</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cwchar</code></td></tr><tr><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">clocale</code></td><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstring</code></td><td align="left"><code class="filename">cwctype</code></td></tr><tr><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">cstddef</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>C++0x include files. These are only available in C++0x compilation mode, i.e. <code class="code">-std=c++0x</code> or <code class="code">-std=gnu++0x</code>.
-</p><p></p><div class="table"><a id="id433029"></a><p class="title"><b>Table 3.3. C++ 200x Library Headers</b></p><div class="table-contents"><table summary="C++ 200x Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="filename">iomanip</code></td><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">regex</code></td><td align="left"><code class="filename">tuple</code></td></tr><tr><td align="left"><code class="filename">array</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">typeinfo</code></td></tr><tr><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">iosfwd</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">type_traits</code></td></tr><tr><td align="left"><code class="filename">complex</code></td><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">new</code></td><td align="left"><code class="filename">stack</code></td><td align="left"><code class="filename">unordered_map</code></td></tr><tr><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="filename">stdexcept</code></td><td align="left"><code class="filename">unordered_set</code></td></tr><tr><td align="left"><code class="filename">exception</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">streambuf</code></td><td align="left"><code class="filename">utility</code></td></tr><tr><td align="left"><code class="filename">fstream</code></td><td align="left"><code class="filename">limits</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="filename">valarray</code></td></tr><tr><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="filename">random</code></td><td align="left"><code class="filename">system_error</code></td><td align="left"><code class="filename">vector</code></td></tr><tr><td align="left"><code class="filename">condition_variable</code></td><td align="left"><code class="filename">mutex</code></td><td align="left"><code class="filename">thread</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id382218"></a><p class="title"><b>Table 3.4. C++ 200x Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ 200x Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">cassert</code></td><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">cstddef</code></td><td align="left"><code class="filename">ctgmath</code></td></tr><tr><td align="left"><code class="filename">ccomplex</code></td><td align="left"><code class="filename">cinttypes</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">cstdint</code></td><td align="left"><code class="filename">ctime</code></td></tr><tr><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">ciso646</code></td><td align="left"><code class="filename">csignal</code></td><td align="left"><code class="filename">cstdio</code></td><td align="left"><code class="filename">cuchar</code></td></tr><tr><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cwchar</code></td></tr><tr><td align="left"><code class="filename">cfenv</code></td><td align="left"><code class="filename">clocale</code></td><td align="left"><code class="filename">cstdbool</code></td><td align="left"><code class="filename">cstring</code></td><td align="left"><code class="filename">cwctype</code></td></tr><tr><td align="left"><code class="filename">cstdatomic</code></td><td align="left"> </td><td align="left"> </td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p>
+ </p><div class="table"><a id="id516690"></a><p class="title"><b>Table 3.1. C++ 1998 Library Headers</b></p><div class="table-contents"><table summary="C++ 1998 Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">complex</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">exception</code></td></tr><tr><td align="left"><code class="filename">fstream</code></td><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">iomanip</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">iosfwd</code></td></tr><tr><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">limits</code></td><td align="left"><code class="filename">list</code></td></tr><tr><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">new</code></td><td align="left"><code class="filename">numeric</code></td></tr><tr><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">stack</code></td></tr><tr><td align="left"><code class="filename">stdexcept</code></td><td align="left"><code class="filename">streambuf</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="filename">utility</code></td><td align="left"><code class="filename">typeinfo</code></td></tr><tr><td align="left"><code class="filename">valarray</code></td><td align="left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id508989"></a><p class="title"><b>Table 3.2. C++ 1998 Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ 1998 Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">cassert</code></td><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">ciso646</code></td></tr><tr><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">clocale</code></td><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">csignal</code></td></tr><tr><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstddef</code></td><td align="left"><code class="filename">cstdio</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cstring</code></td></tr><tr><td align="left"><code class="filename">ctime</code></td><td align="left"><code class="filename">cwchar</code></td><td align="left"><code class="filename">cwctype</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>
+C++0x include files. These are only available in C++0x compilation
+mode, i.e. <code class="literal">-std=c++0x</code> or <code class="literal">-std=gnu++0x</code>.
+</p><p></p><div class="table"><a id="id506064"></a><p class="title"><b>Table 3.3. C++ 200x Library Headers</b></p><div class="table-contents"><table summary="C++ 200x Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /></colgroup><tbody><tr><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="filename">array</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="filename">chrono</code></td><td align="left"><code class="filename">complex</code></td></tr><tr><td align="left"><code class="filename">condition_variable</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="filename">exception</code></td><td align="left"><code class="filename">forward_list</code></td><td align="left"><code class="filename">fstream</code></td></tr><tr><td align="left"><code class="filename">functional</code></td><td align="left"><code class="filename">initalizer_list</code></td><td align="left"><code class="filename">iomanip</code></td><td align="left"><code class="filename">ios</code></td><td align="left"><code class="filename">iosfwd</code></td></tr><tr><td align="left"><code class="filename">iostream</code></td><td align="left"><code class="filename">istream</code></td><td align="left"><code class="filename">iterator</code></td><td align="left"><code class="filename">limits</code></td><td align="left"><code class="filename">list</code></td></tr><tr><td align="left"><code class="filename">locale</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="filename">memory</code></td><td align="left"><code class="filename">mutex</code></td><td align="left"><code class="filename">new</code></td></tr><tr><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="filename">ostream</code></td><td align="left"><code class="filename">queue</code></td><td align="left"><code class="filename">random</code></td><td align="left"><code class="filename">ratio</code></td></tr><tr><td align="left"><code class="filename">regex</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="filename">sstream</code></td><td align="left"><code class="filename">stack</code></td><td align="left"><code class="filename">stdexcept</code></td></tr><tr><td align="left"><code class="filename">streambuf</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="filename">system_error</code></td><td align="left"><code class="filename">thread</code></td><td align="left"><code class="filename">tuple</code></td></tr><tr><td align="left"><code class="filename">type_traits</code></td><td align="left"><code class="filename">typeinfo</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="filename">utility</code></td></tr><tr><td align="left"><code class="filename">valarray</code></td><td align="left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id450972"></a><p class="title"><b>Table 3.4. C++ 200x Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ 200x Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">cassert</code></td><td align="left"><code class="filename">ccomplex</code></td><td align="left"><code class="filename">cctype</code></td><td align="left"><code class="filename">cerrno</code></td><td align="left"><code class="filename">cfenv</code></td></tr><tr><td align="left"><code class="filename">cfloat</code></td><td align="left"><code class="filename">cinttypes</code></td><td align="left"><code class="filename">ciso646</code></td><td align="left"><code class="filename">climits</code></td><td align="left"><code class="filename">clocale</code></td></tr><tr><td align="left"><code class="filename">cmath</code></td><td align="left"><code class="filename">csetjmp</code></td><td align="left"><code class="filename">csignal</code></td><td align="left"><code class="filename">cstdarg</code></td><td align="left"><code class="filename">cstdatomic</code></td></tr><tr><td align="left"><code class="filename">cstdbool</code></td><td align="left"><code class="filename">cstddef</code></td><td align="left"><code class="filename">cstdint</code></td><td align="left"><code class="filename">cstdlib</code></td><td align="left"><code class="filename">cstdio</code></td></tr><tr><td align="left"><code class="filename">cstring</code></td><td align="left"><code class="filename">ctgmath</code></td><td align="left"><code class="filename">ctime</code></td><td align="left"><code class="filename">cuchar</code></td><td align="left"><code class="filename">cwchar</code></td></tr><tr><td align="left"><code class="filename">cwctype</code></td><td align="left"><code class="filename">stdatomic.h</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>
In addition, TR1 includes as:
-</p><div class="table"><a id="id440627"></a><p class="title"><b>Table 3.5. C++ TR1 Library Headers</b></p><div class="table-contents"><table summary="C++ TR1 Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">tr1/array</code></td><td align="left"><code class="filename">tr1/memory</code></td><td align="left"><code class="filename">tr1/regex</code></td><td align="left"><code class="filename">tr1/type_traits</code></td><td align="left"><code class="filename">tr1/unordered_set</code></td></tr><tr><td align="left"><code class="filename">tr1/complex</code></td><td align="left"><code class="filename">tr1/random</code></td><td align="left"><code class="filename">tr1/tuple</code></td><td align="left"><code class="filename">tr1/unordered_map</code></td><td align="left"><code class="filename">tr1/utility</code></td></tr><tr><td align="left"><code class="filename">tr1/functional</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id380897"></a><p class="title"><b>Table 3.6. C++ TR1 Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ TR1 Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">tr1/cmath</code></td><td align="left"><code class="filename">tr1/cfloat</code></td><td align="left"><code class="filename">tr1/cstdarg</code></td><td align="left"><code class="filename">tr1/cstdio</code></td><td align="left"><code class="filename">tr1/ctime</code></td></tr><tr><td align="left"><code class="filename">tr1/ccomplex</code></td><td align="left"><code class="filename">tr1/cinttypes</code></td><td align="left"><code class="filename">tr1/cstdbool</code></td><td align="left"><code class="filename">tr1/cstdlib</code></td><td align="left"><code class="filename">tr1/cwchar</code></td></tr><tr><td align="left"><code class="filename">tr1/cfenv</code></td><td align="left"><code class="filename">tr1/climits</code></td><td align="left"><code class="filename">tr1/cstdint</code></td><td align="left"><code class="filename">tr1/ctgmath</code></td><td align="left"><code class="filename">tr1/cwctype</code></td></tr></tbody></table></div></div><br class="table-break" /><p>
+</p><div class="table"><a id="id474709"></a><p class="title"><b>Table 3.5. C++ TR1 Library Headers</b></p><div class="table-contents"><table summary="C++ TR1 Library Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">tr1/array</code></td><td align="left"><code class="filename">tr1/complex</code></td><td align="left"><code class="filename">tr1/memory</code></td><td align="left"><code class="filename">tr1/functional</code></td><td align="left"><code class="filename">tr1/random</code></td></tr><tr><td align="left"><code class="filename">tr1/regex</code></td><td align="left"><code class="filename">tr1/tuple</code></td><td align="left"><code class="filename">tr1/type_traits</code></td><td align="left"><code class="filename">tr1/unordered_map</code></td><td align="left"><code class="filename">tr1/unordered_set</code></td></tr><tr><td align="left"><code class="filename">tr1/utility</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id474193"></a><p class="title"><b>Table 3.6. C++ TR1 Library Headers for C Library Facilities</b></p><div class="table-contents"><table summary="C++ TR1 Library Headers for C Library Facilities" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">tr1/ccomplex</code></td><td align="left"><code class="filename">tr1/cfenv</code></td><td align="left"><code class="filename">tr1/cfloat</code></td><td align="left"><code class="filename">tr1/cmath</code></td><td align="left"><code class="filename">tr1/cinttypes</code></td></tr><tr><td align="left"><code class="filename">tr1/climits</code></td><td align="left"><code class="filename">tr1/cstdarg</code></td><td align="left"><code class="filename">tr1/cstdbool</code></td><td align="left"><code class="filename">tr1/cstdint</code></td><td align="left"><code class="filename">tr1/cstdio</code></td></tr><tr><td align="left"><code class="filename">tr1/cstdlib</code></td><td align="left"><code class="filename">tr1/ctgmath</code></td><td align="left"><code class="filename">tr1/ctime</code></td><td align="left"><code class="filename">tr1/cwchar</code></td><td align="left"><code class="filename">tr1/cwctype</code></td></tr></tbody></table></div></div><br class="table-break" /><p>
Also included are files for the C++ ABI interface:
-</p><div class="table"><a id="id400536"></a><p class="title"><b>Table 3.7. C++ ABI Headers</b></p><div class="table-contents"><table summary="C++ ABI Headers" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">cxxabi.h</code></td><td align="left"><code class="filename">cxxabi_forced.h</code></td></tr></tbody></table></div></div><br class="table-break" /><p>
+</p><div class="table"><a id="id466545"></a><p class="title"><b>Table 3.7. C++ ABI Headers</b></p><div class="table-contents"><table summary="C++ ABI Headers" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">cxxabi.h</code></td><td align="left"><code class="filename">cxxabi_forced.h</code></td></tr></tbody></table></div></div><br class="table-break" /><p>
And a large variety of extensions.
-</p><div class="table"><a id="id452162"></a><p class="title"><b>Table 3.8. Extension Headers</b></p><div class="table-contents"><table summary="Extension Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">ext/algorithm</code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"><code class="filename">ext/pod_char_traits.h</code></td><td align="left"><code class="filename">ext/stdio_sync_filebuf.h</code></td></tr><tr><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left"><code class="filename">ext/enc_filebuf.h</code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td></tr><tr><td align="left"><code class="filename">ext/atomicity.h</code></td><td align="left"><code class="filename">ext/functional</code></td><td align="left"><code class="filename">ext/numeric</code></td><td align="left"><code class="filename">ext/rb_tree</code></td><td align="left"><code class="filename">ext/typelist.h</code></td></tr><tr><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"><code class="filename">ext/iterator</code></td><td align="left"><code class="filename">ext/numeric_traits.h</code></td><td align="left"><code class="filename">ext/rope</code></td><td align="left"><code class="filename">ext/type_traits.h</code></td></tr><tr><td align="left"><code class="filename">ext/codecvt_specializations.h</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="filename">ext/pb_ds/assoc_container.h</code></td><td align="left"><code class="filename">ext/slist</code></td><td align="left"><code class="filename">ext/vstring.h</code></td></tr><tr><td align="left"><code class="filename">ext/concurrence.h</code></td><td align="left"><code class="filename">ext/memory</code></td><td align="left"><code class="filename">ext/pb_ds/priority_queue.h</code></td><td align="left"><code class="filename">ext/stdio_filebuf.h</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id381166"></a><p class="title"><b>Table 3.9. Extension Debug Headers</b></p><div class="table-contents"><table summary="Extension Debug Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">debug/bitset</code></td><td align="left"><code class="filename">debug/list</code></td><td align="left"><code class="filename">debug/set</code></td><td align="left"><code class="filename">debug/unordered_map</code></td><td align="left"><code class="filename">debug/vector</code></td></tr><tr><td align="left"><code class="filename">debug/deque</code></td><td align="left"><code class="filename">debug/map</code></td><td align="left"><code class="filename">debug/string</code></td><td align="left"><code class="filename">debug/unordered_set</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id393412"></a><p class="title"><b>Table 3.10. Extension Parallel Headers</b></p><div class="table-contents"><table summary="Extension Parallel Headers" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">parallel/algorithm</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr></tbody></table></div></div><br class="table-break" /></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.mixing"></a>Mixing Headers</h3></div></div></div><p> A few simple rules.
+</p><div class="table"><a id="id458800"></a><p class="title"><b>Table 3.8. Extension Headers</b></p><div class="table-contents"><table summary="Extension Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">ext/algorithm</code></td><td align="left"><code class="filename">ext/atomicity.h</code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"><code class="filename">ext/cast.h</code></td></tr><tr><td align="left"><code class="filename">ext/codecvt_specializations.h</code></td><td align="left"><code class="filename">ext/concurrence.h</code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="filename">ext/enc_filebuf.h</code></td><td align="left"><code class="filename">ext/extptr_allocator.h</code></td></tr><tr><td align="left"><code class="filename">ext/functional</code></td><td align="left"><code class="filename">ext/iterator</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="filename">ext/memory</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td></tr><tr><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="filename">ext/numeric</code></td><td align="left"><code class="filename">ext/numeric_traits.h</code></td><td align="left"><code class="filename">ext/pb_ds/assoc_container.h</code></td><td align="left"><code class="filename">ext/pb_ds/priority_queue.h</code></td></tr><tr><td align="left"><code class="filename">ext/pod_char_traits.h</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="filename">ext/rb_tree</code></td><td align="left"><code class="filename">ext/rope</code></td><td align="left"><code class="filename">ext/slist</code></td></tr><tr><td align="left"><code class="filename">ext/stdio_filebuf.h</code></td><td align="left"><code class="filename">ext/stdio_sync_filebuf.h</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left"><code class="filename">ext/typelist.h</code></td><td align="left"><code class="filename">ext/type_traits.h</code></td></tr><tr><td align="left"><code class="filename">ext/vstring.h</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id471622"></a><p class="title"><b>Table 3.9. Extension Debug Headers</b></p><div class="table-contents"><table summary="Extension Debug Headers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">debug/bitset</code></td><td align="left"><code class="filename">debug/deque</code></td><td align="left"><code class="filename">debug/list</code></td><td align="left"><code class="filename">debug/map</code></td><td align="left"><code class="filename">debug/set</code></td></tr><tr><td align="left"><code class="filename">debug/string</code></td><td align="left"><code class="filename">debug/unordered_map</code></td><td align="left"><code class="filename">debug/unordered_set</code></td><td align="left"><code class="filename">debug/vector</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p></p><div class="table"><a id="id475105"></a><p class="title"><b>Table 3.10. Extension Parallel Headers</b></p><div class="table-contents"><table summary="Extension Parallel Headers" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td align="left"><code class="filename">parallel/algorithm</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr></tbody></table></div></div><br class="table-break" /></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.mixing"></a>Mixing Headers</h3></div></div></div><p> A few simple rules.
</p><p>First, mixing different dialects of the standard headers is not
possible. It's an all-or-nothing affair. Thus, code like
</p><pre class="programlisting">
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch03s03.html b/libstdc++-v3/doc/html/manual/bk01pt01ch03s03.html
index bb6e28196fd..2250ea69fec 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt01ch03s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch03s03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Namespaces</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s02.html" title="Headers" /><link rel="next" href="bk01pt01ch03s04.html" title="Macros" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Namespaces</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s02.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s04.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.namespaces"></a>Namespaces</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.namespaces.all"></a>Available Namespaces</h3></div></div></div><p> There are three main namespaces.
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Namespaces</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s02.html" title="Headers" /><link rel="next" href="bk01pt01ch03s04.html" title="Macros" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Namespaces</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s02.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s04.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.namespaces"></a>Namespaces</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.namespaces.all"></a>Available Namespaces</h3></div></div></div><p> There are three main namespaces.
</p><div class="itemizedlist"><ul type="disc"><li><p>std</p><p>The ISO C++ standards specify that "all library entities are defined
within namespace std." This includes namespaces nested
within <code class="code">namespace std</code>, such as <code class="code">namespace
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch03s04.html b/libstdc++-v3/doc/html/manual/bk01pt01ch03s04.html
index 87423b10658..3d839e9afe3 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt01ch03s04.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch03s04.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Macros</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s03.html" title="Namespaces" /><link rel="next" href="bk01pt01ch03s05.html" title="Concurrency" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Macros</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s03.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.macros"></a>Macros</h2></div></div></div><p>All pre-processor switches and configurations are all gathered
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Macros</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s03.html" title="Namespaces" /><link rel="next" href="bk01pt01ch03s05.html" title="Concurrency" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Macros</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s03.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.macros"></a>Macros</h2></div></div></div><p>All pre-processor switches and configurations are all gathered
in the file <code class="code">c++config.h</code>, which is generated during
the libstdc++ configuration and build process, and included by
files part of the public libstdc++ API. Most of these macros
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch03s05.html b/libstdc++-v3/doc/html/manual/bk01pt01ch03s05.html
index c590c7de8cf..d814ad6034e 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt01ch03s05.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch03s05.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Concurrency</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s04.html" title="Macros" /><link rel="next" href="bk01pt01ch03s06.html" title="Exceptions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Concurrency</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s04.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s06.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.concurrency"></a>Concurrency</h2></div></div></div><p>This section discusses issues surrounding the proper compilation
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Concurrency</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s04.html" title="Macros" /><link rel="next" href="bk01pt01ch03s06.html" title="Exceptions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Concurrency</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s04.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s06.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.concurrency"></a>Concurrency</h2></div></div></div><p>This section discusses issues surrounding the proper compilation
of multithreaded applications which use the Standard C++
library. This information is GCC-specific since the C++
standard does not address matters of multithreaded applications.
diff --git a/libstdc++-v3/doc/html/manual/bk01pt01ch03s06.html b/libstdc++-v3/doc/html/manual/bk01pt01ch03s06.html
index 4bee96e55bc..3fbe4e440d3 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt01ch03s06.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt01ch03s06.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s05.html" title="Concurrency" /><link rel="next" href="debug.html" title="Debugging Support" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s05.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="debug.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.exception"></a>Exceptions</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="intro.using.exception.propagating"></a>Propagating Exceptions aka Exception Neutrality</h3></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s05.html" title="Concurrency" /><link rel="next" href="debug.html" title="Debugging Support" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s05.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="debug.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.exception"></a>Exceptions</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="intro.using.exception.propagating"></a>Propagating Exceptions aka Exception Neutrality</h3></div></div></div><p>
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="intro.using.exception.safety"></a>Exception Safety</h3></div></div></div><p>
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="intro.using.exception.no"></a>Support for <code class="literal">-fno-exceptions</code></h3></div></div></div><p>
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch03s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="using.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="debug.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Concurrency </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Debugging Support</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch04.html b/libstdc++-v3/doc/html/manual/bk01pt02ch04.html
index 30ff3115ba1..fd3c1ecc41b 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt02ch04.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt02ch04.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 4. Types</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="bk01pt02pr01.html" title="" /><link rel="next" href="bk01pt02ch04s02.html" title="Numeric Properties" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 4. Types</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02pr01.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch04s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.support.types"></a>Chapter 4. Types</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt02ch04.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s03.html">NULL</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.support.types.fundamental"></a>Fundamental Types</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 4. Types</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="bk01pt02pr01.html" title="" /><link rel="next" href="bk01pt02ch04s02.html" title="Numeric Properties" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 4. Types</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02pr01.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch04s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.support.types"></a>Chapter 4. Types</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt02ch04.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s03.html">NULL</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.support.types.fundamental"></a>Fundamental Types</h2></div></div></div><p>
C++ has the following builtin types:
</p><div class="itemizedlist"><ul type="disc"><li><p>
char
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html b/libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html
index 29c5b7f77cb..9219509ffc6 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt02ch04s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Numeric Properties</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt02ch04.html" title="Chapter 4. Types" /><link rel="prev" href="bk01pt02ch04.html" title="Chapter 4. Types" /><link rel="next" href="bk01pt02ch04s03.html" title="NULL" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Numeric Properties</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch04.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Types</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch04s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.support.types.numeric_limits"></a>Numeric Properties</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Numeric Properties</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt02ch04.html" title="Chapter 4. Types" /><link rel="prev" href="bk01pt02ch04.html" title="Chapter 4. Types" /><link rel="next" href="bk01pt02ch04s03.html" title="NULL" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Numeric Properties</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch04.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Types</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch04s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.support.types.numeric_limits"></a>Numeric Properties</h2></div></div></div><p>
The header <code class="filename">limits</code> defines
traits classes to give access to various implementation
defined-aspects of the fundamental types. The traits classes --
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html b/libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html
index fbfba430e22..e05dd26de0d 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt02ch04s03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>NULL</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt02ch04.html" title="Chapter 4. Types" /><link rel="prev" href="bk01pt02ch04s02.html" title="Numeric Properties" /><link rel="next" href="bk01pt02ch05.html" title="Chapter 5. Dynamic Memory" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">NULL</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch04s02.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Types</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.support.types.null"></a>NULL</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>NULL</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt02ch04.html" title="Chapter 4. Types" /><link rel="prev" href="bk01pt02ch04s02.html" title="Numeric Properties" /><link rel="next" href="bk01pt02ch05.html" title="Chapter 5. Dynamic Memory" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">NULL</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch04s02.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Types</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.support.types.null"></a>NULL</h2></div></div></div><p>
The only change that might affect people is the type of
<code class="constant">NULL</code>: while it is required to be a macro,
the definition of that macro is <span class="emphasis"><em>not</em></span> allowed
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch05.html b/libstdc++-v3/doc/html/manual/bk01pt02ch05.html
index 8e18d9d6658..e48894d697f 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt02ch05.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt02ch05.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 5. Dynamic Memory</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="bk01pt02ch04s03.html" title="NULL" /><link rel="next" href="bk01pt02ch06.html" title="Chapter 6. Termination" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. Dynamic Memory</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch04s03.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch06.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.support.memory"></a>Chapter 5. Dynamic Memory</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 5. Dynamic Memory</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="bk01pt02ch04s03.html" title="NULL" /><link rel="next" href="bk01pt02ch06.html" title="Chapter 6. Termination" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. Dynamic Memory</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch04s03.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch06.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.support.memory"></a>Chapter 5. Dynamic Memory</h2></div></div></div><p>
There are six flavors each of <code class="function">new</code> and
<code class="function">delete</code>, so make certain that you're using the right
ones. Here are quickie descriptions of <code class="function">new</code>:
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch06.html b/libstdc++-v3/doc/html/manual/bk01pt02ch06.html
index a47fc4c28e4..f3ec9218505 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt02ch06.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt02ch06.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 6. Termination</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="bk01pt02ch05.html" title="Chapter 5. Dynamic Memory" /><link rel="next" href="bk01pt02ch06s02.html" title="Verbose Terminate Handler" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 6. Termination</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch05.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch06s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.support.termination"></a>Chapter 6. Termination</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch06s02.html">Verbose Terminate Handler</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="support.termination.handlers"></a>Termination Handlers</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 6. Termination</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="bk01pt02ch05.html" title="Chapter 5. Dynamic Memory" /><link rel="next" href="bk01pt02ch06s02.html" title="Verbose Terminate Handler" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 6. Termination</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch05.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch06s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.support.termination"></a>Chapter 6. Termination</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch06s02.html">Verbose Terminate Handler</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="support.termination.handlers"></a>Termination Handlers</h2></div></div></div><p>
Not many changes here to <code class="filename">cstdlib</code>. You should note that the
<code class="function">abort()</code> function does not call the
destructors of automatic nor static objects, so if you're
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02ch06s02.html b/libstdc++-v3/doc/html/manual/bk01pt02ch06s02.html
index 222fb043500..9f3f4017e91 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt02ch06s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt02ch06s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Verbose Terminate Handler</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt02ch06.html" title="Chapter 6. Termination" /><link rel="prev" href="bk01pt02ch06.html" title="Chapter 6. Termination" /><link rel="next" href="diagnostics.html" title="Part III. Diagnostics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Verbose Terminate Handler</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch06.html">Prev</a> </td><th width="60%" align="center">Chapter 6. Termination</th><td width="20%" align="right"> <a accesskey="n" href="diagnostics.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="support.termination.verbose"></a>Verbose Terminate Handler</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Verbose Terminate Handler</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt02ch06.html" title="Chapter 6. Termination" /><link rel="prev" href="bk01pt02ch06.html" title="Chapter 6. Termination" /><link rel="next" href="diagnostics.html" title="Part III. Diagnostics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Verbose Terminate Handler</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch06.html">Prev</a> </td><th width="60%" align="center">Chapter 6. Termination</th><td width="20%" align="right"> <a accesskey="n" href="diagnostics.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="support.termination.verbose"></a>Verbose Terminate Handler</h2></div></div></div><p>
If you are having difficulty with uncaught exceptions and want a
little bit of help debugging the causes of the core dumps, you can
make use of a GNU extension, the verbose terminate handler.
diff --git a/libstdc++-v3/doc/html/manual/bk01pt02pr01.html b/libstdc++-v3/doc/html/manual/bk01pt02pr01.html
index 3d8a64207ac..328f4e4c7f3 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt02pr01.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt02pr01.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="support.html" title="Part II. Support" /><link rel="next" href="bk01pt02ch04.html" title="Chapter 4. Types" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="support.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch04.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id470937"></a></h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="support.html" title="Part II. Support" /><link rel="next" href="bk01pt02ch04.html" title="Chapter 4. Types" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="support.html">Prev</a> </td><th width="60%" align="center">Part II. Support</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch04.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id449160"></a></h2></div></div></div><p>
This part deals with the functions called and objects created
automatically during the course of a program's existence.
</p><p>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch07.html b/libstdc++-v3/doc/html/manual/bk01pt03ch07.html
index e29d2bf2d49..c8d622ce223 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt03ch07.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt03ch07.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 7. Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="prev" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="next" href="bk01pt03ch07s02.html" title="Adding Data to Exceptions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 7. Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="diagnostics.html">Prev</a> </td><th width="60%" align="center">Part III. Diagnostics</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch07s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.diagnostics.exceptions"></a>Chapter 7. Exceptions</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt03ch07.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.diagnostics.exceptions.hierarchy"></a>Exception Classes</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 7. Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="prev" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="next" href="bk01pt03ch07s02.html" title="Adding Data to Exceptions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 7. Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="diagnostics.html">Prev</a> </td><th width="60%" align="center">Part III. Diagnostics</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch07s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.diagnostics.exceptions"></a>Chapter 7. Exceptions</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt03ch07.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.diagnostics.exceptions.hierarchy"></a>Exception Classes</h2></div></div></div><p>
All exception objects are defined in one of the standard header
files: <code class="filename">exception</code>,
<code class="filename">stdexcept</code>, <code class="filename">new</code>, and
diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html b/libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html
index d7c892a2b82..34f4b23391c 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt03ch07s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Adding Data to Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt03ch07.html" title="Chapter 7. Exceptions" /><link rel="prev" href="bk01pt03ch07.html" title="Chapter 7. Exceptions" /><link rel="next" href="bk01pt03ch07s03.html" title="Cancellation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Adding Data to Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07.html">Prev</a> </td><th width="60%" align="center">Chapter 7. Exceptions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch07s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.diagnostics.exceptions.data"></a>Adding Data to Exceptions</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Adding Data to Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt03ch07.html" title="Chapter 7. Exceptions" /><link rel="prev" href="bk01pt03ch07.html" title="Chapter 7. Exceptions" /><link rel="next" href="bk01pt03ch07s03.html" title="Cancellation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Adding Data to Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07.html">Prev</a> </td><th width="60%" align="center">Chapter 7. Exceptions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch07s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.diagnostics.exceptions.data"></a>Adding Data to Exceptions</h2></div></div></div><p>
The standard exception classes carry with them a single string as
data (usually describing what went wrong or where the 'throw' took
place). It's good to remember that you can add your own data to
diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch07s03.html b/libstdc++-v3/doc/html/manual/bk01pt03ch07s03.html
index 42c7b2e6482..08ba25edef1 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt03ch07s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt03ch07s03.html
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Cancellation</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt03ch07.html" title="Chapter 7. Exceptions" /><link rel="prev" href="bk01pt03ch07s02.html" title="Adding Data to Exceptions" /><link rel="next" href="bk01pt03ch08.html" title="Chapter 8. Concept Checking" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Cancellation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s02.html">Prev</a> </td><th width="60%" align="center">Chapter 7. Exceptions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch08.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.diagnostics.exceptions.cancellation"></a>Cancellation</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Cancellation</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt03ch07.html" title="Chapter 7. Exceptions" /><link rel="prev" href="bk01pt03ch07s02.html" title="Adding Data to Exceptions" /><link rel="next" href="bk01pt03ch08.html" title="Chapter 8. Concept Checking" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Cancellation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s02.html">Prev</a> </td><th width="60%" align="center">Chapter 7. Exceptions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch08.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.diagnostics.exceptions.cancellation"></a>Cancellation</h2></div></div></div><p>
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch07s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt03ch07.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Adding Data to Exceptions </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 8. Concept Checking</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch08.html b/libstdc++-v3/doc/html/manual/bk01pt03ch08.html
index a7b50f0a456..c4322ba51eb 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt03ch08.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt03ch08.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 8. Concept Checking</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="prev" href="bk01pt03ch07s03.html" title="Cancellation" /><link rel="next" href="utilities.html" title="Part IV. Utilities" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 8. Concept Checking</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s03.html">Prev</a> </td><th width="60%" align="center">Part III. Diagnostics</th><td width="20%" align="right"> <a accesskey="n" href="utilities.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.diagnostics.concept_checking"></a>Chapter 8. Concept Checking</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 8. Concept Checking</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="prev" href="bk01pt03ch07s03.html" title="Cancellation" /><link rel="next" href="utilities.html" title="Part IV. Utilities" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 8. Concept Checking</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s03.html">Prev</a> </td><th width="60%" align="center">Part III. Diagnostics</th><td width="20%" align="right"> <a accesskey="n" href="utilities.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.diagnostics.concept_checking"></a>Chapter 8. Concept Checking</h2></div></div></div><p>
In 1999, SGI added “<span class="quote">concept checkers</span>†to their
implementation of the STL: code which checked the template
parameters of instantiated pieces of the STL, in order to insure
diff --git a/libstdc++-v3/doc/html/manual/bk01pt04ch09.html b/libstdc++-v3/doc/html/manual/bk01pt04ch09.html
index 9a93f2c2708..9182ef7ae8f 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt04ch09.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt04ch09.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 9. Functors</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="utilities.html" title="Part IV. Utilities" /><link rel="prev" href="utilities.html" title="Part IV. Utilities" /><link rel="next" href="bk01pt04ch10.html" title="Chapter 10. Pairs" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 9. Functors</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="utilities.html">Prev</a> </td><th width="60%" align="center">Part IV. Utilities</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04ch10.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.util.functors"></a>Chapter 9. Functors</h2></div></div></div><p>If you don't know what functors are, you're not alone. Many people
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 9. Functors</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="utilities.html" title="Part IV. Utilities" /><link rel="prev" href="utilities.html" title="Part IV. Utilities" /><link rel="next" href="bk01pt04ch10.html" title="Chapter 10. Pairs" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 9. Functors</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="utilities.html">Prev</a> </td><th width="60%" align="center">Part IV. Utilities</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04ch10.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.util.functors"></a>Chapter 9. Functors</h2></div></div></div><p>If you don't know what functors are, you're not alone. Many people
get slightly the wrong idea. In the interest of not reinventing
the wheel, we will refer you to the introduction to the functor
concept written by SGI as part of their STL, in
diff --git a/libstdc++-v3/doc/html/manual/bk01pt04ch10.html b/libstdc++-v3/doc/html/manual/bk01pt04ch10.html
index 292026954a6..84177cd3a4c 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt04ch10.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt04ch10.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 10. Pairs</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="utilities.html" title="Part IV. Utilities" /><link rel="prev" href="bk01pt04ch09.html" title="Chapter 9. Functors" /><link rel="next" href="bk01pt04ch11.html" title="Chapter 11. Memory" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 10. Pairs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt04ch09.html">Prev</a> </td><th width="60%" align="center">Part IV. Utilities</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04ch11.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.util.pairs"></a>Chapter 10. Pairs</h2></div></div></div><p>The <code class="code">pair&lt;T1,T2&gt;</code> is a simple and handy way to
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 10. Pairs</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="utilities.html" title="Part IV. Utilities" /><link rel="prev" href="bk01pt04ch09.html" title="Chapter 9. Functors" /><link rel="next" href="bk01pt04ch11.html" title="Chapter 11. Memory" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 10. Pairs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt04ch09.html">Prev</a> </td><th width="60%" align="center">Part IV. Utilities</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04ch11.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.util.pairs"></a>Chapter 10. Pairs</h2></div></div></div><p>The <code class="code">pair&lt;T1,T2&gt;</code> is a simple and handy way to
carry around a pair of objects. One is of type T1, and another of
type T2; they may be the same type, but you don't get anything
extra if they are. The two members can be accessed directly, as
diff --git a/libstdc++-v3/doc/html/manual/bk01pt04ch11.html b/libstdc++-v3/doc/html/manual/bk01pt04ch11.html
index 7776d3d7f63..24d4a7f2ab0 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt04ch11.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt04ch11.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 11. Memory</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="utilities.html" title="Part IV. Utilities" /><link rel="prev" href="bk01pt04ch10.html" title="Chapter 10. Pairs" /><link rel="next" href="auto_ptr.html" title="auto_ptr" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. Memory</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt04ch10.html">Prev</a> </td><th width="60%" align="center">Part IV. Utilities</th><td width="20%" align="right"> <a accesskey="n" href="auto_ptr.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.util.memory"></a>Chapter 11. Memory</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 11. Memory</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="utilities.html" title="Part IV. Utilities" /><link rel="prev" href="bk01pt04ch10.html" title="Chapter 10. Pairs" /><link rel="next" href="auto_ptr.html" title="auto_ptr" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. Memory</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt04ch10.html">Prev</a> </td><th width="60%" align="center">Part IV. Utilities</th><td width="20%" align="right"> <a accesskey="n" href="auto_ptr.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.util.memory"></a>Chapter 11. Memory</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></div><p>
Memory contains three general areas. First, function and operator
calls via <code class="function">new</code> and <code class="function">delete</code>
operator or member function calls. Second, allocation via
@@ -90,7 +90,7 @@
or loading and unloading shared objects in memory. As such, using
caching allocators on systems that do not support
<code class="function">abi::__cxa_atexit</code> is not recommended.
- </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id381147"></a>Interface Design</h4></div></div></div><p>
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id495307"></a>Interface Design</h4></div></div></div><p>
The only allocator interface that
is support is the standard C++ interface. As such, all STL
containers have been adjusted, and all external allocators have
@@ -103,7 +103,7 @@
</p><p>
The base class that <code class="classname">allocator</code> is derived from
may not be user-configurable.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id369986"></a>Selecting Default Allocation Policy</h4></div></div></div><p>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id462480"></a>Selecting Default Allocation Policy</h4></div></div></div><p>
It's difficult to pick an allocation strategy that will provide
maximum utility, without excessively penalizing some behavior. In
fact, it's difficult just deciding which typical actions to measure
@@ -140,7 +140,7 @@
The current default choice for
<code class="classname">allocator</code> is
<code class="classname">__gnu_cxx::new_allocator</code>.
- </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id367405"></a>Disabling Memory Caching</h4></div></div></div><p>
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id531789"></a>Disabling Memory Caching</h4></div></div></div><p>
In use, <code class="classname">allocator</code> may allocate and
deallocate using implementation-specified strategies and
heuristics. Because of this, every call to an allocator object's
@@ -305,11 +305,11 @@
A high-performance allocator that uses a bit-map to keep track
of the used and unused memory locations. It has its own
documentation, found <a class="link" href="bitmap_allocator.html" title="bitmap_allocator">here</a>.
- </p></li></ol></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id434818"></a><p><span class="title"><i>
+ </p></li></ol></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id505299"></a><p><span class="title"><i>
ISO/IEC 14882:1998 Programming languages - C++
</i>. </span>
isoc++_1998
- <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="id434832"></a><p><span class="title"><i>The Standard Librarian: What Are Allocators Good
+ <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="id465950"></a><p><span class="title"><i>The Standard Librarian: What Are Allocators Good
</i>. </span>
austernm
<span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername">
@@ -317,28 +317,28 @@
. </span></span><span class="biblioid">
<a class="ulink" href="http://www.cuj.com/documents/s=8000/cujcexp1812austern/" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id374864"></a><p><span class="title"><i>The Hoard Memory Allocator</i>. </span>
+ . </span></p></div><div class="biblioentry"><a id="id515746"></a><p><span class="title"><i>The Hoard Memory Allocator</i>. </span>
emeryb
<span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="biblioid">
<a class="ulink" href="http://www.cs.umass.edu/~emery/hoard/" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id429786"></a><p><span class="title"><i>Reconsidering Custom Memory Allocation</i>. </span>
+ . </span></p></div><div class="biblioentry"><a id="id507784"></a><p><span class="title"><i>Reconsidering Custom Memory Allocation</i>. </span>
bergerzorn
<span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="author"><span class="firstname">Ben</span> <span class="surname">Zorn</span>. </span><span class="author"><span class="firstname">Kathryn</span> <span class="surname">McKinley</span>. </span><span class="copyright">Copyright © 2002 OOPSLA. </span><span class="biblioid">
<a class="ulink" href="http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id379264"></a><p><span class="title"><i>Allocator Types</i>. </span>
+ . </span></p></div><div class="biblioentry"><a id="id467782"></a><p><span class="title"><i>Allocator Types</i>. </span>
kreftlanger
<span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="publisher"><span class="publishername">
C/C++ Users Journal
. </span></span><span class="biblioid">
<a class="ulink" href="http://www.langer.camelot.de/Articles/C++Report/Allocators/Allocators.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id388071"></a><p><span class="title"><i>The C++ Programming Language</i>. </span>
+ . </span></p></div><div class="biblioentry"><a id="id470766"></a><p><span class="title"><i>The C++ Programming Language</i>. </span>
tcpl
<span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 . </span><span class="pagenums">19.4 Allocators. </span><span class="publisher"><span class="publishername">
Addison Wesley
- . </span></span></p></div><div class="biblioentry"><a id="id438455"></a><p><span class="title"><i>Yalloc: A Recycling C++ Allocator</i>. </span>
+ . </span></span></p></div><div class="biblioentry"><a id="id468765"></a><p><span class="title"><i>Yalloc: A Recycling C++ Allocator</i>. </span>
yenf
<span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span><span class="copyright">Copyright © . </span><span class="biblioid">
<a class="ulink" href="http://home.earthlink.net/~brimar/yalloc/" target="_top">
diff --git a/libstdc++-v3/doc/html/manual/bk01pt04ch12.html b/libstdc++-v3/doc/html/manual/bk01pt04ch12.html
index 7c316db57a6..b771aaf4d2a 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt04ch12.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt04ch12.html
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 12. Traits</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="utilities.html" title="Part IV. Utilities" /><link rel="prev" href="shared_ptr.html" title="shared_ptr" /><link rel="next" href="strings.html" title="Part V. Strings" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 12. Traits</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="shared_ptr.html">Prev</a> </td><th width="60%" align="center">Part IV. Utilities</th><td width="20%" align="right"> <a accesskey="n" href="strings.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.util.traits"></a>Chapter 12. Traits</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 12. Traits</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="utilities.html" title="Part IV. Utilities" /><link rel="prev" href="shared_ptr.html" title="shared_ptr" /><link rel="next" href="strings.html" title="Part V. Strings" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 12. Traits</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="shared_ptr.html">Prev</a> </td><th width="60%" align="center">Part IV. Utilities</th><td width="20%" align="right"> <a accesskey="n" href="strings.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.util.traits"></a>Chapter 12. Traits</h2></div></div></div><p>
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="shared_ptr.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="utilities.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="strings.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">shared_ptr </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part V. Strings</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13.html
index e50eb1fe71c..2af0b5d51b2 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt05ch13.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 13. String Classes</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="strings.html" title="Part V. Strings" /><link rel="prev" href="strings.html" title="Part V. Strings" /><link rel="next" href="bk01pt05ch13s02.html" title="Case Sensitivity" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 13. String Classes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="strings.html">Prev</a> </td><th width="60%" align="center">Part V. Strings</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.strings.string"></a>Chapter 13. String Classes</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s02.html">Case Sensitivity</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s06.html">CString (MFC)</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.simple"></a>Simple Transformations</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 13. String Classes</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="strings.html" title="Part V. Strings" /><link rel="prev" href="strings.html" title="Part V. Strings" /><link rel="next" href="bk01pt05ch13s02.html" title="Case Sensitivity" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 13. String Classes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="strings.html">Prev</a> </td><th width="60%" align="center">Part V. Strings</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.strings.string"></a>Chapter 13. String Classes</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s02.html">Case Sensitivity</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s06.html">CString (MFC)</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.simple"></a>Simple Transformations</h2></div></div></div><p>
Here are Standard, simple, and portable ways to perform common
transformations on a <code class="code">string</code> instance, such as
"convert to all upper case." The word transformations
diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html
index 2db68f6d814..c71af4b5e06 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Case Sensitivity</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="next" href="bk01pt05ch13s03.html" title="Arbitrary Character Types" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Case Sensitivity</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.case"></a>Case Sensitivity</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Case Sensitivity</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="next" href="bk01pt05ch13s03.html" title="Arbitrary Character Types" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Case Sensitivity</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.case"></a>Case Sensitivity</h2></div></div></div><p>
</p><p>The well-known-and-if-it-isn't-well-known-it-ought-to-be
<a class="ulink" href="http://www.gotw.ca/gotw/" target="_top">Guru of the Week</a>
discussions held on Usenet covered this topic in January of 1998.
diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html
index 49f416a170c..3a21fa7d8f9 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Arbitrary Character Types</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13s02.html" title="Case Sensitivity" /><link rel="next" href="bk01pt05ch13s04.html" title="Tokenizing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Arbitrary Character Types</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s02.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s04.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.character_types"></a>Arbitrary Character Types</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Arbitrary Character Types</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13s02.html" title="Case Sensitivity" /><link rel="next" href="bk01pt05ch13s04.html" title="Tokenizing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Arbitrary Character Types</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s02.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s04.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.character_types"></a>Arbitrary Character Types</h2></div></div></div><p>
</p><p>The <code class="code">std::basic_string</code> is tantalizingly general, in that
it is parameterized on the type of the characters which it holds.
In theory, you could whip up a Unicode character class and instantiate
diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html
index 971887c86f6..0ae02e16236 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s04.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Tokenizing</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13s03.html" title="Arbitrary Character Types" /><link rel="next" href="bk01pt05ch13s05.html" title="Shrink to Fit" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Tokenizing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s03.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.token"></a>Tokenizing</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Tokenizing</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13s03.html" title="Arbitrary Character Types" /><link rel="next" href="bk01pt05ch13s05.html" title="Shrink to Fit" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Tokenizing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s03.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.token"></a>Tokenizing</h2></div></div></div><p>
</p><p>The Standard C (and C++) function <code class="code">strtok()</code> leaves a lot to
be desired in terms of user-friendliness. It's unintuitive, it
destroys the character string on which it operates, and it requires
diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html
index b5ee55ddbb2..8b3596a3074 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s05.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Shrink to Fit</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13s04.html" title="Tokenizing" /><link rel="next" href="bk01pt05ch13s06.html" title="CString (MFC)" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Shrink to Fit</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s04.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s06.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.shrink"></a>Shrink to Fit</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Shrink to Fit</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13s04.html" title="Tokenizing" /><link rel="next" href="bk01pt05ch13s06.html" title="CString (MFC)" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Shrink to Fit</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s04.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13s06.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.shrink"></a>Shrink to Fit</h2></div></div></div><p>
</p><p>From GCC 3.4 calling <code class="code">s.reserve(res)</code> on a
<code class="code">string s</code> with <code class="code">res &lt; s.capacity()</code> will
reduce the string's capacity to <code class="code">std::max(s.size(), res)</code>.
diff --git a/libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html b/libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html
index 4725e2c012c..2ee648ef602 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt05ch13s06.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>CString (MFC)</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13s05.html" title="Shrink to Fit" /><link rel="next" href="localization.html" title="Part VI. Localization" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">CString (MFC)</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s05.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="localization.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.Cstring"></a>CString (MFC)</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>CString (MFC)</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /><link rel="prev" href="bk01pt05ch13s05.html" title="Shrink to Fit" /><link rel="next" href="localization.html" title="Part VI. Localization" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">CString (MFC)</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s05.html">Prev</a> </td><th width="60%" align="center">Chapter 13. String Classes</th><td width="20%" align="right"> <a accesskey="n" href="localization.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="strings.string.Cstring"></a>CString (MFC)</h2></div></div></div><p>
</p><p>A common lament seen in various newsgroups deals with the Standard
string class as opposed to the Microsoft Foundation Class called
CString. Often programmers realize that a standard portable
diff --git a/libstdc++-v3/doc/html/manual/bk01pt06ch14.html b/libstdc++-v3/doc/html/manual/bk01pt06ch14.html
index 4b88dbe053e..c9886822aa8 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt06ch14.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt06ch14.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 14. Locales</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="localization.html" title="Part VI. Localization" /><link rel="prev" href="localization.html" title="Part VI. Localization" /><link rel="next" href="bk01pt06ch15.html" title="Chapter 15. Facets aka Categories" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 14. Locales</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="localization.html">Prev</a> </td><th width="60%" align="center">Part VI. Localization</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt06ch15.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.localization.locales"></a>Chapter 14. Locales</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.locales.locale"></a>locale</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 14. Locales</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="localization.html" title="Part VI. Localization" /><link rel="prev" href="localization.html" title="Part VI. Localization" /><link rel="next" href="bk01pt06ch15.html" title="Chapter 15. Facets aka Categories" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 14. Locales</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="localization.html">Prev</a> </td><th width="60%" align="center">Part VI. Localization</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt06ch15.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.localization.locales"></a>Chapter 14. Locales</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.locales.locale"></a>locale</h2></div></div></div><p>
Describes the basic locale object, including nested
classes id, facet, and the reference-counted implementation object,
class _Impl.
@@ -395,25 +395,25 @@ global locale" (emphasis Paolo), that is:
What should non-required facet instantiations do? If the
generic implementation is provided, then how to end-users
provide specializations?
- </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id439218"></a><p><span class="title"><i>
+ </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id459942"></a><p><span class="title"><i>
The GNU C Library
- </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id376176"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id551010"></a><p><span class="title"><i>
Correspondence
- </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id440311"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id551039"></a><p><span class="title"><i>
ISO/IEC 14882:1998 Programming languages - C++
- </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id440329"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id474312"></a><p><span class="title"><i>
ISO/IEC 9899:1999 Programming languages - C
- </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id382447"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id474331"></a><p><span class="title"><i>
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
</i>. </span><span class="copyright">Copyright © 1999
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id433204"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id516648"></a><p><span class="title"><i>
The C++ Programming Language, Special Edition
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
Addison Wesley
- . </span></span></p></div><div class="biblioentry"><a id="id381489"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id481148"></a><p><span class="title"><i>
Standard C++ IOStreams and Locales
</i>. </span><span class="subtitle">
Advanced Programmer's Guide and Reference
diff --git a/libstdc++-v3/doc/html/manual/bk01pt06ch15.html b/libstdc++-v3/doc/html/manual/bk01pt06ch15.html
index dd635743e9b..fdb34a45aa8 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt06ch15.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt06ch15.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 15. Facets aka Categories</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="localization.html" title="Part VI. Localization" /><link rel="prev" href="bk01pt06ch14.html" title="Chapter 14. Locales" /><link rel="next" href="codecvt.html" title="codecvt" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 15. Facets aka Categories</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt06ch14.html">Prev</a> </td><th width="60%" align="center">Part VI. Localization</th><td width="20%" align="right"> <a accesskey="n" href="codecvt.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.localization.facet"></a>Chapter 15. Facets aka Categories</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.ctype"></a>ctype</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id432816"></a>Specializations</h4></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 15. Facets aka Categories</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="localization.html" title="Part VI. Localization" /><link rel="prev" href="bk01pt06ch14.html" title="Chapter 14. Locales" /><link rel="next" href="codecvt.html" title="codecvt" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 15. Facets aka Categories</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt06ch14.html">Prev</a> </td><th width="60%" align="center">Part VI. Localization</th><td width="20%" align="right"> <a accesskey="n" href="codecvt.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.localization.facet"></a>Chapter 15. Facets aka Categories</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.ctype"></a>ctype</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id461922"></a>Specializations</h4></div></div></div><p>
For the required specialization codecvt&lt;wchar_t, char, mbstate_t&gt; ,
conversions are made between the internal character set (always UCS4
on GNU/Linux) and whatever the currently selected locale for the
@@ -47,25 +47,25 @@ characters.
</p></li><li><p>
Rename abstract base class. See if just smash-overriding is a
better approach. Clarify, add sanity to naming.
- </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id393124"></a><p><span class="title"><i>
+ </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id477855"></a><p><span class="title"><i>
The GNU C Library
- </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id386712"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id462336"></a><p><span class="title"><i>
Correspondence
- </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id416631"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id516995"></a><p><span class="title"><i>
ISO/IEC 14882:1998 Programming languages - C++
- </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id416649"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id517013"></a><p><span class="title"><i>
ISO/IEC 9899:1999 Programming languages - C
- </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id390348"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id535750"></a><p><span class="title"><i>
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
</i>. </span><span class="copyright">Copyright © 1999
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id436482"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id535776"></a><p><span class="title"><i>
The C++ Programming Language, Special Edition
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
Addison Wesley
- . </span></span></p></div><div class="biblioentry"><a id="id391094"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id477745"></a><p><span class="title"><i>
Standard C++ IOStreams and Locales
</i>. </span><span class="subtitle">
Advanced Programmer's Guide and Reference
diff --git a/libstdc++-v3/doc/html/manual/bk01pt07ch16.html b/libstdc++-v3/doc/html/manual/bk01pt07ch16.html
index a2bdffffd31..3d1b251973a 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt07ch16.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt07ch16.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 16. Sequences</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="containers.html" title="Part VII. Containers" /><link rel="prev" href="containers.html" title="Part VII. Containers" /><link rel="next" href="bk01pt07ch16s02.html" title="vector" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 16. Sequences</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="containers.html">Prev</a> </td><th width="60%" align="center">Part VII. Containers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch16s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.containers.sequences"></a>Chapter 16. Sequences</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="containers.sequences.list"></a>list</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="sequences.list.size"></a>list::size() is O(n)</h3></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 16. Sequences</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="containers.html" title="Part VII. Containers" /><link rel="prev" href="containers.html" title="Part VII. Containers" /><link rel="next" href="bk01pt07ch16s02.html" title="vector" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 16. Sequences</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="containers.html">Prev</a> </td><th width="60%" align="center">Part VII. Containers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch16s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.containers.sequences"></a>Chapter 16. Sequences</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="containers.sequences.list"></a>list</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="sequences.list.size"></a>list::size() is O(n)</h3></div></div></div><p>
Yes it is, and that's okay. This is a decision that we preserved
when we imported SGI's STL implementation. The following is
quoted from <a class="ulink" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
diff --git a/libstdc++-v3/doc/html/manual/bk01pt07ch16s02.html b/libstdc++-v3/doc/html/manual/bk01pt07ch16s02.html
index deb4790d4a9..f1561554143 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt07ch16s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt07ch16s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>vector</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt07ch16.html" title="Chapter 16. Sequences" /><link rel="prev" href="bk01pt07ch16.html" title="Chapter 16. Sequences" /><link rel="next" href="bk01pt07ch17.html" title="Chapter 17. Associative" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">vector</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch16.html">Prev</a> </td><th width="60%" align="center">Chapter 16. Sequences</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch17.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="containers.sequences.vector"></a>vector</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>vector</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt07ch16.html" title="Chapter 16. Sequences" /><link rel="prev" href="bk01pt07ch16.html" title="Chapter 16. Sequences" /><link rel="next" href="bk01pt07ch17.html" title="Chapter 17. Associative" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">vector</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch16.html">Prev</a> </td><th width="60%" align="center">Chapter 16. Sequences</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch17.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="containers.sequences.vector"></a>vector</h2></div></div></div><p>
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="sequences.vector.management"></a>Space Overhead Management</h3></div></div></div><p>
In <a class="ulink" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
message to the list</a>, Daniel Kostecky announced work on an
diff --git a/libstdc++-v3/doc/html/manual/bk01pt07ch17.html b/libstdc++-v3/doc/html/manual/bk01pt07ch17.html
index ebe2fd0f557..53259e14311 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt07ch17.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt07ch17.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 17. Associative</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="containers.html" title="Part VII. Containers" /><link rel="prev" href="bk01pt07ch16s02.html" title="vector" /><link rel="next" href="bk01pt07ch17s02.html" title="bitset" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 17. Associative</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch16s02.html">Prev</a> </td><th width="60%" align="center">Part VII. Containers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch17s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.containers.associative"></a>Chapter 17. Associative</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="containers.associative.insert_hints"></a>Insertion Hints</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 17. Associative</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="containers.html" title="Part VII. Containers" /><link rel="prev" href="bk01pt07ch16s02.html" title="vector" /><link rel="next" href="bk01pt07ch17s02.html" title="bitset" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 17. Associative</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch16s02.html">Prev</a> </td><th width="60%" align="center">Part VII. Containers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch17s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.containers.associative"></a>Chapter 17. Associative</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="containers.associative.insert_hints"></a>Insertion Hints</h2></div></div></div><p>
Section [23.1.2], Table 69, of the C++ standard lists this
function for all of the associative containers (map, set, etc):
</p><pre class="programlisting">
diff --git a/libstdc++-v3/doc/html/manual/bk01pt07ch17s02.html b/libstdc++-v3/doc/html/manual/bk01pt07ch17s02.html
index 6b434ce5ec1..1d4e3f90403 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt07ch17s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt07ch17s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>bitset</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt07ch17.html" title="Chapter 17. Associative" /><link rel="prev" href="bk01pt07ch17.html" title="Chapter 17. Associative" /><link rel="next" href="bk01pt07ch18.html" title="Chapter 18. Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">bitset</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch17.html">Prev</a> </td><th width="60%" align="center">Chapter 17. Associative</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch18.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="containers.associative.bitset"></a>bitset</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="associative.bitset.size_variable"></a>Size Variable</h3></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>bitset</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt07ch17.html" title="Chapter 17. Associative" /><link rel="prev" href="bk01pt07ch17.html" title="Chapter 17. Associative" /><link rel="next" href="bk01pt07ch18.html" title="Chapter 18. Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">bitset</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch17.html">Prev</a> </td><th width="60%" align="center">Chapter 17. Associative</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch18.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="containers.associative.bitset"></a>bitset</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="associative.bitset.size_variable"></a>Size Variable</h3></div></div></div><p>
No, you cannot write code of the form
</p><pre class="programlisting">
#include &lt;bitset&gt;
diff --git a/libstdc++-v3/doc/html/manual/bk01pt07ch18.html b/libstdc++-v3/doc/html/manual/bk01pt07ch18.html
index e168ed82b58..af7bb752411 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt07ch18.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt07ch18.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 18. Interacting with C</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="containers.html" title="Part VII. Containers" /><link rel="prev" href="bk01pt07ch17s02.html" title="bitset" /><link rel="next" href="iterators.html" title="Part VIII. Iterators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 18. Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch17s02.html">Prev</a> </td><th width="60%" align="center">Part VII. Containers</th><td width="20%" align="right"> <a accesskey="n" href="iterators.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.containers.c"></a>Chapter 18. Interacting with C</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="containers.c.vs_array"></a>Containers vs. Arrays</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 18. Interacting with C</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="containers.html" title="Part VII. Containers" /><link rel="prev" href="bk01pt07ch17s02.html" title="bitset" /><link rel="next" href="iterators.html" title="Part VIII. Iterators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 18. Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch17s02.html">Prev</a> </td><th width="60%" align="center">Part VII. Containers</th><td width="20%" align="right"> <a accesskey="n" href="iterators.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.containers.c"></a>Chapter 18. Interacting with C</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="containers.c.vs_array"></a>Containers vs. Arrays</h2></div></div></div><p>
You're writing some code and can't decide whether to use builtin
arrays or some kind of container. There are compelling reasons
to use one of the container classes, but you're afraid that
diff --git a/libstdc++-v3/doc/html/manual/bk01pt08ch19.html b/libstdc++-v3/doc/html/manual/bk01pt08ch19.html
index d95c0869a84..fdf36b91861 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt08ch19.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt08ch19.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 19. Predefined</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="iterators.html" title="Part VIII. Iterators" /><link rel="prev" href="iterators.html" title="Part VIII. Iterators" /><link rel="next" href="bk01pt08ch19s02.html" title="One Past the End" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 19. Predefined</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="iterators.html">Prev</a> </td><th width="60%" align="center">Part VIII. Iterators</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt08ch19s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.iterators.predefined"></a>Chapter 19. Predefined</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="bk01pt08ch19s02.html">One Past the End</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="iterators.predefined.vs_pointers"></a>Iterators vs. Pointers</h2></div></div></div><p><a class="ulink" href="../faq/index.html#5_1" target="_top">FAQ 5.1</a> points out that iterators
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 19. Predefined</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="iterators.html" title="Part VIII. Iterators" /><link rel="prev" href="iterators.html" title="Part VIII. Iterators" /><link rel="next" href="bk01pt08ch19s02.html" title="One Past the End" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 19. Predefined</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="iterators.html">Prev</a> </td><th width="60%" align="center">Part VIII. Iterators</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt08ch19s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.iterators.predefined"></a>Chapter 19. Predefined</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="bk01pt08ch19s02.html">One Past the End</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="iterators.predefined.vs_pointers"></a>Iterators vs. Pointers</h2></div></div></div><p><a class="ulink" href="../faq/index.html#5_1" target="_top">FAQ 5.1</a> points out that iterators
are not implemented as pointers. They are a generalization of
pointers, but they are implemented in libstdc++ as separate classes.
</p><p>Keeping that simple fact in mind as you design your code will
diff --git a/libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html b/libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html
index d8462d2a497..e22e968ac76 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt08ch19s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>One Past the End</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt08ch19.html" title="Chapter 19. Predefined" /><link rel="prev" href="bk01pt08ch19.html" title="Chapter 19. Predefined" /><link rel="next" href="algorithms.html" title="Part IX. Algorithms" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">One Past the End</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt08ch19.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Predefined</th><td width="20%" align="right"> <a accesskey="n" href="algorithms.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="iterators.predefined.end"></a>One Past the End</h2></div></div></div><p>This starts off sounding complicated, but is actually very easy,
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>One Past the End</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt08ch19.html" title="Chapter 19. Predefined" /><link rel="prev" href="bk01pt08ch19.html" title="Chapter 19. Predefined" /><link rel="next" href="algorithms.html" title="Part IX. Algorithms" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">One Past the End</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt08ch19.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Predefined</th><td width="20%" align="right"> <a accesskey="n" href="algorithms.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="iterators.predefined.end"></a>One Past the End</h2></div></div></div><p>This starts off sounding complicated, but is actually very easy,
especially towards the end. Trust me.
</p><p>Beginners usually have a little trouble understand the whole
'past-the-end' thing, until they remember their early algebra classes
diff --git a/libstdc++-v3/doc/html/manual/bk01pt09ch20.html b/libstdc++-v3/doc/html/manual/bk01pt09ch20.html
index da024cda864..ff02c3a0708 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt09ch20.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt09ch20.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 20. Mutating</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; algorithm&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="algorithms.html" title="Part IX. Algorithms" /><link rel="prev" href="bk01pt09pr02.html" title="" /><link rel="next" href="numerics.html" title="Part X. Numerics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 20. Mutating</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt09pr02.html">Prev</a> </td><th width="60%" align="center">Part IX. Algorithms</th><td width="20%" align="right"> <a accesskey="n" href="numerics.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.algorithms.mutating"></a>Chapter 20. Mutating</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt09ch20.html#algorithms.mutating.swap"><code class="function">swap</code></a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="algorithms.mutating.swap"></a><code class="function">swap</code></h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="algorithms.swap.specializations"></a>Specializations</h3></div></div></div><p>If you call <code class="code"> std::swap(x,y); </code> where x and y are standard
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 20. Mutating</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; algorithm&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="algorithms.html" title="Part IX. Algorithms" /><link rel="prev" href="bk01pt09pr02.html" title="" /><link rel="next" href="numerics.html" title="Part X. Numerics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 20. Mutating</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt09pr02.html">Prev</a> </td><th width="60%" align="center">Part IX. Algorithms</th><td width="20%" align="right"> <a accesskey="n" href="numerics.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.algorithms.mutating"></a>Chapter 20. Mutating</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt09ch20.html#algorithms.mutating.swap">swap</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="algorithms.mutating.swap"></a><code class="function">swap</code></h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="algorithms.swap.specializations"></a>Specializations</h3></div></div></div><p>If you call <code class="code"> std::swap(x,y); </code> where x and y are standard
containers, then the call will automatically be replaced by a call to
<code class="code"> x.swap(y); </code> instead.
</p><p>This allows member functions of each container class to take over, and
diff --git a/libstdc++-v3/doc/html/manual/bk01pt09pr02.html b/libstdc++-v3/doc/html/manual/bk01pt09pr02.html
index 97de0993a47..bed0823db7e 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt09pr02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt09pr02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; algorithm&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="algorithms.html" title="Part IX. Algorithms" /><link rel="prev" href="algorithms.html" title="Part IX. Algorithms" /><link rel="next" href="bk01pt09ch20.html" title="Chapter 20. Mutating" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="algorithms.html">Prev</a> </td><th width="60%" align="center">Part IX. Algorithms</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09ch20.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id370887"></a></h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; algorithm&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="algorithms.html" title="Part IX. Algorithms" /><link rel="prev" href="algorithms.html" title="Part IX. Algorithms" /><link rel="next" href="bk01pt09ch20.html" title="Chapter 20. Mutating" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="algorithms.html">Prev</a> </td><th width="60%" align="center">Part IX. Algorithms</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09ch20.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id464669"></a></h2></div></div></div><p>
The neatest accomplishment of the algorithms chapter is that all the
work is done via iterators, not containers directly. This means two
important things:
diff --git a/libstdc++-v3/doc/html/manual/bk01pt10ch21.html b/libstdc++-v3/doc/html/manual/bk01pt10ch21.html
index 66c31363069..f1c82056d39 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt10ch21.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt10ch21.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 21. Complex</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="numerics.html" title="Part X. Numerics" /><link rel="prev" href="numerics.html" title="Part X. Numerics" /><link rel="next" href="bk01pt10ch22.html" title="Chapter 22. Generalized Operations" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 21. Complex</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="numerics.html">Prev</a> </td><th width="60%" align="center">Part X. Numerics</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt10ch22.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.numerics.complex"></a>Chapter 21. Complex</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 21. Complex</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="numerics.html" title="Part X. Numerics" /><link rel="prev" href="numerics.html" title="Part X. Numerics" /><link rel="next" href="bk01pt10ch22.html" title="Chapter 22. Generalized Operations" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 21. Complex</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="numerics.html">Prev</a> </td><th width="60%" align="center">Part X. Numerics</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt10ch22.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.numerics.complex"></a>Chapter 21. Complex</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></div><p>
</p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="numerics.complex.processing"></a>complex Processing</h2></div></div></div><p>
</p><p>Using <code class="code">complex&lt;&gt;</code> becomes even more comple- er, sorry,
<span class="emphasis"><em>complicated</em></span>, with the not-quite-gratuitously-incompatible
diff --git a/libstdc++-v3/doc/html/manual/bk01pt10ch22.html b/libstdc++-v3/doc/html/manual/bk01pt10ch22.html
index 72b7697d16f..a278eccd573 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt10ch22.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt10ch22.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 22. Generalized Operations</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="numerics.html" title="Part X. Numerics" /><link rel="prev" href="bk01pt10ch21.html" title="Chapter 21. Complex" /><link rel="next" href="bk01pt10ch23.html" title="Chapter 23. Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 22. Generalized Operations</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch21.html">Prev</a> </td><th width="60%" align="center">Part X. Numerics</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt10ch23.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.numerics.generalized_ops"></a>Chapter 22. Generalized Operations</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 22. Generalized Operations</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="numerics.html" title="Part X. Numerics" /><link rel="prev" href="bk01pt10ch21.html" title="Chapter 21. Complex" /><link rel="next" href="bk01pt10ch23.html" title="Chapter 23. Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 22. Generalized Operations</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch21.html">Prev</a> </td><th width="60%" align="center">Part X. Numerics</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt10ch23.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.numerics.generalized_ops"></a>Chapter 22. Generalized Operations</h2></div></div></div><p>
</p><p>There are four generalized functions in the &lt;numeric&gt; header
that follow the same conventions as those in &lt;algorithm&gt;. Each
of them is overloaded: one signature for common default operations,
diff --git a/libstdc++-v3/doc/html/manual/bk01pt10ch23.html b/libstdc++-v3/doc/html/manual/bk01pt10ch23.html
index 0fe7854a454..a3902b3df29 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt10ch23.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt10ch23.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 23. Interacting with C</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="numerics.html" title="Part X. Numerics" /><link rel="prev" href="bk01pt10ch22.html" title="Chapter 22. Generalized Operations" /><link rel="next" href="bk01pt10ch23s02.html" title="C99" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 23. Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch22.html">Prev</a> </td><th width="60%" align="center">Part X. Numerics</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt10ch23s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.numerics.c"></a>Chapter 23. Interacting with C</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt10ch23.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="bk01pt10ch23s02.html">C99</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="numerics.c.array"></a>Numerics vs. Arrays</h2></div></div></div><p>One of the major reasons why FORTRAN can chew through numbers so well
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 23. Interacting with C</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="numerics.html" title="Part X. Numerics" /><link rel="prev" href="bk01pt10ch22.html" title="Chapter 22. Generalized Operations" /><link rel="next" href="bk01pt10ch23s02.html" title="C99" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 23. Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch22.html">Prev</a> </td><th width="60%" align="center">Part X. Numerics</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt10ch23s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.numerics.c"></a>Chapter 23. Interacting with C</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt10ch23.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="bk01pt10ch23s02.html">C99</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="numerics.c.array"></a>Numerics vs. Arrays</h2></div></div></div><p>One of the major reasons why FORTRAN can chew through numbers so well
is that it is defined to be free of pointer aliasing, an assumption
that C89 is not allowed to make, and neither is C++98. C99 adds a new
keyword, <code class="code">restrict</code>, to apply to individual pointers. The
diff --git a/libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html b/libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html
index 5a68fb47293..1122049025e 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt10ch23s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>C99</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt10ch23.html" title="Chapter 23. Interacting with C" /><link rel="prev" href="bk01pt10ch23.html" title="Chapter 23. Interacting with C" /><link rel="next" href="io.html" title="Part XI. Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">C99</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch23.html">Prev</a> </td><th width="60%" align="center">Chapter 23. Interacting with C</th><td width="20%" align="right"> <a accesskey="n" href="io.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="numerics.c.c99"></a>C99</h2></div></div></div><p>In addition to the other topics on this page, we'll note here some
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>C99</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt10ch23.html" title="Chapter 23. Interacting with C" /><link rel="prev" href="bk01pt10ch23.html" title="Chapter 23. Interacting with C" /><link rel="next" href="io.html" title="Part XI. Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">C99</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch23.html">Prev</a> </td><th width="60%" align="center">Chapter 23. Interacting with C</th><td width="20%" align="right"> <a accesskey="n" href="io.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="numerics.c.c99"></a>C99</h2></div></div></div><p>In addition to the other topics on this page, we'll note here some
of the C99 features that appear in libstdc++.
</p><p>The C99 features depend on the <code class="code">--enable-c99</code> configure flag.
This flag is already on by default, but it can be disabled by the
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch24.html b/libstdc++-v3/doc/html/manual/bk01pt11ch24.html
index 2518ce435a5..1c8976e1dc1 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt11ch24.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch24.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 24. Iostream Objects</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="io.html" title="Part XI. Input and Output" /><link rel="next" href="bk01pt11ch25.html" title="Chapter 25. Stream Buffers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 24. Iostream Objects</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="io.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch25.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.io.objects"></a>Chapter 24. Iostream Objects</h2></div></div></div><p>To minimize the time you have to wait on the compiler, it's good to
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 24. Iostream Objects</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="io.html" title="Part XI. Input and Output" /><link rel="next" href="bk01pt11ch25.html" title="Chapter 25. Stream Buffers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 24. Iostream Objects</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="io.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch25.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.io.objects"></a>Chapter 24. Iostream Objects</h2></div></div></div><p>To minimize the time you have to wait on the compiler, it's good to
only include the headers you really need. Many people simply include
&lt;iostream&gt; when they don't need to -- and that can <span class="emphasis"><em>penalize
your runtime as well.</em></span> Here are some tips on which header to use
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch25.html b/libstdc++-v3/doc/html/manual/bk01pt11ch25.html
index 9920f97b7f6..a3bbfded422 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt11ch25.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch25.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 25. Stream Buffers</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="bk01pt11ch24.html" title="Chapter 24. Iostream Objects" /><link rel="next" href="bk01pt11ch25s02.html" title="Buffering" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 25. Stream Buffers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch24.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch25s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.io.streambufs"></a>Chapter 25. Stream Buffers</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt11ch25.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch25s02.html">Buffering</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="io.streambuf.derived"></a>Derived streambuf Classes</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 25. Stream Buffers</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="bk01pt11ch24.html" title="Chapter 24. Iostream Objects" /><link rel="next" href="bk01pt11ch25s02.html" title="Buffering" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 25. Stream Buffers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch24.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch25s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.io.streambufs"></a>Chapter 25. Stream Buffers</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt11ch25.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch25s02.html">Buffering</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="io.streambuf.derived"></a>Derived streambuf Classes</h2></div></div></div><p>
</p><p>Creating your own stream buffers for I/O can be remarkably easy.
If you are interested in doing so, we highly recommend two very
excellent books:
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html b/libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html
index 3d3a8297c45..36b7e1ad8b5 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch25s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Buffering</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt11ch25.html" title="Chapter 25. Stream Buffers" /><link rel="prev" href="bk01pt11ch25.html" title="Chapter 25. Stream Buffers" /><link rel="next" href="bk01pt11ch26.html" title="Chapter 26. Memory Based Streams" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Buffering</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch25.html">Prev</a> </td><th width="60%" align="center">Chapter 25. Stream Buffers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch26.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="io.streambuf.buffering"></a>Buffering</h2></div></div></div><p>First, are you sure that you understand buffering? Particularly
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Buffering</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt11ch25.html" title="Chapter 25. Stream Buffers" /><link rel="prev" href="bk01pt11ch25.html" title="Chapter 25. Stream Buffers" /><link rel="next" href="bk01pt11ch26.html" title="Chapter 26. Memory Based Streams" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Buffering</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch25.html">Prev</a> </td><th width="60%" align="center">Chapter 25. Stream Buffers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch26.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="io.streambuf.buffering"></a>Buffering</h2></div></div></div><p>First, are you sure that you understand buffering? Particularly
the fact that C++ may not, in fact, have anything to do with it?
</p><p>The rules for buffering can be a little odd, but they aren't any
different from those of C. (Maybe that's why they can be a bit
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch26.html b/libstdc++-v3/doc/html/manual/bk01pt11ch26.html
index 40727d60530..23c5189868a 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt11ch26.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch26.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 26. Memory Based Streams</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="bk01pt11ch25s02.html" title="Buffering" /><link rel="next" href="bk01pt11ch27.html" title="Chapter 27. File Based Streams" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 26. Memory Based Streams</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch25s02.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch27.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.io.memstreams"></a>Chapter 26. Memory Based Streams</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.memstreams.compat"></a>Compatibility With strstream</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 26. Memory Based Streams</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="bk01pt11ch25s02.html" title="Buffering" /><link rel="next" href="bk01pt11ch27.html" title="Chapter 27. File Based Streams" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 26. Memory Based Streams</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch25s02.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch27.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.io.memstreams"></a>Chapter 26. Memory Based Streams</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.memstreams.compat"></a>Compatibility With strstream</h2></div></div></div><p>
</p><p>Stringstreams (defined in the header <code class="code">&lt;sstream&gt;</code>)
are in this author's opinion one of the coolest things since
sliced time. An example of their use is in the Received Wisdom
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch27.html b/libstdc++-v3/doc/html/manual/bk01pt11ch27.html
index e35e682e769..ac7cf9e2feb 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt11ch27.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch27.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 27. File Based Streams</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="bk01pt11ch26.html" title="Chapter 26. Memory Based Streams" /><link rel="next" href="bk01pt11ch27s02.html" title="Binary Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 27. File Based Streams</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch26.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch27s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.io.filestreams"></a>Chapter 27. File Based Streams</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt11ch27.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s02.html">Binary Input and Output</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.filestreams.copying_a_file"></a>Copying a File</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 27. File Based Streams</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="bk01pt11ch26.html" title="Chapter 26. Memory Based Streams" /><link rel="next" href="bk01pt11ch27s02.html" title="Binary Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 27. File Based Streams</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch26.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch27s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.io.filestreams"></a>Chapter 27. File Based Streams</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt11ch27.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s02.html">Binary Input and Output</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.filestreams.copying_a_file"></a>Copying a File</h2></div></div></div><p>
</p><p>So you want to copy a file quickly and easily, and most important,
completely portably. And since this is C++, you have an open
ifstream (call it IN) and an open ofstream (call it OUT):
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html b/libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html
index b313bcc5f19..e8079c4d3de 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch27s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Binary Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt11ch27.html" title="Chapter 27. File Based Streams" /><link rel="prev" href="bk01pt11ch27.html" title="Chapter 27. File Based Streams" /><link rel="next" href="bk01pt11ch27s03.html" title="More Binary Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Binary Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch27.html">Prev</a> </td><th width="60%" align="center">Chapter 27. File Based Streams</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch27s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.filestreams.binary"></a>Binary Input and Output</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Binary Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt11ch27.html" title="Chapter 27. File Based Streams" /><link rel="prev" href="bk01pt11ch27.html" title="Chapter 27. File Based Streams" /><link rel="next" href="bk01pt11ch27s03.html" title="More Binary Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Binary Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch27.html">Prev</a> </td><th width="60%" align="center">Chapter 27. File Based Streams</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch27s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.filestreams.binary"></a>Binary Input and Output</h2></div></div></div><p>
</p><p>The first and most important thing to remember about binary I/O is
that opening a file with <code class="code">ios::binary</code> is not, repeat
<span class="emphasis"><em>not</em></span>, the only thing you have to do. It is not a silver
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html b/libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html
index 70369eab80b..4de641f9de7 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch27s03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>More Binary Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt11ch27.html" title="Chapter 27. File Based Streams" /><link rel="prev" href="bk01pt11ch27s02.html" title="Binary Input and Output" /><link rel="next" href="bk01pt11ch28.html" title="Chapter 28. Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">More Binary Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch27s02.html">Prev</a> </td><th width="60%" align="center">Chapter 27. File Based Streams</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch28.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.filestreams.binary2"></a>More Binary Input and Output</h2></div></div></div><p>Towards the beginning of February 2001, the subject of
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>More Binary Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt11ch27.html" title="Chapter 27. File Based Streams" /><link rel="prev" href="bk01pt11ch27s02.html" title="Binary Input and Output" /><link rel="next" href="bk01pt11ch28.html" title="Chapter 28. Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">More Binary Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch27s02.html">Prev</a> </td><th width="60%" align="center">Chapter 27. File Based Streams</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch28.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.filestreams.binary2"></a>More Binary Input and Output</h2></div></div></div><p>Towards the beginning of February 2001, the subject of
"binary" I/O was brought up in a couple of places at the
same time. One notable place was Usenet, where James Kanze and
Dietmar Kühl separately posted articles on why attempting
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch28.html b/libstdc++-v3/doc/html/manual/bk01pt11ch28.html
index 1e7dd0d3eeb..8745a398e4e 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt11ch28.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch28.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 28. Interacting with C</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="bk01pt11ch27s03.html" title="More Binary Input and Output" /><link rel="next" href="bk01pt11ch28s02.html" title="Performance" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 28. Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch27s03.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch28s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.io.c"></a>Chapter 28. Interacting with C</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt11ch28.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch28s02.html">Performance</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.c.FILE"></a>Using FILE* and file descriptors</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 28. Interacting with C</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="io.html" title="Part XI. Input and Output" /><link rel="prev" href="bk01pt11ch27s03.html" title="More Binary Input and Output" /><link rel="next" href="bk01pt11ch28s02.html" title="Performance" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 28. Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch27s03.html">Prev</a> </td><th width="60%" align="center">Part XI. Input and Output</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch28s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.io.c"></a>Chapter 28. Interacting with C</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt11ch28.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch28s02.html">Performance</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.c.FILE"></a>Using FILE* and file descriptors</h2></div></div></div><p>
See the <a class="link" href="bk01pt12ch38.html" title="Chapter 38. Input and Output">extensions</a> for using
<span class="type">FILE</span> and <span class="type">file descriptors</span> with
<code class="classname">ofstream</code> and
diff --git a/libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html b/libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html
index 2cce3db1a73..7dee2f3213a 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt11ch28s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Performance</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt11ch28.html" title="Chapter 28. Interacting with C" /><link rel="prev" href="bk01pt11ch28.html" title="Chapter 28. Interacting with C" /><link rel="next" href="extensions.html" title="Part XII. Extensions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Performance</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch28.html">Prev</a> </td><th width="60%" align="center">Chapter 28. Interacting with C</th><td width="20%" align="right"> <a accesskey="n" href="extensions.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.c.sync"></a>Performance</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Performance</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt11ch28.html" title="Chapter 28. Interacting with C" /><link rel="prev" href="bk01pt11ch28.html" title="Chapter 28. Interacting with C" /><link rel="next" href="extensions.html" title="Part XII. Extensions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Performance</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch28.html">Prev</a> </td><th width="60%" align="center">Chapter 28. Interacting with C</th><td width="20%" align="right"> <a accesskey="n" href="extensions.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.io.c.sync"></a>Performance</h2></div></div></div><p>
Pathetic Performance? Ditch C.
</p><p>It sounds like a flame on C, but it isn't. Really. Calm down.
I'm just saying it to get your attention.
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch29.html b/libstdc++-v3/doc/html/manual/bk01pt12ch29.html
index 03dc8ee9e50..6766b33537e 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch29.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch29.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 29. Compile Time Checks</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12pr03.html" title="" /><link rel="next" href="debug_mode.html" title="Chapter 30. Debug Mode" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 29. Compile Time Checks</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12pr03.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="debug_mode.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.compile_checks"></a>Chapter 29. Compile Time Checks</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 29. Compile Time Checks</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12pr03.html" title="" /><link rel="next" href="debug_mode.html" title="Chapter 30. Debug Mode" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 29. Compile Time Checks</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12pr03.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="debug_mode.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.compile_checks"></a>Chapter 29. Compile Time Checks</h2></div></div></div><p>
Also known as concept checking.
</p><p>In 1999, SGI added <span class="emphasis"><em>concept checkers</em></span> to their implementation
of the STL: code which checked the template parameters of
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html
index c111bffff86..cb203171816 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch30s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Semantics</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="debug_mode.html" title="Chapter 30. Debug Mode" /><link rel="prev" href="debug_mode.html" title="Chapter 30. Debug Mode" /><link rel="next" href="bk01pt12ch30s03.html" title="Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Semantics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch30s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.semantics"></a>Semantics</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Semantics</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="debug_mode.html" title="Chapter 30. Debug Mode" /><link rel="prev" href="debug_mode.html" title="Chapter 30. Debug Mode" /><link rel="next" href="bk01pt12ch30s03.html" title="Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Semantics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch30s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.semantics"></a>Semantics</h2></div></div></div><p>
</p><p>A program that uses the C++ standard library correctly
will maintain the same semantics under debug mode as it had with
the normal (release) library. All functional and exception-handling
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html
index 27c6624e1a8..7fd9f2c6327 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Using</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="debug_mode.html" title="Chapter 30. Debug Mode" /><link rel="prev" href="bk01pt12ch30s02.html" title="Semantics" /><link rel="next" href="bk01pt12ch30s04.html" title="Design" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch30s02.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch30s04.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.using"></a>Using</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Using</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="debug_mode.html" title="Chapter 30. Debug Mode" /><link rel="prev" href="bk01pt12ch30s02.html" title="Semantics" /><link rel="next" href="bk01pt12ch30s04.html" title="Design" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch30s02.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch30s04.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.using"></a>Using</h2></div></div></div><p>
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="debug_mode.using.mode"></a>Using the Debug Mode</h3></div></div></div><p>To use the libstdc++ debug mode, compile your application with the
compiler flag <code class="code">-D_GLIBCXX_DEBUG</code>. Note that this flag
changes the sizes and behavior of standard class templates such
@@ -19,6 +19,6 @@
mode or with debug mode. The
following table provides the names and headers of the debugging
containers:
-</p><div class="table"><a id="id372051"></a><p class="title"><b>Table 30.1. Debugging Containers</b></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /><col /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><code class="classname">std::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="classname">__gnu_debug::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::deque</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="classname">__gnu_debug::deque</code></td><td align="left"><code class="filename">deque</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::list</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="classname">__gnu_debug::list</code></td><td align="left"><code class="filename">list</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::map</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::map</code></td><td align="left"><code class="filename">map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::multimap</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::multimap</code></td><td align="left"><code class="filename">map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::multiset</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::multiset</code></td><td align="left"><code class="filename">set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::set</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::set</code></td><td align="left"><code class="filename">set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::string</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::wstring</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::wstring</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::basic_string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::basic_string</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::vector</code></td><td align="left"><code class="filename">vector</code></td><td align="left"><code class="classname">__gnu_debug::vector</code></td><td align="left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>In addition, when compiling in C++0x mode, these additional
+</p><div class="table"><a id="id513827"></a><p class="title"><b>Table 30.1. Debugging Containers</b></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /><col /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><code class="classname">std::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="classname">__gnu_debug::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::deque</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="classname">__gnu_debug::deque</code></td><td align="left"><code class="filename">deque</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::list</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="classname">__gnu_debug::list</code></td><td align="left"><code class="filename">list</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::map</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::map</code></td><td align="left"><code class="filename">map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::multimap</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::multimap</code></td><td align="left"><code class="filename">map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::multiset</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::multiset</code></td><td align="left"><code class="filename">set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::set</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::set</code></td><td align="left"><code class="filename">set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::string</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::wstring</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::wstring</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::basic_string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::basic_string</code></td><td align="left"><code class="filename">string</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::vector</code></td><td align="left"><code class="filename">vector</code></td><td align="left"><code class="classname">__gnu_debug::vector</code></td><td align="left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /><p>In addition, when compiling in C++0x mode, these additional
containers have additional debug capability.
-</p><div class="table"><a id="id404517"></a><p class="title"><b>Table 30.2. Debugging Containers C++0x</b></p><div class="table-contents"><table summary="Debugging Containers C++0x" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /><col /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><code class="classname">std::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch30s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch30s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>
+</p><div class="table"><a id="id470143"></a><p class="title"><b>Table 30.2. Debugging Containers C++0x</b></p><div class="table-contents"><table summary="Debugging Containers C++0x" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col /><col /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><code class="classname">std::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr><tr><td align="left"><code class="classname">std::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch30s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch30s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html b/libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html
index 141978a48c7..b76fc3dc6ef 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch30s04.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="debug_mode.html" title="Chapter 30. Debug Mode" /><link rel="prev" href="bk01pt12ch30s03.html" title="Using" /><link rel="next" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch30s03.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="parallel_mode.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.design"></a>Design</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="debug_mode.html" title="Chapter 30. Debug Mode" /><link rel="prev" href="bk01pt12ch30s03.html" title="Using" /><link rel="next" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch30s03.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="parallel_mode.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.design"></a>Design</h2></div></div></div><p>
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.debug_mode.design.goals"></a>Goals</h3></div></div></div><p>
</p><p> The libstdc++ debug mode replaces unsafe (but efficient) standard
containers and iterators with semantically equivalent safe standard
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html
index 58468b10b25..39c6f2aaecf 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Semantics</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="prev" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="next" href="bk01pt12ch31s03.html" title="Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Semantics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="parallel_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch31s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.semantics"></a>Semantics</h2></div></div></div><p> The parallel mode STL algorithms are currently not exception-safe,
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Semantics</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="prev" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="next" href="bk01pt12ch31s03.html" title="Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Semantics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="parallel_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch31s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.semantics"></a>Semantics</h2></div></div></div><p> The parallel mode STL algorithms are currently not exception-safe,
i.e. user-defined functors must not throw exceptions.
Also, the order of execution is not guaranteed for some functions, of course.
Therefore, user-defined functors should not have any concurrent side effects.
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html
index dd9057e9769..fed819c6b02 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Using</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="prev" href="bk01pt12ch31s02.html" title="Semantics" /><link rel="next" href="bk01pt12ch31s04.html" title="Design" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s02.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch31s04.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.using"></a>Using</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="parallel_mode.using.prereq_flags"></a>Prerequisite Compiler Flags</h3></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Using</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="prev" href="bk01pt12ch31s02.html" title="Semantics" /><link rel="next" href="bk01pt12ch31s04.html" title="Design" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s02.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch31s04.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.using"></a>Using</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="parallel_mode.using.prereq_flags"></a>Prerequisite Compiler Flags</h3></div></div></div><p>
Any use of parallel functionality requires additional compiler
and runtime support, in particular support for OpenMP. Adding this support is
not difficult: just compile your application with the compiler
@@ -63,4 +63,4 @@ Then compile this code with the prerequisite compiler flags
flags for atomic operations.)
</p><p> The following table provides the names and headers of all the
parallel algorithms that can be used in a similar manner:
-</p><div class="table"><a id="id464045"></a><p class="title"><b>Table 31.1. Parallel Algorithms</b></p><div class="table-contents"><table summary="Parallel Algorithms" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Algorithm</th><th align="left">Header</th><th align="left">Parallel algorithm</th><th align="left">Parallel header</th></tr></thead><tbody><tr><td align="left"><code class="function">std::accumulate</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::accumulate</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::adjacent_difference</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::adjacent_difference</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::inner_product</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::inner_product</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::partial_sum</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::partial_sum</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::adjacent_find</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::adjacent_find</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::count</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::count</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::count_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::count_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::equal</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::equal</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find_first_of</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find_first_of</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::for_each</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::for_each</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::generate</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::generate</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::generate_n</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::generate_n</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::lexicographical_compare</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::lexicographical_compare</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::mismatch</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::mismatch</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::search</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::search</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::search_n</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::search_n</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::transform</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::transform</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::replace</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::replace</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::replace_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::replace_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::max_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::max_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::merge</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::merge</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::min_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::min_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::nth_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::nth_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::partial_sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::partial_sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::partition</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::partition</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::random_shuffle</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::random_shuffle</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_union</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_union</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_intersection</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_intersection</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_symmetric_difference</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_symmetric_difference</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_difference</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_difference</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::stable_sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::stable_sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::unique_copy</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::unique_copy</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch31s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch31s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>
+</p><div class="table"><a id="id466177"></a><p class="title"><b>Table 31.1. Parallel Algorithms</b></p><div class="table-contents"><table summary="Parallel Algorithms" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Algorithm</th><th align="left">Header</th><th align="left">Parallel algorithm</th><th align="left">Parallel header</th></tr></thead><tbody><tr><td align="left"><code class="function">std::accumulate</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::accumulate</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::adjacent_difference</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::adjacent_difference</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::inner_product</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::inner_product</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::partial_sum</code></td><td align="left"><code class="filename">numeric</code></td><td align="left"><code class="function">__gnu_parallel::partial_sum</code></td><td align="left"><code class="filename">parallel/numeric</code></td></tr><tr><td align="left"><code class="function">std::adjacent_find</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::adjacent_find</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::count</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::count</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::count_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::count_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::equal</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::equal</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::find_first_of</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::find_first_of</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::for_each</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::for_each</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::generate</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::generate</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::generate_n</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::generate_n</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::lexicographical_compare</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::lexicographical_compare</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::mismatch</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::mismatch</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::search</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::search</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::search_n</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::search_n</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::transform</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::transform</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::replace</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::replace</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::replace_if</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::replace_if</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::max_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::max_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::merge</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::merge</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::min_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::min_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::nth_element</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::nth_element</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::partial_sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::partial_sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::partition</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::partition</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::random_shuffle</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::random_shuffle</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_union</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_union</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_intersection</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_intersection</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_symmetric_difference</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_symmetric_difference</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::set_difference</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::set_difference</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::stable_sort</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::stable_sort</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr><tr><td align="left"><code class="function">std::unique_copy</code></td><td align="left"><code class="filename">algorithm</code></td><td align="left"><code class="function">__gnu_parallel::unique_copy</code></td><td align="left"><code class="filename">parallel/algorithm</code></td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt12ch31s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch31s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html
index 029f55e6858..40b2ad59432 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s04.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="prev" href="bk01pt12ch31s03.html" title="Using" /><link rel="next" href="bk01pt12ch31s05.html" title="Testing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s03.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch31s05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.design"></a>Design</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Design</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="prev" href="bk01pt12ch31s03.html" title="Using" /><link rel="next" href="bk01pt12ch31s05.html" title="Testing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s03.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch31s05.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.design"></a>Design</h2></div></div></div><p>
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.parallel_mode.design.intro"></a>Interface Basics</h3></div></div></div><p>
All parallel algorithms are intended to have signatures that are
equivalent to the ISO C++ algorithms replaced. For instance, the
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html
index ff3ea023344..733a5258869 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s05.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Testing</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="prev" href="bk01pt12ch31s04.html" title="Design" /><link rel="next" href="bk01pt12ch32.html" title="Chapter 32. Allocators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Testing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s04.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch32.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.test"></a>Testing</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Testing</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="parallel_mode.html" title="Chapter 31. Parallel Mode" /><link rel="prev" href="bk01pt12ch31s04.html" title="Design" /><link rel="next" href="bk01pt12ch32.html" title="Chapter 32. Allocators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Testing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s04.html">Prev</a> </td><th width="60%" align="center">Chapter 31. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch32.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.test"></a>Testing</h2></div></div></div><p>
Both the normal conformance and regression tests and the
supplemental performance tests work.
</p><p>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32.html
index 444c16223e8..ddc6e707931 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch32.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 32. Allocators</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch31s05.html" title="Testing" /><link rel="next" href="bitmap_allocator.html" title="bitmap_allocator" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 32. Allocators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s05.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bitmap_allocator.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.allocator"></a>Chapter 32. Allocators</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.allocator.mt"></a>mt_allocator</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 32. Allocators</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch31s05.html" title="Testing" /><link rel="next" href="bitmap_allocator.html" title="bitmap_allocator" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 32. Allocators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch31s05.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bitmap_allocator.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.allocator"></a>Chapter 32. Allocators</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.allocator.mt"></a>mt_allocator</h2></div></div></div><p>
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.mt.intro"></a>Intro</h3></div></div></div><p>
The mt allocator [hereinafter referred to simply as "the allocator"]
is a fixed size (power of two) allocator that was initially
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch33.html b/libstdc++-v3/doc/html/manual/bk01pt12ch33.html
index ee96bfa38f6..d2fb6a77f85 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch33.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch33.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 33. Containers</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bitmap_allocator.html" title="bitmap_allocator" /><link rel="next" href="bk01pt12ch33s02.html" title="HP/SGI" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 33. Containers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bitmap_allocator.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch33s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.containers"></a>Chapter 33. Containers</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt12ch33.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 33. Containers</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bitmap_allocator.html" title="bitmap_allocator" /><link rel="next" href="bk01pt12ch33s02.html" title="HP/SGI" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 33. Containers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bitmap_allocator.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch33s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.containers"></a>Chapter 33. Containers</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt12ch33.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></div><p>
</p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.containers.pbds"></a>Policy Based Data Structures</h2></div></div></div><p>
<a class="ulink" href="http://gcc.gnu.org/onlinedocs/libstdc++/ext/pb_ds/index.html" target="_top">More details here</a>.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bitmap_allocator.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12ch33s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">bitmap_allocator </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> HP/SGI</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch33s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch33s02.html
index f7a8543b8ce..6318af08bf5 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch33s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch33s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HP/SGI</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt12ch33.html" title="Chapter 33. Containers" /><link rel="prev" href="bk01pt12ch33.html" title="Chapter 33. Containers" /><link rel="next" href="bk01pt12ch33s03.html" title="Deprecated HP/SGI" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">HP/SGI</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch33.html">Prev</a> </td><th width="60%" align="center">Chapter 33. Containers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch33s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.containers.sgi"></a>HP/SGI</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HP/SGI</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt12ch33.html" title="Chapter 33. Containers" /><link rel="prev" href="bk01pt12ch33.html" title="Chapter 33. Containers" /><link rel="next" href="bk01pt12ch33s03.html" title="Deprecated HP/SGI" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">HP/SGI</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch33.html">Prev</a> </td><th width="60%" align="center">Chapter 33. Containers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch33s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.containers.sgi"></a>HP/SGI</h2></div></div></div><p>
</p><p>A few extensions and nods to backwards-compatibility have been made with
containers. Those dealing with older SGI-style allocators are dealt with
elsewhere. The remaining ones all deal with bits:
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch33s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch33s03.html
index b89fad1d7ee..56bc9c58e86 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch33s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch33s03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Deprecated HP/SGI</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt12ch33.html" title="Chapter 33. Containers" /><link rel="prev" href="bk01pt12ch33s02.html" title="HP/SGI" /><link rel="next" href="bk01pt12ch34.html" title="Chapter 34. Utilities" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Deprecated HP/SGI</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch33s02.html">Prev</a> </td><th width="60%" align="center">Chapter 33. Containers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch34.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.containers.deprecated_sgi"></a>Deprecated HP/SGI</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Deprecated HP/SGI</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt12ch33.html" title="Chapter 33. Containers" /><link rel="prev" href="bk01pt12ch33s02.html" title="HP/SGI" /><link rel="next" href="bk01pt12ch34.html" title="Chapter 34. Utilities" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Deprecated HP/SGI</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch33s02.html">Prev</a> </td><th width="60%" align="center">Chapter 33. Containers</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch34.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.containers.deprecated_sgi"></a>Deprecated HP/SGI</h2></div></div></div><p>
The SGI hashing classes <code class="classname">hash_set</code> and
<code class="classname">hash_set</code> have been deprecated by the
unordered_set, unordered_multiset, unordered_map,
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch34.html b/libstdc++-v3/doc/html/manual/bk01pt12ch34.html
index d338b35a671..505d11f34a1 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch34.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch34.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 34. Utilities</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch33s03.html" title="Deprecated HP/SGI" /><link rel="next" href="bk01pt12ch35.html" title="Chapter 35. Algorithms" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 34. Utilities</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch33s03.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch35.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.util"></a>Chapter 34. Utilities</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 34. Utilities</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch33s03.html" title="Deprecated HP/SGI" /><link rel="next" href="bk01pt12ch35.html" title="Chapter 35. Algorithms" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 34. Utilities</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch33s03.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch35.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.util"></a>Chapter 34. Utilities</h2></div></div></div><p>
The &lt;functional&gt; header contains many additional functors
and helper functions, extending section 20.3. They are
implemented in the file stl_function.h:
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch35.html b/libstdc++-v3/doc/html/manual/bk01pt12ch35.html
index ac3e3955327..2db6be689c5 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch35.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch35.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 35. Algorithms</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch34.html" title="Chapter 34. Utilities" /><link rel="next" href="bk01pt12ch36.html" title="Chapter 36. Numerics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 35. Algorithms</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch34.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch36.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.algorithms"></a>Chapter 35. Algorithms</h2></div></div></div><p>25.1.6 (count, count_if) is extended with two more versions of count
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 35. Algorithms</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch34.html" title="Chapter 34. Utilities" /><link rel="next" href="bk01pt12ch36.html" title="Chapter 36. Numerics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 35. Algorithms</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch34.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch36.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.algorithms"></a>Chapter 35. Algorithms</h2></div></div></div><p>25.1.6 (count, count_if) is extended with two more versions of count
and count_if. The standard versions return their results. The
additional signatures return void, but take a final parameter by
reference to which they assign their results, e.g.,
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch36.html b/libstdc++-v3/doc/html/manual/bk01pt12ch36.html
index 81242336348..3f120ae6022 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch36.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch36.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 36. Numerics</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch35.html" title="Chapter 35. Algorithms" /><link rel="next" href="bk01pt12ch37.html" title="Chapter 37. Iterators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 36. Numerics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch35.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch37.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.numerics"></a>Chapter 36. Numerics</h2></div></div></div><p>26.4, the generalized numeric operations such as accumulate, are extended
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 36. Numerics</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch35.html" title="Chapter 35. Algorithms" /><link rel="next" href="bk01pt12ch37.html" title="Chapter 37. Iterators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 36. Numerics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch35.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch37.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.numerics"></a>Chapter 36. Numerics</h2></div></div></div><p>26.4, the generalized numeric operations such as accumulate, are extended
with the following functions:
</p><pre class="programlisting">
power (x, n);
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch37.html b/libstdc++-v3/doc/html/manual/bk01pt12ch37.html
index 7c3d3cd3343..ea5e1fa7e79 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch37.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch37.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 37. Iterators</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch36.html" title="Chapter 36. Numerics" /><link rel="next" href="bk01pt12ch38.html" title="Chapter 38. Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 37. Iterators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch36.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch38.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.iterators"></a>Chapter 37. Iterators</h2></div></div></div><p>24.3.2 describes <code class="code">struct iterator</code>, which didn't exist in the
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 37. Iterators</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch36.html" title="Chapter 36. Numerics" /><link rel="next" href="bk01pt12ch38.html" title="Chapter 38. Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 37. Iterators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch36.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch38.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.iterators"></a>Chapter 37. Iterators</h2></div></div></div><p>24.3.2 describes <code class="code">struct iterator</code>, which didn't exist in the
original HP STL implementation (the language wasn't rich enough at the
time). For backwards compatibility, base classes are provided which
declare the same nested typedefs:
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch38.html b/libstdc++-v3/doc/html/manual/bk01pt12ch38.html
index 04ac340da8e..84c110d3ad5 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch38.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch38.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 38. Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch37.html" title="Chapter 37. Iterators" /><link rel="next" href="bk01pt12ch39.html" title="Chapter 39. Demangling" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 38. Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch37.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch39.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.io"></a>Chapter 38. Input and Output</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 38. Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch37.html" title="Chapter 37. Iterators" /><link rel="next" href="bk01pt12ch39.html" title="Chapter 39. Demangling" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 38. Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch37.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch39.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.io"></a>Chapter 38. Input and Output</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></div><p>
Extensions allowing <code class="code">filebuf</code>s to be constructed from
"C" types like FILE*s and file descriptors.
</p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.io.filebuf_derived"></a>Derived filebufs</h2></div></div></div><p>The v2 library included non-standard extensions to construct
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch39.html b/libstdc++-v3/doc/html/manual/bk01pt12ch39.html
index 15ba1ca3d2d..82a673f19ab 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch39.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch39.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 39. Demangling</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch38.html" title="Chapter 38. Input and Output" /><link rel="next" href="concurrency.html" title="Chapter 40. Concurrency" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 39. Demangling</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch38.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="concurrency.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.demangle"></a>Chapter 39. Demangling</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 39. Demangling</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch38.html" title="Chapter 38. Input and Output" /><link rel="next" href="concurrency.html" title="Chapter 40. Concurrency" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 39. Demangling</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch38.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="concurrency.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.demangle"></a>Chapter 39. Demangling</h2></div></div></div><p>
Transforming C++ ABI identifiers (like RTTI symbols) into the
original C++ source identifiers is called
“<span class="quote">demangling.</span>â€
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch40s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch40s02.html
index 6fd675dae3a..2377a0e32f4 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch40s02.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch40s02.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Implementation</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="concurrency.html" title="Chapter 40. Concurrency" /><link rel="prev" href="concurrency.html" title="Chapter 40. Concurrency" /><link rel="next" href="bk01pt12ch40s03.html" title="Use" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="concurrency.html">Prev</a> </td><th width="60%" align="center">Chapter 40. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch40s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.impl"></a>Implementation</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.impl.atomic_fallbacks"></a>Using Builtin Atomic Functions</h3></div></div></div><p>The functions for atomic operations described above are either
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Implementation</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="concurrency.html" title="Chapter 40. Concurrency" /><link rel="prev" href="concurrency.html" title="Chapter 40. Concurrency" /><link rel="next" href="bk01pt12ch40s03.html" title="Use" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="concurrency.html">Prev</a> </td><th width="60%" align="center">Chapter 40. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch40s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.impl"></a>Implementation</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.impl.atomic_fallbacks"></a>Using Builtin Atomic Functions</h3></div></div></div><p>The functions for atomic operations described above are either
implemented via compiler intrinsics (if the underlying host is
capable) or by library fallbacks.</p><p>Compiler intrinsics (builtins) are always preferred. However, as
the compiler builtins for atomics are not universally implemented,
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch40s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch40s03.html
index b67d0f7fbf5..b02d55e2163 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12ch40s03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12ch40s03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Use</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="concurrency.html" title="Chapter 40. Concurrency" /><link rel="prev" href="bk01pt12ch40s02.html" title="Implementation" /><link rel="next" href="appendix_contributing.html" title="Appendix A. Contributing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Use</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch40s02.html">Prev</a> </td><th width="60%" align="center">Chapter 40. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="appendix_contributing.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.use"></a>Use</h2></div></div></div><p>Typical usage of the last two constructs is demonstrated as follows:
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Use</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="concurrency.html" title="Chapter 40. Concurrency" /><link rel="prev" href="bk01pt12ch40s02.html" title="Implementation" /><link rel="next" href="appendix_contributing.html" title="Appendix A. Contributing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Use</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch40s02.html">Prev</a> </td><th width="60%" align="center">Chapter 40. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="appendix_contributing.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.use"></a>Use</h2></div></div></div><p>Typical usage of the last two constructs is demonstrated as follows:
</p><pre class="programlisting">
#include &lt;ext/concurrence.h&gt;
diff --git a/libstdc++-v3/doc/html/manual/bk01pt12pr03.html b/libstdc++-v3/doc/html/manual/bk01pt12pr03.html
index de01fa9db0e..6334c10f710 100644
--- a/libstdc++-v3/doc/html/manual/bk01pt12pr03.html
+++ b/libstdc++-v3/doc/html/manual/bk01pt12pr03.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="extensions.html" title="Part XII. Extensions" /><link rel="next" href="bk01pt12ch29.html" title="Chapter 29. Compile Time Checks" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch29.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id405371"></a></h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="extensions.html" title="Part XII. Extensions" /><link rel="next" href="bk01pt12ch29.html" title="Chapter 29. Compile Time Checks" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch29.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id513886"></a></h2></div></div></div><p>
Here we will make an attempt at describing the non-Standard extensions to
the library. Some of these are from SGI's STL, some of these are GNU's,
and some just seemed to appear on the doorstep.
diff --git a/libstdc++-v3/doc/html/manual/codecvt.html b/libstdc++-v3/doc/html/manual/codecvt.html
index 27b60b0e17f..747dfb7543f 100644
--- a/libstdc++-v3/doc/html/manual/codecvt.html
+++ b/libstdc++-v3/doc/html/manual/codecvt.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>codecvt</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; codecvt&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt06ch15.html" title="Chapter 15. Facets aka Categories" /><link rel="prev" href="bk01pt06ch15.html" title="Chapter 15. Facets aka Categories" /><link rel="next" href="messages.html" title="messages" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">codecvt</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt06ch15.html">Prev</a> </td><th width="60%" align="center">Chapter 15. Facets aka Categories</th><td width="20%" align="right"> <a accesskey="n" href="messages.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.codecvt"></a>codecvt</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>codecvt</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; codecvt&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt06ch15.html" title="Chapter 15. Facets aka Categories" /><link rel="prev" href="bk01pt06ch15.html" title="Chapter 15. Facets aka Categories" /><link rel="next" href="messages.html" title="messages" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">codecvt</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt06ch15.html">Prev</a> </td><th width="60%" align="center">Chapter 15. Facets aka Categories</th><td width="20%" align="right"> <a accesskey="n" href="messages.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.codecvt"></a>codecvt</h2></div></div></div><p>
The standard class codecvt attempts to address conversions between
different character encoding schemes. In particular, the standard
attempts to detail conversions between the implementation-defined wide
@@ -337,41 +337,41 @@ codecvt usage.
</p></li><li><p>
wchar_t/char internal buffers and conversions between
internal/external buffers?
- </p></li></ul></div></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id392866"></a><p><span class="title"><i>
+ </p></li></ul></div></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id453116"></a><p><span class="title"><i>
The GNU C Library
- </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id456981"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id517137"></a><p><span class="title"><i>
Correspondence
- </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id393470"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id517166"></a><p><span class="title"><i>
ISO/IEC 14882:1998 Programming languages - C++
- </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id393488"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id413525"></a><p><span class="title"><i>
ISO/IEC 9899:1999 Programming languages - C
- </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id431428"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id413543"></a><p><span class="title"><i>
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
</i>. </span><span class="copyright">Copyright © 1999
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id431455"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id474993"></a><p><span class="title"><i>
The C++ Programming Language, Special Edition
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
Addison Wesley
- . </span></span></p></div><div class="biblioentry"><a id="id376909"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id542082"></a><p><span class="title"><i>
Standard C++ IOStreams and Locales
</i>. </span><span class="subtitle">
Advanced Programmer's Guide and Reference
. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername">
Addison Wesley Longman
- . </span></span></p></div><div class="biblioentry"><a id="id384488"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id450803"></a><p><span class="title"><i>
A brief description of Normative Addendum 1
</i>. </span><span class="author"><span class="firstname">Clive</span> <span class="surname">Feather</span>. </span><span class="pagenums">Extended Character Sets. </span><span class="biblioid">
<a class="ulink" href="http://www.lysator.liu.se/c/na1.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id394292"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id512823"></a><p><span class="title"><i>
The Unicode HOWTO
</i>. </span><span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span>. </span><span class="biblioid">
<a class="ulink" href="ftp://ftp.ilog.fr/pub/Users/haible/utf8/Unicode-HOWTO.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id394320"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id512851"></a><p><span class="title"><i>
UTF-8 and Unicode FAQ for Unix/Linux
</i>. </span><span class="author"><span class="firstname">Markus</span> <span class="surname">Khun</span>. </span><span class="biblioid">
<a class="ulink" href="http://www.cl.cam.ac.uk/~mgk25/unicode.html" target="_top">
diff --git a/libstdc++-v3/doc/html/manual/concurrency.html b/libstdc++-v3/doc/html/manual/concurrency.html
index 561c2cf288d..b201c763932 100644
--- a/libstdc++-v3/doc/html/manual/concurrency.html
+++ b/libstdc++-v3/doc/html/manual/concurrency.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 40. Concurrency</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch39.html" title="Chapter 39. Demangling" /><link rel="next" href="bk01pt12ch40s02.html" title="Implementation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 40. Concurrency</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch39.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch40s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.concurrency"></a>Chapter 40. Concurrency</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s03.html">Use</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.design"></a>Design</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.design.threads"></a>Interface to Locks and Mutexes</h3></div></div></div><p>The file &lt;ext/concurrence.h&gt; contains all the higher-level
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 40. Concurrency</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch39.html" title="Chapter 39. Demangling" /><link rel="next" href="bk01pt12ch40s02.html" title="Implementation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 40. Concurrency</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch39.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch40s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.concurrency"></a>Chapter 40. Concurrency</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s03.html">Use</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.design"></a>Design</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.design.threads"></a>Interface to Locks and Mutexes</h3></div></div></div><p>The file &lt;ext/concurrence.h&gt; contains all the higher-level
constructs for playing with threads. In contrast to the atomics layer,
the concurrence layer consists largely of types. All types are defined within <code class="code">namespace __gnu_cxx</code>.
</p><p>
diff --git a/libstdc++-v3/doc/html/manual/configure.html b/libstdc++-v3/doc/html/manual/configure.html
index 0f7285b0b0d..2636cd92cf8 100644
--- a/libstdc++-v3/doc/html/manual/configure.html
+++ b/libstdc++-v3/doc/html/manual/configure.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Configure</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; configure&#10; , &#10; options&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="next" href="bk01pt01ch02s03.html" title="Make" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Configure</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch02.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch02s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.configure"></a>Configure</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Configure</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; configure&#10; , &#10; options&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="next" href="bk01pt01ch02s03.html" title="Make" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Configure</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch02.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch02s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.configure"></a>Configure</h2></div></div></div><p>
When configuring libstdc++, you'll have to configure the entire
<span class="emphasis"><em>gccsrcdir</em></span> directory. Consider using the
toplevel gcc configuration option
@@ -186,14 +186,16 @@
environment.
</p></dd><dt><span class="term"><code class="code">--enable-clock-gettime</code></span></dt><dd><p>This is an abbreviated form of
<code class="code">'--enable-clock-gettime=yes'</code>(described next).
- </p></dd><dt><span class="term"><code class="code">--enable-clock-gettime=OPTION</code></span></dt><dd><p>Enables link-type checks for the availability of the
- clock_gettime clocks, used in [time.clock] of the current C++0x draft.
- The choice OPTION=yes checks for the availability of the monotonic and
- realtime clocks in libc and libposix4. In case of need the latter is
- also linked to libstdc++ as part of the build process. OPTION=rt
- also searches (and, in case, links) librt. Note that the latter
- is not always desirable because, in glibc, for example, in turn it
- triggers the linking of libpthread too, which activates locking,
- a large overhead for single-thread programs. OPTION=no skips the
- tests completely. The default is OPTION=no.
+ </p></dd><dt><span class="term"><code class="code">--enable-libstdcxx-time=OPTION</code></span></dt><dd><p>Enables link-type checks for the availability of the
+ clock_gettime clocks, used in the implementation of [time.clock],
+ and of the nanosleep and sched_yield functions, used in the
+ implementation of [thread.thread.this] of the current C++0x draft.
+ The choice OPTION=yes checks for the availability of the facilities
+ in libc and libposix4. In case of need the latter is also linked
+ to libstdc++ as part of the build process. OPTION=rt also searches
+ (and, in case, links) librt. Note that the latter is not always
+ desirable because, in glibc, for example, in turn it triggers the
+ linking of libpthread too, which activates locking, a large overhead
+ for single-thread programs. OPTION=no skips the tests completely.
+ The default is OPTION=no.
</p></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt01ch02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt01ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt01ch02s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Setup </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Make</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/containers.html b/libstdc++-v3/doc/html/manual/containers.html
index cb5eb15b540..5067d186901 100644
--- a/libstdc++-v3/doc/html/manual/containers.html
+++ b/libstdc++-v3/doc/html/manual/containers.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part VII. Containers</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="messages.html" title="messages" /><link rel="next" href="bk01pt07ch16.html" title="Chapter 16. Sequences" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part VII. Containers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="messages.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch16.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.containers"></a>Part VII. Containers</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt07ch16.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch17.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch18.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="messages.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt07ch16.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">messages </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 16. Sequences</td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part VII. Containers</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="messages.html" title="messages" /><link rel="next" href="bk01pt07ch16.html" title="Chapter 16. Sequences" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part VII. Containers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="messages.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt07ch16.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.containers"></a>Part VII. Containers</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt07ch16.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch17.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch18.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="messages.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt07ch16.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">messages </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 16. Sequences</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/debug.html b/libstdc++-v3/doc/html/manual/debug.html
index 311438cee91..74a981ffd53 100644
--- a/libstdc++-v3/doc/html/manual/debug.html
+++ b/libstdc++-v3/doc/html/manual/debug.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Debugging Support</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s06.html" title="Exceptions" /><link rel="next" href="support.html" title="Part II. Support" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Debugging Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s06.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="support.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.debug"></a>Debugging Support</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Debugging Support</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; C++&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="bk01pt01ch03s06.html" title="Exceptions" /><link rel="next" href="support.html" title="Part II. Support" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Debugging Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch03s06.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="support.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.debug"></a>Debugging Support</h2></div></div></div><p>
There are numerous things that can be done to improve the ease with
which C++ binaries are debugged when using the GNU tool chain. Here
are some of them.
diff --git a/libstdc++-v3/doc/html/manual/debug_mode.html b/libstdc++-v3/doc/html/manual/debug_mode.html
index fa9f7b7e3e8..6afd92e0950 100644
--- a/libstdc++-v3/doc/html/manual/debug_mode.html
+++ b/libstdc++-v3/doc/html/manual/debug_mode.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 30. Debug Mode</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch29.html" title="Chapter 29. Compile Time Checks" /><link rel="next" href="bk01pt12ch30s02.html" title="Semantics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 30. Debug Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch29.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch30s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.debug_mode"></a>Chapter 30. Debug Mode</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.intro"></a>Intro</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 30. Debug Mode</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch29.html" title="Chapter 29. Compile Time Checks" /><link rel="next" href="bk01pt12ch30s02.html" title="Semantics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 30. Debug Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch29.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch30s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.debug_mode"></a>Chapter 30. Debug Mode</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.intro"></a>Intro</h2></div></div></div><p>
By default, libstdc++ is built with efficiency in mind, and
therefore performs little or no error checking that is not
required by the C++ standard. This means that programs that
diff --git a/libstdc++-v3/doc/html/manual/diagnostics.html b/libstdc++-v3/doc/html/manual/diagnostics.html
index 4557c13d9c9..239b4e5cc6d 100644
--- a/libstdc++-v3/doc/html/manual/diagnostics.html
+++ b/libstdc++-v3/doc/html/manual/diagnostics.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part III. Diagnostics</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt02ch06s02.html" title="Verbose Terminate Handler" /><link rel="next" href="bk01pt03ch07.html" title="Chapter 7. Exceptions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part III. Diagnostics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch06s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch07.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.diagnostics"></a>Part III. Diagnostics</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt03ch07.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt03ch07.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt03ch08.html">8. Concept Checking</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt02ch06s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Verbose Terminate Handler </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 7. Exceptions</td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part III. Diagnostics</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt02ch06s02.html" title="Verbose Terminate Handler" /><link rel="next" href="bk01pt03ch07.html" title="Chapter 7. Exceptions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part III. Diagnostics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02ch06s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch07.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.diagnostics"></a>Part III. Diagnostics</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt03ch07.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt03ch07.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt03ch08.html">8. Concept Checking</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt02ch06s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Verbose Terminate Handler </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 7. Exceptions</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/extensions.html b/libstdc++-v3/doc/html/manual/extensions.html
index 3b7cf3478df..18820c37f82 100644
--- a/libstdc++-v3/doc/html/manual/extensions.html
+++ b/libstdc++-v3/doc/html/manual/extensions.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part XII. Extensions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt11ch28s02.html" title="Performance" /><link rel="next" href="bk01pt12pr03.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part XII. Extensions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch28s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12pr03.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.ext"></a>Part XII. Extensions</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt12ch29.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch32.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt12ch33.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch33.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch34.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch35.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch36.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch37.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch38.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch39.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s03.html">Use</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch28s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12pr03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Performance </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part XII. Extensions</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt11ch28s02.html" title="Performance" /><link rel="next" href="bk01pt12pr03.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part XII. Extensions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt11ch28s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12pr03.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.ext"></a>Part XII. Extensions</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt12ch29.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch32.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt12ch33.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch33.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch34.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch35.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch36.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch37.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch38.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch39.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s03.html">Use</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt11ch28s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt12pr03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Performance </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/internals.html b/libstdc++-v3/doc/html/manual/internals.html
index af54578b31b..5c1a0a4e3c3 100644
--- a/libstdc++-v3/doc/html/manual/internals.html
+++ b/libstdc++-v3/doc/html/manual/internals.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Porting to New Hardware or Operating Systems</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; internals&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="prev" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="next" href="abi.html" title="ABI Policy and Guidelines" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Porting to New Hardware or Operating Systems</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_porting.html">Prev</a> </td><th width="60%" align="center">Appendix B. Porting and Maintenance</th><td width="20%" align="right"> <a accesskey="n" href="abi.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.internals"></a>Porting to New Hardware or Operating Systems</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Porting to New Hardware or Operating Systems</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; internals&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="prev" href="appendix_porting.html" title="Appendix B. Porting and Maintenance" /><link rel="next" href="abi.html" title="ABI Policy and Guidelines" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Porting to New Hardware or Operating Systems</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_porting.html">Prev</a> </td><th width="60%" align="center">Appendix B. Porting and Maintenance</th><td width="20%" align="right"> <a accesskey="n" href="abi.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.internals"></a>Porting to New Hardware or Operating Systems</h2></div></div></div><p>
</p><p>This document explains how to port libstdc++ (the GNU C++ library) to
a new target.
</p><p>In order to make the GNU C++ library (libstdc++) work with a new
diff --git a/libstdc++-v3/doc/html/manual/intro.html b/libstdc++-v3/doc/html/manual/intro.html
index d4f976ba112..bce04744fed 100644
--- a/libstdc++-v3/doc/html/manual/intro.html
+++ b/libstdc++-v3/doc/html/manual/intro.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part I. Introduction</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="spine.html" title="The GNU C++ Library" /><link rel="next" href="bk01pt01ch01.html" title="Chapter 1. Status" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part I. Introduction</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="spine.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch01.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.intro"></a>Part I. Introduction</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt01ch01.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt01ch02.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch02s03.html">Make</a></span></dt><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s06.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.no">Support for <code class="literal">-fno-exceptions</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="spine.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt01ch01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 1. Status</td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part I. Introduction</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="spine.html" title="The GNU C++ Library" /><link rel="next" href="bk01pt01ch01.html" title="Chapter 1. Status" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part I. Introduction</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="spine.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch01.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.intro"></a>Part I. Introduction</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt01ch01.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt01ch02.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch02s03.html">Make</a></span></dt><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s06.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="spine.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt01ch01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 1. Status</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/io.html b/libstdc++-v3/doc/html/manual/io.html
index 4690e8f8861..93d7f1696e6 100644
--- a/libstdc++-v3/doc/html/manual/io.html
+++ b/libstdc++-v3/doc/html/manual/io.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part XI. Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt10ch23s02.html" title="C99" /><link rel="next" href="bk01pt11ch24.html" title="Chapter 24. Iostream Objects" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part XI. Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch23s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch24.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.io"></a>Part XI. Input and Output</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt11ch24.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="bk01pt11ch25.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch25.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch25s02.html">Buffering</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch26.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch27.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch27.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s02.html">Binary Input and Output</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch28.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch28.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch28s02.html">Performance</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt10ch23s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt11ch24.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">C99 </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 24. Iostream Objects</td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part XI. Input and Output</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt10ch23s02.html" title="C99" /><link rel="next" href="bk01pt11ch24.html" title="Chapter 24. Iostream Objects" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part XI. Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch23s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt11ch24.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.io"></a>Part XI. Input and Output</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt11ch24.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="bk01pt11ch25.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch25.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch25s02.html">Buffering</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch26.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch27.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch27.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s02.html">Binary Input and Output</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch28.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch28.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch28s02.html">Performance</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt10ch23s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt11ch24.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">C99 </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 24. Iostream Objects</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/iterators.html b/libstdc++-v3/doc/html/manual/iterators.html
index 9e6b562655e..ebcaa5118ae 100644
--- a/libstdc++-v3/doc/html/manual/iterators.html
+++ b/libstdc++-v3/doc/html/manual/iterators.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part VIII. Iterators</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt07ch17s02.html" title="bitset" /><link rel="next" href="bk01pt08ch19.html" title="Chapter 19. Predefined" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part VIII. Iterators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch17s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt08ch19.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.iterators"></a>Part VIII. Iterators</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt08ch19.html">19. Predefined</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="bk01pt08ch19s02.html">One Past the End</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt07ch17s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt08ch19.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">bitset </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 19. Predefined</td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part VIII. Iterators</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt07ch17s02.html" title="bitset" /><link rel="next" href="bk01pt08ch19.html" title="Chapter 19. Predefined" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part VIII. Iterators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt07ch17s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt08ch19.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.iterators"></a>Part VIII. Iterators</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt08ch19.html">19. Predefined</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="bk01pt08ch19s02.html">One Past the End</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt07ch17s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt08ch19.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">bitset </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 19. Predefined</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/localization.html b/libstdc++-v3/doc/html/manual/localization.html
index 8d2d8d701fc..0deb7a3de62 100644
--- a/libstdc++-v3/doc/html/manual/localization.html
+++ b/libstdc++-v3/doc/html/manual/localization.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part VI. Localization</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt05ch13s06.html" title="CString (MFC)" /><link rel="next" href="bk01pt06ch14.html" title="Chapter 14. Locales" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part VI. Localization</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s06.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt06ch14.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.localization"></a>Part VI. Localization</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt06ch14.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt06ch15.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt05ch13s06.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt06ch14.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">CString (MFC) </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 14. Locales</td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part VI. Localization</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt05ch13s06.html" title="CString (MFC)" /><link rel="next" href="bk01pt06ch14.html" title="Chapter 14. Locales" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part VI. Localization</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s06.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt06ch14.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.localization"></a>Part VI. Localization</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt06ch14.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt06ch15.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt05ch13s06.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt06ch14.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">CString (MFC) </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 14. Locales</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/messages.html b/libstdc++-v3/doc/html/manual/messages.html
index 8d081e63902..a4058b39eff 100644
--- a/libstdc++-v3/doc/html/manual/messages.html
+++ b/libstdc++-v3/doc/html/manual/messages.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>messages</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; messages&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt06ch15.html" title="Chapter 15. Facets aka Categories" /><link rel="prev" href="codecvt.html" title="codecvt" /><link rel="next" href="containers.html" title="Part VII. Containers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">messages</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="codecvt.html">Prev</a> </td><th width="60%" align="center">Chapter 15. Facets aka Categories</th><td width="20%" align="right"> <a accesskey="n" href="containers.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.messages"></a>messages</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>messages</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; messages&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt06ch15.html" title="Chapter 15. Facets aka Categories" /><link rel="prev" href="codecvt.html" title="codecvt" /><link rel="next" href="containers.html" title="Part VII. Containers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">messages</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="codecvt.html">Prev</a> </td><th width="60%" align="center">Chapter 15. Facets aka Categories</th><td width="20%" align="right"> <a accesskey="n" href="containers.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.messages"></a>messages</h2></div></div></div><p>
The std::messages facet implements message retrieval functionality
equivalent to Java's java.text.MessageFormat .using either GNU gettext
or IEEE 1003.1-200 functions.
@@ -241,38 +241,38 @@ void test01()
model. As of this writing, it is unknown how to query to see
if a specified message catalog exists using the gettext
package.
- </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id443488"></a><p><span class="title"><i>
+ </p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id536216"></a><p><span class="title"><i>
The GNU C Library
</i>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling, and 7 Locales and Internationalization
- . </span></p></div><div class="biblioentry"><a id="id386456"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id509764"></a><p><span class="title"><i>
Correspondence
- </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id376807"></a><p><span class="title"><i>
+ </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id561619"></a><p><span class="title"><i>
ISO/IEC 14882:1998 Programming languages - C++
- </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id376825"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id561638"></a><p><span class="title"><i>
ISO/IEC 9899:1999 Programming languages - C
- </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id337032"></a><p><span class="title"><i>
+ </i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id446198"></a><p><span class="title"><i>
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
</i>. </span><span class="copyright">Copyright © 1999
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id337060"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id446226"></a><p><span class="title"><i>
The C++ Programming Language, Special Edition
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
Addison Wesley
- . </span></span></p></div><div class="biblioentry"><a id="id432918"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id505472"></a><p><span class="title"><i>
Standard C++ IOStreams and Locales
</i>. </span><span class="subtitle">
Advanced Programmer's Guide and Reference
. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername">
Addison Wesley Longman
- . </span></span></p></div><div class="biblioentry"><a id="id389457"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id452552"></a><p><span class="title"><i>
Java 2 Platform, Standard Edition, v 1.3.1 API Specification
</i>. </span><span class="pagenums">java.util.Properties, java.text.MessageFormat,
java.util.Locale, java.util.ResourceBundle. </span><span class="biblioid">
<a class="ulink" href="http://java.sun.com/j2se/1.3/docs/api" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id429321"></a><p><span class="title"><i>
+ . </span></p></div><div class="biblioentry"><a id="id531697"></a><p><span class="title"><i>
GNU gettext tools, version 0.10.38, Native Language Support
Library and Tools.
</i>. </span><span class="biblioid">
diff --git a/libstdc++-v3/doc/html/manual/numerics.html b/libstdc++-v3/doc/html/manual/numerics.html
index 89d8c0fb07a..bc505c0f7bb 100644
--- a/libstdc++-v3/doc/html/manual/numerics.html
+++ b/libstdc++-v3/doc/html/manual/numerics.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part X. Numerics</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt09ch20.html" title="Chapter 20. Mutating" /><link rel="next" href="bk01pt10ch21.html" title="Chapter 21. Complex" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part X. Numerics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt09ch20.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt10ch21.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.numerics"></a>Part X. Numerics</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt10ch21.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt10ch22.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="bk01pt10ch23.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch23.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="bk01pt10ch23s02.html">C99</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt09ch20.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt10ch21.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 20. Mutating </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 21. Complex</td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part X. Numerics</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt09ch20.html" title="Chapter 20. Mutating" /><link rel="next" href="bk01pt10ch21.html" title="Chapter 21. Complex" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part X. Numerics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt09ch20.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt10ch21.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.numerics"></a>Part X. Numerics</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt10ch21.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt10ch22.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="bk01pt10ch23.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch23.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="bk01pt10ch23s02.html">C99</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt09ch20.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt10ch21.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 20. Mutating </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 21. Complex</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/parallel_mode.html b/libstdc++-v3/doc/html/manual/parallel_mode.html
index b57fb695bb0..ea44f99b7aa 100644
--- a/libstdc++-v3/doc/html/manual/parallel_mode.html
+++ b/libstdc++-v3/doc/html/manual/parallel_mode.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 31. Parallel Mode</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch30s04.html" title="Design" /><link rel="next" href="bk01pt12ch31s02.html" title="Semantics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 31. Parallel Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch30s04.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch31s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.parallel_mode"></a>Chapter 31. Parallel Mode</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></div><p> The libstdc++ parallel mode is an experimental parallel
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 31. Parallel Mode</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="bk01pt12ch30s04.html" title="Design" /><link rel="next" href="bk01pt12ch31s02.html" title="Semantics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 31. Parallel Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch30s04.html">Prev</a> </td><th width="60%" align="center">Part XII. Extensions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch31s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.parallel_mode"></a>Chapter 31. Parallel Mode</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></div><p> The libstdc++ parallel mode is an experimental parallel
implementation of many algorithms the C++ Standard Library.
</p><p>
Several of the standard algorithms, for instance
@@ -10,11 +10,11 @@ explicit source declaration or by compiling existing sources with a
specific compiler flag.
</p><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.intro"></a>Intro</h2></div></div></div><p>The following library components in the include
<code class="filename">numeric</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::accumulate</code></p></li><li><p><code class="function">std::adjacent_difference</code></p></li><li><p><code class="function">std::inner_product</code></p></li><li><p><code class="function">std::partial_sum</code></p></li></ul></div><p>The following library components in the include
-<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::adjacent_find</code></p></li><li><p><code class="function">std::count</code></p></li><li><p><code class="function">std::count_if</code></p></li><li><p><code class="function">std::equal</code></p></li><li><p><code class="function">std::find</code></p></li><li><p><code class="function">std::find_if</code></p></li><li><p><code class="function">std::find_first_of</code></p></li><li><p><code class="function">std::for_each</code></p></li><li><p><code class="function">std::generate</code></p></li><li><p><code class="function">std::generate_n</code></p></li><li><p><code class="function">std::lexicographical_compare</code></p></li><li><p><code class="function">std::mismatch</code></p></li><li><p><code class="function">std::search</code></p></li><li><p><code class="function">std::search_n</code></p></li><li><p><code class="function">std::transform</code></p></li><li><p><code class="function">std::replace</code></p></li><li><p><code class="function">std::replace_if</code></p></li><li><p><code class="function">std::max_element</code></p></li><li><p><code class="function">std::merge</code></p></li><li><p><code class="function">std::min_element</code></p></li><li><p><code class="function">std::nth_element</code></p></li><li><p><code class="function">std::partial_sort</code></p></li><li><p><code class="function">std::partition</code></p></li><li><p><code class="function">std::random_shuffle</code></p></li><li><p><code class="function">std::set_union</code></p></li><li><p><code class="function">std::set_intersection</code></p></li><li><p><code class="function">std::set_symmetric_difference</code></p></li><li><p><code class="function">std::set_difference</code></p></li><li><p><code class="function">std::sort</code></p></li><li><p><code class="function">std::stable_sort</code></p></li><li><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id374433"></a><p><span class="title"><i>
+<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::adjacent_find</code></p></li><li><p><code class="function">std::count</code></p></li><li><p><code class="function">std::count_if</code></p></li><li><p><code class="function">std::equal</code></p></li><li><p><code class="function">std::find</code></p></li><li><p><code class="function">std::find_if</code></p></li><li><p><code class="function">std::find_first_of</code></p></li><li><p><code class="function">std::for_each</code></p></li><li><p><code class="function">std::generate</code></p></li><li><p><code class="function">std::generate_n</code></p></li><li><p><code class="function">std::lexicographical_compare</code></p></li><li><p><code class="function">std::mismatch</code></p></li><li><p><code class="function">std::search</code></p></li><li><p><code class="function">std::search_n</code></p></li><li><p><code class="function">std::transform</code></p></li><li><p><code class="function">std::replace</code></p></li><li><p><code class="function">std::replace_if</code></p></li><li><p><code class="function">std::max_element</code></p></li><li><p><code class="function">std::merge</code></p></li><li><p><code class="function">std::min_element</code></p></li><li><p><code class="function">std::nth_element</code></p></li><li><p><code class="function">std::partial_sort</code></p></li><li><p><code class="function">std::partition</code></p></li><li><p><code class="function">std::random_shuffle</code></p></li><li><p><code class="function">std::set_union</code></p></li><li><p><code class="function">std::set_intersection</code></p></li><li><p><code class="function">std::set_symmetric_difference</code></p></li><li><p><code class="function">std::set_difference</code></p></li><li><p><code class="function">std::sort</code></p></li><li><p><code class="function">std::stable_sort</code></p></li><li><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id546923"></a><p><span class="title"><i>
Parallelization of Bulk Operations for STL Dictionaries
</i>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Leonor</span> <span class="surname">Frias</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername">
Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS)
- . </span></span></p></div><div class="biblioentry"><a id="id374480"></a><p><span class="title"><i>
+ . </span></span></p></div><div class="biblioentry"><a id="id454271"></a><p><span class="title"><i>
The Multi-Core Standard Template Library
</i>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Peter</span> <span class="surname">Sanders</span>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Putze</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername">
Euro-Par 2007: Parallel Processing. (LNCS 4641)
diff --git a/libstdc++-v3/doc/html/manual/shared_ptr.html b/libstdc++-v3/doc/html/manual/shared_ptr.html
index d36bd57170c..dd7c28dc523 100644
--- a/libstdc++-v3/doc/html/manual/shared_ptr.html
+++ b/libstdc++-v3/doc/html/manual/shared_ptr.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>shared_ptr</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; shared_ptr&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt04ch11.html" title="Chapter 11. Memory" /><link rel="prev" href="auto_ptr.html" title="auto_ptr" /><link rel="next" href="bk01pt04ch12.html" title="Chapter 12. Traits" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">shared_ptr</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="auto_ptr.html">Prev</a> </td><th width="60%" align="center">Chapter 11. Memory</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04ch12.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.util.memory.shared_ptr"></a>shared_ptr</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>shared_ptr</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; shared_ptr&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt04ch11.html" title="Chapter 11. Memory" /><link rel="prev" href="auto_ptr.html" title="auto_ptr" /><link rel="next" href="bk01pt04ch12.html" title="Chapter 12. Traits" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">shared_ptr</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="auto_ptr.html">Prev</a> </td><th width="60%" align="center">Chapter 11. Memory</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04ch12.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.util.memory.shared_ptr"></a>shared_ptr</h2></div></div></div><p>
The shared_ptr class template stores a pointer, usually obtained via new,
and implements shared ownership semantics.
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.req"></a>Requirements</h3></div></div></div><p>
@@ -29,7 +29,7 @@ drops to zero.
Derived classes override those functions to destroy resources in a context
where the correct dynamic type is known. This is an application of the
technique known as type erasure.
- </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id389103"></a>Class Hierarchy</h4></div></div></div><p>
+ </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id512206"></a>Class Hierarchy</h4></div></div></div><p>
A <code class="classname">shared_ptr&lt;T&gt;</code> contains a pointer of
type <span class="type">T*</span> and an object of type
<code class="classname">__shared_count</code>. The shared_count contains a
@@ -71,7 +71,7 @@ be forwarded to <span class="type">Tp</span>'s constructor.
Unlike the other <code class="classname">_Sp_counted_*</code> classes, this one is parameterized on the
type of object, not the type of pointer; this is purely a convenience
that simplifies the implementation slightly.
- </p></dd></dl></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id451332"></a>Thread Safety</h4></div></div></div><p>
+ </p></dd></dl></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id530740"></a>Thread Safety</h4></div></div></div><p>
The interface of <code class="classname">tr1::shared_ptr</code> was extended for C++0x
with support for rvalue-references and the other features from
N2351. As with other libstdc++ headers shared by TR1 and C++0x,
@@ -129,7 +129,7 @@ compiler, standard library, platform etc. For the version of
shared_ptr in libstdc++ the compiler and library are fixed, which
makes things much simpler: we have an atomic CAS or we don't, see Lock
Policy below for details.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id405185"></a>Selecting Lock Policy</h4></div></div></div><p>
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id455390"></a>Selecting Lock Policy</h4></div></div></div><p>
</p><p>
There is a single <code class="classname">_Sp_counted_base</code> class,
which is a template parameterized on the enum
@@ -170,7 +170,7 @@ used when libstdc++ is built without <code class="literal">--enable-threads</cod
<code class="filename">ext/atomicity.h</code>, which detect if the program
is multi-threaded. If only one thread of execution exists in
the program then less expensive non-atomic operations are used.
- </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id438316"></a>Dual C++0x and TR1 Implementation</h4></div></div></div><p>
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id512523"></a>Dual C++0x and TR1 Implementation</h4></div></div></div><p>
The classes derived from <code class="classname">_Sp_counted_base</code> (see Class Hierarchy
below) and <code class="classname">__shared_count</code> are implemented separately for C++0x
and TR1, in <code class="filename">bits/boost_sp_shared_count.h</code> and
@@ -181,7 +181,7 @@ The TR1 implementation is considered relatively stable, so is unlikely to
change unless bug fixes require it. If the code that is common to both
C++0x and TR1 modes needs to diverge further then it might be necessary to
duplicate additional classes and only make changes to the C++0x versions.
-</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id454320"></a>Related functions and classes</h4></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>,
+</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id480144"></a>Related functions and classes</h4></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>,
<code class="code">const_pointer_cast</code></span></dt><dd><p>
As noted in N2351, these functions can be implemented non-intrusively using
the alias constructor. However the aliasing constructor is only available
@@ -214,10 +214,10 @@ is called. Users should not try to use this.
As well as the extra constructors, this implementation also needs some
members of _Sp_counted_deleter to be protected where they could otherwise
be private.
- </p></dd></dl></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.using"></a>Use</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id385333"></a>Examples</h4></div></div></div><p>
+ </p></dd></dl></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.using"></a>Use</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id536250"></a>Examples</h4></div></div></div><p>
Examples of use can be found in the testsuite, under
<code class="filename">testsuite/tr1/2_general_utilities/shared_ptr</code>.
- </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id363809"></a>Unresolved Issues</h4></div></div></div><p>
+ </p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id536266"></a>Unresolved Issues</h4></div></div></div><p>
The resolution to C++ Standard Library issue <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674" target="_top">674</a>,
"shared_ptr interface changes for consistency with N1856" will
need to be implemented after it is accepted into the working
@@ -265,7 +265,7 @@ be private.
code to work with, Peter Dimov in particular for his help and
invaluable advice on thread safety. Phillip Jordan and Paolo
Carlini for the lock policy implementation.
- </p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id446901"></a><p>[<abbr class="abbrev">
+ </p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id458468"></a><p>[<abbr class="abbrev">
n2351
</abbr>] <span class="title"><i>
Improving shared_ptr for C++0x, Revision 2
@@ -274,7 +274,7 @@ be private.
. </span><span class="biblioid">
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id388444"></a><p>[<abbr class="abbrev">
+ . </span></p></div><div class="biblioentry"><a id="id414390"></a><p>[<abbr class="abbrev">
n2456
</abbr>] <span class="title"><i>
C++ Standard Library Active Issues List (Revision R52)
@@ -283,7 +283,7 @@ be private.
. </span><span class="biblioid">
<a class="ulink" href="http://open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2456.html" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id388468"></a><p>[<abbr class="abbrev">
+ . </span></p></div><div class="biblioentry"><a id="id513371"></a><p>[<abbr class="abbrev">
n2461
</abbr>] <span class="title"><i>
Working Draft, Standard for Programming Language C++
@@ -292,7 +292,7 @@ be private.
. </span><span class="biblioid">
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf" target="_top">
</a>
- . </span></p></div><div class="biblioentry"><a id="id440491"></a><p>[<abbr class="abbrev">
+ . </span></p></div><div class="biblioentry"><a id="id492282"></a><p>[<abbr class="abbrev">
boostshared_ptr
</abbr>] <span class="title"><i>
Boost C++ Libraries documentation - shared_ptr class template
diff --git a/libstdc++-v3/doc/html/manual/spine.html b/libstdc++-v3/doc/html/manual/spine.html
index 9bb9810a503..347acf6691d 100644
--- a/libstdc++-v3/doc/html/manual/spine.html
+++ b/libstdc++-v3/doc/html/manual/spine.html
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The GNU C++ Library</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="prev" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="next" href="intro.html" title="Part I. Introduction" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The GNU C++ Library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr></table><hr /></div><div class="book" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual-index"></a>The GNU C++ Library</h1></div><div><p class="copyright">Copyright © 2008
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The GNU C++ Library</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="prev" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="next" href="intro.html" title="Part I. Introduction" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The GNU C++ Library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr></table><hr /></div><div class="book" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual-index"></a>The GNU C++ Library</h1></div><div><p class="copyright">Copyright © 2008
<a class="ulink" href="http://fsf.org" target="_top">FSF</a>
- </p></div><div><div class="legalnotice"><a id="id445530"></a><p>
+ </p></div><div><div class="legalnotice"><a id="id516338"></a><p>
<a class="ulink" href="17_intro/license.html" target="_top">License</a>
- </p></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="part"><a href="intro.html">I. Introduction</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt01ch01.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt01ch02.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch02s03.html">Make</a></span></dt><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s06.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.no">Support for <code class="literal">-fno-exceptions</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="support.html">II. Support</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt02ch04.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch04.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s03.html">NULL</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt02ch05.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="bk01pt02ch06.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch06s02.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="diagnostics.html">III. Diagnostics</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt03ch07.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt03ch07.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt03ch08.html">8. Concept Checking</a></span></dt></dl></dd><dt><span class="part"><a href="utilities.html">IV. Utilities</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt04ch09.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch10.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch11.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt04ch12.html">12. Traits</a></span></dt></dl></dd><dt><span class="part"><a href="strings.html">V. Strings</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt05ch13.html">13. String Classes</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s02.html">Case Sensitivity</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s06.html">CString (MFC)</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="localization.html">VI. Localization</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt06ch14.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt06ch15.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="containers.html">VII. Containers</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt07ch16.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch17.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch18.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="iterators.html">VIII. Iterators</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt08ch19.html">19. Predefined</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="bk01pt08ch19s02.html">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="algorithms.html">IX. Algorithms</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt09pr02.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt09ch20.html">20. Mutating</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt09ch20.html#algorithms.mutating.swap"><code class="function">swap</code></a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="numerics.html">X. Numerics</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt10ch21.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt10ch22.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="bk01pt10ch23.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch23.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="bk01pt10ch23s02.html">C99</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="io.html">XI. Input and Output</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt11ch24.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="bk01pt11ch25.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch25.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch25s02.html">Buffering</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch26.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch27.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch27.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s02.html">Binary Input and Output</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch28.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch28.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch28s02.html">Performance</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="extensions.html">XII. Extensions</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt12ch29.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch32.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt12ch33.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch33.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch34.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch35.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch36.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch37.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch38.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch39.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s03.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="appendix_contributing.html">A. Contributing</a></span></dt><dd><dl><dt><span class="sect1"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas02.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="bk01apas03.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas03.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="sect2"><a href="bk01apas03.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas04.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas04.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="bk01apas04.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas05.html">Design Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="appendix_porting.html">B. Porting and Maintenance</a></span></dt><dd><dl><dt><span class="sect1"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.enable"><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="sect1"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="sect2"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.testing">Testing</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="sect1"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="sect2"><a href="api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="sect2"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="appendix_free.html">C. Free Software Needs Free Documentation</a></span></dt><dt><span class="appendix"><a href="bk01apd.html">D. GNU General Public License</a></span></dt><dd><dl><dt><span class="section"><a href="bk01apd.html#gpl-1">Preamble</a></span></dt><dt><span class="section"><a href="bk01apds02.html">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></span></dt><dd><dl><dt><span class="section"><a href="bk01apds02.html#gpl-2-0">Section 0</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-1">Section 1</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-2">Section 2</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-3">Section 3</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-4">Section 4</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-5">Section 5</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-6">Section 6</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-7">Section 7</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-8">Section 8</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-9">Section 9</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-10">Section 10</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-11">NO WARRANTY Section 11</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-12">Section 12</a></span></dt></dl></dd><dt><span class="section"><a href="bk01apds03.html">How to Apply These Terms to Your New Programs</a></span></dt></dl></dd><dt><span class="appendix"><a href="bk01ape.html">E. GNU Free Documentation License</a></span></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>1.1. <a href="bk01pt01ch01.html#id438055">C++ TR1 Implementation Status</a></dt><dt>1.2. <a href="bk01pt01ch01.html#id399554">C++ 200x Implementation Status</a></dt><dt>3.1. <a href="bk01pt01ch03s02.html#id446051">C++ 1998 Library Headers</a></dt><dt>3.2. <a href="bk01pt01ch03s02.html#id382904">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.3. <a href="bk01pt01ch03s02.html#id433029">C++ 200x Library Headers</a></dt><dt>3.4. <a href="bk01pt01ch03s02.html#id382218">C++ 200x Library Headers for C Library Facilities</a></dt><dt>3.5. <a href="bk01pt01ch03s02.html#id440627">C++ TR1 Library Headers</a></dt><dt>3.6. <a href="bk01pt01ch03s02.html#id380897">C++ TR1 Library Headers for C Library Facilities</a></dt><dt>3.7. <a href="bk01pt01ch03s02.html#id400536">C++ ABI Headers</a></dt><dt>3.8. <a href="bk01pt01ch03s02.html#id452162">Extension Headers</a></dt><dt>3.9. <a href="bk01pt01ch03s02.html#id381166">Extension Debug Headers</a></dt><dt>3.10. <a href="bk01pt01ch03s02.html#id393412">Extension Parallel Headers</a></dt><dt>30.1. <a href="bk01pt12ch30s03.html#id372051">Debugging Containers</a></dt><dt>30.2. <a href="bk01pt12ch30s03.html#id404517">Debugging Containers C++0x</a></dt><dt>31.1. <a href="bk01pt12ch31s03.html#id464045">Parallel Algorithms</a></dt><dt>32.1. <a href="bitmap_allocator.html#id403407">Bitmap Allocator Memory Map</a></dt><dt>B.1. <a href="api.html#id395095">Extension Allocators</a></dt><dt>B.2. <a href="api.html#id487362">Extension Allocators Continued</a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library Documentation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part I. Introduction</td></tr></table></div></body></html>
+ </p></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="part"><a href="intro.html">I. Introduction</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt01ch01.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt01ch02.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt01ch02.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch02s03.html">Make</a></span></dt><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s06.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="support.html">II. Support</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt02ch04.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch04.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s03.html">NULL</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt02ch05.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="bk01pt02ch06.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch06s02.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="diagnostics.html">III. Diagnostics</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt03ch07.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt03ch07.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt03ch08.html">8. Concept Checking</a></span></dt></dl></dd><dt><span class="part"><a href="utilities.html">IV. Utilities</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt04ch09.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch10.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch11.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt04ch12.html">12. Traits</a></span></dt></dl></dd><dt><span class="part"><a href="strings.html">V. Strings</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt05ch13.html">13. String Classes</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s02.html">Case Sensitivity</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s06.html">CString (MFC)</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="localization.html">VI. Localization</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt06ch14.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt06ch15.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="containers.html">VII. Containers</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt07ch16.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch17.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt07ch18.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="iterators.html">VIII. Iterators</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt08ch19.html">19. Predefined</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="bk01pt08ch19s02.html">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="algorithms.html">IX. Algorithms</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt09pr02.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt09ch20.html">20. Mutating</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt09ch20.html#algorithms.mutating.swap">swap</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="numerics.html">X. Numerics</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt10ch21.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt10ch22.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="bk01pt10ch23.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt10ch23.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="bk01pt10ch23s02.html">C99</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="io.html">XI. Input and Output</a></span></dt><dd><dl><dt><span class="chapter"><a href="bk01pt11ch24.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="bk01pt11ch25.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch25.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch25s02.html">Buffering</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch26.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch27.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch27.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s02.html">Binary Input and Output</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt11ch28.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt11ch28.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch28s02.html">Performance</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="extensions.html">XII. Extensions</a></span></dt><dd><dl><dt><span class="preface"><a href="bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt12ch29.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch30s04.html#manual.ext.debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch31s04.html#manual.ext.parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch32.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch32.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt12ch33.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch33.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch34.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch35.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch36.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch37.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="bk01pt12ch38.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt12ch39.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt12ch40s03.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="appendix_contributing.html">A. Contributing</a></span></dt><dd><dl><dt><span class="sect1"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas02.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="bk01apas03.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas03.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="sect2"><a href="bk01apas03.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas04.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01apas04.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="bk01apas04.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01apas05.html">Design Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="appendix_porting.html">B. Porting and Maintenance</a></span></dt><dd><dl><dt><span class="sect1"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.enable">GLIBCXX_ENABLE, the --enable maker</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="sect1"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="sect2"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.testing">Testing</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="sect1"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="sect2"><a href="api.html#api.rel_300">3.0</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_310">3.1</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_320">3.2</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_330">3.3</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_340">3.4</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_400">4.0</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_410">4.1</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_420">4.2</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_430">4.3</a></span></dt></dl></dd><dt><span class="sect1"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="sect2"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="appendix_free.html">C. Free Software Needs Free Documentation</a></span></dt><dt><span class="appendix"><a href="bk01apd.html">D. GNU General Public License</a></span></dt><dd><dl><dt><span class="section"><a href="bk01apd.html#gpl-1">Preamble</a></span></dt><dt><span class="section"><a href="bk01apds02.html">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></span></dt><dd><dl><dt><span class="section"><a href="bk01apds02.html#gpl-2-0">Section 0</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-1">Section 1</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-2">Section 2</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-3">Section 3</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-4">Section 4</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-5">Section 5</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-6">Section 6</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-7">Section 7</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-8">Section 8</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-9">Section 9</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-10">Section 10</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-11">NO WARRANTY Section 11</a></span></dt><dt><span class="section"><a href="bk01apds02.html#gpl-2-12">Section 12</a></span></dt></dl></dd><dt><span class="section"><a href="bk01apds03.html">How to Apply These Terms to Your New Programs</a></span></dt></dl></dd><dt><span class="appendix"><a href="bk01ape.html">E. GNU Free Documentation License</a></span></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>1.1. <a href="bk01pt01ch01.html#id549759">C++ TR1 Implementation Status</a></dt><dt>1.2. <a href="bk01pt01ch01.html#id466249">C++ 200x Implementation Status</a></dt><dt>3.1. <a href="bk01pt01ch03s02.html#id516690">C++ 1998 Library Headers</a></dt><dt>3.2. <a href="bk01pt01ch03s02.html#id508989">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.3. <a href="bk01pt01ch03s02.html#id506064">C++ 200x Library Headers</a></dt><dt>3.4. <a href="bk01pt01ch03s02.html#id450972">C++ 200x Library Headers for C Library Facilities</a></dt><dt>3.5. <a href="bk01pt01ch03s02.html#id474709">C++ TR1 Library Headers</a></dt><dt>3.6. <a href="bk01pt01ch03s02.html#id474193">C++ TR1 Library Headers for C Library Facilities</a></dt><dt>3.7. <a href="bk01pt01ch03s02.html#id466545">C++ ABI Headers</a></dt><dt>3.8. <a href="bk01pt01ch03s02.html#id458800">Extension Headers</a></dt><dt>3.9. <a href="bk01pt01ch03s02.html#id471622">Extension Debug Headers</a></dt><dt>3.10. <a href="bk01pt01ch03s02.html#id475105">Extension Parallel Headers</a></dt><dt>30.1. <a href="bk01pt12ch30s03.html#id513827">Debugging Containers</a></dt><dt>30.2. <a href="bk01pt12ch30s03.html#id470143">Debugging Containers C++0x</a></dt><dt>31.1. <a href="bk01pt12ch31s03.html#id466177">Parallel Algorithms</a></dt><dt>32.1. <a href="bitmap_allocator.html#id461252">Bitmap Allocator Memory Map</a></dt><dt>A.1. <a href="bk01apas04.html#id552441">HTML to Docbook XML markup comparison</a></dt><dt>A.2. <a href="bk01apas04.html#id554436">Docbook XML Element Use</a></dt><dt>B.1. <a href="api.html#id549268">Extension Allocators</a></dt><dt>B.2. <a href="api.html#id502386">Extension Allocators Continued</a></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library Documentation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part I. Introduction</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/strings.html b/libstdc++-v3/doc/html/manual/strings.html
index 0b0617fdd79..75eba315023 100644
--- a/libstdc++-v3/doc/html/manual/strings.html
+++ b/libstdc++-v3/doc/html/manual/strings.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part V. Strings</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="shared_ptr.html" title="shared_ptr" /><link rel="next" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part V. Strings</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="shared_ptr.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.strings"></a>Part V. Strings</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt05ch13.html">13. String Classes</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s02.html">Case Sensitivity</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s06.html">CString (MFC)</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="shared_ptr.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt05ch13.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">shared_ptr </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 13. String Classes</td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part V. Strings</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="shared_ptr.html" title="shared_ptr" /><link rel="next" href="bk01pt05ch13.html" title="Chapter 13. String Classes" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part V. Strings</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="shared_ptr.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.strings"></a>Part V. Strings</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt05ch13.html">13. String Classes</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s02.html">Case Sensitivity</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s06.html">CString (MFC)</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="shared_ptr.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt05ch13.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">shared_ptr </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 13. String Classes</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/support.html b/libstdc++-v3/doc/html/manual/support.html
index 8f7e84a1364..2e38596d909 100644
--- a/libstdc++-v3/doc/html/manual/support.html
+++ b/libstdc++-v3/doc/html/manual/support.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part II. Support</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="debug.html" title="Debugging Support" /><link rel="next" href="bk01pt02pr01.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part II. Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02pr01.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.support"></a>Part II. Support</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt02ch04.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch04.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s03.html">NULL</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt02ch05.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="bk01pt02ch06.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch06s02.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02pr01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Debugging Support </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part II. Support</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="debug.html" title="Debugging Support" /><link rel="next" href="bk01pt02pr01.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part II. Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02pr01.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.support"></a>Part II. Support</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt02ch04.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch04.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s03.html">NULL</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt02ch05.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="bk01pt02ch06.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch06s02.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02pr01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Debugging Support </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/manual/test.html b/libstdc++-v3/doc/html/manual/test.html
index 297899eb3fd..4ae5e27f7e7 100644
--- a/libstdc++-v3/doc/html/manual/test.html
+++ b/libstdc++-v3/doc/html/manual/test.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Test</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; test&#10; , &#10; testsuite&#10; , &#10; performance&#10; , &#10; conformance&#10; , &#10; ABI&#10; , &#10; exception safety&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="bk01pt01ch02s03.html" title="Make" /><link rel="next" href="using.html" title="Chapter 3. Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Test</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch02s03.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="using.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.test"></a>Test</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Test</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; test&#10; , &#10; testsuite&#10; , &#10; performance&#10; , &#10; conformance&#10; , &#10; ABI&#10; , &#10; exception safety&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="bk01pt01ch02.html" title="Chapter 2. Setup" /><link rel="prev" href="bk01pt01ch02s03.html" title="Make" /><link rel="next" href="using.html" title="Chapter 3. Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Test</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt01ch02s03.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="using.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.test"></a>Test</h2></div></div></div><p>
The libstdc++ testsuite includes testing for standard conformance,
regressions, ABI, and performance.
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.organization"></a>Organization</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.organization.layout"></a>Directory Layout</h4></div></div></div><p>
diff --git a/libstdc++-v3/doc/html/manual/using.html b/libstdc++-v3/doc/html/manual/using.html
index 8ad83110de6..be70731bfc7 100644
--- a/libstdc++-v3/doc/html/manual/using.html
+++ b/libstdc++-v3/doc/html/manual/using.html
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 3. Using</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I. Introduction" /><link rel="prev" href="test.html" title="Test" /><link rel="next" href="bk01pt01ch03s02.html" title="Headers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="test.html">Prev</a> </td><th width="60%" align="center">Part I. Introduction</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.using"></a>Chapter 3. Using</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s06.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.no">Support for <code class="literal">-fno-exceptions</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.lib"></a>Linking Library Binary Files</h2></div></div></div><p>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 3. Using</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I. Introduction" /><link rel="prev" href="test.html" title="Test" /><link rel="next" href="bk01pt01ch03s02.html" title="Headers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="test.html">Prev</a> </td><th width="60%" align="center">Part I. Introduction</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt01ch03s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.using"></a>Chapter 3. Using</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="bk01pt01ch03s06.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="bk01pt01ch03s06.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.lib"></a>Linking Library Binary Files</h2></div></div></div><p>
If you only built a static library (libstdc++.a), or if you
specified static linking, you don't have to worry about this.
But if you built a shared library (libstdc++.so) and linked
diff --git a/libstdc++-v3/doc/html/manual/utilities.html b/libstdc++-v3/doc/html/manual/utilities.html
index c7f58bf10d2..c67881bf3f1 100644
--- a/libstdc++-v3/doc/html/manual/utilities.html
+++ b/libstdc++-v3/doc/html/manual/utilities.html
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part IV. Utilities</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="start" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt03ch07s03.html" title="Cancellation" /><link rel="next" href="bk01pt04ch09.html" title="Chapter 9. Functors" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part IV. Utilities</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04ch09.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.util"></a>Part IV. Utilities</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt04ch09.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch10.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch11.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt04ch12.html">12. Traits</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch07s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt04ch09.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Cancellation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9. Functors</td></tr></table></div></body></html>
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part IV. Utilities</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt03ch07s03.html" title="Cancellation" /><link rel="next" href="bk01pt04ch09.html" title="Chapter 9. Functors" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part IV. Utilities</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04ch09.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.util"></a>Part IV. Utilities</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt04ch09.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch10.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="bk01pt04ch11.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="bk01pt04ch11.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="bk01pt04ch12.html">12. Traits</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch07s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt04ch09.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Cancellation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9. Functors</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/html/spine.html b/libstdc++-v3/doc/html/spine.html
index 432f577c763..01b26a40c91 100644
--- a/libstdc++-v3/doc/html/spine.html
+++ b/libstdc++-v3/doc/html/spine.html
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The GNU C++ Library Documentation</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="next" href="manual/spine.html" title="The GNU C++ Library" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The GNU C++ Library Documentation</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="manual/spine.html">Next</a></td></tr></table><hr /></div><div class="set" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="set-index"></a>The GNU C++ Library Documentation</h1></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Paolo</span> <span class="surname">Carlini</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Phil</span> <span class="surname">Edwards</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Doug</span> <span class="surname">Gregor</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Dhruv</span> <span class="surname">Matani</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Jason</span> <span class="surname">Merrill</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Mark</span> <span class="surname">Mitchell</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Nathan</span> <span class="surname">Myers</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Felix</span> <span class="surname">Natter</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Stefan</span> <span class="surname">Olsson</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Ami</span> <span class="surname">Tavory</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Jonathan</span> <span class="surname">Wakely</span></h3></div></div></div><div><p class="copyright">Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The GNU C++ Library Documentation</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.0" /><link rel="home" href="spine.html" title="The GNU C++ Library Documentation" /><link rel="next" href="manual/spine.html" title="The GNU C++ Library" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The GNU C++ Library Documentation</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="manual/spine.html">Next</a></td></tr></table><hr /></div><div class="set" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="set-index"></a>The GNU C++ Library Documentation</h1></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Paolo</span> <span class="surname">Carlini</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Phil</span> <span class="surname">Edwards</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Doug</span> <span class="surname">Gregor</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Dhruv</span> <span class="surname">Matani</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Jason</span> <span class="surname">Merrill</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Mark</span> <span class="surname">Mitchell</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Nathan</span> <span class="surname">Myers</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Felix</span> <span class="surname">Natter</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Stefan</span> <span class="surname">Olsson</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Ami</span> <span class="surname">Tavory</span></h3></div><div class="author"><h3 class="author"><span class="firstname">Jonathan</span> <span class="surname">Wakely</span></h3></div></div></div><div><p class="copyright">Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
<a class="ulink" href="http://fsf.org" target="_top">FSF</a>
- </p></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="book"><a href="manual/spine.html">The GNU C++ Library</a></span></dt><dd><dl><dt><span class="part"><a href="manual/intro.html">I. Introduction</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt01ch01.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt01ch02.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt01ch02.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="manual/configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt01ch02s03.html">Make</a></span></dt><dt><span class="sect1"><a href="manual/test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch03s06.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch03s06.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s06.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s06.html#intro.using.exception.no">Support for <code class="literal">-fno-exceptions</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="manual/support.html">II. Support</a></span></dt><dd><dl><dt><span class="preface"><a href="manual/bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="manual/bk01pt02ch04.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt02ch04.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt02ch04s03.html">NULL</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt02ch05.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt02ch06.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt02ch06s02.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/diagnostics.html">III. Diagnostics</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt03ch07.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt03ch07.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt03ch08.html">8. Concept Checking</a></span></dt></dl></dd><dt><span class="part"><a href="manual/utilities.html">IV. Utilities</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt04ch09.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt04ch10.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt04ch11.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="manual/auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt04ch12.html">12. Traits</a></span></dt></dl></dd><dt><span class="part"><a href="manual/strings.html">V. Strings</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt05ch13.html">13. String Classes</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s02.html">Case Sensitivity</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s06.html">CString (MFC)</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/localization.html">VI. Localization</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt06ch14.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt06ch15.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="manual/messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="manual/containers.html">VII. Containers</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt07ch16.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt07ch17.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt07ch18.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/iterators.html">VIII. Iterators</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt08ch19.html">19. Predefined</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt08ch19s02.html">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/algorithms.html">IX. Algorithms</a></span></dt><dd><dl><dt><span class="preface"><a href="manual/bk01pt09pr02.html"></a></span></dt><dt><span class="chapter"><a href="manual/bk01pt09ch20.html">20. Mutating</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt09ch20.html#algorithms.mutating.swap"><code class="function">swap</code></a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="manual/numerics.html">X. Numerics</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt10ch21.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt10ch22.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt10ch23.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt10ch23.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt10ch23s02.html">C99</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/io.html">XI. Input and Output</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt11ch24.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt11ch25.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt11ch25.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt11ch25s02.html">Buffering</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt11ch26.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt11ch27.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt11ch27.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt11ch27s02.html">Binary Input and Output</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt11ch28.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt11ch28.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt11ch28s02.html">Performance</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/extensions.html">XII. Extensions</a></span></dt><dd><dl><dt><span class="preface"><a href="manual/bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch29.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="manual/debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#manual.ext.debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#manual.ext.parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="manual/parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt12ch32.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt12ch33.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt12ch33.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt12ch34.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch35.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch36.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch37.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch38.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt12ch39.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="manual/concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="manual/concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch40s03.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="manual/appendix_contributing.html">A. Contributing</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="sect2"><a href="manual/appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="sect2"><a href="manual/appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="sect2"><a href="manual/appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01apas02.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="manual/bk01apas03.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01apas03.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="sect2"><a href="manual/bk01apas03.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01apas04.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01apas04.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="manual/bk01apas04.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01apas05.html">Design Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="manual/appendix_porting.html">B. Porting and Maintenance</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.enable"><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/internals.html#internals.os">Operating System</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.cpu">CPU</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.testing">Testing</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/backwards.html#backwards.first">First</a></span></dt><dt><span class="sect2"><a href="manual/backwards.html#backwards.second">Second</a></span></dt><dt><span class="sect2"><a href="manual/backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="manual/appendix_free.html">C. Free Software Needs Free Documentation</a></span></dt><dt><span class="appendix"><a href="manual/bk01apd.html">D. GNU General Public License</a></span></dt><dd><dl><dt><span class="section"><a href="manual/bk01apd.html#gpl-1">Preamble</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></span></dt><dd><dl><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-0">Section 0</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-1">Section 1</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-2">Section 2</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-3">Section 3</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-4">Section 4</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-5">Section 5</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-6">Section 6</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-7">Section 7</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-8">Section 8</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-9">Section 9</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-10">Section 10</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-11">NO WARRANTY Section 11</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-12">Section 12</a></span></dt></dl></dd><dt><span class="section"><a href="manual/bk01apds03.html">How to Apply These Terms to Your New Programs</a></span></dt></dl></dd><dt><span class="appendix"><a href="manual/bk01ape.html">E. GNU Free Documentation License</a></span></dt></dl></dd><dt><span class="book"><a href="bk02.html"></a></span></dt><dd><dl><dt><span class="article"><a href="api.html">API and Source Level Documentation</a></span></dt></dl></dd><dt><span class="book"><a href="bk03.html"></a></span></dt><dd><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="manual/spine.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> The GNU C++ Library</td></tr></table></div></body></html>
+ </p></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="book"><a href="manual/spine.html">The GNU C++ Library</a></span></dt><dd><dl><dt><span class="part"><a href="manual/intro.html">I. Introduction</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt01ch01.html">1. Status</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt01ch01.html#manual.intro.status.standard">Implementation Status</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch01.html#manual.intro.status.standard.1998">C++ 1998</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch01.html#manual.intro.status.standard.tr1">C++ TR1</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch01.html#manual.intro.status.standard.200x">C++ 200x</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch01s02.html">License</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch01s02.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch01s02.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch01s03.html">Bugs</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch01s03.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch01s03.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt01ch02.html">2. Setup</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt01ch02.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="manual/configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt01ch02s03.html">Make</a></span></dt><dt><span class="sect1"><a href="manual/test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="manual/test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/using.html">3. Using</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt01ch03s02.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch03s02.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s02.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s02.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s02.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch03s03.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch03s03.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s03.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s03.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch03s04.html">Macros</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt01ch03s05.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s05.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt01ch03s06.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt01ch03s06.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s06.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt01ch03s06.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="manual/debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="manual/support.html">II. Support</a></span></dt><dd><dl><dt><span class="preface"><a href="manual/bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="manual/bk01pt02ch04.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt02ch04.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt02ch04s03.html">NULL</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt02ch05.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt02ch06.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt02ch06.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt02ch06s02.html">Verbose Terminate Handler</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/diagnostics.html">III. Diagnostics</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt03ch07.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt03ch07.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt03ch08.html">8. Concept Checking</a></span></dt></dl></dd><dt><span class="part"><a href="manual/utilities.html">IV. Utilities</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt04ch09.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt04ch10.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt04ch11.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt04ch11.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt04ch11.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="manual/auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="manual/shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt04ch12.html">12. Traits</a></span></dt></dl></dd><dt><span class="part"><a href="manual/strings.html">V. Strings</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt05ch13.html">13. String Classes</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s02.html">Case Sensitivity</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt05ch13s06.html">CString (MFC)</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/localization.html">VI. Localization</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt06ch14.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt06ch14.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt06ch14.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt06ch14.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt06ch14.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt06ch14.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt06ch15.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt06ch15.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt06ch15.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt06ch15.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="manual/codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="manual/messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="manual/messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="manual/containers.html">VII. Containers</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt07ch16.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt07ch16.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt07ch16.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt07ch16s02.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt07ch16s02.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt07ch17.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt07ch17.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt07ch17s02.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt07ch17s02.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt07ch17s02.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt07ch18.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt07ch18.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/iterators.html">VIII. Iterators</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt08ch19.html">19. Predefined</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt08ch19s02.html">One Past the End</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/algorithms.html">IX. Algorithms</a></span></dt><dd><dl><dt><span class="preface"><a href="manual/bk01pt09pr02.html"></a></span></dt><dt><span class="chapter"><a href="manual/bk01pt09ch20.html">20. Mutating</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt09ch20.html#algorithms.mutating.swap">swap</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="part"><a href="manual/numerics.html">X. Numerics</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt10ch21.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt10ch21.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt10ch22.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt10ch23.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt10ch23.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt10ch23s02.html">C99</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/io.html">XI. Input and Output</a></span></dt><dd><dl><dt><span class="chapter"><a href="manual/bk01pt11ch24.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt11ch25.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt11ch25.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt11ch25s02.html">Buffering</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt11ch26.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt11ch26.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt11ch27.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt11ch27.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt11ch27s02.html">Binary Input and Output</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt11ch27s03.html">More Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt11ch28.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt11ch28.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt11ch28s02.html">Performance</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/extensions.html">XII. Extensions</a></span></dt><dd><dl><dt><span class="preface"><a href="manual/bk01pt12pr03.html"></a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch29.html">29. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="manual/debug_mode.html">30. Debug Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch30s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch30s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch30s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch30s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#manual.ext.debug_mode.design.goals">Goals</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#manual.ext.debug_mode.design.methods">Methods</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch30s04.html#manual.ext.debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/parallel_mode.html">31. Parallel Mode</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch31s02.html">Semantics</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch31s03.html">Using</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch31s04.html">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#manual.ext.parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#manual.ext.parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch31s04.html#manual.ext.parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch31s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="manual/parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt12ch32.html">32. Allocators</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt12ch32.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch32.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="sect2"><a href="manual/bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="manual/bk01pt12ch33.html">33. Containers</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt12ch33.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch33s02.html">HP/SGI</a></span></dt><dt><span class="sect1"><a href="manual/bk01pt12ch33s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt12ch34.html">34. Utilities</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch35.html">35. Algorithms</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch36.html">36. Numerics</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch37.html">37. Iterators</a></span></dt><dt><span class="chapter"><a href="manual/bk01pt12ch38.html">38. Input and Output</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/bk01pt12ch38.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/bk01pt12ch39.html">39. Demangling</a></span></dt><dt><span class="chapter"><a href="manual/concurrency.html">40. Concurrency</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="sect2"><a href="manual/concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch40s02.html">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01pt12ch40s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="sect2"><a href="manual/bk01pt12ch40s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01pt12ch40s03.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="manual/appendix_contributing.html">A. Contributing</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="sect2"><a href="manual/appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="sect2"><a href="manual/appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="sect2"><a href="manual/appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01apas02.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="manual/bk01apas03.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01apas03.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="sect2"><a href="manual/bk01apas03.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01apas04.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/bk01apas04.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="manual/bk01apas04.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/bk01apas05.html">Design Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="manual/appendix_porting.html">B. Porting and Maintenance</a></span></dt><dd><dl><dt><span class="sect1"><a href="manual/appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="sect2"><a href="manual/appendix_porting.html#build_hacking.enable">GLIBCXX_ENABLE, the --enable maker</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/internals.html#internals.os">Operating System</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.cpu">CPU</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="sect2"><a href="manual/internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.testing">Testing</a></span></dt><dt><span class="sect2"><a href="manual/abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/api.html#api.rel_300">3.0</a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_310">3.1</a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_320">3.2</a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_330">3.3</a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_340">3.4</a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_400">4.0</a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_410">4.1</a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_420">4.2</a></span></dt><dt><span class="sect2"><a href="manual/api.html#api.rel_430">4.3</a></span></dt></dl></dd><dt><span class="sect1"><a href="manual/backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="sect2"><a href="manual/backwards.html#backwards.first">First</a></span></dt><dt><span class="sect2"><a href="manual/backwards.html#backwards.second">Second</a></span></dt><dt><span class="sect2"><a href="manual/backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></dd><dt><span class="appendix"><a href="manual/appendix_free.html">C. Free Software Needs Free Documentation</a></span></dt><dt><span class="appendix"><a href="manual/bk01apd.html">D. GNU General Public License</a></span></dt><dd><dl><dt><span class="section"><a href="manual/bk01apd.html#gpl-1">Preamble</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></span></dt><dd><dl><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-0">Section 0</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-1">Section 1</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-2">Section 2</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-3">Section 3</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-4">Section 4</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-5">Section 5</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-6">Section 6</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-7">Section 7</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-8">Section 8</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-9">Section 9</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-10">Section 10</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-11">NO WARRANTY Section 11</a></span></dt><dt><span class="section"><a href="manual/bk01apds02.html#gpl-2-12">Section 12</a></span></dt></dl></dd><dt><span class="section"><a href="manual/bk01apds03.html">How to Apply These Terms to Your New Programs</a></span></dt></dl></dd><dt><span class="appendix"><a href="manual/bk01ape.html">E. GNU Free Documentation License</a></span></dt></dl></dd><dt><span class="book"><a href="bk02.html"></a></span></dt><dd><dl><dt><span class="article"><a href="api.html">API and Source Level Documentation</a></span></dt></dl></dd><dt><span class="book"><a href="bk03.html"></a></span></dt><dd><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="manual/spine.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> The GNU C++ Library</td></tr></table></div></body></html>
diff --git a/libstdc++-v3/doc/xml/faq.xml b/libstdc++-v3/doc/xml/faq.xml
index 6d1feedb698..6366e05349d 100644
--- a/libstdc++-v3/doc/xml/faq.xml
+++ b/libstdc++-v3/doc/xml/faq.xml
@@ -273,8 +273,8 @@
</para>
<para>
To build and install from the GNU GCC sources, please consult the
- <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/install.html">install
- documentation</ulink> for detailed
+ <link linkend="manual.intro.setup">setup
+ documentation</link> for detailed
instructions. You may wish to browse those files ahead
of time to get a feel for what's required.
</para>
@@ -692,8 +692,9 @@
</para>
<para>
Long answer: See the implementation status pages for
- <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/c++1998_status.html">C++98</ulink>,
- <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/tr1_status.html">TR1</ulink>, and <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/c++0x_status.html">C++0x</ulink>.
+ <link linkend="manual.intro.status.standard.1998">C++98</link>,
+ <link linkend="manual.intro.status.standard.tr1">TR1</link>, and
+ <link linkend="manual.intro.status.standard.200x">C++0x</link>.
</para>
</answer>
</qandaentry>
diff --git a/libstdc++-v3/doc/xml/manual/appendix_contributing.xml b/libstdc++-v3/doc/xml/manual/appendix_contributing.xml
index a3207466971..7e2bff6a821 100644
--- a/libstdc++-v3/doc/xml/manual/appendix_contributing.xml
+++ b/libstdc++-v3/doc/xml/manual/appendix_contributing.xml
@@ -930,20 +930,20 @@ indicate a place that may require attention for multi-thread safety.
<sect3 id="doxygen.rules" xreflabel="doxygen.rules">
<title>Generating the Doxygen Files</title>
<para>
- The Makefile rules
+ The following Makefile rules run Doxygen to generate HTML
+ docs, XML docs, and the man pages.
</para>
- <screen><userinput>make doc-html-doxygen</userinput></screen>
+
<para>
- and
+ <screen><userinput>make doc-html-doxygen</userinput></screen>
</para>
- <screen><userinput>make doc-xml-doxygen</userinput></screen>
+
<para>
- and
+ <screen><userinput>make doc-xml-doxygen</userinput></screen>
</para>
- <screen><userinput>make doc-man-doxygen</userinput></screen>
+
<para>
- in the libstdc++ build directory generate the HTML docs, the
- XML docs, and the man pages.
+ <screen><userinput>make doc-man-doxygen</userinput></screen>
</para>
<para>
@@ -1073,8 +1073,11 @@ indicate a place that may require attention for multi-thread safety.
<para>
Access to the DocBook stylesheets and DTD is required. The
stylesheets are usually packaged by vendor, in something
- like <filename>docbook-style-xsl</filename>. The installation
- directory for this package corresponds to
+ like <filename>docbook-style-xsl</filename>. To exactly match
+ generated output, please use a version of the stylesheets
+ equivalent
+ to <filename>docbook-style-xsl-1.74.0-5</filename>. The
+ installation directory for this package corresponds to
the <literal>XSL_STYLE_DIR</literal>
in <filename>doc/Makefile.am</filename> and defaults
to <filename class="directory">/usr/share/sgml/docbook/xsl-stylesheets</filename>.
@@ -1121,28 +1124,28 @@ xmllint --noout --valid <filename>xml/index.xml</filename>
<title>Generating the DocBook Files</title>
<para>
- The Makefile rules
+ The following Makefile rules generate (in order): an HTML
+ version of all the documentation, a PDF version of the same, a
+ single XML document, and the result of validating the entire XML
+ document.
</para>
- <screen><userinput>make doc-html</userinput></screen>
+
<para>
- and
+ <screen><userinput>make doc-html</userinput></screen>
</para>
- <screen><userinput>make doc-pdf</userinput></screen>
+
<para>
- and
+ <screen><userinput>make doc-pdf</userinput></screen>
</para>
- <screen><userinput>make doc-xml-single</userinput></screen>
+
<para>
- and
+ <screen><userinput>make doc-xml-single</userinput></screen>
</para>
- <screen><userinput>make doc-xml-validate</userinput></screen>
<para>
- in the libstdc++ build directory result respectively in the
- following: the generation of an HTML version of all the
- documentation, a PDF version of the same, a single XML
- document, and the results of validating the XML document.
+ <screen><userinput>make doc-xml-validate</userinput></screen>
</para>
+
</sect3>
<sect3 id="docbook.examples" xreflabel="docbook.examples">
@@ -1214,67 +1217,160 @@ xmllint --noout --valid <filename>xml/index.xml</filename>
<sect3 id="docbook.markup" xreflabel="docbook.markup">
<title>Markup By Example</title>
- <literallayout>
- HTML to XML rough equivalents
-
- &lt;p&gt; &lt;para&gt;
-
- &lt;pre&gt; &lt;computeroutput&gt;
- &lt;pre&gt; &lt;programlisting&gt;
- &lt;pre&gt; &lt;literallayout&gt;
-
- &lt;ul&gt; &lt;itemizedlist&gt;
- &lt;ol&gt; &lt;orderedlist&gt;
- &lt;il&gt; &lt;listitem&gt;
-
- &lt;dl&gt; &lt;variablelist&gt;
-
- &lt;varlistentry&gt;
- &lt;dt&gt; &lt;term&gt;
- &lt;/dt&gt; &lt;/term&gt;
- &lt;dd&gt; &lt;listitem&gt;
- &lt;/dt&gt; &lt;/listitem&gt;
- &lt;/varlistentry&gt;
-
- &lt;a href &lt;ulink url
- &lt;code&gt; &lt;literal&gt;
- &lt;code&gt; &lt;programlisting&gt;
-
- &lt;strong&gt; &lt;emphasis&gt;
- &lt;em&gt; &lt;emphasis&gt;
- &quot; &lt;quote&gt;
-
- ctype.h &lt;filename class="headerfile"&gt;&lt;/filename&gt;
-
-
- build_dir &lt;filename class="directory"&gt;path_to_build_dir&lt;/filename&gt;
-
- Finer gradations of &lt;code&gt;
-
- &lt;classname&gt; &lt;classname&gt;string&lt;/classname&gt;
- &lt;classname&gt;vector&lt;&gt;&lt;/classname&gt;
- &lt;function&gt;fs.clear()&lt;/function&gt;
-
- &lt;structname&gt;
-
- &lt;function&gt; &lt;function&gt;clear()&lt;/function&gt;
-
- &lt;type&gt; &lt;type&gt;long long&lt;/type&gt;
-
- &lt;varname&gt; &lt;varname&gt;fs&lt;/varname&gt;
-
- &lt;literal&gt; &lt;literal&gt;-Weffc++&lt;/literal&gt;
- &lt;literal&gt;rel_ops&lt;/literal&gt;
-
- &lt;constant&gt; &lt;constant&gt;_GNU_SOURCE&lt;/constant&gt;
- &lt;constant&gt;3.0&lt;/constant&gt;
+<para>
+Complete details on Docbook markup can be found in the DocBook Element
+Reference, <ulink url="http://www.docbook.org/tdg/en/html/part2.html">online</ulink>. An
+incomplete reference for HTML to Docbook conversion is detailed in the
+table below.
+</para>
- &lt;filename&gt;
+<table frame='all'>
+<title>HTML to Docbook XML markup comparison</title>
+<tgroup cols='2' align='left' colsep='1' rowsep='1'>
+<colspec colname='c1'></colspec>
+<colspec colname='c2'></colspec>
+
+ <thead>
+ <row>
+ <entry>HTML</entry>
+ <entry>XML</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>&lt;p&gt;</entry>
+ <entry>&lt;para&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;pre&gt;</entry>
+ <entry>&lt;computeroutput&gt;, &lt;programlisting&gt;,
+ &lt;literallayout&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;ul&gt;</entry>
+ <entry>&lt;itemizedlist&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;ol&gt;</entry>
+ <entry>&lt;orderedlist&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;il&gt;</entry>
+ <entry>&lt;listitem&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;dl&gt;</entry>
+ <entry>&lt;variablelist&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;dt&gt;</entry>
+ <entry>&lt;term&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;dd&gt;</entry>
+ <entry>&lt;listitem&gt;</entry>
+ </row>
+
+ <row>
+ <entry>&lt;a href=""&gt;</entry>
+ <entry>&lt;ulink url=""&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;code&gt;</entry>
+ <entry>&lt;literal&gt;, &lt;programlisting&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;strong&gt;</entry>
+ <entry>&lt;emphasis&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;em&gt;</entry>
+ <entry>&lt;emphasis&gt;</entry>
+ </row>
+ <row>
+ <entry>&quot;</entry>
+ <entry>&lt;quote&gt;</entry>
+ </row>
+ </tbody>
+</tgroup>
+</table>
+
+<para>
+ And examples of detailed markup for which there are no real HTML
+ equivalents are listed in the table below.
+</para>
- &lt;command&gt; &lt;command&gt;g++&lt;/command&gt;
+<table frame='all'>
+<title>Docbook XML Element Use</title>
+<tgroup cols='2' align='left' colsep='1' rowsep='1'>
+<colspec colname='c1'></colspec>
+<colspec colname='c2'></colspec>
+
+ <thead>
+ <row>
+ <entry>Element</entry>
+ <entry>Use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>&lt;structname&gt;</entry>
+ <entry>&lt;structname&gt;char_traits&lt;/structname&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;classname&gt;</entry>
+ <entry>&lt;classname&gt;string&lt;/classname&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;function&gt;</entry>
+ <entry>
+ <para>&lt;function&gt;clear()&lt;/function&gt;</para>
+ <para>&lt;function&gt;fs.clear()&lt;/function&gt;</para>
+ </entry>
+ </row>
+ <row>
+ <entry>&lt;type&gt;</entry>
+ <entry>&lt;type&gt;long long&lt;/type&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;varname&gt;</entry>
+ <entry>&lt;varname&gt;fs&lt;/varname&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;literal&gt;</entry>
+ <entry>
+ <para>&lt;literal&gt;-Weffc++&lt;/literal&gt;</para>
+ <para>&lt;literal&gt;rel_ops&lt;/literal&gt;</para>
+ </entry>
+ </row>
+ <row>
+ <entry>&lt;constant&gt;</entry>
+ <entry>
+ <para>&lt;constant&gt;_GNU_SOURCE&lt;/constant&gt;</para>
+ <para>&lt;constant&gt;3.0&lt;/constant&gt;</para>
+ </entry>
+ </row>
+ <row>
+ <entry>&lt;command&gt;</entry>
+ <entry>&lt;command&gt;g++&lt;/command&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;errortext&gt;</entry>
+ <entry>&lt;errortext&gt;In instantiation of&lt;/errortext&gt;</entry>
+ </row>
+ <row>
+ <entry>&lt;filename&gt;</entry>
+ <entry>
+ <para>&lt;filename class="headerfile"&gt;ctype.h&lt;/filename&gt;</para>
+ <para>&lt;filename class="directory"&gt;/home/gcc/build&lt;/filename&gt;</para>
+ </entry>
+ </row>
+ </tbody>
+</tgroup>
+</table>
- &lt;errortext&gt; &lt;errortext&gt;foo Concept &lt;/errortext&gt;
-</literallayout>
</sect3>
</sect2>
diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml
index 00d9f566b5c..d1a8914e56f 100644
--- a/libstdc++-v3/doc/xml/manual/using.xml
+++ b/libstdc++-v3/doc/xml/manual/using.xml
@@ -121,13 +121,52 @@
<colspec colname='c3'></colspec>
<colspec colname='c4'></colspec>
<tbody>
-<row><entry><filename class="headerfile">algorithm</filename></entry><entry><filename class="headerfile">iomanip</filename></entry><entry><filename class="headerfile">list</filename></entry><entry><filename class="headerfile">ostream</filename></entry><entry><filename class="headerfile">streambuf</filename></entry></row>
-<row><entry><filename class="headerfile">bitset</filename></entry><entry><filename class="headerfile">ios</filename></entry><entry><filename class="headerfile">locale</filename></entry><entry><filename class="headerfile">queue</filename></entry><entry><filename class="headerfile">string</filename></entry></row>
-<row><entry><filename class="headerfile">complex</filename></entry><entry><filename class="headerfile">iosfwd</filename></entry><entry><filename class="headerfile">map</filename></entry><entry><filename class="headerfile">set</filename></entry><entry><filename class="headerfile">typeinfo</filename></entry></row>
-<row><entry><filename class="headerfile">deque</filename></entry><entry><filename class="headerfile">iostream</filename></entry><entry><filename class="headerfile">memory</filename></entry><entry><filename class="headerfile">sstream</filename></entry><entry><filename class="headerfile">utility</filename></entry></row>
-<row><entry><filename class="headerfile">exception</filename></entry><entry><filename class="headerfile">istream</filename></entry><entry><filename class="headerfile">new</filename></entry><entry><filename class="headerfile">stack</filename></entry><entry><filename class="headerfile">valarray</filename></entry></row>
-<row><entry><filename class="headerfile">fstream</filename></entry><entry><filename class="headerfile">iterator</filename></entry><entry><filename class="headerfile">numeric</filename></entry><entry><filename class="headerfile">stdexcept</filename></entry><entry><filename class="headerfile">vector</filename></entry></row>
-<row><entry><filename class="headerfile">functional</filename></entry><entry><filename class="headerfile">limits</filename></entry></row>
+<row>
+<entry><filename class="headerfile">algorithm</filename></entry>
+<entry><filename class="headerfile">bitset</filename></entry>
+<entry><filename class="headerfile">complex</filename></entry>
+<entry><filename class="headerfile">deque</filename></entry>
+<entry><filename class="headerfile">exception</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">fstream</filename></entry>
+<entry><filename class="headerfile">functional</filename></entry>
+<entry><filename class="headerfile">iomanip</filename></entry>
+<entry><filename class="headerfile">ios</filename></entry>
+<entry><filename class="headerfile">iosfwd</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">iostream</filename></entry>
+<entry><filename class="headerfile">istream</filename></entry>
+<entry><filename class="headerfile">iterator</filename></entry>
+<entry><filename class="headerfile">limits</filename></entry>
+<entry><filename class="headerfile">list</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">locale</filename></entry>
+<entry><filename class="headerfile">map</filename></entry>
+<entry><filename class="headerfile">memory</filename></entry>
+<entry><filename class="headerfile">new</filename></entry>
+<entry><filename class="headerfile">numeric</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">ostream</filename></entry>
+<entry><filename class="headerfile">queue</filename></entry>
+<entry><filename class="headerfile">set</filename></entry>
+<entry><filename class="headerfile">sstream</filename></entry>
+<entry><filename class="headerfile">stack</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">stdexcept</filename></entry>
+<entry><filename class="headerfile">streambuf</filename></entry>
+<entry><filename class="headerfile">string</filename></entry>
+<entry><filename class="headerfile">utility</filename></entry>
+<entry><filename class="headerfile">typeinfo</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">valarray</filename></entry>
+<entry><filename class="headerfile">vector</filename></entry>
+</row>
</tbody>
</tgroup>
</table>
@@ -141,15 +180,39 @@
<colspec colname='c3'></colspec>
<colspec colname='c4'></colspec>
<tbody>
-<row><entry><filename class="headerfile">cassert</filename></entry><entry><filename class="headerfile">ciso646</filename></entry><entry><filename class="headerfile">csetjmp</filename></entry><entry><filename class="headerfile">cstdio</filename></entry><entry><filename class="headerfile">ctime</filename></entry></row>
-<row><entry><filename class="headerfile">cctype</filename></entry><entry><filename class="headerfile">climits</filename></entry><entry><filename class="headerfile">csignal</filename></entry><entry><filename class="headerfile">cstdlib</filename></entry><entry><filename class="headerfile">cwchar</filename></entry></row>
-<row><entry><filename class="headerfile">cerrno</filename></entry><entry><filename class="headerfile">clocale</filename></entry><entry><filename class="headerfile">cstdarg</filename></entry><entry><filename class="headerfile">cstring</filename></entry><entry><filename class="headerfile">cwctype</filename></entry></row>
-<row><entry><filename class="headerfile">cfloat</filename></entry><entry><filename class="headerfile">cmath</filename></entry><entry><filename class="headerfile">cstddef</filename></entry></row>
+<row>
+<entry><filename class="headerfile">cassert</filename></entry>
+<entry><filename class="headerfile">cerrno</filename></entry>
+<entry><filename class="headerfile">cctype</filename></entry>
+<entry><filename class="headerfile">cfloat</filename></entry>
+<entry><filename class="headerfile">ciso646</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">climits</filename></entry>
+<entry><filename class="headerfile">clocale</filename></entry>
+<entry><filename class="headerfile">cmath</filename></entry>
+<entry><filename class="headerfile">csetjmp</filename></entry>
+<entry><filename class="headerfile">csignal</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">cstdarg</filename></entry>
+<entry><filename class="headerfile">cstddef</filename></entry>
+<entry><filename class="headerfile">cstdio</filename></entry>
+<entry><filename class="headerfile">cstdlib</filename></entry>
+<entry><filename class="headerfile">cstring</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">ctime</filename></entry>
+<entry><filename class="headerfile">cwchar</filename></entry>
+<entry><filename class="headerfile">cwctype</filename></entry>
+</row>
</tbody>
</tgroup>
</table>
-<para>C++0x include files. These are only available in C++0x compilation mode, i.e. <code>-std=c++0x</code> or <code>-std=gnu++0x</code>.
+<para>
+C++0x include files. These are only available in C++0x compilation
+mode, i.e. <literal>-std=c++0x</literal> or <literal>-std=gnu++0x</literal>.
</para>
<para></para>
@@ -161,15 +224,75 @@
<colspec colname='c3'></colspec>
<colspec colname='c4'></colspec>
<tbody>
-<row><entry><filename class="headerfile">algorithm</filename></entry><entry><filename class="headerfile">iomanip</filename></entry><entry><filename class="headerfile">locale</filename></entry><entry><filename class="headerfile">regex</filename></entry><entry><filename class="headerfile">tuple</filename></entry></row>
-<row><entry><filename class="headerfile">array</filename></entry><entry><filename class="headerfile">ios</filename></entry><entry><filename class="headerfile">map</filename></entry><entry><filename class="headerfile">set</filename></entry><entry><filename class="headerfile">typeinfo</filename></entry></row>
-<row><entry><filename class="headerfile">bitset</filename></entry><entry><filename class="headerfile">iosfwd</filename></entry><entry><filename class="headerfile">memory</filename></entry><entry><filename class="headerfile">sstream</filename></entry><entry><filename class="headerfile">type_traits</filename></entry></row>
-<row><entry><filename class="headerfile">complex</filename></entry><entry><filename class="headerfile">iostream</filename></entry><entry><filename class="headerfile">new</filename></entry><entry><filename class="headerfile">stack</filename></entry><entry><filename class="headerfile">unordered_map</filename></entry></row>
-<row><entry><filename class="headerfile">deque</filename></entry><entry><filename class="headerfile">istream</filename></entry><entry><filename class="headerfile">numeric</filename></entry><entry><filename class="headerfile">stdexcept</filename></entry><entry><filename class="headerfile">unordered_set</filename></entry></row>
-<row><entry><filename class="headerfile">exception</filename></entry><entry><filename class="headerfile">iterator</filename></entry><entry><filename class="headerfile">ostream</filename></entry><entry><filename class="headerfile">streambuf</filename></entry><entry><filename class="headerfile">utility</filename></entry></row>
-<row><entry><filename class="headerfile">fstream</filename></entry><entry><filename class="headerfile">limits</filename></entry><entry><filename class="headerfile">queue</filename></entry><entry><filename class="headerfile">string</filename></entry><entry><filename class="headerfile">valarray</filename></entry></row>
-<row><entry><filename class="headerfile">functional</filename></entry><entry><filename class="headerfile">list</filename></entry><entry><filename class="headerfile">random</filename></entry><entry><filename class="headerfile">system_error</filename></entry><entry><filename class="headerfile">vector</filename></entry></row>
-<row><entry><filename class="headerfile">condition_variable</filename></entry><entry><filename class="headerfile">mutex</filename></entry><entry><filename class="headerfile">thread</filename></entry><entry></entry><entry></entry></row>
+
+<row>
+<entry><filename class="headerfile">algorithm</filename></entry>
+<entry><filename class="headerfile">array</filename></entry>
+<entry><filename class="headerfile">bitset</filename></entry>
+<entry><filename class="headerfile">chrono</filename></entry>
+<entry><filename class="headerfile">complex</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">condition_variable</filename></entry>
+<entry><filename class="headerfile">deque</filename></entry>
+<entry><filename class="headerfile">exception</filename></entry>
+<entry><filename class="headerfile">forward_list</filename></entry>
+<entry><filename class="headerfile">fstream</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">functional</filename></entry>
+<entry><filename class="headerfile">initalizer_list</filename></entry>
+<entry><filename class="headerfile">iomanip</filename></entry>
+<entry><filename class="headerfile">ios</filename></entry>
+<entry><filename class="headerfile">iosfwd</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">iostream</filename></entry>
+<entry><filename class="headerfile">istream</filename></entry>
+<entry><filename class="headerfile">iterator</filename></entry>
+<entry><filename class="headerfile">limits</filename></entry>
+<entry><filename class="headerfile">list</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">locale</filename></entry>
+<entry><filename class="headerfile">map</filename></entry>
+<entry><filename class="headerfile">memory</filename></entry>
+<entry><filename class="headerfile">mutex</filename></entry>
+<entry><filename class="headerfile">new</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">numeric</filename></entry>
+<entry><filename class="headerfile">ostream</filename></entry>
+<entry><filename class="headerfile">queue</filename></entry>
+<entry><filename class="headerfile">random</filename></entry>
+<entry><filename class="headerfile">ratio</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">regex</filename></entry>
+<entry><filename class="headerfile">set</filename></entry>
+<entry><filename class="headerfile">sstream</filename></entry>
+<entry><filename class="headerfile">stack</filename></entry>
+<entry><filename class="headerfile">stdexcept</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">streambuf</filename></entry>
+<entry><filename class="headerfile">string</filename></entry>
+<entry><filename class="headerfile">system_error</filename></entry>
+<entry><filename class="headerfile">thread</filename></entry>
+<entry><filename class="headerfile">tuple</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">type_traits</filename></entry>
+<entry><filename class="headerfile">typeinfo</filename></entry>
+<entry><filename class="headerfile">unordered_map</filename></entry>
+<entry><filename class="headerfile">unordered_set</filename></entry>
+<entry><filename class="headerfile">utility</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">valarray</filename></entry>
+<entry><filename class="headerfile">vector</filename></entry>
+</row>
+
</tbody>
</tgroup>
</table>
@@ -185,12 +308,46 @@
<colspec colname='c4'></colspec>
<colspec colname='c5'></colspec>
<tbody>
-<row><entry><filename class="headerfile">cassert</filename></entry><entry><filename class="headerfile">cfloat</filename></entry><entry><filename class="headerfile">cmath</filename></entry><entry><filename class="headerfile">cstddef</filename></entry><entry><filename class="headerfile">ctgmath</filename></entry></row>
-<row><entry><filename class="headerfile">ccomplex</filename></entry><entry><filename class="headerfile">cinttypes</filename></entry><entry><filename class="headerfile">csetjmp</filename></entry><entry><filename class="headerfile">cstdint</filename></entry><entry><filename class="headerfile">ctime</filename></entry></row>
-<row><entry><filename class="headerfile">cctype</filename></entry><entry><filename class="headerfile">ciso646</filename></entry><entry><filename class="headerfile">csignal</filename></entry><entry><filename class="headerfile">cstdio</filename></entry><entry><filename class="headerfile">cuchar</filename></entry></row>
-<row><entry><filename class="headerfile">cerrno</filename></entry><entry><filename class="headerfile">climits</filename></entry><entry><filename class="headerfile">cstdarg</filename></entry><entry><filename class="headerfile">cstdlib</filename></entry><entry><filename class="headerfile">cwchar</filename></entry></row>
-<row><entry><filename class="headerfile">cfenv</filename></entry><entry><filename class="headerfile">clocale</filename></entry><entry><filename class="headerfile">cstdbool</filename></entry><entry><filename class="headerfile">cstring</filename></entry><entry><filename class="headerfile">cwctype</filename></entry></row>
-<row><entry><filename class="headerfile">cstdatomic</filename></entry><entry></entry><entry></entry><entry></entry><entry></entry></row>
+<row>
+<entry><filename class="headerfile">cassert</filename></entry>
+<entry><filename class="headerfile">ccomplex</filename></entry>
+<entry><filename class="headerfile">cctype</filename></entry>
+<entry><filename class="headerfile">cerrno</filename></entry>
+<entry><filename class="headerfile">cfenv</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">cfloat</filename></entry>
+<entry><filename class="headerfile">cinttypes</filename></entry>
+<entry><filename class="headerfile">ciso646</filename></entry>
+<entry><filename class="headerfile">climits</filename></entry>
+<entry><filename class="headerfile">clocale</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">cmath</filename></entry>
+<entry><filename class="headerfile">csetjmp</filename></entry>
+<entry><filename class="headerfile">csignal</filename></entry>
+<entry><filename class="headerfile">cstdarg</filename></entry>
+<entry><filename class="headerfile">cstdatomic</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">cstdbool</filename></entry>
+<entry><filename class="headerfile">cstddef</filename></entry>
+<entry><filename class="headerfile">cstdint</filename></entry>
+<entry><filename class="headerfile">cstdlib</filename></entry>
+<entry><filename class="headerfile">cstdio</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">cstring</filename></entry>
+<entry><filename class="headerfile">ctgmath</filename></entry>
+<entry><filename class="headerfile">ctime</filename></entry>
+<entry><filename class="headerfile">cuchar</filename></entry>
+<entry><filename class="headerfile">cwchar</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">cwctype</filename></entry>
+<entry><filename class="headerfile">stdatomic.h</filename></entry>
+</row>
+
</tbody>
</tgroup>
</table>
@@ -210,9 +367,24 @@
<colspec colname='c5'></colspec>
<tbody>
-<row><entry><filename class="headerfile">tr1/array</filename></entry><entry><filename class="headerfile">tr1/memory</filename></entry><entry><filename class="headerfile">tr1/regex</filename></entry><entry><filename class="headerfile">tr1/type_traits</filename></entry><entry><filename class="headerfile">tr1/unordered_set</filename></entry></row>
-<row><entry><filename class="headerfile">tr1/complex</filename></entry><entry><filename class="headerfile">tr1/random</filename></entry><entry><filename class="headerfile">tr1/tuple</filename></entry><entry><filename class="headerfile">tr1/unordered_map</filename></entry><entry><filename class="headerfile">tr1/utility</filename></entry></row>
-<row><entry><filename class="headerfile">tr1/functional</filename></entry></row>
+<row>
+<entry><filename class="headerfile">tr1/array</filename></entry>
+<entry><filename class="headerfile">tr1/complex</filename></entry>
+<entry><filename class="headerfile">tr1/memory</filename></entry>
+<entry><filename class="headerfile">tr1/functional</filename></entry>
+<entry><filename class="headerfile">tr1/random</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">tr1/regex</filename></entry>
+<entry><filename class="headerfile">tr1/tuple</filename></entry>
+<entry><filename class="headerfile">tr1/type_traits</filename></entry>
+<entry><filename class="headerfile">tr1/unordered_map</filename></entry>
+<entry><filename class="headerfile">tr1/unordered_set</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">tr1/utility</filename></entry>
+</row>
+
</tbody>
</tgroup>
</table>
@@ -230,9 +402,28 @@
<colspec colname='c5'></colspec>
<tbody>
-<row><entry><filename class="headerfile">tr1/cmath</filename></entry><entry><filename class="headerfile">tr1/cfloat</filename></entry><entry><filename class="headerfile">tr1/cstdarg</filename></entry><entry><filename class="headerfile">tr1/cstdio</filename></entry><entry><filename class="headerfile">tr1/ctime</filename></entry></row>
-<row><entry><filename class="headerfile">tr1/ccomplex</filename></entry><entry><filename class="headerfile">tr1/cinttypes</filename></entry><entry><filename class="headerfile">tr1/cstdbool</filename></entry><entry><filename class="headerfile">tr1/cstdlib</filename></entry><entry><filename class="headerfile">tr1/cwchar</filename></entry></row>
-<row><entry><filename class="headerfile">tr1/cfenv</filename></entry><entry><filename class="headerfile">tr1/climits</filename></entry><entry><filename class="headerfile">tr1/cstdint</filename></entry><entry><filename class="headerfile">tr1/ctgmath</filename></entry><entry><filename class="headerfile">tr1/cwctype</filename></entry></row>
+<row>
+<entry><filename class="headerfile">tr1/ccomplex</filename></entry>
+<entry><filename class="headerfile">tr1/cfenv</filename></entry>
+<entry><filename class="headerfile">tr1/cfloat</filename></entry>
+<entry><filename class="headerfile">tr1/cmath</filename></entry>
+<entry><filename class="headerfile">tr1/cinttypes</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">tr1/climits</filename></entry>
+<entry><filename class="headerfile">tr1/cstdarg</filename></entry>
+<entry><filename class="headerfile">tr1/cstdbool</filename></entry>
+<entry><filename class="headerfile">tr1/cstdint</filename></entry>
+<entry><filename class="headerfile">tr1/cstdio</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">tr1/cstdlib</filename></entry>
+<entry><filename class="headerfile">tr1/ctgmath</filename></entry>
+<entry><filename class="headerfile">tr1/ctime</filename></entry>
+<entry><filename class="headerfile">tr1/cwchar</filename></entry>
+<entry><filename class="headerfile">tr1/cwctype</filename></entry>
+</row>
+
</tbody>
</tgroup>
</table>
@@ -266,12 +457,52 @@
<colspec colname='c5'></colspec>
<tbody>
-<row><entry><filename class="headerfile">ext/algorithm</filename></entry><entry><filename class="headerfile">ext/debug_allocator.h</filename></entry><entry><filename class="headerfile">ext/mt_allocator.h</filename></entry><entry><filename class="headerfile">ext/pod_char_traits.h</filename></entry><entry><filename class="headerfile">ext/stdio_sync_filebuf.h</filename></entry></row>
-<row><entry><filename class="headerfile">ext/array_allocator.h</filename></entry><entry><filename class="headerfile">ext/enc_filebuf.h</filename></entry><entry><filename class="headerfile">ext/new_allocator.h</filename></entry><entry><filename class="headerfile">ext/pool_allocator.h</filename></entry><entry><filename class="headerfile">ext/throw_allocator.h</filename></entry></row>
-<row><entry><filename class="headerfile">ext/atomicity.h</filename></entry><entry><filename class="headerfile">ext/functional</filename></entry><entry><filename class="headerfile">ext/numeric</filename></entry><entry><filename class="headerfile">ext/rb_tree</filename></entry><entry><filename class="headerfile">ext/typelist.h</filename></entry></row>
-<row><entry><filename class="headerfile">ext/bitmap_allocator.h</filename></entry><entry><filename class="headerfile">ext/iterator</filename></entry><entry><filename class="headerfile">ext/numeric_traits.h</filename></entry><entry><filename class="headerfile">ext/rope</filename></entry><entry><filename class="headerfile">ext/type_traits.h</filename></entry></row>
-<row><entry><filename class="headerfile">ext/codecvt_specializations.h</filename></entry><entry><filename class="headerfile">ext/malloc_allocator.h</filename></entry><entry><filename class="headerfile">ext/pb_ds/assoc_container.h</filename></entry><entry><filename class="headerfile">ext/slist</filename></entry><entry><filename class="headerfile">ext/vstring.h</filename></entry></row>
-<row><entry><filename class="headerfile">ext/concurrence.h</filename></entry><entry><filename class="headerfile">ext/memory</filename></entry><entry><filename class="headerfile">ext/pb_ds/priority_queue.h</filename></entry><entry><filename class="headerfile">ext/stdio_filebuf.h</filename></entry></row>
+<row>
+<entry><filename class="headerfile">ext/algorithm</filename></entry>
+<entry><filename class="headerfile">ext/atomicity.h</filename></entry>
+<entry><filename class="headerfile">ext/array_allocator.h</filename></entry>
+<entry><filename class="headerfile">ext/bitmap_allocator.h</filename></entry>
+<entry><filename class="headerfile">ext/cast.h</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">ext/codecvt_specializations.h</filename></entry>
+<entry><filename class="headerfile">ext/concurrence.h</filename></entry>
+<entry><filename class="headerfile">ext/debug_allocator.h</filename></entry>
+<entry><filename class="headerfile">ext/enc_filebuf.h</filename></entry>
+<entry><filename class="headerfile">ext/extptr_allocator.h</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">ext/functional</filename></entry>
+<entry><filename class="headerfile">ext/iterator</filename></entry>
+<entry><filename class="headerfile">ext/malloc_allocator.h</filename></entry>
+<entry><filename class="headerfile">ext/memory</filename></entry>
+<entry><filename class="headerfile">ext/mt_allocator.h</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">ext/new_allocator.h</filename></entry>
+<entry><filename class="headerfile">ext/numeric</filename></entry>
+<entry><filename class="headerfile">ext/numeric_traits.h</filename></entry>
+<entry><filename class="headerfile">ext/pb_ds/assoc_container.h</filename></entry>
+<entry><filename class="headerfile">ext/pb_ds/priority_queue.h</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">ext/pod_char_traits.h</filename></entry>
+<entry><filename class="headerfile">ext/pool_allocator.h</filename></entry>
+<entry><filename class="headerfile">ext/rb_tree</filename></entry>
+<entry><filename class="headerfile">ext/rope</filename></entry>
+<entry><filename class="headerfile">ext/slist</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">ext/stdio_filebuf.h</filename></entry>
+<entry><filename class="headerfile">ext/stdio_sync_filebuf.h</filename></entry>
+<entry><filename class="headerfile">ext/throw_allocator.h</filename></entry>
+<entry><filename class="headerfile">ext/typelist.h</filename></entry>
+<entry><filename class="headerfile">ext/type_traits.h</filename></entry>
+</row>
+<row>
+<entry><filename class="headerfile">ext/vstring.h</filename></entry>
+</row>
+
</tbody>
</tgroup>
</table>
@@ -288,8 +519,21 @@
<colspec colname='c5'></colspec>
<tbody>
-<row><entry><filename class="headerfile">debug/bitset</filename></entry><entry><filename class="headerfile">debug/list</filename></entry><entry><filename class="headerfile">debug/set</filename></entry><entry><filename class="headerfile">debug/unordered_map</filename></entry><entry><filename class="headerfile">debug/vector</filename></entry></row>
-<row><entry><filename class="headerfile">debug/deque</filename></entry><entry><filename class="headerfile">debug/map</filename></entry><entry><filename class="headerfile">debug/string</filename></entry><entry><filename class="headerfile">debug/unordered_set</filename></entry></row>
+<row>
+<entry><filename class="headerfile">debug/bitset</filename></entry>
+<entry><filename class="headerfile">debug/deque</filename></entry>
+<entry><filename class="headerfile">debug/list</filename></entry>
+<entry><filename class="headerfile">debug/map</filename></entry>
+<entry><filename class="headerfile">debug/set</filename></entry>
+</row>
+
+<row>
+<entry><filename class="headerfile">debug/string</filename></entry>
+<entry><filename class="headerfile">debug/unordered_map</filename></entry>
+<entry><filename class="headerfile">debug/unordered_set</filename></entry>
+<entry><filename class="headerfile">debug/vector</filename></entry>
+</row>
+
</tbody>
</tgroup>
</table>
@@ -302,7 +546,10 @@
<colspec colname='c1'></colspec>
<colspec colname='c2'></colspec>
<tbody>
-<row><entry><filename class="headerfile">parallel/algorithm</filename></entry><entry><filename class="headerfile">parallel/numeric</filename></entry></row>
+<row>
+<entry><filename class="headerfile">parallel/algorithm</filename></entry>
+<entry><filename class="headerfile">parallel/numeric</filename></entry>
+</row>
</tbody>
</tgroup>
</table>
diff --git a/libstdc++-v3/include/backward/hashtable.h b/libstdc++-v3/include/backward/hashtable.h
index 62bc5bc5193..c0981ee8565 100644
--- a/libstdc++-v3/include/backward/hashtable.h
+++ b/libstdc++-v3/include/backward/hashtable.h
@@ -210,16 +210,16 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
};
// Note: assumes long is at least 32 bits.
- enum { _S_num_primes = 28 };
+ enum { _S_num_primes = 29 };
static const unsigned long __stl_prime_list[_S_num_primes] =
{
- 53ul, 97ul, 193ul, 389ul, 769ul,
- 1543ul, 3079ul, 6151ul, 12289ul, 24593ul,
- 49157ul, 98317ul, 196613ul, 393241ul, 786433ul,
- 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul,
- 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,
- 1610612741ul, 3221225473ul, 4294967291ul
+ 5ul, 53ul, 97ul, 193ul, 389ul,
+ 769ul, 1543ul, 3079ul, 6151ul, 12289ul,
+ 24593ul, 49157ul, 98317ul, 196613ul, 393241ul,
+ 786433ul, 1572869ul, 3145739ul, 6291469ul, 12582917ul,
+ 25165843ul, 50331653ul, 100663319ul, 201326611ul, 402653189ul,
+ 805306457ul, 1610612741ul, 3221225473ul, 4294967291ul
};
inline unsigned long
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index 2a49837029d..a5861d954b3 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -458,7 +458,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param n Number of characters to copy.
* @param a Allocator to use (default is default allocator).
*
- * NB: @a s must have at least @a n characters, '\0' has no special
+ * NB: @a s must have at least @a n characters, '\\0' has no special
* meaning.
*/
basic_string(const _CharT* __s, size_type __n,
@@ -2140,7 +2140,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* result of the comparison is nonzero returns it, otherwise the shorter
* one is ordered first.
*
- * NB: s must have at least n2 characters, '\0' has no special
+ * NB: s must have at least n2 characters, '\\0' has no special
* meaning.
*/
int
diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h
index 89ced313fe5..0a4bf3a6a95 100644
--- a/libstdc++-v3/include/bits/forward_list.h
+++ b/libstdc++-v3/include/bits/forward_list.h
@@ -50,7 +50,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
using __gnu_cxx::__const_pointer_cast;
/**
- * @brief A helper basic node class for @forward_list.
+ * @brief A helper basic node class for %forward_list.
* This is just a linked list with nothing inside it.
* There are purely list shuffling utility methods here.
*/
@@ -62,56 +62,27 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
::other::pointer _Pointer;
typedef typename _Alloc::template rebind<_Fwd_list_node_base<_Alloc> >
::other::const_pointer _Const_pointer;
-
+
_Pointer _M_next;
-
+
_Fwd_list_node_base() : _M_next(0) { }
-
+
static void
swap(_Fwd_list_node_base& __x, _Fwd_list_node_base& __y)
{ std::swap(__x._M_next, __y._M_next); }
-
+
void
- _M_transfer_after(_Pointer __bbegin, _Pointer __bend)
- {
- _Pointer __keep = __bbegin->_M_next;
- if (__bend)
- {
- __bbegin->_M_next = __bend->_M_next;
- __bend->_M_next = this->_M_next;
- }
- else
- __bbegin->_M_next = 0;
- this->_M_next = __keep;
- }
-
+ _M_transfer_after(_Pointer __bbegin);
+
void
- _M_transfer_after(_Pointer __bbegin)
- {
- _Pointer __bend = __bbegin;
- while (__bend && __bend->_M_next)
- __bend = __bend->_M_next;
- _M_transfer_after(__bbegin, __bend);
- }
-
+ _M_transfer_after(_Pointer __bbegin, _Pointer __bend);
+
void
- _M_reverse_after()
- {
- _Pointer __tail = this->_M_next;
- if (!__tail)
- return;
- while (_Pointer __temp = __tail->_M_next)
- {
- _Pointer __keep = this->_M_next;
- this->_M_next = __temp;
- __tail->_M_next = __temp->_M_next;
- this->_M_next->_M_next = __keep;
- }
- }
+ _M_reverse_after();
};
/**
- * @brief A helper node class for @forward_list.
+ * @brief A helper node class for %forward_list.
* This is just a linked list with a data value in each node.
* There is a sorting utility method.
*/
@@ -159,16 +130,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
reference
operator*() const
- { return __static_pointer_cast<_Node*>(this->_M_node)->_M_value; }
+ { return __static_pointer_cast<_Node*>(_M_node)->_M_value; }
pointer
operator->() const
- { return &__static_pointer_cast<_Node*>(this->_M_node)->_M_value; }
+ { return &__static_pointer_cast<_Node*>(_M_node)->_M_value; }
_Self&
operator++()
{
- this->_M_node = this->_M_node->_M_next;
+ _M_node = _M_node->_M_next;
return *this;
}
@@ -176,23 +147,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator++(int)
{
_Self __tmp(*this);
- this->_M_node = this->_M_node->_M_next;
+ _M_node = _M_node->_M_next;
return __tmp;
}
bool
operator==(const _Self& __x) const
- { return this->_M_node == __x._M_node; }
+ { return _M_node == __x._M_node; }
bool
operator!=(const _Self& __x) const
- { return this->_M_node != __x._M_node; }
+ { return _M_node != __x._M_node; }
_Self
_M_next() const
{
if (_M_node)
- return _Fwd_list_iterator(this->_M_node->_M_next);
+ return _Fwd_list_iterator(_M_node->_M_next);
else
return _Fwd_list_iterator(0);
}
@@ -230,16 +201,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
reference
operator*() const
- { return __static_pointer_cast<_Node*>(this->_M_node)->_M_value; }
+ { return __static_pointer_cast<_Node*>(_M_node)->_M_value; }
pointer
operator->() const
- { return &__static_pointer_cast<_Node*>(this->_M_node)->_M_value; }
+ { return &__static_pointer_cast<_Node*>(_M_node)->_M_value; }
_Self&
operator++()
{
- this->_M_node = this->_M_node->_M_next;
+ _M_node = _M_node->_M_next;
return *this;
}
@@ -247,23 +218,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator++(int)
{
_Self __tmp(*this);
- this->_M_node = this->_M_node->_M_next;
+ _M_node = _M_node->_M_next;
return __tmp;
}
bool
operator==(const _Self& __x) const
- { return this->_M_node == __x._M_node; }
+ { return _M_node == __x._M_node; }
bool
operator!=(const _Self& __x) const
- { return this->_M_node != __x._M_node; }
+ { return _M_node != __x._M_node; }
_Self
_M_next() const
{
if (this->_M_node)
- return _Fwd_list_const_iterator(this->_M_node->_M_next);
+ return _Fwd_list_const_iterator(_M_node->_M_next);
else
return _Fwd_list_const_iterator(0);
}
@@ -290,7 +261,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return __x._M_node != __y._M_node; }
/**
- * @brief Base class for @forward_list.
+ * @brief Base class for %forward_list.
*/
template<typename _Tp, typename _Alloc = allocator<_Tp> >
struct _Fwd_list_base
@@ -777,7 +748,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
reference
front()
{
- _Node* __front = __static_pointer_cast<_Node*>(this->_M_impl._M_head._M_next);
+ _Node* __front =
+ __static_pointer_cast<_Node*>(this->_M_impl._M_head._M_next);
return __front->_M_value;
}
@@ -1229,7 +1201,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Reverse the order of elements in the list in linear time.
*/
void
- reverse();
+ reverse()
+ { this->_M_impl._M_head._M_reverse_after(); }
private:
template<typename _Integer>
@@ -1328,7 +1301,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _Tp, typename _Alloc>
inline void
swap(forward_list<_Tp, _Alloc>& __lx,
- forward_list<_Tp, _Alloc>&& __ly)
+ forward_list<_Tp, _Alloc>&& __ly)
{ __lx.swap(__ly); }
_GLIBCXX_END_NAMESPACE // namespace std
diff --git a/libstdc++-v3/include/bits/forward_list.tcc b/libstdc++-v3/include/bits/forward_list.tcc
index bfc814df4a3..35fb9b30afc 100644
--- a/libstdc++-v3/include/bits/forward_list.tcc
+++ b/libstdc++-v3/include/bits/forward_list.tcc
@@ -1,6 +1,6 @@
// <forward_list.tcc> -*- C++ -*-
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,6 +36,50 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
+ template<typename _Alloc>
+ void
+ _Fwd_list_node_base<_Alloc>::
+ _M_transfer_after(_Pointer __bbegin)
+ {
+ _Pointer __bend = __bbegin;
+ while (__bend && __bend->_M_next)
+ __bend = __bend->_M_next;
+ _M_transfer_after(__bbegin, __bend);
+ }
+
+ template<typename _Alloc>
+ void
+ _Fwd_list_node_base<_Alloc>::
+ _M_transfer_after(_Pointer __bbegin, _Pointer __bend)
+ {
+ _Pointer __keep = __bbegin->_M_next;
+ if (__bend)
+ {
+ __bbegin->_M_next = __bend->_M_next;
+ __bend->_M_next = _M_next;
+ }
+ else
+ __bbegin->_M_next = 0;
+ _M_next = __keep;
+ }
+
+ template<typename _Alloc>
+ void
+ _Fwd_list_node_base<_Alloc>::
+ _M_reverse_after()
+ {
+ _Pointer __tail = _M_next;
+ if (!__tail)
+ return;
+ while (_Pointer __temp = __tail->_M_next)
+ {
+ _Pointer __keep = _M_next;
+ _M_next = __temp;
+ __tail->_M_next = __temp->_M_next;
+ _M_next->_M_next = __keep;
+ }
+ }
+
/**
* @brief Sort the singly linked list starting after this node.
* This node is assumed to be an empty head node (of type
@@ -412,12 +456,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
template<typename _Tp, typename _Alloc>
- void
- forward_list<_Tp, _Alloc>::
- reverse()
- { this->_M_impl._M_head._M_reverse_after(); }
-
- template<typename _Tp, typename _Alloc>
bool
operator==(const forward_list<_Tp, _Alloc>& __lx,
const forward_list<_Tp, _Alloc>& __ly)
diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h
index 8e70984971d..5ede8ad1f00 100644
--- a/libstdc++-v3/include/bits/shared_ptr.h
+++ b/libstdc++-v3/include/bits/shared_ptr.h
@@ -51,6 +51,9 @@
* You should not attempt to use it directly.
*/
+#ifndef _SHARED_PTR_H
+#define _SHARED_PTR_H 1
+
#ifndef __GXX_EXPERIMENTAL_CXX0X__
# include <c++0x_warning.h>
#endif
@@ -1589,3 +1592,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// @} group pointer_abstractions
_GLIBCXX_END_NAMESPACE
+
+#endif // _SHARED_PTR_H
diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h
index cea0f0a4fb2..3ca81771b54 100644
--- a/libstdc++-v3/include/ext/vstring.h
+++ b/libstdc++-v3/include/ext/vstring.h
@@ -204,7 +204,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
* @param __n Number of characters to copy.
* @param __a Allocator to use (default is default allocator).
*
- * NB: @a __s must have at least @a __n characters, '\0' has no special
+ * NB: @a __s must have at least @a __n characters, '\\0' has no special
* meaning.
*/
__versa_string(const _CharT* __s, size_type __n,
@@ -2006,7 +2006,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
* the comparison is nonzero returns it, otherwise the shorter
* one is ordered first.
*
- * NB: s must have at least n2 characters, '\0' has no special
+ * NB: s must have at least n2 characters, '\\0' has no special
* meaning.
*/
int
diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex
index ebde1a0a232..e5c583554c1 100644
--- a/libstdc++-v3/include/std/complex
+++ b/libstdc++-v3/include/std/complex
@@ -333,7 +333,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator+(const complex<_Tp>& __x, const _Tp& __y)
{
complex<_Tp> __r = __x;
- __r.real() += __y;
+ __r += __y;
return __r;
}
@@ -342,7 +342,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator+(const _Tp& __x, const complex<_Tp>& __y)
{
complex<_Tp> __r = __y;
- __r.real() += __x;
+ __r += __x;
return __r;
}
//@}
@@ -363,7 +363,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator-(const complex<_Tp>& __x, const _Tp& __y)
{
complex<_Tp> __r = __x;
- __r.real() -= __y;
+ __r -= __y;
return __r;
}
@@ -372,7 +372,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
operator-(const _Tp& __x, const complex<_Tp>& __y)
{
complex<_Tp> __r(__x, -__y.imag());
- __r.real() -= __y.real();
+ __r -= __y.real();
return __r;
}
//@}
diff --git a/libstdc++-v3/include/std/fstream b/libstdc++-v3/include/std/fstream
index 097d5769fa2..11bc743db3c 100644
--- a/libstdc++-v3/include/std/fstream
+++ b/libstdc++-v3/include/std/fstream
@@ -45,8 +45,11 @@
#include <istream>
#include <ostream>
#include <bits/codecvt.h>
-#include <cstdio> // For BUFSIZ
+#include <cstdio> // For BUFSIZ
#include <bits/basic_file.h> // For __basic_file, __c_lock
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <string> // For std::string overloads.
+#endif
_GLIBCXX_BEGIN_NAMESPACE(std)
@@ -59,7 +62,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* external disk file, and maintains a joint file position for both
* sequences. Many of its semantics are described in terms of similar
* behavior in the Standard C Library's @c FILE streams.
- */
+ */
// Requirements on traits_type, specific to this class:
// traits_type::pos_type must be fpos<traits_type::state_type>
// traits_type::off_type must be streamoff
@@ -114,19 +117,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Actual size of internal buffer. This number is equal to the size
* of the put area + 1 position, reserved for the overflow char of
* a full area.
- */
+ */
size_t _M_buf_size;
// Set iff _M_buf is allocated memory from _M_allocate_internal_buffer.
bool _M_buf_allocated;
/**
- * _M_reading == false && _M_writing == false for 'uncommitted' mode;
+ * _M_reading == false && _M_writing == false for 'uncommitted' mode;
* _M_reading == true for 'read' mode;
* _M_writing == true for 'write' mode;
*
* NB: _M_reading == true && _M_writing == true is unused.
- */
+ */
bool _M_reading;
bool _M_writing;
@@ -135,11 +138,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Necessary bits for putback buffer management.
*
* @note pbacks of over one character are not currently supported.
- */
- char_type _M_pback;
+ */
+ char_type _M_pback;
char_type* _M_pback_cur_save;
char_type* _M_pback_end_save;
- bool _M_pback_init;
+ bool _M_pback_init;
//@}
// Cached codecvt facet.
@@ -149,19 +152,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Buffer for external characters. Used for input when
* codecvt::always_noconv() == false. When valid, this corresponds
* to eback().
- */
+ */
char* _M_ext_buf;
/**
* Size of buffer held by _M_ext_buf.
- */
+ */
streamsize _M_ext_buf_size;
/**
* Pointers into the buffer held by _M_ext_buf that delimit a
* subsequence of bytes that have been read but not yet converted.
* When valid, _M_ext_next corresponds to egptr().
- */
+ */
const char* _M_ext_next;
char* _M_ext_end;
@@ -169,7 +172,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Initializes pback buffers, and moves normal buffers to safety.
* Assumptions:
* _M_in_cur has already been moved back
- */
+ */
void
_M_create_pback()
{
@@ -186,7 +189,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Deactivates pback buffer contents, and restores normal buffer.
* Assumptions:
* The pback buffer has only moved forward.
- */
+ */
void
_M_destroy_pback() throw()
{
@@ -206,12 +209,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* The default constructor initializes the parent class using its
* own default ctor.
- */
+ */
basic_filebuf();
/**
* @brief The destructor closes the file first.
- */
+ */
virtual
~basic_filebuf()
{ this->close(); }
@@ -219,7 +222,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// Members:
/**
* @brief Returns true if the external file is open.
- */
+ */
bool
is_open() const throw()
{ return _M_file.is_open(); }
@@ -266,6 +269,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
__filebuf_type*
open(const char* __s, ios_base::openmode __mode);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Opens an external file.
+ * @param s The name of the file.
+ * @param mode The open mode flags.
+ * @return @c this on success, NULL on failure
+ */
+ __filebuf_type*
+ open(const std::string& __s, ios_base::openmode __mode)
+ { return open(__s.c_str(), __mode); }
+#endif
+
/**
* @brief Closes the currently associated file.
* @return @c this on success, NULL on failure
@@ -276,7 +291,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* all the characters. The file is then closed.
*
* If any operations fail, this function also fails.
- */
+ */
__filebuf_type*
close();
@@ -328,7 +343,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* buffer; see
* http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch25s02.html
* for more.
- */
+ */
virtual __streambuf_type*
setbuf(char_type* __s, streamsize __n);
@@ -367,11 +382,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* __off == egptr() - eback() upon underflow/uflow ('read' mode);
* __off == 0 upon overflow ('write' mode);
* __off == -1 upon open, setbuf, seekoff/pos ('uncommitted' mode).
- *
+ *
* NB: epptr() - pbase() == _M_buf_size - 1, since _M_buf_size
* reflects the actual allocated memory and the last cell is reserved
* for the overflow char of a full put area.
- */
+ */
void
_M_set_buffer(streamsize __off)
{
@@ -399,7 +414,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* functions from std::basic_istream. To control the associated
* sequence, an instance of std::basic_filebuf is used, which this page
* refers to as @c sb.
- */
+ */
template<typename _CharT, typename _Traits>
class basic_ifstream : public basic_istream<_CharT, _Traits>
{
@@ -426,7 +441,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Initializes @c sb using its default constructor, and passes
* @c &sb to the base class initializer. Does not open any files
* (you haven't given it a filename to open).
- */
+ */
basic_ifstream() : __istream_type(), _M_filebuf()
{ this->init(&_M_filebuf); }
@@ -439,7 +454,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* Tip: When using std::string to hold the filename, you must use
* .c_str() before passing it to this constructor.
- */
+ */
explicit
basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
: __istream_type(), _M_filebuf()
@@ -448,12 +463,30 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
this->open(__s, __mode);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Create an input file stream.
+ * @param s std::string specifying the filename.
+ * @param mode Open file in specified mode (see std::ios_base).
+ *
+ * @c ios_base::in is automatically included in @a mode.
+ */
+ explicit
+ basic_ifstream(const std::string& __s,
+ ios_base::openmode __mode = ios_base::in)
+ : __istream_type(), _M_filebuf()
+ {
+ this->init(&_M_filebuf);
+ this->open(__s, __mode);
+ }
+#endif
+
/**
* @brief The destructor does nothing.
*
* The file is closed by the filebuf object, not the formatting
* stream.
- */
+ */
~basic_ifstream()
{ }
@@ -463,7 +496,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @return The current basic_filebuf buffer.
*
* This hides both signatures of std::basic_ios::rdbuf().
- */
+ */
__filebuf_type*
rdbuf() const
{ return const_cast<__filebuf_type*>(&_M_filebuf); }
@@ -471,7 +504,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Wrapper to test for an open file.
* @return @c rdbuf()->is_open()
- */
+ */
bool
is_open()
{ return _M_filebuf.is_open(); }
@@ -492,7 +525,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* Tip: When using std::string to hold the filename, you must use
* .c_str() before passing it to this constructor.
- */
+ */
void
open(const char* __s, ios_base::openmode __mode = ios_base::in)
{
@@ -504,12 +537,33 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
this->clear();
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Opens an external file.
+ * @param s The name of the file.
+ * @param mode The open mode flags.
+ *
+ * Calls @c std::basic_filebuf::open(s,mode|in). If that function
+ * fails, @c failbit is set in the stream's error state.
+ */
+ void
+ open(const std::string& __s, ios_base::openmode __mode = ios_base::in)
+ {
+ if (!_M_filebuf.open(__s, __mode | ios_base::in))
+ this->setstate(ios_base::failbit);
+ else
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 409. Closing an fstream should clear error state
+ this->clear();
+ }
+#endif
+
/**
* @brief Close the file.
*
* Calls @c std::basic_filebuf::close(). If that function
* fails, @c failbit is set in the stream's error state.
- */
+ */
void
close()
{
@@ -528,7 +582,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* functions from std::basic_ostream. To control the associated
* sequence, an instance of std::basic_filebuf is used, which this page
* refers to as @c sb.
- */
+ */
template<typename _CharT, typename _Traits>
class basic_ofstream : public basic_ostream<_CharT,_Traits>
{
@@ -555,7 +609,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Initializes @c sb using its default constructor, and passes
* @c &sb to the base class initializer. Does not open any files
* (you haven't given it a filename to open).
- */
+ */
basic_ofstream(): __ostream_type(), _M_filebuf()
{ this->init(&_M_filebuf); }
@@ -569,7 +623,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* Tip: When using std::string to hold the filename, you must use
* .c_str() before passing it to this constructor.
- */
+ */
explicit
basic_ofstream(const char* __s,
ios_base::openmode __mode = ios_base::out|ios_base::trunc)
@@ -579,12 +633,31 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
this->open(__s, __mode);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Create an output file stream.
+ * @param s std::string specifying the filename.
+ * @param mode Open file in specified mode (see std::ios_base).
+ *
+ * @c ios_base::out|ios_base::trunc is automatically included in
+ * @a mode.
+ */
+ explicit
+ basic_ofstream(const std::string& __s,
+ ios_base::openmode __mode = ios_base::out|ios_base::trunc)
+ : __ostream_type(), _M_filebuf()
+ {
+ this->init(&_M_filebuf);
+ this->open(__s, __mode);
+ }
+#endif
+
/**
* @brief The destructor does nothing.
*
* The file is closed by the filebuf object, not the formatting
* stream.
- */
+ */
~basic_ofstream()
{ }
@@ -594,7 +667,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @return The current basic_filebuf buffer.
*
* This hides both signatures of std::basic_ios::rdbuf().
- */
+ */
__filebuf_type*
rdbuf() const
{ return const_cast<__filebuf_type*>(&_M_filebuf); }
@@ -602,7 +675,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Wrapper to test for an open file.
* @return @c rdbuf()->is_open()
- */
+ */
bool
is_open()
{ return _M_filebuf.is_open(); }
@@ -623,7 +696,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* Tip: When using std::string to hold the filename, you must use
* .c_str() before passing it to this constructor.
- */
+ */
void
open(const char* __s,
ios_base::openmode __mode = ios_base::out | ios_base::trunc)
@@ -636,12 +709,34 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
this->clear();
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Opens an external file.
+ * @param s The name of the file.
+ * @param mode The open mode flags.
+ *
+ * Calls @c std::basic_filebuf::open(s,mode|out|trunc). If that
+ * function fails, @c failbit is set in the stream's error state.
+ */
+ void
+ open(const std::string& __s,
+ ios_base::openmode __mode = ios_base::out | ios_base::trunc)
+ {
+ if (!_M_filebuf.open(__s, __mode | ios_base::out))
+ this->setstate(ios_base::failbit);
+ else
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 409. Closing an fstream should clear error state
+ this->clear();
+ }
+#endif
+
/**
* @brief Close the file.
*
* Calls @c std::basic_filebuf::close(). If that function
* fails, @c failbit is set in the stream's error state.
- */
+ */
void
close()
{
@@ -660,7 +755,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* the inherited functions from std::basic_iostream. To control the
* associated sequence, an instance of std::basic_filebuf is used, which
* this page refers to as @c sb.
- */
+ */
template<typename _CharT, typename _Traits>
class basic_fstream : public basic_iostream<_CharT, _Traits>
{
@@ -688,7 +783,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Initializes @c sb using its default constructor, and passes
* @c &sb to the base class initializer. Does not open any files
* (you haven't given it a filename to open).
- */
+ */
basic_fstream()
: __iostream_type(), _M_filebuf()
{ this->init(&_M_filebuf); }
@@ -700,7 +795,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* Tip: When using std::string to hold the filename, you must use
* .c_str() before passing it to this constructor.
- */
+ */
explicit
basic_fstream(const char* __s,
ios_base::openmode __mode = ios_base::in | ios_base::out)
@@ -710,12 +805,28 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
this->open(__s, __mode);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Create an input/output file stream.
+ * @param s Null terminated string specifying the filename.
+ * @param mode Open file in specified mode (see std::ios_base).
+ */
+ explicit
+ basic_fstream(const std::string& __s,
+ ios_base::openmode __mode = ios_base::in | ios_base::out)
+ : __iostream_type(NULL), _M_filebuf()
+ {
+ this->init(&_M_filebuf);
+ this->open(__s, __mode);
+ }
+#endif
+
/**
* @brief The destructor does nothing.
*
* The file is closed by the filebuf object, not the formatting
* stream.
- */
+ */
~basic_fstream()
{ }
@@ -725,7 +836,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @return The current basic_filebuf buffer.
*
* This hides both signatures of std::basic_ios::rdbuf().
- */
+ */
__filebuf_type*
rdbuf() const
{ return const_cast<__filebuf_type*>(&_M_filebuf); }
@@ -733,7 +844,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Wrapper to test for an open file.
* @return @c rdbuf()->is_open()
- */
+ */
bool
is_open()
{ return _M_filebuf.is_open(); }
@@ -754,7 +865,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* Tip: When using std::string to hold the filename, you must use
* .c_str() before passing it to this constructor.
- */
+ */
void
open(const char* __s,
ios_base::openmode __mode = ios_base::in | ios_base::out)
@@ -767,12 +878,34 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
this->clear();
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Opens an external file.
+ * @param s The name of the file.
+ * @param mode The open mode flags.
+ *
+ * Calls @c std::basic_filebuf::open(s,mode). If that
+ * function fails, @c failbit is set in the stream's error state.
+ */
+ void
+ open(const std::string& __s,
+ ios_base::openmode __mode = ios_base::in | ios_base::out)
+ {
+ if (!_M_filebuf.open(__s, __mode))
+ this->setstate(ios_base::failbit);
+ else
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 409. Closing an fstream should clear error state
+ this->clear();
+ }
+#endif
+
/**
* @brief Close the file.
*
* Calls @c std::basic_filebuf::close(). If that function
* fails, @c failbit is set in the stream's error state.
- */
+ */
void
close()
{
diff --git a/libstdc++-v3/include/std/iostream b/libstdc++-v3/include/std/iostream
index 5f2f23f1df0..4b702f7daef 100644
--- a/libstdc++-v3/include/std/iostream
+++ b/libstdc++-v3/include/std/iostream
@@ -53,7 +53,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* The &lt;iostream&gt; header declares the eight <em>standard stream
* objects</em>. For other declarations, see
* http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html
- * and the @link s27_2_iosfwd I/O forward declarations @endlink
+ * and the @link iosfwd I/O forward declarations @endlink
*
* They are required by default to cooperate with the global C library's
* @c FILE streams, and to be available during program startup and
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
index 132a92459e3..130d504d903 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -111,7 +111,7 @@ namespace std
{ typedef _Tp type; };
template<typename _Tp,
- bool = is_object<_Tp>::value || is_function<_Tp>::value,
+ bool = !is_reference<_Tp>::value && !is_void<_Tp>::value,
bool = is_rvalue_reference<_Tp>::value>
struct __add_lvalue_reference_helper
{ typedef _Tp type; };
@@ -131,7 +131,7 @@ namespace std
{ };
template<typename _Tp,
- bool = is_object<_Tp>::value || is_function<_Tp>::value>
+ bool = !is_reference<_Tp>::value && !is_void<_Tp>::value>
struct __add_rvalue_reference_helper
{ typedef _Tp type; };
diff --git a/libstdc++-v3/include/tr1/shared_ptr.h b/libstdc++-v3/include/tr1/shared_ptr.h
index a21561433d9..7725145a823 100644
--- a/libstdc++-v3/include/tr1/shared_ptr.h
+++ b/libstdc++-v3/include/tr1/shared_ptr.h
@@ -51,6 +51,9 @@
* You should not attempt to use it directly.
*/
+#ifndef _TR1_SHARED_PTR_H
+#define _TR1_SHARED_PTR_H 1
+
#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
# error TR1 header cannot be included from C++0x header
#endif
@@ -1018,3 +1021,5 @@ namespace tr1
}
}
+
+#endif // _TR1_SHARED_PTR_H
diff --git a/libstdc++-v3/testsuite/thread/guard.cc b/libstdc++-v3/testsuite/18_support/pthread_guard.cc
index a509321f83f..a509321f83f 100644
--- a/libstdc++-v3/testsuite/thread/guard.cc
+++ b/libstdc++-v3/testsuite/18_support/pthread_guard.cc
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/39405.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/39405.cc
new file mode 100644
index 00000000000..83221e676cb
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/39405.cc
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2009 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <memory>
+
+// libstdc++/39405
+template<typename T>
+ struct foo
+ {
+ std::shared_ptr<foo<T> > m_foo;
+ };
+
+std::shared_ptr<foo<int> > t;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
index 5f60c2ff627..c6def9b42d7 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006, 2007 Free Software Foundation
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -18,12 +18,18 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DWIDTH=200000" { target simulator } }
+
// 21.3.7.9 inserters and extractors
#include <ostream>
#include <sstream>
#include <testsuite_hooks.h>
+#ifndef WIDTH
+#define WIDTH 20000000
+#endif
+
// libstdc++/28277
void test01()
{
@@ -33,7 +39,7 @@ void test01()
ostringstream oss_01;
const string str_01(50, 'a');
- oss_01.width(20000000);
+ oss_01.width(WIDTH);
const streamsize width = oss_01.width();
oss_01 << str_01;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc
index 653f4de36db..35cae2e27d2 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006, 2007 Free Software Foundation
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -18,12 +18,18 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DWIDTH=500000" { target simulator } }
+
// 21.3.7.9 inserters and extractors
#include <ostream>
#include <sstream>
#include <testsuite_hooks.h>
+#ifndef WIDTH
+#define WIDTH 50000000
+#endif
+
// libstdc++/28277
void test01()
{
@@ -33,7 +39,7 @@ void test01()
wostringstream oss_01;
const wstring str_01(50, L'a');
- oss_01.width(5000000);
+ oss_01.width(WIDTH);
const streamsize width = oss_01.width();
oss_01 << str_01;
diff --git a/libstdc++-v3/testsuite/thread/18185.cc b/libstdc++-v3/testsuite/21_strings/basic_string/pthread18185.cc
index 56d0965fee0..56d0965fee0 100644
--- a/libstdc++-v3/testsuite/thread/18185.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/pthread18185.cc
diff --git a/libstdc++-v3/testsuite/thread/pthread4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/pthread4.cc
index 146d8c7a594..146d8c7a594 100644
--- a/libstdc++-v3/testsuite/thread/pthread4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/pthread4.cc
diff --git a/libstdc++-v3/testsuite/thread/pthread1.cc b/libstdc++-v3/testsuite/23_containers/list/pthread1.cc
index 66a0eab5bed..66a0eab5bed 100644
--- a/libstdc++-v3/testsuite/thread/pthread1.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/pthread1.cc
diff --git a/libstdc++-v3/testsuite/thread/pthread5.cc b/libstdc++-v3/testsuite/23_containers/list/pthread5.cc
index 643373148de..643373148de 100644
--- a/libstdc++-v3/testsuite/thread/pthread5.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/pthread5.cc
diff --git a/libstdc++-v3/testsuite/thread/pthread6.cc b/libstdc++-v3/testsuite/23_containers/map/pthread6.cc
index 5b24f18f0b6..5b24f18f0b6 100644
--- a/libstdc++-v3/testsuite/thread/pthread6.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/pthread6.cc
diff --git a/libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc b/libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc
index ee04793e66e..b2c3cb566b6 100644
--- a/libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/heap/moveable.cc
@@ -1,6 +1,6 @@
// { dg-options "-std=gnu++0x" }
-// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -18,6 +18,8 @@
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
+// { dg-options "-std=gnu++0x -DITERATIONS=5" { target simulator } }
+
// 25.3.6 Heap operations [lib.alg.heap.operations]
#undef _GLIBCXX_CONCEPT_CHECKS
@@ -28,6 +30,10 @@
#include <testsuite_iterators.h>
#include <testsuite_rvalref.h>
+#ifndef ITERATIONS
+#define ITERATIONS 9
+#endif
+
using __gnu_test::test_container;
using __gnu_test::random_access_iterator_wrapper;
using __gnu_test::rvalstruct;
@@ -115,7 +121,7 @@ void
test01()
{
int array[9];
- for (int i = 1; i < 9; ++i)
+ for (int i = 1; i < ITERATIONS; ++i)
{
for(int z = 0; z < i; ++z)
array[z] = z;
diff --git a/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc b/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc
index 2a9b0f42a09..f03daacd494 100644
--- a/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/search_n/iterator.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -16,6 +17,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DTEST_DEPTH=10" { target simulator } }
+
// 25 algorithms, search_n
#include <algorithm>
@@ -23,7 +26,10 @@
#include <testsuite_hooks.h>
#include <testsuite_iterators.h>
+#ifndef TEST_DEPTH
#define TEST_DEPTH 14
+#endif
+
int array1[11] = {0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0};
int array2[TEST_DEPTH];
diff --git a/libstdc++-v3/testsuite/26_numerics/complex/dr387_2.cc b/libstdc++-v3/testsuite/26_numerics/complex/dr387_2.cc
new file mode 100644
index 00000000000..33a502f0892
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/complex/dr387_2.cc
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+//
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <complex>
+
+// DR 387. std::complex over-encapsulated.
+// http://gcc.gnu.org/ml/gcc/2009-03/msg00264.html
+typedef std::complex<double> C;
+
+C f1(C& c) { return c+1.0; }
+C f2(C& c) { return c-1.0; }
+C f3(C& c) { return 1.0+c; }
+C f4(C& c) { return 1.0-c; }
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/5.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/5.cc
new file mode 100644
index 00000000000..dddd2f16ff6
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/5.cc
@@ -0,0 +1,31 @@
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <fstream>
+
+// Test member functions.
+void test01()
+{
+ std::filebuf fb;
+
+ const std::string name = "filebuf_name.txt";
+ fb.open(name, std::ios_base::in | std::ios_base::ate);
+}
diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/cons/3.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/cons/1.cc
index 4b01bd10ef4..4b01bd10ef4 100644
--- a/libstdc++-v3/testsuite/27_io/basic_fstream/cons/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_fstream/cons/1.cc
diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/cons/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/cons/char/1.cc
new file mode 100644
index 00000000000..5b0047aa19d
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_fstream/cons/char/1.cc
@@ -0,0 +1,28 @@
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <fstream>
+
+void test01()
+{
+ const std::string name = "fstream_name.txt";
+ std::fstream fs(name);
+}
diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/open/char/1.cc
new file mode 100644
index 00000000000..9277339e980
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_fstream/open/char/1.cc
@@ -0,0 +1,32 @@
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <fstream>
+
+void test01()
+{
+ std::fstream fs;
+
+ const std::string name = "fstream_name.txt";
+ fs.open(name);
+
+ fs.close();
+}
diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/2.cc
new file mode 100644
index 00000000000..44d3b9d0d79
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/2.cc
@@ -0,0 +1,28 @@
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <fstream>
+
+void test01()
+{
+ const std::string name = "ifstream_name.txt";
+ std::ifstream ifs(name);
+}
diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/2.cc
new file mode 100644
index 00000000000..21b34fb907c
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/2.cc
@@ -0,0 +1,32 @@
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <fstream>
+
+void test01()
+{
+ std::ifstream ifs;
+
+ const std::string name = "ifstream_name.txt";
+ ifs.open(name);
+
+ ifs.close();
+}
diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/1.cc
new file mode 100644
index 00000000000..106639c16de
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/1.cc
@@ -0,0 +1,51 @@
+// Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 27.8.1.10 ofstream member functions
+// @require@ %-*.tst
+// @diff@ %-*.tst %-*.txt
+
+// { dg-require-fileio "" }
+
+#include <ostream>
+#include <fstream>
+#include <testsuite_hooks.h>
+
+const char name_02[] = "ofstream_members-1.txt";
+
+// http://gcc.gnu.org/ml/libstdc++/2000-07/msg00004.html
+void test02()
+{
+ bool test __attribute__((unused)) = true;
+ const int more_than_max_open_files = 8200;
+
+ for(int i = 0; ++i < more_than_max_open_files;)
+ {
+ std::ofstream ifs(name_02);
+ VERIFY( static_cast<bool>(ifs) );
+ }
+}
+
+int main()
+{
+ test02();
+ return 0;
+}
+
+
+
diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc
index 106639c16de..dc47541eb03 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -16,36 +16,13 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
-// 27.8.1.10 ofstream member functions
-// @require@ %-*.tst
-// @diff@ %-*.tst %-*.txt
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
-// { dg-require-fileio "" }
-
-#include <ostream>
#include <fstream>
-#include <testsuite_hooks.h>
-
-const char name_02[] = "ofstream_members-1.txt";
-
-// http://gcc.gnu.org/ml/libstdc++/2000-07/msg00004.html
-void test02()
-{
- bool test __attribute__((unused)) = true;
- const int more_than_max_open_files = 8200;
-
- for(int i = 0; ++i < more_than_max_open_files;)
- {
- std::ofstream ifs(name_02);
- VERIFY( static_cast<bool>(ifs) );
- }
-}
-int main()
+void test01()
{
- test02();
- return 0;
+ const std::string name = "ofstream_name.txt";
+ std::ofstream ofs(name);
}
-
-
-
diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/2.cc
new file mode 100644
index 00000000000..f457c96ff5f
--- /dev/null
+++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/2.cc
@@ -0,0 +1,32 @@
+// Copyright (C) 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <fstream>
+
+void test01()
+{
+ std::ofstream ofs;
+
+ const std::string name = "ofstream_name.txt";
+ ofs.open(name);
+
+ ofs.close();
+}
diff --git a/libstdc++-v3/testsuite/thread/pthread2.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/pthread2.cc
index 1e03a9fad37..1e03a9fad37 100644
--- a/libstdc++-v3/testsuite/thread/pthread2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/pthread2.cc
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc
index 9c68320bf17..caa851cf9d2 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006, 2006 Free Software Foundation
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -18,12 +18,18 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DWIDTH=200000" { target simulator } }
+
// 27.6.2.5.4 basic_ostream character inserters
#include <ostream>
#include <sstream>
#include <testsuite_hooks.h>
+#ifndef WIDTH
+#define WIDTH 20000000
+#endif
+
// libstdc++/28277
void test01()
{
@@ -32,7 +38,7 @@ void test01()
ostringstream oss_01;
- oss_01.width(20000000);
+ oss_01.width(WIDTH);
const streamsize width = oss_01.width();
oss_01 << 'a';
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc
index 3ef1f8c4362..381ac6930bd 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006, 2007 Free Software Foundation
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -18,12 +18,18 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DWIDTH=200000" { target simulator } }
+
// 27.6.2.5.4 basic_ostream character inserters
#include <ostream>
#include <sstream>
#include <testsuite_hooks.h>
+#ifndef WIDTH
+#define WIDTH 20000000
+#endif
+
// libstdc++/28277
void test01()
{
@@ -33,7 +39,7 @@ void test01()
ostringstream oss_01;
const string str_01(50, 'a');
- oss_01.width(20000000);
+ oss_01.width(WIDTH);
const streamsize width = oss_01.width();
oss_01 << str_01.c_str();
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc
index dc5ffe5dff2..54cdf33f96a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc
@@ -18,12 +18,18 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DWIDTH=500000" { target simulator } }
+
// 27.6.2.5.4 basic_ostream character inserters
#include <ostream>
#include <sstream>
#include <testsuite_hooks.h>
+#ifndef WIDTH
+#define WIDTH 50000000
+#endif
+
// libstdc++/28277
void test01()
{
@@ -32,7 +38,7 @@ void test01()
wostringstream oss_01;
- oss_01.width(5000000);
+ oss_01.width(WIDTH);
const streamsize width = oss_01.width();
oss_01 << L'a';
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc
index e80242cf0a7..aff7d9c0b97 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006, 2007 Free Software Foundation
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -18,12 +18,18 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DWIDTH=500000" { target simulator } }
+
// 27.6.2.5.4 basic_ostream character inserters
#include <ostream>
#include <sstream>
#include <testsuite_hooks.h>
+#ifndef WIDTH
+#define WIDTH 50000000
+#endif
+
// libstdc++/28277
void test01()
{
@@ -33,7 +39,7 @@ void test01()
wostringstream oss_01;
const wstring str_01(50, L'a');
- oss_01.width(5000000);
+ oss_01.width(WIDTH);
const streamsize width = oss_01.width();
oss_01 << str_01.c_str();
diff --git a/libstdc++-v3/testsuite/thread/pthread3.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/pthread3.cc
index 936fd5271aa..936fd5271aa 100644
--- a/libstdc++-v3/testsuite/thread/pthread3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/pthread3.cc
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc
index 93968798b67..bf740d24cef 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc
@@ -23,8 +23,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
-#include <thread/all.h>
#include <condition_variable>
+#include <thread/all.h>
int main()
{
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/native_handle/typesizes.cc
index 2544291ab13..ed373026362 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/native_handle/typesizes.cc
@@ -23,8 +23,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
-#include <thread/all.h>
#include <condition_variable>
+#include <thread/all.h>
int main()
{
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc
index cda0816cfbe..76edae25e2c 100644
--- a/libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc
@@ -23,8 +23,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
-#include <thread/all.h>
#include <mutex>
+#include <thread/all.h>
int main()
{
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc
index 8ee1f3895c1..6987f9b5760 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc
@@ -23,8 +23,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
-#include <thread/all.h>
#include <mutex>
+#include <thread/all.h>
int main()
{
diff --git a/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
index 6f3f650df43..78e556dbb8c 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
@@ -23,8 +23,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
-#include <thread/all.h>
#include <thread>
+#include <thread/all.h>
int main()
{
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc
index e9debe55e00..89ea70cda73 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc
@@ -23,8 +23,8 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
-#include <thread/all.h>
#include <mutex>
+#include <thread/all.h>
int main()
{
diff --git a/libstdc++-v3/testsuite/thread/pthread7-rope.cc b/libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc
index 93bfe088cfa..93bfe088cfa 100644
--- a/libstdc++-v3/testsuite/thread/pthread7-rope.cc
+++ b/libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc
diff --git a/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc b/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc
index eb506b0c81d..5b096b753c4 100644
--- a/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc
+++ b/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc
@@ -1,6 +1,6 @@
// 2007-04-09 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -18,11 +18,17 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DWIDTH=200000" { target simulator } }
+
#include <ostream>
#include <sstream>
#include <ext/vstring.h>
#include <testsuite_hooks.h>
+#ifndef WIDTH
+#define WIDTH 20000000
+#endif
+
// libstdc++/28277
void test01()
{
@@ -32,7 +38,7 @@ void test01()
ostringstream oss_01;
const __gnu_cxx::__vstring str_01(50, 'a');
- oss_01.width(20000000);
+ oss_01.width(WIDTH);
const streamsize width = oss_01.width();
oss_01 << str_01;
diff --git a/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc b/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc
index 205a99525f6..6358de586b6 100644
--- a/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc
+++ b/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc
@@ -1,6 +1,6 @@
// 2007-04-09 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -18,11 +18,17 @@
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
+// { dg-options "-DWIDTH=500000" { target simulator } }
+
#include <ostream>
#include <sstream>
#include <ext/vstring.h>
#include <testsuite_hooks.h>
+#ifndef WIDTH
+#define WIDTH 50000000
+#endif
+
// libstdc++/28277
void test01()
{
@@ -32,7 +38,7 @@ void test01()
wostringstream oss_01;
const __gnu_cxx::__wvstring str_01(50, L'a');
- oss_01.width(5000000);
+ oss_01.width(WIDTH);
const streamsize width = oss_01.width();
oss_01 << str_01;
diff --git a/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp b/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp
index 6a05a27ff8d..d8441953550 100644
--- a/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp
+++ b/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp
@@ -1,6 +1,6 @@
# Functional and regression tests in C++ for libstdc++.
-# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
# libstdc++-v3 testsuite that uses the 'dg.exp' driver.
@@ -57,7 +58,6 @@ if {[info exists tests_file] && [file exists $tests_file]} {
lappend subdirs "$srcdir/backward"
lappend subdirs "$srcdir/ext"
lappend subdirs "$srcdir/performance"
- lappend subdirs "$srcdir/thread"
lappend subdirs "$srcdir/tr1"
verbose "subdirs are $subdirs"
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/39405.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/39405.cc
new file mode 100644
index 00000000000..4641e1bc050
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/39405.cc
@@ -0,0 +1,30 @@
+// { dg-do compile }
+
+// Copyright (C) 2009 Free Software Foundation
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <tr1/memory>
+
+// libstdc++/39405
+template<typename T>
+ struct foo
+ {
+ std::tr1::shared_ptr<foo<T> > m_foo;
+ };
+
+std::tr1::shared_ptr<foo<int> > t;
diff --git a/libtool.m4 b/libtool.m4
index 66b1a3fbd25..c17514b9260 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -2445,7 +2445,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -3077,7 +3077,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3698,7 +3698,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -3982,7 +3982,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -4363,7 +4363,7 @@ _LT_EOF
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -5848,7 +5848,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(inherit_rpath, $1)=yes
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog
index fa171a8fddb..8bedd24639d 100644
--- a/maintainer-scripts/ChangeLog
+++ b/maintainer-scripts/ChangeLog
@@ -1,3 +1,12 @@
+2009-03-28 Gerald Pfeifer <gerald@pfeifer.com>
+
+ * crontab: Stop 4.2 snapshots.
+ Spread out 4.3, 4.4, and 4.5 snapshots more evenly.
+
+2009-03-27 Mark Mitchell <mark@codesourcery.com>
+
+ * crontab: Add 4.4 branch snapshots.
+
2009-02-21 Gerald Pfeifer <gerald@pfeifer.com>
* update_version_svn (ADD_BRANCHES): Remove autovect-branch
diff --git a/maintainer-scripts/crontab b/maintainer-scripts/crontab
index 091c24d8249..03902a2fce6 100644
--- a/maintainer-scripts/crontab
+++ b/maintainer-scripts/crontab
@@ -1,6 +1,6 @@
16 0 * * * sh /home/gccadmin/scripts/update_version_svn
50 0 * * * sh /home/gccadmin/scripts/update_web_docs_svn
55 0 * * * sh /home/gccadmin/scripts/update_web_docs_libstdcxx_svn
-32 22 * * 3 sh /home/gccadmin/scripts/gcc_release -s 4.2:branches/gcc-4_2-branch -l -d /sourceware/snapshot-tmp/gcc all
-32 22 * * 4 sh /home/gccadmin/scripts/gcc_release -s 4.3:branches/gcc-4_3-branch -l -d /sourceware/snapshot-tmp/gcc all
-32 22 * * 5 sh /home/gccadmin/scripts/gcc_release -s 4.4:trunk -l -d /sourceware/snapshot-tmp/gcc all
+32 22 * * 0 sh /home/gccadmin/scripts/gcc_release -s 4.3:branches/gcc-4_3-branch -l -d /sourceware/snapshot-tmp/gcc all
+32 22 * * 2 sh /home/gccadmin/scripts/gcc_release -s 4.4:branches/gcc-4_4-branch -l -d /sourceware/snapshot-tmp/gcc all
+32 22 * * 4 sh /home/gccadmin/scripts/gcc_release -s 4.5:trunk -l -d /sourceware/snapshot-tmp/gcc all
diff --git a/zlib/ChangeLog.gcj b/zlib/ChangeLog.gcj
index 02814a99cd4..eee68cdf60b 100644
--- a/zlib/ChangeLog.gcj
+++ b/zlib/ChangeLog.gcj
@@ -1,3 +1,7 @@
+2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
2008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/zlib/configure b/zlib/configure
index e7df78adcd3..284449a5fcf 100755
--- a/zlib/configure
+++ b/zlib/configure
@@ -4161,7 +4161,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -6825,7 +6825,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -7386,7 +7386,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
@@ -8950,7 +8950,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no