Fix init_sync_libfuncs_1 iteration.
authorRichard Henderson <rth@redhat.com>
Sun, 27 Nov 2011 00:06:16 +0000 (16:06 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 27 Nov 2011 00:06:16 +0000 (16:06 -0800)
        * optabs.c (init_sync_libfuncs_1): Include max in iteration.

From-SVN: r181749

gcc/ChangeLog
gcc/optabs.c

index 5d304c89026327da074000b1a7db4ea8e1fd79a4..41b3b9b4d4099b737cdcf012a02f191af11b4f23 100644 (file)
@@ -1,5 +1,7 @@
 2011-11-26  Richard Henderson  <rth@redhat.com>
 
+       * optabs.c (init_sync_libfuncs_1): Include max in iteration.
+
        * omp-low.c (expand_omp_atomic): Assume anything aligned to
        BIGGEST_ALIGNMENT is aligned.
 
index 1aafd28b5bec7187eab90714988a71da5c8fc05b..0ce21e9b548550a32c82f606df5a4fec4c807d49 100644 (file)
@@ -6606,7 +6606,7 @@ init_sync_libfuncs_1 (optab tab, const char *base, int max)
   buf[len + 2] = '\0';
 
   mode = QImode;
-  for (i = 1; i < max; i *= 2)
+  for (i = 1; i <= max; i *= 2)
     {
       buf[len + 1] = '0' + i;
       set_optab_libfunc (tab, mode, buf);