public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* doubled words
@ 2011-04-10 11:55 Jim Meyering
  2011-04-10 18:01 ` Mike Stump
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Jim Meyering @ 2011-04-10 11:55 UTC (permalink / raw)
  To: gcc-patches

I've noticed/fixed a few occurrences of doubled words like "the the",
"to to", etc. in other packages, so wrote this to find more of them:

  git ls-files|xargs perl -0777 -n \
    -e 'while (/\b(then?|if|but|or|and|to)\s+\1\b/gms)' \
    -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g;' \
    -e ' print "$ARGV:$n:$v\n"}' | grep -v ChangeLog

I would be inclined to prepare a patch if I thought it would
be applied (promptly?), but I submitted a clear/simple fix for
an obvious double-free bug (albeit only in a test case) a month ago:

	http://patchwork.ozlabs.org/patch/85973/
	avoid memory overrun in a test leading to potential double-free
	* testsuite/test-expandargv.c (writeout_test): Fix off-by-one error:
	i.e., do copy the trailing NUL byte.

AFAIK, it hasn't been applied.  If a "real" bug has such low priority,
this is not a good time to submit a clean-up change.

Running the above command on gcc's master produced the following output:
Note that if you add "i" to the regexp match option list, you'll get
at least one more legitimate match:

    gcc/fortran/gfortran.texi:970:The the

However, many of the mixed case matches are spurious.
(same for the "if if" matches in code)

-------------------------------------------------------------------
boehm-gc/configure.host:5:the the
boehm-gc/doc/README:123:to to
boehm-gc/misc.c:212:to to
boehm-gc/os_dep.c:4010:to to
config/tcl.m4:2417:the the
contrib/reghunt/bin/gcc-build-full:18:the the
contrib/reghunt/bin/gcc-build-simple:20:the the
contrib/reghunt/bin/gcc-svn-patchlist:19:the the
contrib/reghunt/bin/gcc-svn-update:18:the the
contrib/reghunt/bin/gcc-test-accepts-invalid:18:the the
contrib/reghunt/bin/gcc-test-bogus-warning:18:the the
contrib/reghunt/bin/gcc-test-compiler-hangs:18:the the
contrib/reghunt/bin/gcc-test-ice-on-invalid-code:18:the the
contrib/reghunt/bin/gcc-test-ice-on-valid-code:18:the the
contrib/reghunt/bin/gcc-test-missing-warning:18:the the
contrib/reghunt/bin/gcc-test-rejects-valid:18:the the
contrib/reghunt/bin/gcc-test-segfault-on-valid-code:19:the the
contrib/reghunt/bin/gcc-test-wrong-code:18:the the
contrib/reghunt/bin/reg-hunt:62:the the
contrib/reghunt/bin/reg-newmid:25:the the
contrib/reghunt/bin/reg-test:40:the the
gcc/ada/gcc-interface/trans.c:5411:to\n	 to
gcc/ada/sem_prag.adb:1701:to to
gcc/c-family/c-ada-spec.c:3236:the the
gcc/c-typeck.c:8885:if if
gcc/cfganal.c:653:then then
gcc/cgraphunit.c:48:the the
gcc/config/arm/arm.c:9508:to to
gcc/config/arm/arm.c:9656:to to
gcc/config/arm/arm.c:23010:the the
gcc/config/arm/arm.md:100:the the
gcc/config/cris/cris.md:2512:the the
gcc/config/i386/i386.c:16252:the the
gcc/config/i386/i386.c:16286:the\n     the
gcc/config/i386/i386.c:21002:and and
gcc/config/i386/smmintrin.h:600:the the
gcc/config/mips/mips-protos.h:74:the\n       the
gcc/config/mips/mips.c:10800:to to
gcc/config/s390/s390.c:4015:and and
gcc/config/s390/s390.md:8827:and and
gcc/config/sh/sh.c:9108:the the
gcc/config/spu/spu.c:2669:to to
gcc/config/spu/spu.c:4373:and and
gcc/cp/decl.c:1091:then\n     then
gcc/cp/name-lookup.c:4149:the the
gcc/doc/invoke.texi:7711:the the
gcc/doc/tm.texi:96:the\nthe
gcc/doc/tm.texi:2334:the\nthe
gcc/doc/tm.texi.in:96:the\nthe
gcc/doc/tm.texi.in:2324:the\nthe
gcc/fortran/frontend-passes.c:888:the\n	       the
gcc/fortran/gfortran.texi:813:and and
gcc/fortran/intrinsic.texi:2766:the the
gcc/fortran/intrinsic.texi:2808:the the
gcc/fortran/target-memory.c:498:the the
gcc/fortran/trans-decl.c:1700:the the
gcc/fortran/trans-decl.c:1783:the the
gcc/fortran/trans-expr.c:3602:to\n     to
gcc/fortran/trans-types.c:2228:the the
gcc/gengtype.c:1955:the the
gcc/genhooks.c:40:the the
gcc/gimple.c:2317:the the
gcc/go/gofrontend/backend.h:151:the the
gcc/go/gofrontend/gogo-tree.cc:2179:the the
gcc/haifa-sched.c:854:the\n     the
gcc/ipa-prop.c:1519:and and
gcc/ira-emit.c:232:the the
gcc/ira-int.h:808:the the
gcc/java/jcf-parse.c:1765:to to
gcc/lto-streamer.c:532:the the
gcc/lto/lto.c:189:the the
gcc/matrix-reorg.c:849:to to
gcc/objc/objc-next-runtime-abi-02.c:2162:the the
gcc/regs.h:47:or or
gcc/regstat.c:45:or or
gcc/sel-sched.c:2744:to to
gcc/targhooks.c:1193:the the
gcc/testsuite/ada/acats/tests/c4/c460011.a:40:the the
gcc/testsuite/ada/acats/tests/c9/c954013.a:366:the the
gcc/testsuite/gcc.c-torture/compile/20011106-2.c:1:the the
gcc/testsuite/gcc.c-torture/execute/980709-1.x:4:the the
gcc/testsuite/gcc.c-torture/execute/990826-0.x:4:the the
gcc/testsuite/gcc.dg/vect/vect-peel-1.c:17:the \n     the
gcc/testsuite/gcc.target/mips/inter/mips16_stubs_1_x.c:92:and and
gcc/testsuite/gfortran.dg/alloc_comp_assign_10.f90:34:if \n      if
gcc/testsuite/gfortran.dg/alloc_comp_basics_1.f90:124:if\n        if
gcc/testsuite/gfortran.dg/alloc_comp_basics_1.f90:133:if\n            if
gcc/testsuite/gfortran.dg/allocatable_scalar_4.f90:73:if\n    if
gcc/testsuite/gfortran.dg/any_all_2.f90:12:if\n\n  if
gcc/testsuite/gfortran.dg/append_1.f90:30:if\n        if
gcc/testsuite/gfortran.dg/auto_char_dummy_array_1.f90:43:if\n\n    if
gcc/testsuite/gfortran.dg/bind_c_dts_2.f03:34:if\n\n    if
gcc/testsuite/gfortran.dg/bind_c_dts_2.f03:39:if\n\n    if
gcc/testsuite/gfortran.dg/bind_c_dts_2.f03:43:if\n\n    if
gcc/testsuite/gfortran.dg/bind_c_dts_2.f03:47:if\n\n    if
gcc/testsuite/gfortran.dg/bind_c_dts_2.f03:51:if\n\n    if
gcc/testsuite/gfortran.dg/bind_c_dts_2.f03:55:if\n\n    if
gcc/testsuite/gfortran.dg/bound_2.f90:211:if\n\n    if
gcc/testsuite/gfortran.dg/bound_7.f90:215:if\n\n    if
gcc/testsuite/gfortran.dg/bounds_check_15.f90:30:if\n    if
gcc/testsuite/gfortran.dg/c_assoc_2.f03:13:if\n    \n    if
gcc/testsuite/gfortran.dg/c_assoc_2.f03:17:if\n\n    if
gcc/testsuite/gfortran.dg/c_assoc_2.f03:21:if\n\n    if
gcc/testsuite/gfortran.dg/c_assoc_2.f03:29:if\n\n    if
gcc/testsuite/gfortran.dg/c_loc_tests_2.f03:40:if\n    if
gcc/testsuite/gfortran.dg/c_loc_tests_2.f03:75:if\n    if
gcc/testsuite/gfortran.dg/default_format_1.inc:29:if\n\n    if
gcc/testsuite/gfortran.dg/default_format_1.inc:61:if\n\n    if
gcc/testsuite/gfortran.dg/default_format_2.inc:30:if\n\n    if
gcc/testsuite/gfortran.dg/dup_save_1.f90:9:if\n     if
gcc/testsuite/gfortran.dg/dup_save_1.f90:12:if\n     if
gcc/testsuite/gfortran.dg/dup_save_1.f90:15:if\n     if
gcc/testsuite/gfortran.dg/dup_save_2.f90:10:if\n     if
gcc/testsuite/gfortran.dg/dup_save_2.f90:13:if\n     if
gcc/testsuite/gfortran.dg/dup_save_2.f90:16:if\n     if
gcc/testsuite/gfortran.dg/ftell_3.f90:33:if\n  if
gcc/testsuite/gfortran.dg/func_result_1.f90:2:the the
gcc/testsuite/gfortran.dg/goto_2.f90:14:if\n    if
gcc/testsuite/gfortran.dg/graphite/run-id-1.f:41:if\n\n      if
gcc/testsuite/gfortran.dg/intrinsic_modulo_1.f90:30:if\n    if
gcc/testsuite/gfortran.dg/iso_c_binding_rename_1.f03:42:if\n    if
gcc/testsuite/gfortran.dg/iso_c_binding_rename_1.f03:55:if\n\n    if
gcc/testsuite/gfortran.dg/iso_c_binding_rename_1.f03:76:if\n    \n    if
gcc/testsuite/gfortran.dg/list_read_3.f90:21:if\n\n  if
gcc/testsuite/gfortran.dg/loc_2.f90:50:if\n     if
gcc/testsuite/gfortran.dg/loc_2.f90:54:if\n     if
gcc/testsuite/gfortran.dg/loc_2.f90:58:if\n     if
gcc/testsuite/gfortran.dg/loc_2.f90:70:if\n        if
gcc/testsuite/gfortran.dg/loc_2.f90:75:if\n        if
gcc/testsuite/gfortran.dg/loc_2.f90:80:if\n        if
gcc/testsuite/gfortran.dg/loc_2.f90:93:if\n           if
gcc/testsuite/gfortran.dg/loc_2.f90:98:if\n           if
gcc/testsuite/gfortran.dg/loc_2.f90:103:if\n           if
gcc/testsuite/gfortran.dg/matmul_6.f90:46:if\n        if
gcc/testsuite/gfortran.dg/missing_derived_type_1.f90:2:the the
gcc/testsuite/gfortran.dg/namelist_27.f90:55:if\n       if
gcc/testsuite/gfortran.dg/use_rename_1.f90:3:the the
gcc/testsuite/gfortran.dg/vect/fast-math-vect-8.f90:76:if\n    if
gcc/testsuite/gfortran.dg/whole_file_27.f90:165:if\n  if
gcc/testsuite/gfortran.fortran-torture/compile/emptyif.f90:9:if\n   \n   if
gcc/testsuite/gfortran.fortran-torture/compile/emptyif.f90:14:if\n\n   if
gcc/testsuite/gfortran.fortran-torture/compile/emptyif.f90:19:if\n\n   if
gcc/testsuite/gfortran.fortran-torture/compile/emptyif.f90:26:if\n\n   if
gcc/testsuite/gfortran.fortran-torture/compile/emptyif.f90:33:if\n\n   if
gcc/testsuite/gfortran.fortran-torture/execute/allocate.f90:18:if\n  if
gcc/testsuite/gfortran.fortran-torture/execute/emptyif.f90:17:if\n  if
gcc/testsuite/gfortran.fortran-torture/execute/forall_7.f90:79:if\n	  if
gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_fraction_exponent.f90:68:if\nif
gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_fraction_exponent.f90:81:if\nif
gcc/testsuite/gfortran.fortran-torture/execute/save_2.f90:16:if\n	if
gcc/testsuite/objc-obj-c++-shared/objc-test-suite-next-encode-assist-impl.h:679:the the
gcc/testsuite/objc/execute/next_mapping.h:752:the the
gcc/tree-loop-distribution.c:107:the the
gcc/tree-sra.c:2338:the\n   the
gcc/tree-ssa-alias.c:519:the the
gcc/tree-ssa-dom.c:337:the the
gcc/tree-ssa-pre.c:4683:then then
gcc/tree-vect-data-refs.c:1498:the\n                 the
gcc/tree-vrp.c:927:to to
gcc/tree-vrp.c:980:to to
gcc/tree-vrp.c:7092:the\n     the
gcc/tree.c:7606:the\n   the
libdecnumber/decCommon.c:391:the the
libffi/README:105:the the
libffi/src/dlmalloc.c:103:if if
libffi/src/dlmalloc.c:1616:the the
libffi/src/dlmalloc.c:3436:or\n       or
libgfortran/configure.host:4:the the
libgo/config/ltmain.sh:570:and and
libgo/go/go/printer/nodes.go:273:the the
libgo/go/math/remainder.go:7:the the
libgo/go/regexp/regexp.go:712:to to
libgo/go/runtime/extern.go:23:the the
libgo/go/tabwriter/tabwriter.go:582:the the
libgomp/testsuite/libgomp.fortran/allocatable6.f90:27:if\n    if
libgomp/testsuite/libgomp.fortran/omp_parse1.f90:177:if\n    if
libgomp/testsuite/libgomp.fortran/omp_parse2.f90:98:if\n    if
libiberty/regex.c:5434:the\n   the
libjava/classpath/external/w3c_dom/org/w3c/dom/Document.java:263:the the
libjava/classpath/external/w3c_dom/org/w3c/dom/bootstrap/DOMImplementationRegistry.java:89:the the
libjava/classpath/gnu/CORBA/CDR/AbstractCdrInput.java:1073:the the
libjava/classpath/gnu/CORBA/NamingService/Ext.java:59:the the
libjava/classpath/gnu/CORBA/NamingService/TransientContext.java:320:the the
libjava/classpath/gnu/java/awt/font/opentype/NameDecoder.java:324:and and
libjava/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java:101:the the
libjava/classpath/gnu/java/awt/java2d/PixelCoverage.java:65:the the
libjava/classpath/gnu/java/awt/java2d/ScanlineCoverage.java:402:the the
libjava/classpath/gnu/javax/crypto/sasl/UserAlreadyExistsException.java:45:the the
libjava/classpath/gnu/javax/imageio/jpeg/JPEGImageInputStream.java:145:the the
libjava/classpath/gnu/javax/naming/giop/ListBindingsEnumeration.java:72:the the
libjava/classpath/gnu/javax/naming/giop/ListEnumeration.java:69:the the
libjava/classpath/gnu/javax/print/ipp/IppRequest.java:816:the the
libjava/classpath/gnu/javax/print/ipp/IppStatusCode.java:116:the the
libjava/classpath/gnu/javax/swing/text/html/parser/models/node.java:183:the the
libjava/classpath/gnu/javax/swing/text/html/parser/support/Parser.java:233:the the
libjava/classpath/java/awt/font/ImageGraphicAttribute.java:146:the the
libjava/classpath/java/awt/geom/Area.java:836:the the
libjava/classpath/java/awt/geom/QuadCurve2D.java:323:the the
libjava/classpath/java/awt/image/IndexColorModel.java:53:the the
libjava/classpath/java/beans/PropertyDescriptor.java:285:the the
libjava/classpath/java/io/ByteArrayOutputStream.java:133:the the
libjava/classpath/java/io/CharArrayWriter.java:144:the the
libjava/classpath/java/lang/Boolean.java:148:the the
libjava/classpath/java/lang/Math.java:108:the the
libjava/classpath/java/lang/Math.java:127:the the
libjava/classpath/java/lang/StrictMath.java:114:the the
libjava/classpath/java/lang/StrictMath.java:132:the the
libjava/classpath/java/lang/reflect/Array.java:139:the the
libjava/classpath/java/math/BigInteger.java:2219:the the
libjava/classpath/java/math/BigInteger.java:2235:the the
libjava/classpath/java/net/URL.java:337:then then
libjava/classpath/java/net/URL.java:361:then then
libjava/classpath/java/net/URLClassLoader.java:406:the the
libjava/classpath/java/net/URLConnection.java:306:the the
libjava/classpath/java/nio/ByteBuffer.java:152:the the
libjava/classpath/java/nio/ByteBuffer.java:181:the the
libjava/classpath/java/nio/ByteBuffer.java:209:the the
libjava/classpath/java/nio/CharBuffer.java:188:the the
libjava/classpath/java/nio/CharBuffer.java:217:the the
libjava/classpath/java/nio/CharBuffer.java:245:the the
libjava/classpath/java/nio/DoubleBuffer.java:134:the the
libjava/classpath/java/nio/DoubleBuffer.java:163:the the
libjava/classpath/java/nio/DoubleBuffer.java:191:the the
libjava/classpath/java/nio/FloatBuffer.java:134:the the
libjava/classpath/java/nio/FloatBuffer.java:163:the the
libjava/classpath/java/nio/FloatBuffer.java:191:the the
libjava/classpath/java/nio/IntBuffer.java:135:the the
libjava/classpath/java/nio/IntBuffer.java:164:the the
libjava/classpath/java/nio/IntBuffer.java:192:the the
libjava/classpath/java/nio/LongBuffer.java:134:the the
libjava/classpath/java/nio/LongBuffer.java:163:the the
libjava/classpath/java/nio/LongBuffer.java:191:the the
libjava/classpath/java/nio/ShortBuffer.java:135:the the
libjava/classpath/java/nio/ShortBuffer.java:164:the the
libjava/classpath/java/nio/ShortBuffer.java:192:the the
libjava/classpath/java/security/AccessControlContext.java:49:the the
libjava/classpath/java/security/Signer.java:75:the the
libjava/classpath/java/util/TreeMap.java:2207:the the
libjava/classpath/java/util/TreeMap.java:2302:the the
libjava/classpath/java/util/TreeMap.java:2347:the the
libjava/classpath/java/util/TreeMap.java:2406:the the
libjava/classpath/java/util/TreeSet.java:463:the the
libjava/classpath/java/util/TreeSet.java:483:the the
libjava/classpath/java/util/logging/LogRecord.java:541:the the
libjava/classpath/java/util/logging/Logger.java:338:the the
libjava/classpath/java/util/logging/Logger.java:352:the the
libjava/classpath/javax/imageio/spi/ServiceRegistry.java:407:if if
libjava/classpath/javax/imageio/spi/ServiceRegistry.java:460:if if
libjava/classpath/javax/management/ObjectInstance.java:105:the the
libjava/classpath/javax/print/package.html:89:the the
libjava/classpath/javax/swing/ImageIcon.java:385:the the
libjava/classpath/javax/swing/ImageIcon.java:398:the the
libjava/classpath/javax/swing/JComponent.java:2456:the the
libjava/classpath/javax/swing/JFileChooser.java:646:the the
libjava/classpath/javax/swing/JTable.java:2843:the the
libjava/classpath/javax/swing/JTree.java:223:the the
libjava/classpath/javax/swing/JTree.java:1453:to to
libjava/classpath/javax/swing/SwingUtilities.java:1451:the the
libjava/classpath/javax/swing/border/SoftBevelBorder.java:105:if if
libjava/classpath/javax/swing/plaf/BorderUIResource.java:318:if if
libjava/classpath/javax/swing/plaf/ComponentUI.java:95:the the
libjava/classpath/javax/swing/plaf/basic/BasicBorders.java:805:the the
libjava/classpath/javax/swing/plaf/basic/BasicScrollBarUI.java:771:the the
libjava/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java:571:the the
libjava/classpath/javax/swing/text/html/CSSParser.java:294:the the
libjava/classpath/javax/swing/text/html/HRuleView.java:116:the the
libjava/classpath/javax/swing/tree/FixedHeightLayoutCache.java:406:the the
libjava/classpath/javax/swing/tree/VariableHeightLayoutCache.java:420:the the
libjava/classpath/javax/swing/undo/CompoundEdit.java:56:the the
libjava/classpath/javax/swing/undo/CompoundEdit.java:151:the the
libjava/classpath/ltmain.sh:547:and and
libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c:133:if if
libjava/classpath/org/ietf/jgss/GSSContext.java:418:the the
libjava/classpath/org/ietf/jgss/GSSContext.java:458:the the
libjava/classpath/org/ietf/jgss/GSSCredential.java:109:the the
libjava/classpath/org/omg/CORBA/ARG_INOUT.java:42:the the
libjava/classpath/org/omg/IOP/CodecOperations.java:119:the the
libjava/classpath/org/omg/PortableInterceptor/ClientRequestInfoOperations.java:226:the the
libjava/classpath/org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java:92:and and
libjava/classpath/org/omg/PortableInterceptor/ObjectReferenceTemplateSeqHelper.java:69:the the
libjava/classpath/org/omg/PortableServer/POAOperations.java:190:the the
libjava/classpath/org/omg/PortableServer/POAOperations.java:216:the the
libjava/classpath/org/omg/PortableServer/package.html:214:the the
libjava/classpath/scripts/check_jni_methods.sh.in:24:the the
libjava/classpath/tools/gnu/classpath/tools/NotifyingInputStreamReader.java:127:to to
libjava/configure.ac:670:if if
libjava/configure.host:4:the the
libjava/gnu/gcj/runtime/PersistentByteMap.java:23:the the
libjava/gnu/gcj/runtime/PersistentByteMap.java:438:the the
libjava/include/config.h.in:432:if if
libjava/include/jni_md.h:52:and and
libjava/java/lang/Math.java:100:the the
libjava/java/lang/Math.java:119:the the
libjava/java/lang/natObject.cc:507:the the
libjava/java/lang/reflect/Array.java:126:the the
libjava/java/util/logging/Logger.java:356:the the
libjava/java/util/logging/Logger.java:373:the the
libjava/jvmti.cc:1088:the the
libjava/testsuite/lib/libjava.exp:248:the the
libobjc/encoding.c:1154:the the
libstdc++-v3/configure.host:4:the the
libstdc++-v3/doc/html/ext/lwg-closed.html:2966:the the
libstdc++-v3/doc/html/ext/lwg-closed.html:7942:the the
libstdc++-v3/doc/html/ext/lwg-closed.html:10676:the the
libstdc++-v3/doc/html/ext/lwg-defects.html:4763:the the
libstdc++-v3/doc/html/ext/lwg-defects.html:12751:the the
libstdc++-v3/doc/html/ext/lwg-defects.html:13413:the the
libstdc++-v3/doc/html/ext/lwg-defects.html:19629:the the
libstdc++-v3/doc/html/ext/lwg-defects.html:24715:the the
libstdc++-v3/doc/html/ext/lwg-defects.html:41449:the the
libstdc++-v3/doc/html/ext/lwg-defects.html:46044:the the
libstdc++-v3/doc/html/ext/lwg-defects.html:70907:the the
libstdc++-v3/doc/html/ext/lwg-defects.html:72274:the the
libstdc++-v3/doc/html/ext/lwg-defects.html:79177:the the
libstdc++-v3/doc/html/ext/pb_ds/introduction.html:113:the the
libstdc++-v3/doc/html/ext/pb_ds/motivation.html:668:the\n      the
libstdc++-v3/doc/html/ext/pb_ds/tree_order_statistics_timing_test.html:15:the the
libstdc++-v3/testsuite/data/thirty_years_among_the_dead_preproc.txt:2652:the\nthe
ltmain.sh:570:and and
zlib/contrib/asm586/README.586:8:the the
zlib/contrib/minizip/unzip.c:407:the the
zlib/contrib/minizip/zip.c:552:the the
zlib/contrib/minizip/zip.h:154:the the
zlib/contrib/minizip/zip.h:156:the the
zlib/contrib/puff/puff.c:20:to to
zlib/deflate.c:166:to to
zlib/deflate.c:179:to to
zlib/old/visual-basic.txt:118:the the

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: doubled words
  2011-04-10 11:55 doubled words Jim Meyering
@ 2011-04-10 18:01 ` Mike Stump
  2011-04-10 21:07   ` Jim Meyering
  2011-04-10 18:21 ` Mike Stump
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Mike Stump @ 2011-04-10 18:01 UTC (permalink / raw)
  To: Jim Meyering; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

On Apr 10, 2011, at 4:54 AM, Jim Meyering wrote:
> I've noticed/fixed a few occurrences of doubled words like "the the",
> "to to"

I fixed all the non-surious matches in the gcc/testsuite.  if if in the fortran testsuite was the major spurious match.  Thanks.


[-- Attachment #2: double.patch.txt --]
[-- Type: text/plain, Size: 7182 bytes --]

Index: gcc.target/mips/inter/mips16_stubs_1_x.c
===================================================================
--- gcc.target/mips/inter/mips16_stubs_1_x.c	(revision 172244)
+++ gcc.target/mips/inter/mips16_stubs_1_x.c	(working copy)
@@ -89,7 +89,7 @@
 #define CHECK_RESULT(x, y) if ((x) != (y)) abort ()
 #define CHECK_VOID_RESULT(x, y)  CHECK_RESULT (((x), the_result), y)
 
-/* Call functions through pointers and and check against expected results.  */
+/* Call functions through pointers and check against expected results.  */
 void
 test (void)
 {
Index: gfortran.dg/func_result_1.f90
===================================================================
--- gfortran.dg/func_result_1.f90	(revision 172244)
+++ gfortran.dg/func_result_1.f90	(working copy)
@@ -1,5 +1,5 @@
 ! { dg-do run }
-! From PR 19673 : We didn't dereference the the result from POINTER
+! From PR 19673 : We didn't dereference the result from POINTER
 ! functions with a RESULT clause
 program ret_ptr
   if (foo(99) /= bar(99)) call abort ()
Index: gfortran.dg/use_rename_1.f90
===================================================================
--- gfortran.dg/use_rename_1.f90	(revision 172244)
+++ gfortran.dg/use_rename_1.f90	(working copy)
@@ -1,6 +1,6 @@
 ! { dg-do compile }
 ! Tests the fix for PR34854, in which the second of the two subroutines would fail
-! because the the type declaration of nmoltype_phase would incorrectly conflict
+! because the type declaration of nmoltype_phase would incorrectly conflict
 ! with the type given to the module variable of the same name.
 !
 ! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Index: gfortran.dg/missing_derived_type_1.f90
===================================================================
--- gfortran.dg/missing_derived_type_1.f90	(revision 172244)
+++ gfortran.dg/missing_derived_type_1.f90	(working copy)
@@ -1,5 +1,5 @@
 ! { dg-do compile }
-! Tests the fix for PR29364, in which the the absence of the derived type
+! Tests the fix for PR29364, in which the absence of the derived type
 ! 'nonexist' was not diagnosed.
 !
 ! Contributed by Tobias Burnus  <tobias.burnus@physik.fu-berlin.de>
Index: gcc.c-torture/execute/990826-0.x
===================================================================
--- gcc.c-torture/execute/990826-0.x	(revision 172244)
+++ gcc.c-torture/execute/990826-0.x	(working copy)
@@ -1,7 +1,7 @@
 # XFAIL this test for AIX using -msoft-float.
 # This test calls the system libm.a function floor.
 # A false failure is reported if -msoft-float is used.
-# AIX expects the the parameters to be passed in fp regs. 
+# AIX expects the parameters to be passed in fp regs. 
 if { [istarget powerpc-*-aix*] || [istarget rs6000-*-aix*] } {
     set torture_eval_before_execute {
 	global compiler_conditional_xfail_data
Index: gcc.c-torture/execute/980709-1.x
===================================================================
--- gcc.c-torture/execute/980709-1.x	(revision 172244)
+++ gcc.c-torture/execute/980709-1.x	(working copy)
@@ -1,7 +1,7 @@
 # XFAIL this test for AIX using -msoft-float.
 # This test calls the system libm.a function pow.
 # A false failure is reported if -msoft-float is used.
-# AIX expects the the parameters to be passed in fp regs. 
+# AIX expects the parameters to be passed in fp regs. 
 if { [istarget powerpc-*-aix*] || [istarget rs6000-*-aix*] } {
     set torture_eval_before_execute {
 	global compiler_conditional_xfail_data
Index: gcc.c-torture/compile/20011106-2.c
===================================================================
--- gcc.c-torture/compile/20011106-2.c	(revision 172244)
+++ gcc.c-torture/compile/20011106-2.c	(working copy)
@@ -1,4 +1,4 @@
-/* Test the the type of a component of a conditional expression between
+/* Test the type of a component of a conditional expression between
    two structures is correct.  */
 /* Origin: Joseph Myers <jsm28@cam.ac.uk>.  */
 
Index: ada/acats/tests/c4/c460011.a
===================================================================
--- ada/acats/tests/c4/c460011.a	(revision 172244)
+++ ada/acats/tests/c4/c460011.a	(working copy)
@@ -37,7 +37,7 @@
 --      and greater than the value of the mod.
 --      Declare a generic test procedure and instantiate it for each of the
 --      unsigned types for each operand type.
---      Check that the the operand is properly rounded during the conversion.
+--      Check that the operand is properly rounded during the conversion.
 --
 -- APPLICABILITY CRITERIA:
 --      This test is applicable to all implementations which support
Index: ada/acats/tests/c9/c954013.a
===================================================================
--- ada/acats/tests/c9/c954013.a	(revision 172244)
+++ ada/acats/tests/c9/c954013.a	(working copy)
@@ -363,7 +363,7 @@
                -- Show that this message did pass through the Distributor Task
                Transaction.TC_Thru_Dist := true;
 
-               -- Pass this transaction on the the appropriate computation
+               -- Pass this transaction on the appropriate computation
                -- task
                case Transaction.Code is 
                   when Credit =>
Index: gcc.dg/vect/vect-peel-1.c
===================================================================
--- gcc.dg/vect/vect-peel-1.c	(revision 172244)
+++ gcc.dg/vect/vect-peel-1.c	(working copy)
@@ -14,10 +14,10 @@
   int i;
   int ia[N+1];
 
-  /* All the accesses are misaligned. With cost model disabled, we count the 
-     the number of aligned accesses for each peeling option, and in this case
-     we align the two loads if possible (i.e., if misaligned stores are 
-     supported).  */
+  /* All the accesses are misaligned. With cost model disabled, we
+     count the number of aligned accesses for each peeling option, and
+     in this case we align the two loads if possible (i.e., if
+     misaligned stores are supported).  */
   for (i = 1; i <= N; i++)
     {
       ia[i] = ib[i+2] + ib[i+6];
Index: objc-obj-c++-shared/objc-test-suite-next-encode-assist-impl.h
===================================================================
--- objc-obj-c++-shared/objc-test-suite-next-encode-assist-impl.h	(revision 172244)
+++ objc-obj-c++-shared/objc-test-suite-next-encode-assist-impl.h	(working copy)
@@ -676,7 +676,7 @@
          && *ntype++ != '=')
     /* do nothing */;
 
-  /* If there's a "<name>=", ntype - 1 points to '='; skip the the name */
+  /* If there's a "<name>=", ntype - 1 points to '='; skip the name */
   if (*(ntype - 1) == '=')
     type = ntype;
 
Index: objc/execute/next_mapping.h
===================================================================
--- objc/execute/next_mapping.h	(revision 172244)
+++ objc/execute/next_mapping.h	(working copy)
@@ -749,7 +749,7 @@
          && *ntype++ != '=')
     /* do nothing */;
 
-  /* If there's a "<name>=", ntype - 1 points to '='; skip the the name */
+  /* If there's a "<name>=", ntype - 1 points to '='; skip the name */
   if (*(ntype - 1) == '=')
     type = ntype;
 

[-- Attachment #3: Type: text/plain, Size: 1 bytes --]



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: doubled words
  2011-04-10 11:55 doubled words Jim Meyering
  2011-04-10 18:01 ` Mike Stump
@ 2011-04-10 18:21 ` Mike Stump
  2011-04-10 19:07 ` Mike Stump
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Mike Stump @ 2011-04-10 18:21 UTC (permalink / raw)
  To: Jim Meyering; +Cc: gcc-patches

On Apr 10, 2011, at 4:54 AM, Jim Meyering wrote:
> I would be inclined to prepare a patch if I thought it would
> be applied (promptly?), but I submitted a clear/simple fix for
> an obvious double-free bug (albeit only in a test case) a month ago:
> 
> 	http://patchwork.ozlabs.org/patch/85973/
> 	avoid memory overrun in a test leading to potential double-free
> 	* testsuite/test-expandargv.c (writeout_test): Fix off-by-one error:
> 	i.e., do copy the trailing NUL byte.
> 
> AFAIK, it hasn't been applied.  If a "real" bug has such low priority,
> this is not a good time to submit a clean-up change.

So, my recommendation would be to treat each patch by itself.  I know how you feel.  I've applied it as it was previous approved.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: doubled words
  2011-04-10 11:55 doubled words Jim Meyering
  2011-04-10 18:01 ` Mike Stump
  2011-04-10 18:21 ` Mike Stump
@ 2011-04-10 19:07 ` Mike Stump
  2011-04-10 20:42   ` Jim Meyering
  2011-04-10 19:28 ` Joseph S. Myers
  2011-04-10 19:34 ` Joseph S. Myers
  4 siblings, 1 reply; 10+ messages in thread
From: Mike Stump @ 2011-04-10 19:07 UTC (permalink / raw)
  To: Jim Meyering; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 763 bytes --]

On Apr 10, 2011, at 4:54 AM, Jim Meyering wrote:
> I've noticed/fixed a few occurrences of doubled words like "the the",

I've fixed the obviously wrong ones in gcc/.* excluding ada and go.  I don't hate Ada and go, since I don't pretend to keep up on rules to their parts of the tree.  I did do java, but only gcc/java, as I think we still can put in obvious work there.  One or more of the ones you listed were spurious, I didn't change those.

I'm skipping everything not gcc/.*, as I don't keep up on the various rules.  One disadvantage of having a multiplicity of rules.  :-(  Longer term, would be nice to remove some of the multiplicity of rules.

I also re-flowed a few of these to make them prettier and fixed the English on a few.

Thanks.


[-- Attachment #2: double.patch.txt --]
[-- Type: text/plain, Size: 31283 bytes --]

Index: doc/tm.texi
===================================================================
--- doc/tm.texi	(revision 172246)
+++ doc/tm.texi	(working copy)
@@ -94,7 +94,7 @@
 Similarly, there is a @code{targetcm} variable for hooks that are
 specific to front ends for C-family languages, documented as ``C
 Target Hook''.  This is declared in @file{c-family/c-target.h}, the
-the initializer @code{TARGETCM_INITIALIZER} in
+initializer @code{TARGETCM_INITIALIZER} in
 @file{c-family/c-target-def.h}.  If targets initialize @code{targetcm}
 themselves, they should set @code{target_has_targetcm=yes} in
 @file{config.gcc}; otherwise a default definition is used.
@@ -2332,7 +2332,7 @@
 certain operand, you should define a class @code{FLOAT_OR_GENERAL_REGS}
 which includes both of them.  Otherwise you will get suboptimal code,
 or even internal compiler errors when reload cannot find a register in the
-the class computed via @code{reg_class_subunion}.
+class computed via @code{reg_class_subunion}.
 
 You must also specify certain redundant information about the register
 classes: for each class, which classes contain it and which ones are
Index: doc/tm.texi.in
===================================================================
--- doc/tm.texi.in	(revision 172246)
+++ doc/tm.texi.in	(working copy)
@@ -94,7 +94,7 @@
 Similarly, there is a @code{targetcm} variable for hooks that are
 specific to front ends for C-family languages, documented as ``C
 Target Hook''.  This is declared in @file{c-family/c-target.h}, the
-the initializer @code{TARGETCM_INITIALIZER} in
+initializer @code{TARGETCM_INITIALIZER} in
 @file{c-family/c-target-def.h}.  If targets initialize @code{targetcm}
 themselves, they should set @code{target_has_targetcm=yes} in
 @file{config.gcc}; otherwise a default definition is used.
@@ -2322,7 +2322,7 @@
 certain operand, you should define a class @code{FLOAT_OR_GENERAL_REGS}
 which includes both of them.  Otherwise you will get suboptimal code,
 or even internal compiler errors when reload cannot find a register in the
-the class computed via @code{reg_class_subunion}.
+class computed via @code{reg_class_subunion}.
 
 You must also specify certain redundant information about the register
 classes: for each class, which classes contain it and which ones are
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 172246)
+++ doc/invoke.texi	(working copy)
@@ -7708,7 +7708,7 @@
 
 This option enables the extraction of object files with GIMPLE bytecode out of
 library archives. This improves the quality of optimization by exposing more
-code the the link time optimizer.  This information specify what symbols 
+code the link time optimizer.  This information specify what symbols 
 can be accessed externally (by non-LTO object or during dynamic linking).
 Resulting code quality improvements on binaries (and shared libraries that do
 use hidden visibility) is similar to @code{-fwhole-program}.  See
Index: targhooks.c
===================================================================
--- targhooks.c	(revision 172246)
+++ targhooks.c	(working copy)
@@ -1189,9 +1189,10 @@
   else if (!caller_opts)
     ret = false;
 
-  /* If both caller and callee have attributes, assume that if the pointer is
-     different, the the two functions have different target options since
-     build_target_option_node uses a hash table for the options.  */
+  /* If both caller and callee have attributes, assume that if the
+     pointer is different, the two functions have different target
+     options since build_target_option_node uses a hash table for the
+     options.  */
   else
     ret = (callee_opts == caller_opts);
 
Index: regstat.c
===================================================================
--- regstat.c	(revision 172246)
+++ regstat.c	(working copy)
@@ -42,7 +42,7 @@
    REG_N_SETS and REG_N_REFS.
    ----------------------------------------------------------------------------*/
 
-/* If a pass need to change these values in some magical way or or the
+/* If a pass need to change these values in some magical way or the
    pass needs to have accurate values for these and is not using
    incremental df scanning, then it should use REG_N_SETS and
    REG_N_USES.  If the pass is doing incremental scanning then it
Index: c-family/c-ada-spec.c
===================================================================
--- c-family/c-ada-spec.c	(revision 172246)
+++ c-family/c-ada-spec.c	(working copy)
@@ -3233,7 +3233,7 @@
 
   pkg_name = get_ada_package (source_file);
 
-  /* Construct the the .ads filename and package name.  */
+  /* Construct the .ads filename and package name.  */
   ads_name = xstrdup (pkg_name);
 
   for (s = ads_name; *s; s++)
Index: gengtype.c
===================================================================
--- gengtype.c	(revision 172246)
+++ gengtype.c	(working copy)
@@ -1952,7 +1952,7 @@
 
 /* An output file, suitable for definitions, that can see declarations
    made in INPF and is linked into every language that uses INPF.
-   Since the the result is cached inside INPF, that argument cannot be
+   Since the result is cached inside INPF, that argument cannot be
    declared constant, but is "almost" constant. */
 
 outf_p
Index: java/jcf-parse.c
===================================================================
--- java/jcf-parse.c	(revision 172246)
+++ java/jcf-parse.c	(working copy)
@@ -1762,7 +1762,7 @@
 	      next = list + count;
 	      avail = avail - count;
 	    }
-	  /* Subtract to to guarantee space for final '\0'. */
+	  /* Subtract one to guarantee space for final '\0'. */
 	  count = fread (next, 1, avail - 1, finput);
 	  if (count == 0)
 	    {
Index: objc/objc-next-runtime-abi-02.c
===================================================================
--- objc/objc-next-runtime-abi-02.c	(revision 172246)
+++ objc/objc-next-runtime-abi-02.c	(working copy)
@@ -2159,7 +2159,7 @@
     }
 
     /* TODO: delete the vec.  */
-    /* TODO: upgrade to the the clang/llvm hidden version.  */
+    /* TODO: upgrade to the clang/llvm hidden version.  */
 }
 
 /* This routine declares a variable to hold meta data for 'struct
Index: cgraphunit.c
===================================================================
--- cgraphunit.c	(revision 172246)
+++ cgraphunit.c	(working copy)
@@ -45,9 +45,9 @@
       This function is called once (source level) compilation unit is finalized
       and it will no longer change.
 
-      In the the call-graph construction and local function
-      analysis takes place here.  Bodies of unreachable functions are released
-      to conserve memory usage.
+      In the call-graph construction and local function analysis takes
+      place here.  Bodies of unreachable functions are released to
+      conserve memory usage.
 
       The function can be called multiple times when multiple source level
       compilation units are combined (such as in C frontend)
Index: regs.h
===================================================================
--- regs.h	(revision 172246)
+++ regs.h	(working copy)
@@ -44,7 +44,7 @@
    regstat_init_n_sets_and_refs from the current values of
    DF_REG_DEF_COUNT and DF_REG_USE_COUNT.  REG_N_REFS and REG_N_SETS
    should only be used if a pass need to change these values in some
-   magical way or or the pass needs to have accurate values for these
+   magical way or the pass needs to have accurate values for these
    and is not using incremental df scanning.
 
    At the end of a pass that uses REG_N_REFS and REG_N_SETS, a call
Index: cp/decl.c
===================================================================
--- cp/decl.c	(revision 172246)
+++ cp/decl.c	(working copy)
@@ -1089,7 +1089,7 @@
     return;
 
   /* If the old declaration was `static', or the new one isn't, then
-     then everything is OK.  */
+     everything is OK.  */
   if (DECL_THIS_STATIC (olddecl) || !DECL_THIS_STATIC (newdecl))
     return;
 
Index: cp/name-lookup.c
===================================================================
--- cp/name-lookup.c	(revision 172246)
+++ cp/name-lookup.c	(working copy)
@@ -4146,10 +4146,10 @@
   /* Look through namespace aliases.  */
   scope = ORIGINAL_NAMESPACE (scope);
 
-  /* Algorithm: Starting with SCOPE, walk through the the set of used
+  /* Algorithm: Starting with SCOPE, walk through the set of used
      namespaces.  For each used namespace, look through its inline
-     namespace set for any bindings and usings.  If no bindings are found,
-     add any usings seen to the set of used namespaces.  */
+     namespace set for any bindings and usings.  If no bindings are
+     found, add any usings seen to the set of used namespaces.  */
   VEC_safe_push (tree, gc, todo, scope);
 
   while (VEC_length (tree, todo))
Index: haifa-sched.c
===================================================================
--- haifa-sched.c	(revision 172246)
+++ haifa-sched.c	(working copy)
@@ -852,7 +852,7 @@
   /* A USE insn should never require the value used to be computed.
      This allows the computation of a function's result and parameter
      values to overlap the return and call.  We don't care about the
-     the dependence cost when only decreasing register pressure.  */
+     dependence cost when only decreasing register pressure.  */
   if (recog_memoized (used) < 0)
     {
       cost = 0;
Index: ira-int.h
===================================================================
--- ira-int.h	(revision 172246)
+++ ira-int.h	(working copy)
@@ -805,7 +805,7 @@
   int x_ira_class_subset_p[N_REG_CLASSES][N_REG_CLASSES];
 
   /* Array of the number of hard registers of given class which are
-     available for allocation.  The order is defined by the the hard
+     available for allocation.  The order is defined by the hard
      register numbers.  */
   short x_ira_non_ordered_class_hard_regs[N_REG_CLASSES][FIRST_PSEUDO_REGISTER];
 
Index: sel-sched.c
===================================================================
--- sel-sched.c	(revision 172246)
+++ sel-sched.c	(working copy)
@@ -2741,7 +2741,7 @@
         sel_print ("real successors num: %d\n", sinfo->all_succs_n);
     }
 
-  /* Add insn to to the tail of current path.  */
+  /* Add insn to the tail of current path.  */
   ilist_add (&p, insn);
 
   FOR_EACH_VEC_ELT (rtx, sinfo->succs_ok, is, succ)
Index: cfganal.c
===================================================================
--- cfganal.c	(revision 172246)
+++ cfganal.c	(working copy)
@@ -650,7 +650,7 @@
 }
 \f
 /* Compute reverse top sort order.  This is computing a post order
-   numbering of the graph.  If INCLUDE_ENTRY_EXIT is true, then then
+   numbering of the graph.  If INCLUDE_ENTRY_EXIT is true, then
    ENTRY_BLOCK and EXIT_BLOCK are included.  If DELETE_UNREACHABLE is
    true, unreachable blocks are deleted.  */
 
Index: matrix-reorg.c
===================================================================
--- matrix-reorg.c	(revision 172246)
+++ matrix-reorg.c	(working copy)
@@ -846,7 +846,7 @@
 }
 
 /* The transposing decision making.
-   In order to to calculate the profitability of transposing, we collect two
+   In order to calculate the profitability of transposing, we collect two
    types of information regarding the accesses:
    1. profiling information used to express the hotness of an access, that
    is how often the matrix is accessed by this access site (count of the
Index: fortran/trans-expr.c
===================================================================
--- fortran/trans-expr.c	(revision 172246)
+++ fortran/trans-expr.c	(working copy)
@@ -3600,7 +3600,7 @@
   /* If there are alternate return labels, function type should be
      integer.  Can't modify the type in place though, since it can be shared
      with other functions.  For dummy arguments, the typing is done to
-     to this result, even if it has to be repeated for each call.  */
+     this result, even if it has to be repeated for each call.  */
   if (has_alternate_specifier
       && TREE_TYPE (TREE_TYPE (TREE_TYPE (se->expr))) != integer_type_node)
     {
Index: fortran/gfortran.texi
===================================================================
--- fortran/gfortran.texi	(revision 172246)
+++ fortran/gfortran.texi	(working copy)
@@ -810,7 +810,7 @@
 including @code{PASS}, @code{PROCEDURE} and @code{GENERIC}, and
 operators bound to a type.
 
-@item Abstract interfaces and and type extension with the possibility to
+@item Abstract interfaces and type extension with the possibility to
 override type-bound procedures or to have deferred binding.
 
 @item Polymorphic entities (``@code{CLASS}'') for derived types -- including
Index: fortran/trans-types.c
===================================================================
--- fortran/trans-types.c	(revision 172246)
+++ fortran/trans-types.c	(working copy)
@@ -2225,7 +2225,7 @@
     goto copy_derived_types;
 
   /* If a whole file compilation, the derived types from an earlier
-     namespace can be used as the the canonical type.  */
+     namespace can be used as the canonical type.  */
   if (gfc_option.flag_whole_file
 	&& derived->backend_decl == NULL
 	&& !derived->attr.use_assoc
Index: fortran/frontend-passes.c
===================================================================
--- fortran/frontend-passes.c	(revision 172246)
+++ fortran/frontend-passes.c	(working copy)
@@ -886,7 +886,7 @@
 	      break;
 
 	    /* Fall through to the variable case in order to walk the
-	       the reference.  */
+	       reference.  */
 
 	  case EXPR_SUBSTRING:
 	  case EXPR_VARIABLE:
Index: fortran/trans-decl.c
===================================================================
--- fortran/trans-decl.c	(revision 172246)
+++ fortran/trans-decl.c	(working copy)
@@ -1697,7 +1697,7 @@
 
   /* Initialize DECL_EXTERNAL and TREE_PUBLIC before calling decl_attributes;
      TREE_PUBLIC specifies whether a function is globally addressable (i.e.
-     the the opposite of declaring a function as static in C).  */
+     the opposite of declaring a function as static in C).  */
   DECL_EXTERNAL (fndecl) = 1;
   TREE_PUBLIC (fndecl) = 1;
 
@@ -1780,7 +1780,7 @@
 
   /* Initialize DECL_EXTERNAL and TREE_PUBLIC before calling decl_attributes;
      TREE_PUBLIC specifies whether a function is globally addressable (i.e.
-     the the opposite of declaring a function as static in C).  */
+     the opposite of declaring a function as static in C).  */
   DECL_EXTERNAL (fndecl) = 0;
 
   if (!current_function_decl
Index: fortran/target-memory.c
===================================================================
--- fortran/target-memory.c	(revision 172246)
+++ fortran/target-memory.c	(working copy)
@@ -495,7 +495,7 @@
       /* The constructor points to the component.  */
       c->n.component = cmp;
 
-      /* Calculate the offset, which consists of the the FIELD_OFFSET in
+      /* Calculate the offset, which consists of the FIELD_OFFSET in
 	 bytes, which appears in multiples of DECL_OFFSET_ALIGN-bit-sized,
 	 and additional bits of FIELD_BIT_OFFSET. The code assumes that all
 	 sizes of the components are multiples of BITS_PER_UNIT,
Index: fortran/intrinsic.texi
===================================================================
--- fortran/intrinsic.texi	(revision 172246)
+++ fortran/intrinsic.texi	(working copy)
@@ -2763,7 +2763,7 @@
 @smallexample
    use iso_fortran_env
    print '(4a)', 'This file was compiled by ', &
-                 compiler_version(), ' using the the options ', &
+                 compiler_version(), ' using the options ', &
                  compiler_options()
    end
 @end smallexample
@@ -2805,7 +2805,7 @@
 @smallexample
    use iso_fortran_env
    print '(4a)', 'This file was compiled by ', &
-                 compiler_version(), ' using the the options ', &
+                 compiler_version(), ' using the options ', &
                  compiler_options()
    end
 @end smallexample
Index: ira-emit.c
===================================================================
--- ira-emit.c	(revision 172246)
+++ ira-emit.c	(working copy)
@@ -229,7 +229,7 @@
     }
 }
 
-/* Return TRUE if the the move list LIST1 and LIST2 are equal (two
+/* Return TRUE if the move list LIST1 and LIST2 are equal (two
    moves are equal if they involve the same allocnos).  */
 static bool
 eq_move_lists_p (move_t list1, move_t list2)
Index: genhooks.c
===================================================================
--- genhooks.c	(revision 172246)
+++ genhooks.c	(working copy)
@@ -37,7 +37,7 @@
 #undef DEFHOOK
 };
 
-/* For each @Fcode in the the first paragraph of the documentation string DOC,
+/* For each @Fcode in the first paragraph of the documentation string DOC,
    print an @findex directive.  HOOK_NAME is the name of the hook this bit of
    documentation pertains to.  */
 static void
Index: lto/lto.c
===================================================================
--- lto/lto.c	(revision 172246)
+++ lto/lto.c	(working copy)
@@ -186,9 +186,10 @@
 }
 
 
-/* Decode the content of memory pointed to by DATA in the the
-   in decl state object STATE. DATA_IN points to a data_in structure for
-   decoding. Return the address after the decoded object in the input.  */
+/* Decode the content of memory pointed to by DATA in the in decl
+   state object STATE. DATA_IN points to a data_in structure for
+   decoding. Return the address after the decoded object in the
+   input.  */
 
 static const uint32_t *
 lto_read_in_decl_state (struct data_in *data_in, const uint32_t *data,
Index: ipa-prop.c
===================================================================
--- ipa-prop.c	(revision 172246)
+++ ipa-prop.c	(working copy)
@@ -1515,9 +1515,9 @@
   info->uses_analysis_done = 1;
 }
 
-/* Initialize the array describing properties of of formal parameters of NODE,
-   analyze their uses and and compute jump functions associated with actual
-   arguments of calls from within NODE.  */
+/* Initialize the array describing properties of of formal parameters
+   of NODE, analyze their uses and compute jump functions associated
+   with actual arguments of calls from within NODE.  */
 
 void
 ipa_analyze_node (struct cgraph_node *node)
Index: gimple.c
===================================================================
--- gimple.c	(revision 172246)
+++ gimple.c	(working copy)
@@ -2314,7 +2314,7 @@
 /* Return true if the RHS of statement S has side effects.
    We may use it to determine if it is admissable to replace
    an assignment or call with a copy of a previously-computed
-   value.  In such cases, side-effects due the the LHS are
+   value.  In such cases, side-effects due to the LHS are
    preserved.  */
 
 bool
Index: config/s390/s390.c
===================================================================
--- config/s390/s390.c	(revision 172246)
+++ config/s390/s390.c	(working copy)
@@ -4012,7 +4012,7 @@
 }
 
 /* Try a machine-dependent way of reloading an illegitimate address AD
-   operand.  If we find one, push the reload and and return the new address.
+   operand.  If we find one, push the reload and return the new address.
 
    MODE is the mode of the enclosing MEM.  OPNUM is the operand number
    and TYPE is the reload type of the current reload.  */
Index: config/spu/spu.c
===================================================================
--- config/spu/spu.c	(revision 172246)
+++ config/spu/spu.c	(working copy)
@@ -2662,13 +2662,14 @@
 
 /* The SPU might hang when it executes 48 inline instructions after a
    hinted branch jumps to its hinted target.  The beginning of a
-   function and the return from a call might have been hinted, and must
-   be handled as well.  To prevent a hang we insert 2 hbrps.  The first
-   should be within 6 insns of the branch target.  The second should be
-   within 22 insns of the branch target.  When determining if hbrps are
-   necessary, we look for only 32 inline instructions, because up to to
-   12 nops and 4 hbrps could be inserted.  Similarily, when inserting
-   new hbrps, we insert them within 4 and 16 insns of the target.  */
+   function and the return from a call might have been hinted, and
+   must be handled as well.  To prevent a hang we insert 2 hbrps.  The
+   first should be within 6 insns of the branch target.  The second
+   should be within 22 insns of the branch target.  When determining
+   if hbrps are necessary, we look for only 32 inline instructions,
+   because up to 12 nops and 4 hbrps could be inserted.  Similarily,
+   when inserting new hbrps, we insert them within 4 and 16 insns of
+   the target.  */
 static void
 insert_hbrp (void)
 {
@@ -4370,7 +4371,7 @@
     {
       /* We use the associated declaration to make sure the access is
          referring to the whole object.
-         We check both MEM_EXPR and and SYMBOL_REF_DECL.  I'm not sure
+         We check both MEM_EXPR and SYMBOL_REF_DECL.  I'm not sure
          if it is necessary.  Will there be cases where one exists, and
          the other does not?  Will there be cases where both exist, but
          have different types?  */
Index: config/i386/smmintrin.h
===================================================================
--- config/i386/smmintrin.h	(revision 172246)
+++ config/i386/smmintrin.h	(working copy)
@@ -597,7 +597,7 @@
 #define _SIDD_CMP_EQUAL_EACH		0x08
 #define _SIDD_CMP_EQUAL_ORDERED		0x0c
 
-/* These macros specify the the polarity.  */
+/* These macros specify the polarity.  */
 #define _SIDD_POSITIVE_POLARITY		0x00
 #define _SIDD_NEGATIVE_POLARITY		0x10
 #define _SIDD_MASKED_POSITIVE_POLARITY	0x20
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 172246)
+++ config/i386/i386.c	(working copy)
@@ -16249,7 +16249,7 @@
 }
 
 /* Split 32bit/64bit divmod with 8bit unsigned divmod if dividend and
-   divisor are within the the range [0-255].  */
+   divisor are within the range [0-255].  */
 
 void
 ix86_split_idivmod (enum machine_mode mode, rtx operands[],
@@ -16283,7 +16283,7 @@
 
   scratch = gen_reg_rtx (mode);
 
-  /* Use 8bit unsigned divimod if dividend and divisor are within the
+  /* Use 8bit unsigned divimod if dividend and divisor are within
      the range [0-255].  */
   emit_move_insn (scratch, operands[2]);
   scratch = expand_simple_binop (mode, IOR, scratch, operands[3],
@@ -20984,23 +20984,24 @@
   return ret;
 }
 
-/* Expand string move (memcpy) operation.  Use i386 string operations when
-   profitable.  expand_setmem contains similar code.  The code depends upon
-   architecture, block size and alignment, but always has the same
-   overall structure:
+/* Expand string move (memcpy) operation.  Use i386 string operations
+   when profitable.  expand_setmem contains similar code.  The code
+   depends upon architecture, block size and alignment, but always has
+   the same overall structure:
 
    1) Prologue guard: Conditional that jumps up to epilogues for small
-      blocks that can be handled by epilogue alone.  This is faster but
-      also needed for correctness, since prologue assume the block is larger
-      than the desired alignment.
+      blocks that can be handled by epilogue alone.  This is faster
+      but also needed for correctness, since prologue assume the block
+      is larger than the desired alignment.
 
       Optional dynamic check for size and libcall for large
       blocks is emitted here too, with -minline-stringops-dynamically.
 
-   2) Prologue: copy first few bytes in order to get destination aligned
-      to DESIRED_ALIGN.  It is emitted only when ALIGN is less than
-      DESIRED_ALIGN and and up to DESIRED_ALIGN - ALIGN bytes can be copied.
-      We emit either a jump tree on power of two sized blocks, or a byte loop.
+   2) Prologue: copy first few bytes in order to get destination
+      aligned to DESIRED_ALIGN.  It is emitted only when ALIGN is less
+      than DESIRED_ALIGN and up to DESIRED_ALIGN - ALIGN bytes can be
+      copied.  We emit either a jump tree on power of two sized
+      blocks, or a byte loop.
 
    3) Main body: the copying loop itself, copying in SIZE_NEEDED chunks
       with specified algorithm.
Index: config/sh/sh.c
===================================================================
--- config/sh/sh.c	(revision 172246)
+++ config/sh/sh.c	(working copy)
@@ -9105,7 +9105,7 @@
   return 0;
 }
 
-/* Returns the function vector number, if the the attribute
+/* Returns the function vector number, if the attribute
    'function_vector' is assigned, otherwise returns zero.  */
 int
 sh2a_get_function_vector_number (rtx x)
Index: config/cris/cris.md
===================================================================
--- config/cris/cris.md	(revision 172246)
+++ config/cris/cris.md	(working copy)
@@ -2509,7 +2509,7 @@
 
 ;; The addi insn as it is normally used.
 
-;; Make the the ACR alternative taste bad enough to not choose it as a
+;; Make the ACR alternative taste bad enough to not choose it as a
 ;; preference to avoid spilling problems (unwind-dw2-fde.c at build).
 ;; FIXME: Revisit for new register allocator.
 
Index: config/arm/arm.c
===================================================================
--- config/arm/arm.c	(revision 172246)
+++ config/arm/arm.c	(working copy)
@@ -9505,7 +9505,7 @@
    from that base register.
    REGS is an array filled in with the destination register numbers.
    SAVED_ORDER (if nonnull), is an array filled in with an order that maps
-   insn numbers to to an ascending order of stores.  If CHECK_REGS is true,
+   insn numbers to an ascending order of stores.  If CHECK_REGS is true,
    the sequence of registers in REGS matches the loads from ascending memory
    locations, and the function verifies that the register numbers are
    themselves ascending.  If CHECK_REGS is false, the register numbers
@@ -9653,7 +9653,7 @@
    array filled in with the source register numbers, REG_RTXS (if nonnull) is
    likewise filled with the corresponding rtx's.
    SAVED_ORDER (if nonnull), is an array filled in with an order that maps insn
-   numbers to to an ascending order of stores.
+   numbers to an ascending order of stores.
    If CHECK_REGS is true, the sequence of registers in *REGS matches the stores
    from ascending memory locations, and the function verifies that the register
    numbers are themselves ascending.  If CHECK_REGS is false, the register
@@ -23007,7 +23007,7 @@
 static unsigned arm_insn_count;
 
 /* An emitter that counts emitted instructions but does not actually
-   emit instruction into the the instruction stream.  */
+   emit instruction into the instruction stream.  */
 static void
 arm_count (int label,
 	   const char *pattern ATTRIBUTE_UNUSED,
Index: config/arm/arm.md
===================================================================
--- config/arm/arm.md	(revision 172246)
+++ config/arm/arm.md	(working copy)
@@ -97,7 +97,7 @@
                         ; generate correct unwind information.
   UNSPEC_PIC_OFFSET     ; A symbolic 12-bit OFFSET that has been treated
                         ; correctly for PIC usage.
-  UNSPEC_GOTSYM_OFF     ; The offset of the start of the the GOT from a
+  UNSPEC_GOTSYM_OFF     ; The offset of the start of the GOT from a
                         ; a given symbolic address.
   UNSPEC_THUMB1_CASESI  ; A Thumb1 compressed dispatch-table call.
   UNSPEC_RBIT           ; rbit operation.
Index: config/mips/mips-protos.h
===================================================================
--- config/mips/mips-protos.h	(revision 172246)
+++ config/mips/mips-protos.h	(working copy)
@@ -72,7 +72,7 @@
 
    SYMBOL_GOTOFF_DISP
        An UNSPEC wrapper around a SYMBOL_GOT_DISP.  It represents the
-       the offset from _gp of the symbol's GOT entry.
+       offset from _gp of the symbol's GOT entry.
 
    SYMBOL_GOTOFF_CALL
        Like SYMBOL_GOTOFF_DISP, but used when calling a global function.
Index: config/mips/mips.c
===================================================================
--- config/mips/mips.c	(revision 172246)
+++ config/mips/mips.c	(working copy)
@@ -10783,25 +10783,26 @@
 			       enum machine_mode to ATTRIBUTE_UNUSED,
 			       enum reg_class rclass)
 {
-  /* There are several problems with changing the modes of values
-     in floating-point registers:
+  /* There are several problems with changing the modes of values in
+     floating-point registers:
 
      - When a multi-word value is stored in paired floating-point
-       registers, the first register always holds the low word.
-       We therefore can't allow FPRs to change between single-word
-       and multi-word modes on big-endian targets.
+       registers, the first register always holds the low word.  We
+       therefore can't allow FPRs to change between single-word and
+       multi-word modes on big-endian targets.
 
-     - GCC assumes that each word of a multiword register can be accessed
-       individually using SUBREGs.  This is not true for floating-point
-       registers if they are bigger than a word.
+     - GCC assumes that each word of a multiword register can be
+       accessed individually using SUBREGs.  This is not true for
+       floating-point registers if they are bigger than a word.
 
      - Loading a 32-bit value into a 64-bit floating-point register
-       will not sign-extend the value, despite what LOAD_EXTEND_OP says.
-       We can't allow FPRs to change from SImode to to a wider mode on
-       64-bit targets.
+       will not sign-extend the value, despite what LOAD_EXTEND_OP
+       says.  We can't allow FPRs to change from SImode to a wider
+       mode on 64-bit targets.
 
-     - If the FPU has already interpreted a value in one format, we must
-       not ask it to treat the value as having a different format.
+     - If the FPU has already interpreted a value in one format, we
+       must not ask it to treat the value as having a different
+       format.
 
      We therefore disallow all mode changes involving FPRs.  */
   return reg_classes_intersect_p (FP_REGS, rclass);
Index: lto-streamer.c
===================================================================
--- lto-streamer.c	(revision 172246)
+++ lto-streamer.c	(working copy)
@@ -529,7 +529,7 @@
 
 
 /* Generate a vector of common nodes and make sure they are merged
-   properly according to the the gimple type table.  */
+   properly according to the gimple type table.  */
 
 static VEC(tree,heap) *
 lto_get_common_nodes (void)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: doubled words
  2011-04-10 11:55 doubled words Jim Meyering
                   ` (2 preceding siblings ...)
  2011-04-10 19:07 ` Mike Stump
@ 2011-04-10 19:28 ` Joseph S. Myers
  2011-04-10 19:34 ` Joseph S. Myers
  4 siblings, 0 replies; 10+ messages in thread
From: Joseph S. Myers @ 2011-04-10 19:28 UTC (permalink / raw)
  To: Jim Meyering; +Cc: gcc-patches

On Sun, 10 Apr 2011, Jim Meyering wrote:

> I would be inclined to prepare a patch if I thought it would
> be applied (promptly?), but I submitted a clear/simple fix for
> an obvious double-free bug (albeit only in a test case) a month ago:
> 
> 	http://patchwork.ozlabs.org/patch/85973/
> 	avoid memory overrun in a test leading to potential double-free
> 	* testsuite/test-expandargv.c (writeout_test): Fix off-by-one error:
> 	i.e., do copy the trailing NUL byte.
> 
> AFAIK, it hasn't been applied.  If a "real" bug has such low priority,
> this is not a good time to submit a clean-up change.

Please ping unreviewed (or approved but not committed) patches at least 
weekly, as many times as needed.  If a patch isn't reviewed within a week, 
it's unlikely to be reviewed without a ping.  (Actually I suspect the vast 
bulk of reviews are within two or three days.)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: doubled words
  2011-04-10 11:55 doubled words Jim Meyering
                   ` (3 preceding siblings ...)
  2011-04-10 19:28 ` Joseph S. Myers
@ 2011-04-10 19:34 ` Joseph S. Myers
  4 siblings, 0 replies; 10+ messages in thread
From: Joseph S. Myers @ 2011-04-10 19:34 UTC (permalink / raw)
  To: Jim Meyering; +Cc: gcc-patches

On Sun, 10 Apr 2011, Jim Meyering wrote:

> boehm-gc/configure.host:5:the the
> boehm-gc/doc/README:123:to to
> boehm-gc/misc.c:212:to to
> boehm-gc/os_dep.c:4010:to to

Maintained externally and the GCC copy is very out-of-date.  Send patches 
to upstream boehm-gc instead.

> libdecnumber/decCommon.c:391:the the

Maintained externally, though I'm not sure by whom.

> libffi/README:105:the the
> libffi/src/dlmalloc.c:103:if if
> libffi/src/dlmalloc.c:1616:the the
> libffi/src/dlmalloc.c:3436:or\n       or

Maintained externally at least to some extent (there is a separate master 
repository).

> libgo/config/ltmain.sh:570:and and
> libgo/go/go/printer/nodes.go:273:the the
> libgo/go/math/remainder.go:7:the the
> libgo/go/regexp/regexp.go:712:to to
> libgo/go/runtime/extern.go:23:the the
> libgo/go/tabwriter/tabwriter.go:582:the the

Maintained externally.

> libiberty/regex.c:5434:the\n   the

Based on glibc, though I'm not sure this implementation is still used 
there and if it is I don't think we really merge from glibc as upstream.

> libjava/classpath/external/w3c_dom/org/w3c/dom/Document.java:263:the the

All of Classpath is maintained externally.

> libstdc++-v3/doc/html/ext/lwg-closed.html:2966:the the
> libstdc++-v3/doc/html/ext/lwg-closed.html:7942:the the
> libstdc++-v3/doc/html/ext/lwg-closed.html:10676:the the
> libstdc++-v3/doc/html/ext/lwg-defects.html:4763:the the
> libstdc++-v3/doc/html/ext/lwg-defects.html:12751:the the
> libstdc++-v3/doc/html/ext/lwg-defects.html:13413:the the
> libstdc++-v3/doc/html/ext/lwg-defects.html:19629:the the
> libstdc++-v3/doc/html/ext/lwg-defects.html:24715:the the
> libstdc++-v3/doc/html/ext/lwg-defects.html:41449:the the
> libstdc++-v3/doc/html/ext/lwg-defects.html:46044:the the
> libstdc++-v3/doc/html/ext/lwg-defects.html:70907:the the
> libstdc++-v3/doc/html/ext/lwg-defects.html:72274:the the
> libstdc++-v3/doc/html/ext/lwg-defects.html:79177:the the

Maintained externally.

> ltmain.sh:570:and and

Maintained externally.

> zlib/contrib/asm586/README.586:8:the the
> zlib/contrib/minizip/unzip.c:407:the the
> zlib/contrib/minizip/zip.c:552:the the
> zlib/contrib/minizip/zip.h:154:the the
> zlib/contrib/minizip/zip.h:156:the the
> zlib/contrib/puff/puff.c:20:to to
> zlib/deflate.c:166:to to
> zlib/deflate.c:179:to to
> zlib/old/visual-basic.txt:118:the the

Maintained externally.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: doubled words
  2011-04-10 19:07 ` Mike Stump
@ 2011-04-10 20:42   ` Jim Meyering
  0 siblings, 0 replies; 10+ messages in thread
From: Jim Meyering @ 2011-04-10 20:42 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc-patches

Mike Stump wrote:
> On Apr 10, 2011, at 4:54 AM, Jim Meyering wrote:
>> I've noticed/fixed a few occurrences of doubled words like "the the",
>
> I've fixed the obviously wrong ones in gcc/.* excluding ada and go.  I
> don't hate Ada and go, since I don't pretend to keep up on rules to
> their parts of the tree.  I did do java, but only gcc/java, as I think
> we still can put in obvious work there.  One or more of the ones you
> listed were spurious, I didn't change those.
>
> I'm skipping everything not gcc/.*, as I don't keep up on the various
> rules.  One disadvantage of having a multiplicity of rules.  :-(
> Longer term, would be nice to remove some of the multiplicity of
> rules.
>
> I also re-flowed a few of these to make them prettier and fixed the
> English on a few.

Thanks for the quick work.
I realized that I'd omitted a few short, common words
and have added "in", "on", "at" and "for".
Running this revised command shows a few new ones,
at least one is in a diagnostic, which means it shows up
also in each of the .po files.

git ls-files .|xargs perl -0777 -n \
  -e 'while (/\b(then?|in|on|if|at|but|f?or|and|to)\s+\1\b/gms)' \
  -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g; print "$ARGV:$n:$v\n"}'

Here are a few fixes:

diff --git a/gcc/config/alpha/vms-unwind.h b/gcc/config/alpha/vms-unwind.h
index ea2c3a3..71cb7b8 100644
--- a/gcc/config/alpha/vms-unwind.h
+++ b/gcc/config/alpha/vms-unwind.h
@@ -1,5 +1,5 @@
 /* Fallback frame unwinding for Alpha/VMS.
-   Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2009, 2010
+   Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2009, 2010, 2011
    Free Software Foundation, Inc.

    This file is part of GCC.
@@ -229,7 +229,7 @@ alpha_vms_fallback_frame_state (struct _Unwind_Context *context,

   /* If PV designates an exception dispatcher, we have to adjust the return
      address column to get at the signal occurrence point, and account for
-     for what the CHF context contains.  */
+     what the CHF context contains.  */

   if (DENOTES_EXC_DISPATCHER (pv))
     {
diff --git a/gcc/config/arm/unwind-arm.h b/gcc/config/arm/unwind-arm.h
index a9ba126..1a51d8d 100644
--- a/gcc/config/arm/unwind-arm.h
+++ b/gcc/config/arm/unwind-arm.h
@@ -1,5 +1,5 @@
 /* Header file for the ARM EABI unwinder
-   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011
    Free Software Foundation, Inc.
    Contributed by Paul Brook

@@ -65,7 +65,7 @@ extern "C" {
     }
   _Unwind_State;

-  /* Provided only for for compatibility with existing code.  */
+  /* Provided only for compatibility with existing code.  */
   typedef int _Unwind_Action;
 #define _UA_SEARCH_PHASE	1
 #define _UA_CLEANUP_PHASE	2
diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
index 6ea5fa2..5796bc7 100644
--- a/gcc/config/microblaze/microblaze.c
+++ b/gcc/config/microblaze/microblaze.c
@@ -919,7 +919,7 @@ microblaze_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *tot
 	  {
 	    /* Add 1 to make shift slightly more expensive than add.  */
 	    *total = COSTS_N_INSNS (INTVAL (XEXP (x, 1))) + 1;
-	    /* Reduce shift costs for for special circumstances.  */
+	    /* Reduce shift costs for special circumstances.  */
 	    if (optimize_size && INTVAL (XEXP (x, 1)) > 5)
 	      *total -= 2;
 	    if (!optimize_size && INTVAL (XEXP (x, 1)) > 17)
diff --git a/gcc/config/sh/constraints.md b/gcc/config/sh/constraints.md
index 6b0e5d2..40d0d0b 100644
--- a/gcc/config/sh/constraints.md
+++ b/gcc/config/sh/constraints.md
@@ -1,5 +1,5 @@
 ;; Constraint definitions for Renesas / SuperH SH.
-;; Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc.
 ;;
 ;; This file is part of GCC.
 ;;
@@ -99,7 +99,7 @@
        (match_test "ival >= -128 && ival <= 127")))

 (define_constraint "I10"
-  "A signed 10-bit constant, as used in in SHmedia andi, ori."
+  "A signed 10-bit constant, as used in SHmedia andi, ori."
   (and (match_code "const_int")
        (match_test "ival >= -512 && ival <= 511")))

diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 86274e9..e055d7d 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -13979,7 +13979,7 @@ type_unification_real (tree tparms,
   gcc_assert (ntparms > 0);

   /* Reset the number of non-defaulted template arguments contained
-     in in TARGS.  */
+     in TARGS.  */
   NON_DEFAULT_TEMPLATE_ARGS_COUNT (targs) = NULL_TREE;

   switch (strict)
diff --git a/gcc/go/gofrontend/backend.h b/gcc/go/gofrontend/backend.h
index 01f3cfa..d112d1f 100644
--- a/gcc/go/gofrontend/backend.h
+++ b/gcc/go/gofrontend/backend.h
@@ -148,7 +148,7 @@ class Backend
   
   // Create a new label.  NAME will be empty if this is a label
   // created by the frontend for a loop construct.  The location is
-  // where the the label is defined.
+  // where the label is defined.
   virtual Blabel*
   label(Bfunction*, const std::string& name, source_location) = 0;

diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index feeddad..a56c1b7 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -1,6 +1,6 @@
 /* Parser for Java(TM) .class files.
    Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.

 This file is part of GCC.

@@ -368,7 +368,7 @@ set_source_filename (JCF *jcf, int index)
    from the input class file into the output file.  We don't decode the
    data at all, merely rewriting constant indexes whenever we come
    across them: this is necessary because the constant pool in the
-   output file isn't the same as the constant pool in in the input.
+   output file isn't the same as the constant pool in the input.

    The main advantage of this technique is that the resulting
    annotation data is pointer-free, so it doesn't have to be relocated
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index fc8c940..3df4dcc 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -1,6 +1,6 @@
 /* Control flow functions for trees.
    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-   2010  Free Software Foundation, Inc.
+   2010, 2011  Free Software Foundation, Inc.
    Contributed by Diego Novillo <dnovillo@redhat.com>

 This file is part of GCC.
@@ -2989,7 +2989,7 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
       if (!TMR_BASE (expr)
 	  || !is_gimple_mem_ref_addr (TMR_BASE (expr)))
 	{
-	  error ("invalid address operand in in TARGET_MEM_REF");
+	  error ("invalid address operand in TARGET_MEM_REF");
 	  return true;
 	}
       if (!TMR_OFFSET (expr)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: doubled words
  2011-04-10 18:01 ` Mike Stump
@ 2011-04-10 21:07   ` Jim Meyering
  2011-04-23  7:48     ` Mike Stump
  0 siblings, 1 reply; 10+ messages in thread
From: Jim Meyering @ 2011-04-10 21:07 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc-patches

Mike Stump wrote:
> On Apr 10, 2011, at 4:54 AM, Jim Meyering wrote:
>> I've noticed/fixed a few occurrences of doubled words like "the the",
>> "to to"
>
> I fixed all the non-surious matches in the gcc/testsuite.  if if in
> the fortran testsuite was the major spurious match.  Thanks.

Thanks.
Yet more: "an" and "it".
At least the first one in the .texi file is legit.

$ git ls-files .|xargs perl -0777 -n -e 'while (/\b(it)\s+\1\b/gms)' -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g; print "$ARGV:$n:$v\n"}'|grep -v ChangeLog
gcc/ada/gnat_ugn.texi:12636:it\nit
gcc/config/cris/cris.opt:152:it it
gcc/gensupport.c:1066:it\n     it
gcc/testsuite/ada/acats/tests/cxg/cxg2014.a:263:it it
libiberty/regex.c:4085:it\n                 it
libjava/classpath/java/io/ByteArrayOutputStream.java:61:it it
libjava/classpath/java/io/CharArrayWriter.java:58:it it
libjava/classpath/org/omg/CORBA_2_3/portable/OutputStream.java:75:it it
libstdc++-v3/doc/html/ext/lwg-defects.html:9102:it it
libstdc++-v3/testsuite/data/thirty_years_among_the_dead_preproc.txt:73079:it\nit
libstdc++-v3/testsuite/data/thirty_years_among_the_dead_preproc.txt:171737:it\nit


$ git ls-files .|xargs perl -0777 -n -e 'while (/\b(an)\s+\1\b/gms)' -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g; print "$ARGV:$n:$v\n"}'|grep -v ChangeLog
gcc/fortran/frontend-passes.c:213:an an
libffi/src/dlmalloc.c:1822:an an
libjava/classpath/gnu/CORBA/CDR/AbstractCdrOutput.java:877:an an
libjava/classpath/gnu/javax/crypto/jce/params/BlockCipherParameters.java:78:an an
libjava/classpath/org/omg/CORBA/CompletionStatusHelper.java:93:an an

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: doubled words
  2011-04-10 21:07   ` Jim Meyering
@ 2011-04-23  7:48     ` Mike Stump
  2011-04-23  9:08       ` Jim Meyering
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Stump @ 2011-04-23  7:48 UTC (permalink / raw)
  To: Jim Meyering; +Cc: gcc-patches

On Apr 10, 2011, at 2:07 PM, Jim Meyering wrote:
> $ git ls-files .|xargs perl -0777 -n -e 'while (/\b(it)\s+\1\b/gms)' -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g; print "$ARGV:$n:$v\n"}'|grep -v ChangeLog
> gcc/config/cris/cris.opt:152:it it
> gcc/gensupport.c:1066:it\n     it

These are obvious to me, so I checked in fixes for them.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: doubled words
  2011-04-23  7:48     ` Mike Stump
@ 2011-04-23  9:08       ` Jim Meyering
  0 siblings, 0 replies; 10+ messages in thread
From: Jim Meyering @ 2011-04-23  9:08 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc-patches

Mike Stump wrote:
> On Apr 10, 2011, at 2:07 PM, Jim Meyering wrote:
>> $ git ls-files .|xargs perl -0777 -n -e 'while (/\b(it)\s+\1\b/gms)'
>> -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g; print
>> "$ARGV:$n:$v\n"}'|grep -v ChangeLog
>> gcc/config/cris/cris.opt:152:it it
>> gcc/gensupport.c:1066:it\n     it
>
> These are obvious to me, so I checked in fixes for them.

Likewise for this:

  gcc/ada/gnat_ugn.texi:12636:it\nit


From 9eeae941081b3d6a0dd2c7db2b4752a3f04b1541 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sat, 23 Apr 2011 08:47:04 +0200
Subject: [PATCH] * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it
 it/it is/

---
 gcc/ada/ChangeLog     |    4 ++++
 gcc/ada/gnat_ugn.texi |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 70df175..f6e705e 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2011-04-23  Jim Meyering  <meyering@redhat.com>
+
+	* gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
+
 2011-04-22  Eric Botcazou  <ebotcazou@adacore.com>

 	* gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index d843106..463662a 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -12634,7 +12634,7 @@ that is the entity @code{Main} is declared in main.ads, line 2, column 9,
 its body is in main.adb, line 1, column 14 and is not referenced any where.

 The entity @code{Print} is declared in bar.ads, line 2, column 15 and it
-it referenced in main.adb, line 6 column 12 and line 7 column 12.
+is referenced in main.adb, line 6 column 12 and line 7 column 12.

 @item gnatxref package1.adb package2.ads
 @code{gnatxref} will generates cross-reference information for
--
1.7.5.rc3.291.g63e4e

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-04-23  6:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-10 11:55 doubled words Jim Meyering
2011-04-10 18:01 ` Mike Stump
2011-04-10 21:07   ` Jim Meyering
2011-04-23  7:48     ` Mike Stump
2011-04-23  9:08       ` Jim Meyering
2011-04-10 18:21 ` Mike Stump
2011-04-10 19:07 ` Mike Stump
2011-04-10 20:42   ` Jim Meyering
2011-04-10 19:28 ` Joseph S. Myers
2011-04-10 19:34 ` Joseph S. Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).